/* ============================================================
   Mortgage calculator hub - styles
   Finance-tool look: navy + one green accent, light grey page, white cards with thin borders, system fonts.
   Screen: tap targets >= 44px, WCAG AA. Print: black on white, one page (Letter or A4). No external fonts, CDNs or trackers.
   ============================================================ */
:root {
  --ink: #172033;
  --navy: #14284b;
  --navy-2: #243f70;
  --muted: #45505f;
  --bg: #f1f3f7;
  --paper: #fff;
  --line: #cfd6e0;
  --field: #667285;
  --accent: #0f7b5f;
  --accent-hover: #0b6a52;
  --accent-bright: #2fd0a0;
  --accent-soft: #e4f4ee;
  --link: #0b57b0;
  --focus: #ffbf2f;
  --warn-bg: #fff6e0;
  --warn-line: #8a5a00;
  --radius: 5px;
  --radius-card: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Liberation Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.55; color: var(--ink); background: var(--bg); overflow-wrap: break-word; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
main.wrap { padding-top: 1rem; padding-bottom: 3rem; }
main:focus { outline: none; }
h1, h2, h3 { line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(1.7rem, 4.6vw, 2.3rem); margin: 0.35em 0 0.3em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin: 1.7em 0 0.5em; }
h3 { font-size: 1.1rem; margin: 1.2em 0 0.4em; }
p, li { max-width: 70ch; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px #000; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 0.8rem 1.2rem; z-index: 100; }
.skip-link:focus { left: 0; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.print-only { display: none; }

/* ---------- header ---------- */
.site-header { background: var(--navy); color: #fff; border-bottom: 4px solid var(--accent-bright); position: relative; z-index: 20; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; min-height: 48px; padding: 2px 0; color: #fff; text-decoration: none; margin-right: auto; border-radius: 6px; }
.brand-mark { width: 2.4rem; height: 2.4rem; flex: none; display: block; }
.wordmark { font-size: 1.2rem; font-weight: 800; line-height: 1.1; letter-spacing: 0.01em; }
.wm-c { color: var(--accent-bright); }
.menu-toggle { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 46px; padding: 0.3rem 0.9rem; border: 2px solid #fff; border-radius: var(--radius); background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.menu-toggle:hover { background: var(--navy-2); }
.menu-toggle[aria-expanded="true"] { background: #fff; border-color: #fff; color: var(--navy); }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; }
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { max-width: none; }
.nav-btn { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; min-height: 46px; padding: 0.3rem 0.8rem; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: #fff; font: inherit; font-weight: 700; text-align: left; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.nav-btn:hover { border-color: #fff; }
.nav-btn[aria-expanded="true"] { background: #fff; border-color: #fff; color: var(--navy); }
.nav-group.is-current > .nav-btn { text-decoration: underline; text-decoration-color: var(--accent-bright); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.nav-caret { width: 0.5em; height: 0.5em; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-25%) rotate(45deg); flex: none; }
.nav-btn[aria-expanded="true"] .nav-caret { transform: translateY(25%) rotate(-135deg); }
.nav-drop { list-style: none; margin: 0; padding: 0.4rem 0.6rem; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-card); }
.nav-drop a { display: flex; align-items: center; min-height: 46px; padding: 0.2rem 0.6rem; border-radius: 3px; color: var(--ink); font-weight: 600; text-decoration: none; }
.nav-drop a:hover { background: var(--accent-soft); text-decoration: underline; }
.nav-drop a[aria-current] { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
@media (max-width: 999.98px) {
  .main-nav { display: none; flex: 1 1 100%; min-width: 0; padding: 0.5rem 0 0.6rem; border-top: 1px solid #3d5688; margin-top: 0.3rem; }
  .menu-open .main-nav { display: block; }
  .nav-list { display: grid; gap: 0.3rem; }
  .nav-btn { border-color: #52689a; }
  .nav-drop { margin: 0.3rem 0 0.2rem; }
}
@media (min-width: 1000px) {
  .menu-toggle { display: none; }
  .main-nav { flex: 0 1 auto; min-width: 0; }
  .nav-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
  .nav-group { position: relative; }
  .nav-drop { position: absolute; left: 0; top: calc(100% + 8px); width: 21rem; max-width: calc(100vw - 2rem); box-shadow: 0 6px 16px rgba(0,0,0,.22); z-index: 30; }
  .nav-group:last-child .nav-drop { left: auto; right: 0; }
}

/* ---------- intro ---------- */
.intro-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin-bottom: 0.8rem; }
.lead { font-size: 1.05rem; margin: 0; flex: 1 1 22rem; color: var(--muted); }
.howto-jump { flex: none; }

/* ---------- buttons + fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.5rem 1.1rem;
  border-radius: var(--radius); border: 2px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; text-align: center; max-width: 100%; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.secondary { background: var(--paper); color: var(--navy); border-color: var(--navy); }
.btn.secondary:hover { background: #e6ebf3; color: var(--navy); }
.btn.big { min-height: 56px; font-size: 1.1rem; padding: 0.6rem 1.4rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.4rem 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 0.7rem 1.2rem 1rem; }
.tool-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.tool-title { margin: 0; font-size: 1.2rem; }
.example-note { margin: 0; color: var(--muted); font-size: 0.92rem; max-width: none; }
.form-step { padding: 0.8rem 0 0.4rem; margin: 0; border: 0; min-width: 0; border-bottom: 1px solid var(--line); }
.step-h { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.3rem; padding: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.2; color: var(--navy); }
legend.step-h { float: left; width: 100%; }
legend.step-h + * { clear: left; }
.step-badge { display: inline-flex; align-items: center; min-height: 1.7rem; padding: 0.05rem 0.55rem; border-radius: 4px; background: var(--navy); color: #fff; font-size: 0.9rem; font-weight: 700; }
.fields { display: grid; gap: 0 1.2rem; grid-template-columns: minmax(0, 1fr); padding-bottom: 0.4rem; }
@media (min-width: 640px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.field { min-width: 0; padding-bottom: 0.3rem; }
.field-label { display: block; font-weight: 700; font-size: 0.95rem; margin: 0.6rem 0 0.25rem; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=month], select {
  width: 100%; min-height: 48px; padding: 0.4rem 0.7rem; font: inherit; font-size: 1.1rem; font-weight: 600; color: var(--ink); background: #fff;
  border: 1px solid var(--field); border-radius: var(--radius); }
input:hover, select:hover { border-color: var(--ink); }
input[type=checkbox] { width: 1.5rem; height: 1.5rem; accent-color: var(--accent); flex: none; margin: 0; }
.check-row { display: flex; align-items: center; gap: 0.7rem; min-height: 48px; margin-top: 0.8rem; font-weight: 700; cursor: pointer; }
.val-row { display: flex; align-items: stretch; gap: 0.4rem; }
.val-row input { flex: 1 1 auto; min-width: 0; }
.unit-prefix, .unit-suffix { display: inline-flex; align-items: center; font-weight: 700; color: var(--muted); }
.unit-prefix { min-width: 0.8rem; }
.unit-suffix { min-width: 1.4rem; font-size: 0.95rem; }
.seg { display: flex; gap: 0; }
.seg-opt { position: relative; flex: 1 1 0; display: flex; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt span { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.3rem 0.5rem; border: 2px solid var(--navy); background: #fff; color: var(--navy); font-weight: 700; cursor: pointer; text-align: center; font-size: 0.95rem; }
.seg-opt:first-child span { border-radius: var(--radius) 0 0 var(--radius); }
.seg-opt:last-child span { border-radius: 0 var(--radius) var(--radius) 0; border-left-width: 0; }
.seg-opt input:checked + span { background: var(--navy); color: #fff; }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px #000; }
.seg-opt span:hover { background: #e6ebf3; }
.seg-opt input:checked + span:hover { background: var(--navy-2); }
.down-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 8.5rem); gap: 0.5rem; align-items: stretch; }
.hint { color: var(--muted); font-size: 0.88rem; margin: 0.25rem 0 0; }
.form-error { margin: 0.6rem 0 0; padding: 0.5rem 0.8rem; background: #fdecec; border: 1px solid #a11; border-left-width: 4px; border-radius: var(--radius); color: #7a0d0d; font-weight: 700; }
.form-actions { padding-top: 0.9rem; }
.form-actions .btn.big { min-width: 12rem; margin-top: 0.3rem; }
@media (max-width: 600px) { .form-actions .btn.big { width: 100%; } }

/* ---------- result ---------- */
.result-wrap { margin-top: 1.2rem; scroll-margin-top: 0.6rem; }
.print-ready { margin: 0 0 0.6rem; padding: 0.55rem 1rem; background: var(--navy); color: #fff; font-weight: 700; border-radius: var(--radius); }
.print-ready:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.result { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius-card); padding: 0.9rem 1.2rem 1rem; }
.result p { margin: 0 0 0.5rem; max-width: none; }
.res-inputs { font-weight: 600; color: var(--muted); font-size: 0.95rem; }
.res-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0 0.7rem; }
.res-box { flex: 1 1 11rem; max-width: 22rem; display: flex; flex-direction: column; padding: 0.5rem 0.9rem 0.6rem; background: #f6f8fb; border: 1px solid var(--line); border-left: 5px solid var(--navy-2); border-radius: var(--radius); }
.res-box.key { background: var(--accent-soft); border-color: #9ccfbd; border-left-color: var(--accent); }
.res-label { font-weight: 700; font-size: 0.92rem; color: var(--muted); }
.res-val { font-size: 1.7rem; font-weight: 800; line-height: 1.15; color: var(--navy); font-variant-numeric: tabular-nums; }
.res-note { font-size: 0.88rem; color: var(--muted); }
.res-detail { font-size: 0.98rem; }
.form-note { background: var(--warn-bg); border-left: 4px solid var(--warn-line); padding: 0.45rem 0.8rem; margin: 0.4rem 0 0.6rem; font-size: 0.95rem; border-radius: 0 var(--radius) var(--radius) 0; max-width: none; }
.res-warn { background: var(--warn-bg); border-left: 4px solid var(--warn-line); padding: 0.45rem 0.8rem; font-weight: 600; border-radius: 0 var(--radius) var(--radius) 0; }
.res-tool-note { font-size: 0.95rem; color: var(--ink); margin-top: 0.8rem !important; }
.res-disclaimer, .res-round { color: var(--muted); font-size: 0.92rem; margin-top: 0.4rem !important; }
.res-disclaimer { border-top: 1px solid var(--line); padding-top: 0.6rem; margin-top: 0.8rem !important; }
.how-calc { margin: 0.6rem 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfd; }
.how-calc > summary { min-height: 48px; padding: 0.7rem 1rem; font-weight: 700; cursor: pointer; display: list-item; }
.how-calc ul { margin: 0; padding: 0 1rem 0.8rem 2.2rem; }
.how-calc li { margin-bottom: 0.4rem; font-size: 0.95rem; }
.preview-actions { margin: 0.9rem 0 0.2rem; display: flex; flex-direction: column; align-items: stretch; gap: 0.4rem; }
.preview-actions .btn-row { margin: 0; }
.edit-back { align-self: flex-start; font-weight: 700; font-size: 0.95rem; min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; }
.monthly-block { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0; }
.monthly-wrap { margin: 0 0 0.8rem; max-height: 28rem; overflow: auto; border: 1px solid var(--line); }
@media (max-width: 600px) {
  .preview-actions .btn.big { width: 100%; }
  .res-val { font-size: 1.45rem; }
  .res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .res-box { max-width: none; padding: 0.4rem 0.6rem 0.5rem; }
  .res-box.key { grid-column: 1 / -1; }
  .res-label { font-size: 0.86rem; }
  .monthly-block .btn { flex: 1 1 100%; }
}

/* ---------- data tables ---------- */
.table-scroll { overflow-x: auto; max-width: 100%; margin: 0.4rem 0 0.8rem; }
.result .table-scroll { max-width: 52rem; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.data caption { text-align: left; font-weight: 700; padding: 0.3rem 0 0.4rem; color: var(--navy); font-size: 1rem; }
table.data thead th { background: var(--navy); color: #fff; padding: 0.4rem 0.6rem; font-size: 0.9rem; line-height: 1.2; text-align: right; vertical-align: bottom; font-weight: 700; }
table.data thead th:first-child { text-align: left; }
table.data tbody th { text-align: left; font-weight: 600; background: #f3f5f9; padding: 0.35rem 0.6rem; border-right: 1px solid var(--line); }
table.data td { text-align: right; padding: 0.35rem 0.6rem; }
table.data tbody tr { border-bottom: 1px solid #e1e6ee; }
table.data tr.total th, table.data tr.total td { font-weight: 800; background: var(--accent-soft); }
@media (max-width: 600px) {
  table.data th, table.data td { padding: 0.3rem 0.25rem; }
  table.data { font-size: 0.8rem; }
  table.data thead th { font-size: 0.74rem; }
  table.data.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack th, table.data.stack td { display: block; width: 100%; }
  table.data.stack { font-size: 0.9rem; }
  table.data.stack tr { padding: 0.3rem 0.5rem 0.5rem; }
  table.data.stack tbody th { background: #f3f5f9; border-right: 0; font-weight: 800; padding: 0.3rem 0.3rem; }
  table.data.stack td { display: flex; justify-content: space-between; gap: 1rem; text-align: right; padding: 0.15rem 0.3rem; }
  table.data.stack td::before { content: attr(data-label); font-weight: 600; text-align: left; color: var(--muted); }
}

/* ---------- after the output ---------- */
.next-step { margin-top: 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 0.4rem 1.2rem 1rem; }
.next-step h2 { margin-top: 0.7rem; }
.tpl-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.tpl-cards li { max-width: none; }
.tpl-card { display: flex; align-items: center; gap: 0.7rem; min-height: 52px; height: 100%; padding: 0.45rem 0.8rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; }
.tpl-card:hover { border-color: var(--navy); border-left-color: var(--accent); text-decoration: underline; }
.tpl-ico { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; color: var(--navy); flex: none; font-size: 1.15rem; }
.browse { margin-top: 1.6rem; }
.browse h2 { margin-bottom: 0.2rem; }
.browse h3 { margin: 1.1rem 0 0.4rem; }
.affiliate { margin-top: 1rem; }

/* ---------- how to + FAQ + content ---------- */
.howto { margin-top: 2rem; scroll-margin-top: 0.5rem; }
.howto-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.howto-steps li { counter-increment: s; display: flex; align-items: center; gap: 0.8rem; max-width: 46rem; }
.howto-steps li::before { content: counter(s); flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 4px; background: var(--navy); color: #fff; font-size: 1rem; font-weight: 700; }
.how-ico { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; flex: none; color: var(--navy); font-size: 1.25rem; }
.back-top a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }
.seo p { max-width: 70ch; }
.example { background: var(--accent-soft); border: 1px solid #9ccfbd; border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 0.7rem 1rem; margin: 1rem 0; max-width: 52rem; }
.example h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.example p { margin: 0 0 0.5rem; }
.example p:last-child { margin-bottom: 0; }
.faq { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin: 0 0 0.6rem; max-width: 50rem; }
.faq summary { min-height: 48px; padding: 0.65rem 1rem; font-weight: 700; cursor: pointer; display: list-item; }
.faq-a { padding: 0 1rem 0.4rem; }
.faq-a p { margin: 0 0 0.6rem; }
.page-info main p, .page-info main li { font-size: 1.03rem; }
.page-info main ul, .page-info main ol { padding-left: 1.3rem; }
.page-info main li { margin-bottom: 0.3rem; }

/* ---------- breadcrumbs ---------- */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.15rem; font-size: 0.95rem; }
.crumbs li { display: inline-flex; align-items: center; max-width: none; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.15rem; font-weight: 600; }
.crumbs [aria-current] { color: var(--muted); font-weight: 600; padding: 0 0.15rem; }
.crumb-sep { color: var(--muted); padding: 0 0.3rem; }
main.wrap > .crumbs { margin-top: -0.6rem; }
main.wrap > .crumbs + h1 { margin-top: 0.1em; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 1.2rem 0 1.6rem; margin-top: 2rem; border-top: 4px solid var(--accent-bright); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.footer-links a { color: #fff; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; min-width: 44px; font-weight: 600; }
.footer-calcs { border-bottom: 1px solid #3d5688; padding-bottom: 0.3rem; margin-bottom: 0.3rem; }
.site-footer p { margin: 0.6rem 0 0; font-size: 0.92rem; max-width: 80ch; }
.footer-disclaimer { color: #e2e8f4; }
@media (max-width: 600px) {
  .wrap { padding: 0 0.75rem; }
  .panel, .next-step { padding-left: 0.8rem; padding-right: 0.8rem; }
  .result { padding-left: 0.8rem; padding-right: 0.8rem; }
  .wordmark { font-size: 1.05rem; }
  .brand-mark { width: 2.2rem; height: 2.2rem; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- print: the result only, one page (Letter or A4) ---------- */
@page { margin: 0.5in; }
@media print {
  html { font-size: 11pt !important; }
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .skip-link, .no-print, .crumbs { display: none !important; }
  .print-only { display: block; }
  main.wrap { padding: 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  .page-tool main > :not(.result-wrap) { display: none !important; }
  .page-tool .result-wrap > :not(.result) { display: none !important; }
  .page-tool .result-wrap { margin: 0; }
  .result { border: 0; border-top: 2pt solid #000; padding: 6pt 0 0; font-size: 10pt; line-height: 1.3; }
  .print-head { margin: 0 0 4pt !important; font-size: 10pt; }
  .res-inputs { font-size: 9.5pt; color: #000; }
  .res-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4pt; margin: 4pt 0 6pt; }
  .res-box, .res-box.key { background: #fff; border: 1pt solid #000; border-left-width: 4pt; padding: 3pt 5pt; max-width: none; }
  .res-box.key { grid-column: auto; }
  .res-label, .res-note { color: #000; font-size: 8pt; }
  .res-val { font-size: 12pt; color: #000; }
  .res-warn { background: #fff; border: 1pt solid #000; font-size: 9pt; padding: 2pt 5pt; }
  .res-detail, .res-tool-note, .res-disclaimer, .res-round { font-size: 8.5pt; color: #000; margin: 3pt 0 0 !important; }
  .table-scroll { overflow: visible; max-height: none; margin: 2pt 0 4pt; }
  table.data { break-inside: avoid; font-size: 8.5pt; border: 0; }
  table.data caption { font-size: 9.5pt; color: #000; padding: 2pt 0; }
  table.data thead th { background: #fff !important; color: #000; border-bottom: 1.2pt solid #000; padding: 1.5pt 4pt; font-size: 8.5pt; }
  table.data tbody th, table.data td { padding: 1pt 4pt; border-bottom: 0.5pt solid #999; background: #fff !important; color: #000; }
  table.data tr.total th, table.data tr.total td { background: #fff !important; font-weight: 800; border-top: 1pt solid #000; }
  table.data.stack thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  table.data.stack, table.data.stack tbody { display: table; }
  table.data.stack tbody { display: table-row-group; }
  table.data.stack tr { display: table-row; padding: 0; }
  table.data.stack th, table.data.stack td { display: table-cell; width: auto; }
  table.data.stack td::before { content: none; }
  table.data.stack thead { display: table-header-group; }
  /* long year-by-year tables (a 40-year loan): tighter rows so the result still fits one page */
  #res-body > .table-scroll table.data.many { font-size: 7.5pt; line-height: 1.1; }
  #res-body > .table-scroll table.data.many caption { font-size: 8.5pt; padding: 1pt 0; }
  #res-body > .table-scroll table.data.many thead th { font-size: 7.5pt; padding: 1pt 3pt; }
  #res-body > .table-scroll table.data.many tbody th, #res-body > .table-scroll table.data.many td { padding: 0.2pt 3pt; }
  .monthly-wrap { display: none !important; }
  .print-monthly .monthly-wrap, .print-monthly .monthly-wrap[hidden] { display: block !important; }
  .print-monthly #res-body > :not(.monthly-wrap) { display: none !important; }
  .print-monthly .monthly-wrap { max-height: none; border: 0; overflow: visible; }
  .print-monthly .monthly-wrap table.data { break-inside: auto; }
  .print-monthly .monthly-wrap thead { display: table-header-group; }
  .print-monthly .monthly-wrap tr { break-inside: avoid; }
}
