:root {
  --ink: #111;
  --body: #222;
  --muted: #666;
  --faint: #6b6b6b;
  --rule: #e3e6ea;
  --navy: #1c3b66;
  --blue: #23649e;
  --accent: #3a8ee6;
  --panel: #f1f4f8;
  --equity: #0e5c63;
  --debt: #22a3c0;
  --red: #b83b2e;
  --green: #2f6f3a;
  --cta: #465bb0;
  --cta-hover: #3a4d99;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--body);
  background: #fff;
}

img { max-width: 100%; display: block; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: var(--blue); }

.wrap { max-width: 660px; margin: 0 auto; padding: 0 20px; }

/* Header */
.meta { text-align: center; font-size: 13px; line-height: 1.5; color: #767676; margin: 10px 0 22px; }
.meta b { color: #326b9a; }

h1 {
  font-size: 38px;
  line-height: 1.15;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.4px;
  margin: 0 0 28px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  padding: 10px 0;
  font-size: 15px;
  color: var(--muted);
}
.byline img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.byline strong { color: var(--ink); }
.byline .updated { margin-left: auto; font-size: 13px; color: var(--faint); }

.hero { width: 100%; height: auto; margin: 18px 0 0; }

/* Body copy */
p { font-size: 17px; line-height: 1.7; margin: 0 0 20px; }
.lead { margin-top: 18px; font-size: 18px; }
.inline-link { color: var(--blue); font-weight: 700; text-decoration: none; transition: color 0.2s ease; }
.inline-link:hover { color: var(--navy); text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h2 { font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--ink); margin: 36px 0 14px; }
h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 28px 0 16px; }

.source { font-size: 12px; color: var(--faint); margin: 8px 0 26px; line-height: 1.5; }

sup { font-size: 0.7em; line-height: 0; }

/* Stat row */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--rule);
  margin-top: 8px;
}
.stat { padding: 14px 14px 16px 0; }
.stat + .stat { padding-left: 14px; border-left: 1px solid var(--rule); }
.stat .num { font-size: 34px; font-weight: 900; color: var(--navy); line-height: 1; }
.stat .num small { font-size: 15px; font-weight: 700; margin-left: 2px; }
.stat .label { font-size: 13px; line-height: 1.4; color: #7a5a3a; margin-top: 8px; }

/* Charts */
.chart { margin: 6px 0 0; padding: 0; }
.chart-title { font-size: 17px; font-weight: 700; color: var(--ink); margin: 30px 0 4px; }
.chart-sub { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { font-family: 'Roboto', Arial, sans-serif; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.legend span::before {
  content: "";
  display: inline-block;
  width: 12px; height: 12px;
  margin-right: 6px;
  vertical-align: -1px;
}
.legend .k-debt::before { background: var(--debt); }
.legend .k-equity::before { background: var(--equity); }

/* Callout with houses */
.callout {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--panel);
  border-left: 5px solid var(--blue);
  padding: 18px 20px;
  margin: 8px 0 0;
}
.callout .big { font-size: 50px; font-weight: 900; color: var(--blue); line-height: 1; white-space: nowrap; }
.callout .big small { font-size: 22px; font-weight: 700; margin: 0 4px; }
.houses { display: flex; gap: 5px; margin-bottom: 8px; }
.houses svg { width: 18px; height: 18px; fill: var(--navy); }
.houses svg.off { fill: #c2cbd6; }
.callout p { font-size: 14px; line-height: 1.5; margin: 0; color: var(--navy); }

/* Gentle mid-article CTA */
.soft-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid #d6e2ef;
  border-radius: 6px;
  background: #fafcfe;
  padding: 18px 20px;
  margin: 0 0 30px;
}
.soft-cta p { font-size: 16px; line-height: 1.55; margin: 0; flex: 1; }
.soft-cta strong { color: var(--ink); }
.soft-cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid var(--cta);
  border-radius: 6px;
  color: var(--cta);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.soft-cta-btn:hover { background: var(--cta); color: #fff; }

/* Horizontal bars */
.bars { margin: 4px 0 0; }
.bar-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; margin-bottom: 8px; }
.bar-row .name { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.bar-row .name span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.track { background: var(--panel); height: 34px; position: relative; }
.fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  min-width: 64px;
}
.fill.red { background: var(--red); }
.fill.green { background: var(--green); }
.fill.navy { background: var(--navy); }
.fill.blue { background: #13809a; }
.fill.grey { background: #6b7785; }

/* Example box */
.example {
  border: 1px solid var(--rule);
  border-top: 4px solid var(--navy);
  margin: 8px 0 0;
}
.example-head { padding: 14px 18px 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); font-weight: 700; }
.compare { display: grid; grid-template-columns: 1fr 1fr; }
.compare > div { padding: 12px 18px 18px; }
.compare > div + div { border-left: 1px solid var(--rule); background: #f4f9f4; }
.compare h4 { margin: 0 0 10px; font-size: 16px; color: var(--ink); }
.compare dl { margin: 0; font-size: 14px; }
.compare dl div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--rule); }
.compare dt { color: var(--muted); }
.compare dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }
.compare .total { font-size: 28px; font-weight: 900; margin-top: 12px; color: var(--red); }
.compare > div + div .total { color: var(--green); }
.compare .total small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.example-foot { background: var(--navy); color: #fff; padding: 12px 18px; font-size: 15px; }
.example-foot strong { font-size: 18px; }

/* Table */
.table-wrap { overflow-x: auto; margin: 8px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { background: var(--navy); color: #fff; font-size: 14px; font-weight: 700; }
tbody th { font-weight: 700; color: var(--ink); width: 34%; }
td.good { color: var(--green); font-weight: 700; }
td.bad { color: var(--red); font-weight: 700; }
tr.diff th, tr.diff td { background: #f4f9f4; }

/* Equity estimate */
.equity-table td:last-child { font-weight: 900; color: var(--navy); }

/* Qualify */
.steps p { margin-bottom: 14px; }
.small { font-size: 13px; color: var(--muted); }

.map { margin: 6px 0 22px; }
.us-map { display: block; width: 100%; height: auto; }
.us-map .state-link { fill: #3b8546; cursor: pointer; transition: opacity 0.2s ease; }
.us-map .state-link:hover { opacity: 0.8; }
.us-map .state-link:focus { outline: none; }
.us-map .state-link:focus-visible path { stroke: var(--navy); stroke-width: 2; }
.us-map .stateText { fill: #fff; }
.us-map #State_Names { pointer-events: none; }
.us-map [id^="btn-"] path { stroke: transparent; stroke-width: 6; }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  margin: 10px 0 34px;
  padding: 20px 16px;
  background: var(--cta);
  border-bottom: 4px solid var(--cta-hover);
  border-radius: 6px;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.cta:hover { background: var(--cta-hover); box-shadow: 0 6px 16px rgba(58, 77, 153, 0.35); }

/* Sources */
.sources { border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 10px; }
.sources h3 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.sources ol { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.sources li { margin-bottom: 6px; }

.site-footer { background: #006699; margin-top: 36px; padding: 30px 20px 60px; }
.site-footer footer { max-width: 660px; margin: 0 auto; text-align: center; color: #f4f5e6; font-size: 12px; line-height: 1.5; }
.footer-logo { width: 150px; height: 28px; margin: 0 auto 26px; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; }
.site-footer a { display: inline-block; padding: 12px 6px; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.site-footer a:focus-visible { outline-color: #fff; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  h1 { font-size: 27px; }
  h2 { font-size: 21px; }
  p { font-size: 16px; }
  .lead { font-size: 17px; }
  .byline .updated { display: none; }
  .stat .num { font-size: 26px; }
  .stat .num small { font-size: 12px; }
  .stat .label { font-size: 12px; }
  .stat { padding-right: 8px; }
  .stat + .stat { padding-left: 8px; }
  .callout { flex-direction: column; align-items: flex-start; gap: 10px; }
  .callout .big { font-size: 42px; }
  .bar-row { grid-template-columns: 96px 1fr; gap: 8px; }
  .fill { font-size: 15px; }
  .chart text { font-size: 22px; }
  .soft-cta { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .cta { font-size: 21px; min-height: 64px; padding: 16px 12px; }
  .compare { grid-template-columns: 1fr; }
  .compare > div + div { border-left: 0; border-top: 1px solid var(--rule); }
  table { font-size: 14px; }
  th, td { padding: 9px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
