/* Components. Colours come only from brand.css tokens. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 21px;
  line-height: 1.5;
  -webkit-text-stroke: 0.25px currentColor; /* thickens the hand font slightly so it reads dark */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); background: var(--butter); }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 .4em;
  -webkit-text-stroke: 0.6px var(--ink);
}
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(32px, 4.2vw, 44px); }
h3 { font-size: 27px; }
h4 { font-size: 23px; }
p { margin: 0 0 1em; }

/* One key word per heading on a butter highlighter strip */
mark {
  color: inherit;
  background: linear-gradient(transparent 14%, var(--butter) 14%, var(--butter) 90%, transparent 90%);
  padding: 0 .12em;
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--butter); padding: 8px 14px; border: var(--line) solid var(--ink); z-index: 99; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 800px; }

/* ---------- Header ---------- */
.topbar { background: var(--page); border-bottom: var(--line) solid var(--ink); position: sticky; top: 0; z-index: 20; }
.topbar__in { display: flex; align-items: center; gap: 20px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { background: none; }
.brand__mark { flex: none; width: 50px; height: 50px; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-family: var(--font-head); font-size: 26px; line-height: 1.05; -webkit-text-stroke: .6px var(--ink); }
.brand__title { font-family: var(--font-head); font-size: 17px; line-height: 1.2; color: var(--small); -webkit-text-stroke: .3px var(--small); }
.brand__sep { opacity: .5; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { font-family: var(--font-head); font-size: 20px; text-decoration: none; padding: 6px 10px; border-radius: var(--radius-sm); border: 2px solid transparent; }
.nav a:hover { background: var(--main); }
.nav a[aria-current="page"] { border-color: var(--ink); background: var(--main); }
.nav .nav__cta { background: var(--butter); border: var(--line) solid var(--ink); box-shadow: var(--shadow-sm); margin-left: 6px; }
.nav .nav__cta:hover { background: var(--butter); transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.navtoggle { display: none; margin-left: auto; font-family: var(--font-head); font-size: 20px; background: var(--butter); color: var(--ink); border: var(--line) solid var(--ink); border-radius: var(--radius-sm); padding: 6px 14px; box-shadow: var(--shadow-sm); cursor: pointer; }

@media (max-width: 1120px) {
  .navtoggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--page); border-bottom: var(--line) solid var(--ink); flex-direction: column; align-items: stretch; padding: 10px 24px 18px; gap: 2px; }
  .nav.is-open { display: flex; }
  .nav a { font-size: 22px; padding: 10px 12px; }
  .nav .nav__cta { margin: 8px 0 0; text-align: center; }
  .topbar { position: sticky; }
  .topbar__in { position: static; }
}
@media (max-width: 560px) {
  .brand__mark { width: 42px; height: 42px; }
  .brand__name { font-size: 22px; }
  .brand__title { font-size: 15px; }
  .topbar__in { min-height: 72px; gap: 10px; }
  .navtoggle { font-size: 18px; padding: 5px 10px; }
}

/* ---------- Sections ---------- */
.section { padding: 76px 0; position: relative; }
.section--tint { background: var(--tint); border-top: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink); }
.section--main { background: var(--main); border-top: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink); }
.section--tight { padding: 48px 0; }
.section__head { max-width: 780px; margin-bottom: 36px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { font-family: var(--font-head); font-size: 21px; color: var(--small); margin-bottom: 8px; }
.eyebrow a { text-decoration: none; }
.lede { font-size: 24px; color: var(--small); }
.note { font-size: 18px; color: var(--small); border: 2px dashed var(--ink); border-radius: var(--radius-sm); padding: 12px 16px; margin: 24px 0; background: var(--page); }

/* ---------- Hero ---------- */
.hero { background: var(--main); border-bottom: var(--line) solid var(--ink); position: relative; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: end; min-height: 560px; }
.hero__copy { padding: 56px 0 64px; position: relative; z-index: 2; align-self: center; }
.hero__copy .lede { color: var(--body); max-width: 540px; }
.hero__photo { position: relative; z-index: 1; align-self: end; justify-self: center; width: min(100%, 470px); }
.hero__photo img { width: 100%; }
.hero--short .hero__in { min-height: 0; grid-template-columns: 1fr; }
.hero--short .hero__copy { padding: 56px 0 60px; max-width: 820px; }
.hero--compact .hero__copy { padding: 30px 0 32px; }
.hero--compact h1 { margin-bottom: .2em; }
.hero--compact .lede { margin-bottom: 0; font-size: 21px; }
.section--calc { padding-top: 40px; }
.blob { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.blob--fill { background: var(--second); }
.blob--ring { border: 16px solid var(--butter); }
.blob--soft { background: var(--page); opacity: .45; }
.hero-who { margin-top: 26px; font-family: var(--font-head); font-size: 20px; color: var(--ink); line-height: 1.3; }

@media (max-width: 860px) {
  .blob--ring, .blob--soft { display: none; }
  .hero__in { grid-template-columns: 1fr; min-height: 0; }
  .hero__copy { padding: 44px 0 8px; }
  .hero__photo { width: min(78%, 360px); }
}

/* ---------- Home chooser: Buy / Sell / Invest / Calculator ---------- */
.chooser { margin-top: 26px; }
.chooser__q { font-family: var(--font-head); font-size: 23px; color: var(--ink); margin: 0 0 10px; -webkit-text-stroke: .4px var(--ink); }
.chooser__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; }
.opt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-head); font-size: 23px; line-height: 1.15; color: var(--ink);
  background: #fff; border: var(--line) solid var(--ink); border-radius: 10px; padding: 10px 18px; box-shadow: var(--shadow-sm);
  text-decoration: none; cursor: pointer; transition: transform .08s, box-shadow .08s; -webkit-text-stroke: .4px var(--ink); }
