@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

:root {
  --navy: #0B1F33;
  --navy-soft: #152A40;
  --emerald: #0F766E;
  --emerald-bright: #14B8A6;
  --emerald-deep: #134E4A;
  --mint: #ECFDF8;
  --mint-border: #A7F3D0;
  --gold: #D97706;
  --gold-soft: #FFFBEB;
  --bg: #F4F7FA;
  --bg-accent: #EEF3F8;
  --surface: #ffffff;
  --text: #0B1F33;
  --muted: #5B6B7C;
  --border: #E2E8F0;
  --brand: var(--emerald);
  --brand-dark: var(--emerald-deep);
  --brand-soft: var(--mint);
  --accent: var(--gold);
  --danger: #B91C1C;
  --ok: #047857;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11,31,51,.04), 0 8px 28px rgba(11,31,51,.06);
  --shadow-lg: 0 4px 6px rgba(11,31,51,.04), 0 16px 40px rgba(11,31,51,.08);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background:
    radial-gradient(1200px 500px at 10% -10%, #d8f3ef 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e8eef6 0%, transparent 50%),
    var(--bg);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--emerald); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--emerald-deep); }
img { max-width: 100%; height: auto; }
.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  background: rgba(255,255,255,.88); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.logo {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  color: var(--navy); text-decoration: none; letter-spacing: -.02em;
}
.logo img, .logo svg.logo-mark { width: 34px; height: 34px; display: block; flex-shrink: 0; }
.logo .word { color: var(--navy); }
.logo .word em { font-style: normal; color: var(--emerald); }
.nav { display: flex; flex-wrap: wrap; gap: .35rem .15rem; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 560;
  padding: .4rem .7rem; border-radius: 999px;
}
.nav a:hover { color: var(--navy); background: var(--bg-accent); }
.nav-toggle {
  display: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: .45rem .7rem; font: inherit; font-weight: 600; color: var(--navy);
}

.hero { padding: 2.75rem 0 1.25rem; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(1.75rem, 4.2vw, 2.55rem);
  line-height: 1.18; margin: 0 0 .75rem; letter-spacing: -.025em; color: var(--navy);
}
.hero p.lead { color: var(--muted); font-size: 1.08rem; margin: 0 0 1.25rem; max-width: 40rem; }
.trust-bar {
  display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin: 0 0 1.5rem;
}
.trust-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; color: var(--navy-soft);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: .35rem .7rem; box-shadow: var(--shadow);
}
.trust-chip svg { width: 14px; height: 14px; color: var(--emerald); }

.grid-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; padding: 0 0 2.5rem;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.3rem; box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--emerald-bright), var(--navy));
  opacity: 0; transition: opacity .18s;
}
a.card:hover { transform: translateY(-3px); border-color: #b6ddd6; box-shadow: var(--shadow-lg); }
a.card:hover::before { opacity: 1; }
.card h2, .card h3 { margin: 0 0 .4rem; font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }

.calc-layout {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 1.35rem; padding-bottom: 2rem;
}
@media (max-width: 860px) {
  .calc-layout { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .35rem; }
  .nav.open { display: flex; }
  .nav a { border-radius: 10px; }
  .header-inner { flex-wrap: wrap; }
}

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem; box-shadow: var(--shadow);
}
.panel.results-panel {
  background: linear-gradient(165deg, #ffffff 0%, #f3faf8 100%);
  border-color: #d5ebe6;
}
.panel h2 {
  margin: 0 0 1rem; font-size: 1.05rem; font-weight: 700; color: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.panel-meta { font-size: .75rem; font-weight: 500; color: var(--muted); }

.field { margin-bottom: .95rem; }
.field label { display: block; font-size: .84rem; font-weight: 650; margin-bottom: .32rem; color: var(--navy-soft); }
.field .hint { font-size: .76rem; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: .62rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--emerald-bright);
  box-shadow: 0 0 0 3px rgba(20,184,166,.18);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; } }

