/* ---------- Design tokens ---------- */
:root {
  --color-navy: #10263f;
  --color-navy-dark: #0a1a2c;
  --color-gold: #c99a3b;
  --color-gold-dark: #a97e28;
  --color-text: #1f2933;
  --color-text-muted: #52606d;
  --color-bg: #ffffff;
  --color-bg-muted: #f4f6f8;
  --color-border: #e2e6ea;
  --radius: 6px;
  --max-width: 1120px;
  font-size: 16px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--color-navy); }
ul { padding: 0; list-style: none; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}

h1, h2, h3 { color: var(--color-navy); line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 0.75rem; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn--accent {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}
.btn--accent:hover { background: var(--color-gold-dark); }
.btn--outline {
  background: transparent;
  border-color: #fff;
  color: #fff;
}
.hero .btn--outline:hover { background: rgba(255,255,255,0.1); }
.btn--outline.btn--dark { border-color: var(--color-navy); color: var(--color-navy); }
.btn--outline.btn--dark:hover { background: var(--color-bg-muted); }
.btn--small { padding: 0.4rem 0.9rem; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-navy);
}
.brand__logo { height: 56px; width: auto; object-fit: contain; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle__bar {
  width: 24px; height: 2px;
  background: var(--color-navy);
}

.primary-nav {
  display: none;
  align-items: center;
  gap: 1.15rem;
}
.primary-nav a { text-decoration: none; color: var(--color-navy); font-weight: 500; white-space: nowrap; }
.primary-nav a:hover { color: var(--color-gold-dark); }
.primary-nav.is-open { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding-bottom: 1rem; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .primary-nav { display: flex; }
}

/* ---------- Messages ---------- */
.messages { margin: 1rem 0; }
.message { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 0.5rem; }
.message--success { background: #e3f6e8; color: #1c5c31; }
.message--error { background: #fbe4e4; color: #7d2222; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-navy), var(--color-navy-dark));
  color: #fff;
  padding: 4.5rem 0;
}
.hero__inner { max-width: 720px; }
.hero h1 { color: #fff; }
.hero__lede { margin-top: 1rem; font-size: 1.15rem; color: #d7dee6; }
.hero__actions { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section--muted { background: var(--color-bg-muted); }

.features {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.feature p { color: var(--color-text-muted); }

/* ---------- Contact section ---------- */
.contact-section {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .contact-section { grid-template-columns: 0.9fr 1.1fr; }
}
.contact-details { margin-top: 1rem; }
.contact-details li { margin-bottom: 0.4rem; }
.disclosure-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-left: 3px solid var(--color-gold);
  padding-left: 0.9rem;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
}
.form-row--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.form-row--checkbox label { font-weight: 400; margin: 0; }
.form-row--checkbox input { margin-top: 0.3rem; }
.form-row .errorlist {
  color: #b3261e;
  font-size: 0.85rem;
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
}
.form-legal { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 1rem; }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
.team-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.team-card__photo {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
}
.team-card__title { color: var(--color-text-muted); margin-bottom: 0.75rem; }
.team-card .btn { margin-top: 1rem; }

/* ---------- Reviews ---------- */
.reviews-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}
@media (min-width: 700px) {
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
}
.review-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.review-card__stars { color: var(--color-gold); letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.review-card__text { color: var(--color-text); margin-bottom: 1rem; }
.review-card__author { font-weight: 600; color: var(--color-navy); }
.review-card__author span { font-weight: 400; color: var(--color-text-muted); }
.reviews-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

.review-carousel { margin-top: 1.5rem; max-width: 640px; }
.review-carousel__track { position: relative; min-height: 180px; }
.review-carousel__slide { text-align: center; }
.review-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.review-carousel__arrow {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  line-height: 1;
  color: var(--color-navy);
  cursor: pointer;
  flex-shrink: 0;
}
.review-carousel__arrow:hover { background: var(--color-bg-muted); }
.review-carousel__dots { display: flex; gap: 0.5rem; }
.review-carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--color-border);
  cursor: pointer;
}
.review-carousel__dot.is-active { background: var(--color-navy); }

/* ---------- Prose (legal pages) ---------- */
.prose { max-width: 72ch; }
.prose h1 { margin-bottom: 1.5rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1rem; color: var(--color-text); }
.prose ul, .prose ol { padding-left: 1.5rem; list-style: revert; }

.lede { max-width: 72ch; font-size: 1.1rem; color: var(--color-text-muted); }

/* ---------- Loan programs ---------- */
.loan-program-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .loan-program-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .loan-program-grid { grid-template-columns: 1fr; }
}
.loan-program-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(16, 38, 63, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.loan-program-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--color-bg-muted);
  color: var(--color-navy);
  margin-bottom: 1rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.loan-program-card__icon svg { width: 22px; height: 22px; }
.loan-program-card__title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--color-navy);
  transition: color 0.15s ease;
}
.loan-program-card__desc {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  flex-grow: 1;
  transition: color 0.15s ease;
}
.loan-program-card__link {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}
.loan-program-card:hover {
  background: var(--color-navy);
  border-color: var(--color-navy);
}
.loan-program-card:hover .loan-program-card__icon {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.loan-program-card:hover .loan-program-card__title,
.loan-program-card:hover .loan-program-card__desc,
.loan-program-card:hover .loan-program-card__link {
  color: #fff;
}
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #d7dee6;
}
.back-link:hover { color: #fff; }
.loan-program-cta { margin-top: 2.5rem; }

/* ---------- VA Loans hub ---------- */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.quick-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.quick-link-card:hover {
  border-color: var(--color-navy);
  box-shadow: 0 1px 3px rgba(16, 38, 63, 0.1);
}
.quick-link-card__title { font-weight: 700; color: var(--color-navy); }
.quick-link-card__desc { font-size: 0.88rem; color: var(--color-text-muted); }

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (max-width: 900px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .article-grid { grid-template-columns: 1fr; }
}
.article-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(16, 38, 63, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.article-card__title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--color-navy);
  transition: color 0.15s ease;
}
.article-card__desc {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  flex-grow: 1;
  transition: color 0.15s ease;
}
.article-card__link {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}
.article-card:hover {
  background: var(--color-navy);
  border-color: var(--color-navy);
}
.article-card:hover .article-card__title,
.article-card:hover .article-card__desc,
.article-card:hover .article-card__link {
  color: #fff;
}
.prose .cta-box {
  background: var(--color-bg-muted);
  border-left: 3px solid var(--color-gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.prose .cta-box p { margin-bottom: 0.75rem; }
.prose .cta-box p:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 72ch;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}
.faq-item summary {
  cursor: pointer;
  padding: 1.1rem 2.75rem 1.1rem 1.5rem;
  font-weight: 600;
  color: var(--color-navy);
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--color-text-muted);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item__answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text);
}
.faq-item__answer p { margin-bottom: 0.75rem; }
.faq-item__answer p:last-child { margin-bottom: 0; }
.faq-footer-note { margin-top: 2rem; color: var(--color-text-muted); max-width: 72ch; }