.opt:hover { background: #fff; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.opt[aria-expanded="true"], .opt[aria-expanded="true"]:hover { background: var(--butter); }
/* Buy -> "What kind of home?" big pop-up over a blurred page */
.choose-dlg { width: min(580px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto; margin: auto; padding: 26px 26px 22px; color: var(--body); background: #fff; border: var(--line) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.choose-dlg::backdrop { background: rgba(31, 45, 58, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.choose-dlg[open] { animation: dlg-in .18s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .choose-dlg[open] { animation: none; } }
html:has(.choose-dlg[open]) { overflow: hidden; }
.choose-dlg h2 { font-size: 34px; margin: 2px 0 18px; }
.choose-dlg__close { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; font-size: 20px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 9px; cursor: pointer; }
.choose-dlg__close:hover { background: var(--tint); }
.choose-dlg__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .choose-dlg { padding: 22px 18px 18px; } .choose-dlg h2 { font-size: 28px; } .choose-dlg__opts { grid-template-columns: 1fr; gap: 12px; } }
.choice { display: grid; gap: 4px; align-content: start; color: var(--ink); text-decoration: none; background: var(--main); border: var(--line) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 16px 16px 14px; transition: transform .1s, box-shadow .1s; }
.choice:hover { background: var(--main); }
@media (hover: hover) { .choice:hover { background: var(--butter); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); } }
.choice:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }
.choice__emoji { font-size: 34px; line-height: 1; }
.choice__title { font-family: var(--font-head); font-size: 27px; -webkit-text-stroke: .4px var(--ink); }
.choice__note { font-size: 17px; line-height: 1.35; color: var(--small); }
.choose-dlg__alt { margin: 18px 0 0; font-size: 18px; color: var(--small); }
.chooser__alt { margin: 16px 0 0; font-size: 19px; color: var(--small); }
@media (max-width: 560px) {
  .chooser__opts { gap: 10px; }
  .opt { font-size: 20px; padding: 10px 8px; }
}

