@font-face {
  font-family: "DM Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("fonts/dm-serif-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("fonts/poppins-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url("fonts/poppins-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url("fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --teal: #1f5f5b;
  --cream: #fbf7f0;
  --coral: #b84a2c;
  --grey: #48545d;
  --white: #ffffff;
  --sand: #f2e8cf;
  --line: #e2d8c4;
  --ink: #222222;
  --focus: #1f5f5b;
  --max: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font: 400 16px/1.55 Poppins, "Segoe UI", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
}

img { max-width: 100%; height: auto; }
a { color: var(--teal); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 8px;
  top: -40px;
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus { top: 8px; }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 40px; height: 40px; display: block; }
.brand-name {
  font-family: "DM Serif Display", "Iowan Old Style", Palatino, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.2;
}
.brand-tag {
  display: block;
  font-family: Poppins, "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--grey);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--teal); text-decoration: underline; }

.btn {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 12px 18px;
  min-height: 44px;
  line-height: 1.2;
  border: 1px solid var(--teal);
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: center;
}
.btn:hover { background: #174946; color: var(--white); }
.btn-ghost {
  background: var(--white);
  color: var(--teal);
}
.btn-ghost:hover { background: var(--sand); color: var(--teal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }

.hero, .band {
  padding: 32px 0 8px;
}
h1, h2, h3 {
  font-family: "DM Serif Display", "Iowan Old Style", Palatino, "Times New Roman", serif;
  font-weight: 400;
  color: var(--teal);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-top: 0; }
h3 { font-size: 1.2rem; }

.lede, .answer-first {
  font-size: 1.05rem;
  max-width: 46rem;
}
.muted, .fine { color: var(--grey); }

.crumbs {
  font-size: 0.9rem;
  color: var(--grey);
  margin: 0 0 16px;
}
.crumbs a { color: var(--grey); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 20px;
  margin: 16px 0;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--grey); font-size: 0.85rem; }
caption { text-align: left; font-weight: 600; margin-bottom: 8px; color: var(--ink); }

label, .label { font-weight: 500; display: block; margin: 12px 0 4px; }
input[type="text"], input[type="number"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #b7b0a3;
  border-radius: 0;
  font: inherit;
  background: var(--white);
  color: var(--ink);
}
.debt-table input { min-height: 44px; }

.res {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.res .k { font-size: 0.85rem; color: var(--grey); }
.res .v { font-size: 1.35rem; font-weight: 600; color: var(--teal); font-family: Poppins, "Segoe UI", system-ui, sans-serif; }

.cta-card {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.cta-card h2, .cta-card a { color: var(--white); }
.cta-card p { margin: 0 0 14px; }
.cta-card .btn {
  background: var(--white);
  color: var(--teal);
  border-color: var(--white);
}
.cta-card .btn:hover { background: var(--sand); color: var(--teal); }

.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 16px 16px 16px 56px;
  position: relative;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  color: var(--teal);
  font-family: "DM Serif Display", Palatino, serif;
  font-size: 1.4rem;
}

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  margin: 0 0 8px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 16px;
  min-height: 44px;
}
.faq details p { margin: 0; padding: 0 16px 16px; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 24px 0 40px;
  color: var(--grey);
  font-size: 0.9rem;
}
.site-footer a { color: var(--grey); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.chart-legend { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: 0.9rem; margin-top: 8px; color: var(--grey); }
.swatch { display: inline-block; width: 22px; height: 0; border-top: 3px solid currentColor; vertical-align: middle; margin-right: 6px; }
.swatch-dash { border-top-style: dashed; }

#msg[data-kind="error"] { color: #8a2b16; font-weight: 500; }

@media (max-width: 700px) {
  .compare { grid-template-columns: 1fr; }
  .debt-table thead { position: absolute; left: -9999px; }
  .debt-table, .debt-table tbody, .debt-table tr, .debt-table td { display: block; width: 100%; }
  .debt-table tr {
    border: 1px solid var(--line);
    margin: 0 0 12px;
    padding: 8px 12px 12px;
    background: var(--cream);
  }
  .debt-table td {
    border: 0;
    padding: 6px 0;
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    align-items: center;
    gap: 8px;
  }
  .debt-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--grey);
  }
  .debt-table td.actions { grid-template-columns: 1fr; }
  .debt-table td.actions::before { display: none; }
  .btn, .btn-row .btn { width: 100%; }
  .nav .btn { width: auto; }
}

#chart { width: 100%; height: auto; display: block; }