.lead-capture-form {
  max-width: 420px;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--color-bg-muted);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-gold);
}
.lead-capture-form .form-row:last-of-type { margin-bottom: 1rem; }

/* ---------- Mortgage terms glossary ---------- */
.terms-search-row {
  max-width: 420px;
  margin-bottom: 2.5rem;
}
.terms-search-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.terms-search-row input[type="search"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
}
.terms-search-empty { margin-top: 1rem; color: var(--color-text-muted); }

.terms-list { max-width: 72ch; }
.terms-letter-heading {
  color: var(--color-gold-dark);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.4rem;
  margin: 2.5rem 0 1.25rem;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}
.terms-letter-group:first-child .terms-letter-heading { margin-top: 0; }
.term-card { margin-bottom: 1.75rem; }
.term-card__name { margin-bottom: 0.35rem; }
.term-card__acronym { color: var(--color-text-muted); font-weight: 400; }
.term-card__definition p { margin-bottom: 0.5rem; color: var(--color-text); }
.term-card__definition p:last-child { margin-bottom: 0; }

/* ---------- Financial literacy resources ---------- */
.resource-category { margin-bottom: 3rem; }
.resource-category h2 {
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.resource-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
}
.resource-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.resource-card__type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gold-dark);
  background: var(--color-bg-muted);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  margin-bottom: 0.75rem;
}
.resource-card__title { margin-bottom: 0.15rem; }
.resource-card__creator { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.resource-card__description p { margin-bottom: 0.75rem; color: var(--color-text); }
.resource-card__link { font-weight: 600; }

/* ---------- Newsletter signup ---------- */
.newsletter-summary { max-width: 65ch; margin-bottom: 2.5rem; }
.newsletter-form-wrap { max-width: 480px; }
.newsletter-consent { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 1rem; }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 3rem 0; }
.error-page .btn { margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: #cfd8e3;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-heading { color: #fff; font-size: 1.05rem; margin-bottom: 0.75rem; }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding-bottom: 2rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
.site-footer a { color: #cfd8e3; }
.site-footer a:hover { color: var(--color-gold); }
.footer-list li { margin-bottom: 0.4rem; }
.social-links { display: flex; gap: 0.9rem; margin-top: 1rem; }
.social-links a { color: #cfd8e3; line-height: 0; }
.social-links a:hover { color: var(--color-gold); }
.footer-social {
  text-align: center;
  padding-bottom: 2rem;
}
.footer-social .footer-heading { margin-bottom: 0.75rem; }
.social-links--center { justify-content: center; margin-top: 0; }
.equal-housing {
  font-size: 0.85rem;
  color: #9aa7b5;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  margin-top: 0.5rem;
}
.copyright { font-size: 0.8rem; color: #7c8a99; margin-top: 0.75rem; }

/* ---------- Mortgage calculator ---------- */
.hero--compact { padding: 3rem 0; }

.calculator {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .calculator { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}

.calculator-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.calculator-form .form-row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) {
  .calculator-form .form-row--split { grid-template-columns: 1fr; }
}
.input-prefix, .input-suffix {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.input-prefix span, .input-suffix span {
  padding: 0.65rem 0.75rem;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.input-prefix input, .input-suffix input,
.calculator-form select {
  flex: 1;
  width: 100%;
  border: none;
  padding: 0.65rem 0.75rem;
  font: inherit;
  min-width: 0;
}
.calculator-form select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}
.input-prefix input:focus-visible, .input-suffix input:focus-visible {
  outline: none;
}
.input-prefix:focus-within, .input-suffix:focus-within {
  outline: 3px solid var(--color-gold);
  outline-offset: 1px;
}

.calculator-results {
  background: var(--color-navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 90px;
}
.calculator-results__label { color: #b9c4d0; margin-bottom: 0.25rem; }
.calculator-results__total { font-size: 2.4rem; font-weight: 700; color: #fff; margin-bottom: 1.25rem; }
.calculator-results__loan { margin-top: 1.25rem; color: #cfd8e3; }
.calculator-results .btn { margin-top: 1.5rem; width: 100%; text-align: center; }

.donut-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
}
.donut { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut__track { fill: none; stroke: rgba(255,255,255,0.15); stroke-width: 14; }
.donut-segment { fill: none; stroke-width: 14; }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.donut-center__amount { font-size: 1.7rem; font-weight: 700; color: #fff; }
.donut-center__label { font-size: 0.85rem; color: #b9c4d0; }

.payment-breakdown li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.95rem;
}
.payment-breakdown li:last-child { border-bottom: none; }
.payment-breakdown li[hidden] { display: none; }
.swatch {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 0.6rem;
}
.swatch--principal { background: var(--color-gold); }
.swatch--tax { background: #6fa3c7; }
.swatch--insurance { background: #7fb3a0; }
.swatch--pmi { background: #c0785a; }
.swatch--hoa { background: #9a8fc2; }
.donut-segment.swatch--principal { stroke: var(--color-gold); }
.donut-segment.swatch--tax { stroke: #6fa3c7; }
.donut-segment.swatch--insurance { stroke: #7fb3a0; }
.donut-segment.swatch--pmi { stroke: #c0785a; }
.donut-segment.swatch--hoa { stroke: #9a8fc2; }

/* ---------- Calculator tabs ---------- */
.calc-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
  overflow-x: auto;
}
.calc-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.85rem 0.25rem;
  margin-right: 1.5rem;
  font: inherit;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.calc-tab:hover { color: var(--color-navy); }
.calc-tab.is-active { color: var(--color-navy); border-bottom-color: var(--color-gold); }

/* ---------- Loan type segmented control (also used generically as .seg-tabs/.seg-tab) ---------- */
.loan-type-tabs, .seg-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  background: var(--color-bg-muted);
  border-radius: var(--radius);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}
.loan-type-tab, .seg-tab {
  background: none;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
}
.loan-type-tab:hover, .seg-tab:hover { color: var(--color-navy); }
.loan-type-tab.is-active, .seg-tab.is-active {
  background: #fff;
  color: var(--color-navy);
  box-shadow: 0 1px 3px rgba(16,38,63,0.15);
}

/* ---------- Numbered calculator section headers ---------- */
.calc-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  margin: 2rem 0 1rem;
  color: var(--color-navy);
}
.calc-section-title:first-child { margin-top: 0; }
.calc-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.checkbox-label input { margin: 0; }

.field-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-bg-muted);
  border-left: 3px solid var(--color-gold);
  padding: 0.75rem 1rem;
  margin: 0;
}

/* ---------- Loan comparison ---------- */
.calculator-form--wide { margin-bottom: 2rem; }
.comparison-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .comparison-grid { grid-template-columns: 1fr 1fr; }
}
.comparison-column {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.comparison-result {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.comparison-result__label { color: var(--color-text-muted); margin-bottom: 0.25rem; }
.comparison-result__total { font-size: 1.8rem; font-weight: 700; color: var(--color-navy); margin-bottom: 0.75rem; }
.comparison-result__line { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 0.25rem; }
.comparison-summary {
  background: var(--color-bg-muted);
  border-left: 3px solid var(--color-gold);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  font-weight: 600;
}

/* ---------- Buydown table ---------- */
.buydown-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.buydown-table th, .buydown-table td {
  text-align: left;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.buydown-table th { color: #b9c4d0; font-weight: 600; }

/* ---------- VA Home Loan Guide: patriotic red/white/blue theme ---------- */
.va-guide-theme {
  --color-navy: #0a3161;
  --color-navy-dark: #041e42;
  --color-gold: #b22234;
  --color-gold-dark: #8c1a29;
}
.va-guide-theme .btn--accent { color: #fff; }