/* ---------- Buttons, chips ---------- */
.btnrow { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.btn {
  display: inline-block; font-family: var(--font-head); font-size: 22px; line-height: 1.2;
  color: var(--ink); background: var(--page); text-decoration: none;
  padding: 11px 22px; border: var(--line) solid var(--ink); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); transition: transform .08s, box-shadow .08s; cursor: pointer;
  -webkit-text-stroke: .4px var(--ink);
}
.btn:hover { background: var(--page); transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--main, .btn--main:hover { background: var(--butter); }
.chip { display: inline-block; font-family: var(--font-head); font-size: 18px; background: var(--butter); border: 2px solid var(--ink); border-radius: 6px; padding: 1px 10px; color: var(--ink); }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 28px; }
.grid--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.card {
  background: #fff; border: var(--line) solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 24px 20px; position: relative;
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card--main { background: var(--main); }
.card--second { background: var(--second); }
.card--link { display: block; text-decoration: none; color: var(--body); transition: transform .1s, box-shadow .1s; }
.card--link:hover { background: #fff; transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }
.card__emoji { font-size: 34px; line-height: 1; display: block; margin-bottom: 10px; -webkit-text-stroke: 0; }
.card__date { font-size: 17px; color: var(--small); margin-bottom: 4px; }
.card__go { font-family: var(--font-head); font-size: 19px; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.emoji { -webkit-text-stroke: 0; }

/* Numbered steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); counter-reset: step; }
.steps li { counter-increment: step; background: #fff; border: var(--line) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 18px 84px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 20px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--main); border: var(--line) solid var(--ink); display: grid; place-items: center;
  font-family: var(--font-head); font-size: 26px; color: var(--ink);
}
.steps h3 { font-size: 25px; margin-bottom: 6px; }
.steps p { margin: 0; }

/* Sticky-note tip */
.tip { background: var(--second); border: var(--line) solid var(--ink); border-radius: 6px; padding: 26px 24px 18px; position: relative; transform: rotate(-1deg); box-shadow: var(--shadow-sm); max-width: 640px; margin: 36px auto 8px; }
.tip::before { content: ""; position: absolute; top: -14px; left: 50%; width: 120px; height: 26px; transform: translateX(-50%) rotate(2deg); background: var(--butter); border: 2px solid var(--ink); opacity: .95; }
.tip strong { font-family: var(--font-head); font-weight: 400; font-size: 23px; color: var(--ink); display: block; margin-bottom: 4px; }
.tip p:last-child { margin: 0; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* Check list */
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 38px; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 22px; height: 22px; background: var(--main); border: 2px solid var(--ink); border-radius: 5px; }
.checks li::after { content: ""; position: absolute; left: 9px; top: 9px; width: 7px; height: 12px; border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }

/* ---------- Ledger (worked numbers) ---------- */
.ledger { background: #fff; border: var(--line) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 24px 14px; }
.ledger__title { font-family: var(--font-head); font-size: 23px; color: var(--ink); margin: 0 0 6px; }
.ledger table { width: 100%; border-collapse: collapse; font-size: 20px; }
.ledger td { padding: 9px 0; border-bottom: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent); vertical-align: top; }
.ledger td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-variant-numeric: tabular-nums; }
.ledger tr.minus td:last-child { color: var(--ink); }
.ledger tr.total td { border-bottom: 0; border-top: var(--line) solid var(--ink); font-family: var(--font-head); font-size: 25px; color: var(--ink); padding-top: 12px; }
.ledger tr.total td:last-child span { background: var(--butter); padding: 0 6px; border: 2px solid var(--ink); border-radius: 6px; }
.ledger small { display: block; font-size: 16px; color: var(--small); }
.ledger__foot { font-size: 16px; color: var(--small); margin: 10px 0 0; }

/* ---------- Calculators and forms ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label, .field .label { display: block; font-family: var(--font-head); font-size: 21px; color: var(--ink); margin-bottom: 6px; }
.field small { display: block; font-size: 16px; color: var(--small); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; font-family: var(--font-body); font-size: 22px; color: var(--body); background: #fff;
  border: var(--line) solid var(--ink); border-radius: var(--radius-sm); padding: 9px 12px; -webkit-text-stroke: .2px currentColor;
}
textarea.input { min-height: 140px; resize: vertical; }
.input:focus { outline: 4px solid var(--butter); outline-offset: 0; }
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--small); }
.money .input { padding-left: 28px; }
.pct { position: relative; }
.pct::after { content: "%"; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--small); }
.prepay-sum { background: var(--butter); border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 18px; line-height: 1.4; }
.prepay-sum strong { font-family: var(--font-head); font-weight: 400; font-size: 22px; color: var(--ink); }
.prepay-sum p { margin: 0; }
.prepay-sum p + p { margin-top: 6px; }
.pay-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pay-extra { font-size: 22px; line-height: 1.2; background: var(--butter); border: 2px solid var(--ink); border-radius: 8px; padding: 3px 10px; -webkit-text-stroke: .3px var(--ink); }
.pay-total { display: inline-block; margin-top: 2px; background: var(--butter); border: 2px solid var(--ink); border-radius: 6px; padding: 1px 8px; font-family: var(--font-head); font-size: 19px; color: var(--ink); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.suggest button { font-family: var(--font-body); font-size: 18px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 3px 12px; cursor: pointer; -webkit-text-stroke: .2px var(--ink); }
.suggest button:hover { background: var(--tint); }
.suggest button[aria-pressed="true"] { background: var(--main); box-shadow: 3px 3px 0 var(--ink); }
.field-error { margin: 8px 0 0; background: var(--butter); border: 2px solid var(--ink); border-radius: 6px; padding: 6px 10px; font-size: 17px; line-height: 1.35; color: var(--ink); }
.field-error::before { content: "⚠️ "; -webkit-text-stroke: 0; }
.input[aria-invalid="true"] { border-style: dashed; background: var(--butter); }
.suggest-pct { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 0 10px 0 8px; font-size: 18px; color: var(--ink); cursor: text; }
.suggest-pct input { width: 52px; border: 0; background: transparent; font-family: var(--font-body); font-size: 18px; color: var(--ink); padding: 3px 0; text-align: right; -webkit-text-stroke: .2px var(--ink); }
.suggest-pct input::placeholder { color: var(--small); opacity: .8; }
.suggest-pct input:focus { outline: none; }
.suggest-pct:focus-within { outline: 3px solid var(--butter); }
.suggest-pct.is-on { background: var(--main); box-shadow: 3px 3px 0 var(--ink); }
.toggle--sm span { font-size: 18px; padding: 4px 11px; }
.ledger .cmp--pick tr[data-freq] { cursor: pointer; }
@media (hover: hover) { .ledger .cmp--pick tr[data-freq]:hover td { background: var(--tint); } }
.ledger .cmp--pick tr.is-current td { font-family: var(--font-head); color: var(--ink); }
.ledger .cmp--pick tr.is-current td:first-child::before { content: "▸ "; }
.unit { position: relative; }
.unit::after { content: attr(data-unit); position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--small); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.toggle { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle label { font-family: var(--font-body); font-size: 20px; margin: 0; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle span { display: inline-block; padding: 6px 14px; border: var(--line) solid var(--ink); border-radius: var(--radius-sm); background: #fff; }
.toggle input:checked + span { background: var(--main); box-shadow: var(--shadow-sm); }
.toggle input:focus-visible + span { outline: 4px solid var(--ink); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 19px; margin-bottom: 14px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.big-num { font-family: var(--font-head); font-size: clamp(36px, 8.5vw, 50px); color: var(--ink); line-height: 1; margin: 4px 0 6px; -webkit-text-stroke: .8px var(--ink); }
.result-label { font-family: var(--font-head); font-size: 21px; color: var(--small); margin: 0; }
.warn { background: var(--butter); border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 18px; margin: 12px 0; }
/* Calculator grid: inputs on top, each result under its inputs, closing cash across the bottom */
.calcgrid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "price prepay" "pay save" "sum sum" "cash month"; }
.area-sum { grid-area: sum; }
.area-price { grid-area: price; } .area-prepay { grid-area: prepay; } .area-pay { grid-area: pay; } .area-save { grid-area: save; } .area-cash { grid-area: cash; } .area-month { grid-area: month; }
.area-pay, .area-save { scroll-margin-top: 100px; }
@media (max-width: 900px) {
  .calcgrid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "price" "pay" "prepay" "save" "sum" "cash" "month"; }
}
.block-title { font-size: 30px; margin-bottom: 16px; }
.result--save { background: var(--second); }
/* Mortgage summary: term vs whole mortgage, charts, report button */
.sum-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px 28px; }
.sum-head .block-title { margin-bottom: 10px; }
.sum-term { max-width: 340px; margin-bottom: 18px; }
.sum-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 30px; margin-top: 8px; }
@media (max-width: 900px) { .sum-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.ledger .cmp th small { display: block; font-family: var(--font-body); font-size: 15px; }
.ledger .cmp tr.is-total td { font-family: var(--font-head); color: var(--ink); }
.sum-text p { font-size: 18px; line-height: 1.45; margin: 12px 0 0; }
.sum-report { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; padding-top: 18px; border-top: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent); }
.sum-report .ledger__foot { flex: 1 1 220px; }
.chart { margin: 0 0 20px; }
.chart figcaption { font-family: var(--font-head); font-size: 21px; color: var(--ink); margin-bottom: 6px; }
.chart__svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__svg text { font-family: var(--font-body); font-size: 17px; fill: var(--small); }
.chart__svg .c-label { font-family: var(--font-head); fill: var(--ink); }
@media (max-width: 480px) { .chart__svg text { font-size: 20px; } }
.chart__svg .c-grid { stroke: color-mix(in srgb, var(--ink) 16%, transparent); stroke-width: 1.5; }
.chart__svg .c-axis { stroke: var(--ink); stroke-width: 3; }
.chart__svg .c-reg { fill: var(--main); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.chart__svg .c-plan { fill: var(--butter); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.chart__svg .c-term { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 5; }
.chart__svg .c-dot { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 17px; color: var(--small); margin: 8px 0 0; }
.sw { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.sw--reg { background: var(--main); } .sw--plan { background: var(--butter); } .sw--int { background: var(--second); }
.psplit { display: grid; gap: 14px; }
.psplit__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 18px; }
.psplit__val { font-family: var(--font-head); color: var(--ink); }
.psplit__track { grid-column: 1 / -1; display: flex; height: 26px; background: #fff; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.psplit__p { background: var(--main); }
.psplit__i { background: var(--second); border-left: 2px solid var(--ink); }
.psplit__note { grid-column: 1 / -1; font-size: 15.5px; color: var(--small); }
.bars { display: grid; gap: 14px; margin: 4px 0 8px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 18px; }
.bar__val { font-family: var(--font-head); color: var(--ink); }
.bar__track { grid-column: 1 / -1; height: 24px; background: #fff; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.bar__fill { display: block; height: 100%; background: var(--main); border-right: 2px solid var(--ink); transition: width .25s; }
.bar__fill--fast { background: var(--butter); }
.cash-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.result--month { box-shadow: var(--shadow-sm); }
.per { font-size: 18px; -webkit-text-stroke: 0; color: var(--small); }
.exp-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 4px 14px; align-items: center; padding: 9px 0; border-bottom: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent); }
.exp-row small { display: block; font-size: 15.5px; color: var(--small); line-height: 1.3; }
.exp-label { font-size: 20px; }
.exp-val { text-align: right; font-size: 20px; font-variant-numeric: tabular-nums; }
.exp-suggest { grid-column: 1 / -1; margin: 2px 0 0; }
.exp-row--total { border-bottom: 0; border-top: var(--line) solid var(--ink); font-family: var(--font-head); font-size: 24px; color: var(--ink); margin-top: 2px; padding-top: 12px; }
.exp-row--total span:last-child { text-align: right; }
.exp-row--prepay { border: 0; padding-top: 4px; }
.exp-row--prepay > span:last-child { text-align: right; font-family: var(--font-head); font-size: 20px; color: var(--ink); }
.money--sm::before { font-size: 18px; left: 10px; }
.money--sm .input { font-size: 19px; padding: 5px 8px 5px 24px; text-align: right; }
.input[data-auto="1"] { color: var(--small); }
.linkbtn { font-family: var(--font-body); font-size: 17px; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ledger .cmp th { font-family: var(--font-head); font-weight: 400; font-size: 18px; color: var(--small); text-align: right; padding: 0 0 6px 12px; }
.ledger .cmp th:first-child { text-align: left; padding-left: 0; }
.ledger .cmp td:nth-child(2) { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
/* Comparison tables must fit a phone: durations may stack ("21 years" over "8 months") */
.ledger .cmp td:last-child { white-space: normal; }
.ledger .cmp .nw { white-space: nowrap; }
@media (max-width: 480px) {
  .ledger { padding: 16px 16px 12px; }
  .ledger .cmp { font-size: 18px; }
  .ledger .cmp th { font-size: 16px; padding-left: 8px; }
  .ledger .cmp td:nth-child(n+2) { padding-left: 8px; }
}
@media (max-width: 340px) {
  .ledger { padding: 14px 12px 10px; }
  .ledger table { font-size: 18px; }
  .ledger .cmp { font-size: 17px; }
  .ledger td:last-child { padding-left: 10px; }
  .ledger .cmp--sum { font-size: 15.5px; }
  .ledger tr.total td { font-size: 21px; }
  .ledger .cmp--sum td:nth-child(n+2), .ledger .cmp--sum th { padding-left: 6px; }
}
.result--main { border-width: 4px; }
.result--second { background: var(--tint); box-shadow: var(--shadow-sm); }
.big-num--sm { font-size: clamp(30px, 6.5vw, 38px); }
.minibar { display: none; }
@media (max-width: 900px) {
  .minibar:not([hidden]) { display: flex; align-items: center; gap: 8px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
    background: var(--butter); border: var(--line) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
    padding: 8px 14px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-size: 22px; }
  .minibar:hover { background: var(--butter); }
  .minibar #mini-freq { font-size: 17px; }
  .minibar__go { margin-left: auto; font-size: 18px; text-decoration: underline; }
}
.extra { border: 2px dashed var(--ink); border-radius: var(--radius-sm); padding: 6px 16px 14px; margin: 8px 0 0; }
.extra legend { font-family: var(--font-head); font-size: 22px; color: var(--ink); padding: 0 6px; }
.extra small { display: block; font-size: 16px; color: var(--small); }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.tabs a { font-family: var(--font-head); font-size: 22px; text-decoration: none; padding: 8px 18px; border: var(--line) solid var(--ink); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); }
.tabs a:hover { background: var(--main); }
.form-msg { margin-top: 14px; }
.guide-group { margin-top: 44px; scroll-margin-top: 100px; }
.guide-group h2 { font-size: 34px; margin-bottom: 18px; }
.guide-group .grid--three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Prose (guides) ---------- */
.prose { font-size: 21px; }
.prose h2 { font-size: 34px; margin-top: 1.4em; }
.prose h3 { font-size: 27px; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose ul li::marker { content: "■  "; color: var(--ink); font-size: .7em; }
.prose blockquote { margin: 1.4em 0; background: var(--second); border: var(--line) solid var(--ink); border-radius: 6px; padding: 16px 20px; transform: rotate(-.5deg); }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 2px dashed var(--ink); margin: 2em 0; }
.prose strong { font-family: var(--font-head); font-weight: 400; font-size: 1.06em; color: var(--ink); }
.byline { font-size: 18px; color: var(--small); margin-top: 14px; }

/* ---------- Footer ---------- */
.footer { background: var(--tint); border-top: var(--line) solid var(--ink); padding: 52px 0 28px; margin-top: 0; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__id { grid-column: 1 / -1; } }
.footer__line { font-family: var(--font-head); font-size: 21px; color: var(--ink); margin: 0; line-height: 1.3; -webkit-text-stroke: .4px var(--ink); }
.footer__licence { font-size: 18px; color: var(--small); margin: 4px 0 0; }
.footer__contact { margin-top: 14px; font-size: 19px; }
.footer__head { font-family: var(--font-head); font-size: 21px; color: var(--ink); margin: 0 0 6px; }
.footer__links { display: flex; flex-direction: column; gap: 4px; font-size: 19px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }
.footer__legal { margin-top: 36px; padding-top: 18px; border-top: 2px dashed var(--ink); font-size: 16px; color: var(--small); }
.footer__legal p { margin-bottom: 6px; }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt0 { margin-top: 0; }
.muted { color: var(--small); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------------- Rental property calculator ---------------- */
.rgrid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "prop costs" "flow returns" "flow cashin" "proj proj"; align-items: start; }
.area-prop { grid-area: prop; } .area-costs { grid-area: costs; } .area-flow { grid-area: flow; } .area-returns { grid-area: returns; } .area-cashin { grid-area: cashin; } .area-proj { grid-area: proj; }
.area-flow, .area-proj { scroll-margin-top: 100px; }
@media (max-width: 900px) { .rgrid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "prop" "costs" "flow" "returns" "cashin" "proj"; } }
.pct--sm::after { font-size: 18px; right: 10px; }
.pct--sm .input { font-size: 19px; padding: 5px 26px 5px 8px; text-align: right; }
.field-note { display: block; font-size: 16px; color: var(--small); }
.calc-cross { font-size: 19px; margin: 26px 0 0; }
.ledger tr.sub td { font-family: var(--font-head); color: var(--ink); border-bottom: 2px solid var(--ink); }
.result--main.is-neg .big-num { color: var(--ink); }
.result--main.is-neg { background: var(--butter); }
.glance__tile.is-neg, .kfig.is-neg { background: var(--butter); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--tint); border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 10px 12px; }
.stat__label { font-family: var(--font-head); font-size: 17px; color: var(--small); margin: 0; }
.stat__value { font-family: var(--font-head); font-size: clamp(24px, 4vw, 30px); color: var(--ink); line-height: 1.1; margin: 2px 0 4px; -webkit-text-stroke: .5px var(--ink); }
.stat__value small { font-size: 16px; -webkit-text-stroke: 0; }
.stat__note { font-size: 15px; line-height: 1.3; color: var(--small); margin: 0; }
@media (max-width: 360px) { .stats { grid-template-columns: minmax(0, 1fr); } }
.growth { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
@media (max-width: 760px) { .growth { grid-template-columns: minmax(0, 1fr); } }
.proj-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px 32px; align-items: start; margin: 6px 0 14px; }
@media (max-width: 900px) { .proj-grid { grid-template-columns: minmax(0, 1fr); } }
.proj-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .proj-cards { grid-template-columns: minmax(0, 1fr); } }
.proj-card { background: var(--tint); border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 10px 14px 6px; }
.proj-card h3 { font-size: 21px; margin: 0 0 2px; }
.proj-card table { font-size: 17px; }