.results { display: grid; gap: .6rem; }
.result-pill {
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
  padding: .75rem .9rem; background: rgba(255,255,255,.85); border: 1px solid #e5eef0;
  border-radius: 12px;
}
.result-pill .label { color: var(--muted); font-size: .85rem; font-weight: 500; }
.result-pill .value {
  font-weight: 700; font-size: 1.12rem; font-variant-numeric: tabular-nums; color: var(--navy);
  letter-spacing: -.01em;
}
.result-pill.primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--emerald-deep) 100%);
  border: none; color: #fff; padding: 1rem 1.05rem; box-shadow: 0 8px 24px rgba(11,31,51,.18);
}
.result-pill.primary .label { color: rgba(255,255,255,.78); }
.result-pill.primary .value { color: #fff; font-size: 1.35rem; }

.chart-wrap {
  margin-top: 1.15rem; min-height: 180px; padding: .85rem;
  background: rgba(255,255,255,.7); border: 1px solid #e8eef2; border-radius: 12px;
}
.chart-wrap canvas, .chart-wrap svg { width: 100%; max-height: 280px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .5rem; }

.muted { color: var(--muted); }
.small { font-size: .88rem; }
.notice {
  margin: 1rem 0; padding: .9rem 1.05rem; border-radius: 12px; background: var(--gold-soft);
  border: 1px solid #f3e0b5; font-size: .88rem; color: #7A4E0C;
}
.methodology {
  margin: 1.5rem 0 2rem; padding: 1.25rem 1.35rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.methodology h2 { margin: 0 0 .65rem; font-size: 1.1rem; font-family: var(--font-display); }
.methodology ul { margin: .4rem 0 0; padding-left: 1.15rem; color: var(--muted); font-size: .92rem; }
.methodology .updated { margin-top: .85rem; font-size: .8rem; color: var(--muted); }

.affiliate-box, .signup-box {
  margin: 1.25rem 0; padding: 1.15rem 1.2rem; border-radius: var(--radius);
  border: 1px dashed #c5d0dc; background: linear-gradient(180deg, #fafcfe, #f5f8fb);
}
.affiliate-box h3, .signup-box h3 { margin: 0 0 .4rem; font-size: 1rem; color: var(--navy); }

.signup-box .hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
.signup-consent { margin: .65rem 0 0; }
.signup-consent a { color: var(--emerald-deep); }
.signup-msg { margin: .65rem 0 0; font-size: .9rem; font-weight: 600; }
.signup-msg.is-ok { color: var(--ok); }
.signup-msg.is-error { color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .6rem 1.1rem; border-radius: 10px; border: none; font: inherit; font-weight: 650;
  cursor: pointer; background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-deep) 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(15,118,110,.25);
}
.btn:hover { filter: brightness(1.05); }
.btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--border); box-shadow: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }

.faq { margin: 1.5rem 0 2rem; }
.faq > h2 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .75rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: .8rem 1.05rem; margin-bottom: .55rem; box-shadow: var(--shadow);
}
.faq summary { cursor: pointer; font-weight: 650; color: var(--navy); }
.faq details p { margin: .55rem 0 0; color: var(--muted); font-size: .92rem; }

.prose { max-width: 42rem; }
.prose h2 { margin-top: 1.75rem; font-size: 1.3rem; font-family: var(--font-display); color: var(--navy); }

.site-footer {
  border-top: 1px solid var(--border); background: var(--navy); color: #94A3B8;
  padding: 2.5rem 0 2rem; margin-top: 1.5rem; font-size: .88rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.75rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { margin: 0 0 .55rem; color: #F8FAFC; font-size: .9rem; letter-spacing: .02em; }
.footer-grid p { margin: 0; max-width: 28rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: .3rem 0; }
.footer-grid a { color: #94A3B8; text-decoration: none; }
.footer-grid a:hover { color: #99F6E4; }
.footer-bottom { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom small { color: #64748B; }

.debt-list .debt-row {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto; gap: .4rem; margin-bottom: .4rem; align-items: center;
}
@media (max-width: 700px) { .debt-list .debt-row { grid-template-columns: 1fr 1fr; } }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.data th, table.data td { padding: .4rem .5rem; border-bottom: 1px solid var(--border); text-align: right; }
table.data th:first-child, table.data td:first-child { text-align: left; }
.badge {
  display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: .2rem .5rem; border-radius: 999px;
  background: var(--mint); color: var(--emerald-deep); border: 1px solid var(--mint-border);
}