/* ---------------- Mortgage report ---------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ledger .kv td:last-child { white-space: normal; }
.report__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.report__tip { font-size: 16px; color: var(--small); margin: 10px 0 30px; }

/* Header: the title on the left, when and who on the right */
.rhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 18px 40px; padding-bottom: 22px; margin-bottom: 24px; border-bottom: var(--line) solid var(--ink); }
.rhead h1 { margin: 4px 0 10px; }
.rhead__intro { font-size: 21px; max-width: 640px; margin: 0; }
.rhead__meta { display: grid; gap: 6px; min-width: 250px; margin: 0; font-size: 17px; }
.rhead__meta div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
.rhead__meta dt { font-family: var(--font-head); color: var(--small); }
.rhead__meta dd { margin: 0; color: var(--ink); }
@media (max-width: 760px) { .rhead { grid-template-columns: minmax(0, 1fr); } }

/* At a glance: the four numbers people look for first */
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
@media (max-width: 900px) { .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.glance__tile { background: #fff; border: var(--line) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 14px 16px 12px; }
.glance__tile--main { background: var(--main); }
.glance__label { font-family: var(--font-head); font-size: 18px; color: var(--small); margin: 0; }
.glance__value { font-family: var(--font-head); font-size: clamp(22px, 3vw, 32px); color: var(--ink); line-height: 1.1; margin: 4px 0; -webkit-text-stroke: .5px var(--ink); }
.glance__note { font-size: 15.5px; line-height: 1.3; color: var(--small); margin: 0; }

/* Section menu */
.rnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.rnav a { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; color: var(--ink); text-decoration: none; background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 3px 12px 3px 5px; }
.rnav a:hover { background: var(--tint); }
.rnav__n, .rsec__num { display: inline-grid; place-items: center; flex: none; font-family: var(--font-head); color: var(--ink); background: var(--butter); border: 2px solid var(--ink); border-radius: 6px; }
.rnav__n { width: 24px; height: 24px; font-size: 15px; }

/* Sections: one card style, numbered in order */
.rbody { counter-reset: rsec; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.rsec, .rpair > * { min-width: 0; }
.rsec { counter-increment: rsec; scroll-margin-top: 100px; }
.rsec[hidden] { display: none; }
.rsec__title { display: flex; align-items: center; gap: 12px; font-size: 28px; margin: 0 0 16px; }
.rsec__num { width: 36px; height: 36px; font-size: 21px; border-width: var(--line); border-radius: 9px; }
.rsec__num::before { content: counter(rsec); }
.rsec__sub { font-size: 21px; color: var(--ink); margin: 0 0 2px; }
.rsec__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; }
@media (max-width: 900px) { .rsec__cols { grid-template-columns: minmax(0, 1fr); } }
.rsec__lede { font-size: 17px; color: var(--small); margin: -6px 0 12px; }
.rsec__count { font-family: var(--font-body); font-size: 18px; color: var(--small); }
.rsec .chart { margin: 0; }
.rpair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: stretch; }
@media (max-width: 900px) { .rpair { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .rsec__title { font-size: 24px; gap: 10px; } .rsec__num { width: 32px; height: 32px; font-size: 19px; } .rbody, .rpair { gap: 22px; } }

/* A key figure at the top of a section */
.kfig { background: var(--tint); border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 14px; }
.kfig__label { font-family: var(--font-head); font-size: 18px; color: var(--small); margin: 0; }
.kfig__value { font-family: var(--font-head); font-size: clamp(28px, 6vw, 40px); line-height: 1.05; color: var(--ink); margin: 2px 0 4px; -webkit-text-stroke: .6px var(--ink); }
.kfig__note { font-size: 16px; color: var(--small); margin: 0; }
.plain { background: var(--tint); border-radius: var(--radius-sm); padding: 12px 16px 14px; }
.plain .sum-text p { margin-top: 8px; }
.rnotes { margin: 0; padding-left: 22px; font-size: 18px; }
.rnotes li { margin-bottom: 6px; }
.rnotes__contact { font-size: 18px; margin: 12px 0 0; }

/* Schedules that fold open and shut (by month, every payment) */
.rfold summary { list-style: none; cursor: pointer; }
.rfold summary::-webkit-details-marker { display: none; }
.rfold summary .rsec__title { flex-wrap: wrap; margin: 0; }
.rfold summary .rsec__title::after { content: "Show"; margin-left: auto; font-family: var(--font-body); font-size: 17px; background: var(--butter); border: 2px solid var(--ink); border-radius: 8px; padding: 1px 12px; }
.rfold[open] summary .rsec__title::after { content: "Hide"; background: #fff; }
.rfold[open] summary { margin-bottom: 16px; }
.rfold__hint { margin: 10px 0 0; }
.ledger .sched tr.sched__year td { font-family: var(--font-head); color: var(--ink); background: var(--tint); border-bottom: 2px solid var(--ink); padding-top: 8px; text-align: left; }
.ledger .sched tbody tr.sched__year:first-child td { padding-top: 6px; }

/* Schedules */
.ledger .sched { width: 100%; border-collapse: collapse; font-size: 17px; font-variant-numeric: tabular-nums; }
.ledger .sched th { font-family: var(--font-head); font-weight: 400; font-size: 17px; color: var(--small); text-align: right; white-space: nowrap; padding: 0 0 6px 12px; border-bottom: var(--line) solid var(--ink); }
.ledger .sched td, .ledger .sched td:last-child { text-align: right; white-space: nowrap; padding: 5px 0 5px 12px; border-bottom: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.ledger .sched th:first-child, .ledger .sched td:first-child { text-align: left; padding-left: 0; }
.ledger .sched tr.is-term td { background: var(--butter); }
.ledger .sched tfoot td { font-family: var(--font-head); color: var(--ink); border-top: var(--line) solid var(--ink); border-bottom: 0; }
.phone-note { display: none; }
@media screen and (max-width: 480px) {
  .ledger .sched, .ledger .sched th { font-size: 15px; }
  .ledger .sched th, .ledger .sched td, .ledger .sched td:last-child { padding-left: 8px; }
  .ledger .sched .cents, .ledger .sched .col-p { display: none; }
  .phone-note { display: block; font-size: 15px; color: var(--small); margin: -4px 0 10px; }
}
@media screen and (max-width: 380px) {
  .ledger .sched, .ledger .sched th { font-size: 13.5px; }
  .ledger .sched th, .ledger .sched td, .ledger .sched td:last-child { padding-left: 5px; }
  .rsec.ledger { padding-left: 12px; padding-right: 12px; }
}

/* Get the PDF by email */
.getpdf { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 18px 36px; background: var(--second); border: var(--line) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 26px; scroll-margin-top: 100px; }
@media (max-width: 900px) { .getpdf { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .getpdf { padding: 16px; } }
.getpdf h2 { font-size: 28px; margin: 0 0 8px; }
.getpdf__intro p { font-size: 18px; margin: 0; }
.getpdf__form .input { background: #fff; }
.getpdf__form select.input { appearance: auto; font-family: var(--font-body); font-size: 19px; color: var(--ink); }
.getpdf__small { font-size: 16px; margin: 0 0 14px; }
.print-gate { display: none; }

/* ---------------- Print / Save as PDF ---------------- */
@media print {
  @page { size: letter; margin: 12mm; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  html, body { background: #fff !important; }
  .topbar, .no-print, .minibar, .blob, .footer__links, .rnav { display: none !important; }
  .rgate { display: none !important; }
  .print-gate { display: block !important; padding: 40px 0; }
  .print-gate h1 { font-size: 36px; margin: 4px 0 14px; }
  .print-gate p { font-size: 15px; max-width: 560px; }
  .section { padding: 0 !important; }
  .wrap { max-width: none !important; padding: 0 !important; }
  .ledger, .card, .glance__tile { box-shadow: none !important; border-width: 2px !important; }
  .rhead { grid-template-columns: minmax(0, 1fr) auto !important; padding-bottom: 10px; margin-bottom: 12px; border-bottom-width: 2px; }
  .rhead h1 { font-size: 34px; margin: 2px 0 4px; }
  .rhead__intro { font-size: 15px; }
  .rhead__meta { font-size: 12.5px; gap: 2px; min-width: 0; }
  .rhead__meta div { grid-template-columns: 60px minmax(0, 1fr); }
  .glance { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 10px !important; margin-bottom: 12px; }
  .glance__tile { padding: 8px 10px !important; }
  .glance__label { font-size: 13px; } .glance__value { font-size: 21px; } .glance__note { font-size: 11px; }
  .rbody { display: block; }
  .rsec { padding: 10px 14px 8px !important; margin-bottom: 12px; break-inside: avoid; }
  .rsec__title { font-size: 20px; gap: 8px; margin-bottom: 8px; }
  .rsec__num { width: 24px; height: 24px; font-size: 14px; border-width: 2px; border-radius: 6px; }
  .rsec__sub { font-size: 15px; }
  .rsec__cols, .rpair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 10px 22px !important; }
  .rpair { margin-bottom: 12px; } .rpair .rsec { margin-bottom: 0; }
  .rsec--appendix { break-before: page; break-inside: auto !important; }
  .rsec.is-closed { display: none !important; }
  .kfig { padding: 6px 10px; margin-bottom: 6px; }
  .kfig__label { font-size: 13px; } .kfig__value { font-size: 24px; } .kfig__note { font-size: 11.5px; }
  .plain { padding: 8px 12px; }
  .ledger table, .sum-text p, .psplit__row, .legend, .rnotes, .rnotes__contact, .rsec__lede { font-size: 13px; }
  .ledger td { padding: 4px 0; }
  .ledger tr.total td { font-size: 15px; padding-top: 6px; }
  .ledger .cmp th { font-size: 12.5px; }
  .ledger small, .ledger__foot, .psplit__note { font-size: 11px; }
  .chart figcaption { font-size: 15px; }
  .ledger .sched, .ledger .sched th { font-size: 11.5px; }
  .ledger .sched td, .ledger .sched td:last-child { padding: 2px 0 2px 10px; }
  .rfold summary .rsec__title::after { display: none; }
  .rsec td small { display: inline; margin-left: 4px; }
  .rsec td small::before { content: "· "; }
  .rsec .stat { padding: 6px 8px; }
  .rsec .stat__value { font-size: 20px; }
  .rsec .stat__note { font-size: 10.5px; }
  #projection .proj-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .proj-card td { padding: 2px 0 !important; }
  .proj-card tr.total td { padding-top: 3px !important; font-size: 13px; }
  #projection .rsec__lede { margin: -4px 0 6px; }
  .proj-card { padding: 6px 10px 4px; }
  .proj-card h3 { font-size: 15px; }
  .ledger .sched tr.sched__year td { padding-top: 4px; }
  .ledger .sched tr.sched__year { break-after: avoid; page-break-after: avoid; }
  tr { break-inside: avoid; }
  thead { display: table-header-group; }
  .table-scroll { overflow: visible !important; }
  .footer { background: #fff !important; border-top: 2px solid var(--ink); padding: 10px 0 0 !important; break-inside: avoid; }
  .footer__legal { margin-top: 8px !important; padding-top: 8px !important; font-size: 11px; }
  a { color: inherit !important; text-decoration: none !important; }
}

/* Email signature page (/signature) */
.sigbox { background: #fff; border: 2px dashed var(--ink); border-radius: 12px; padding: 24px; margin: 0 0 16px; overflow-x: auto; }
.sigbox img { max-width: none; }
.sigbox a:hover { background: none; }
.sigcopy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 32px; }
