*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
}

/* ── NAVBAR ── */
.navbar {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  height: 60px;
}

.navbar__logo {
  display: flex;
  align-items: center;
}

.navbar__logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar__icon {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}

.navbar__wordmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.navbar__wordmark-top {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}

.navbar__the {
  font-size: 10px;
  font-weight: 400;
  color: #333;
  letter-spacing: 0.05em;
}

.navbar__mortgage {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.navbar__reports {
  font-size: 18px;
  font-weight: 400;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.navbar__sub {
  font-size: 9px;
  color: #888;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* keep old .logo-img for any remaining uses */
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

/* ── HERO ── */
.hero {
  position: relative;
  background: linear-gradient(135deg, #5baee8 0%, #4a9ee0 40%, #3b8fd6 100%);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 24px 100px;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
}

.hero__title {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero__sub {
  font-size: clamp(14px, 2vw, 17px);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

/* ── DECORATIVE SQUARES ── */
.hero__decorations {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.deco {
  position: absolute;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
}

.deco--1 {
  width: 60px;
  height: 60px;
  top: 30px;
  right: 18%;
}

.deco--2 {
  width: 36px;
  height: 36px;
  top: 24px;
  right: 10%;
}

.deco--3 {
  width: 80px;
  height: 80px;
  top: 50%;
  right: 8%;
  transform: translateY(-50%);
}

.deco--4 {
  width: 44px;
  height: 44px;
  bottom: 30%;
  right: 22%;
}

.deco--5 {
  width: 24px;
  height: 24px;
  bottom: 28%;
  right: 13%;
}

/* ── WAVE ── */
.hero__wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  line-height: 0;
}

.hero__wave svg {
  width: 100%;
  height: 70px;
  display: block;
}

/* ── TOOLS ── */
.tools {
  padding: 56px 24px;
  background: #fff;
}

.tools__container {
  max-width: 1140px;
  margin: 0 auto;
}

.tools__header {
  text-align: center;
  margin-bottom: 40px;
}

.tools__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 8px;
}

.tools__title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 400;
  color: #141e28;
  line-height: 1.3;
}

.tools__title strong {
  font-weight: 700;
}

.tools__grid {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid #ebebeb;
  border-left: 1px solid #ebebeb;
}

.tool-card {
  display: block;
  width: 33.333%;
  padding: 36px 32px;
  border-right: 1px solid #ebebeb;
  border-bottom: 1px solid #ebebeb;
  text-decoration: none;
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
}

.tool-card:hover {
  background: #f9fafb;
}

.tool-card__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  color: #141e28;
}

.tool-card__icon-hex {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 90px;
  height: 90px;
  background: #f6f5fc;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
}

.tool-card__icon svg {
  fill: currentColor;
  transition: fill 0.1s;
}

.tool-card__name {
  font-size: 17px;
  font-weight: 600;
  color: #141e28;
  margin-bottom: 8px;
  line-height: 1.3;
}

.tool-card__desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .tool-card {
    width: 50%;
  }
}

@media (max-width: 480px) {
  .tool-card {
    width: 100%;
  }
}

/* ── FOOTER ── */
.site-footer {
  background: #fff;
}

.site-footer__top {
  padding: 40px 24px 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-badge {
  height: 52px;
  width: auto;
  display: block;
}

.site-footer__bottom {
  border-top: 1px solid #e4e4e9;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.site-footer__copy {
  font-size: 13px;
  color: #374151;
  white-space: nowrap;
}

.site-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
  color: #374151;
}

.site-footer__nav span {
  color: #374151;
  padding: 0 8px;
}

.site-footer__nav a {
  color: #374151;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__nav a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
  }

  .site-footer__top {
    gap: 32px;
  }

  .footer-badge {
    height: 40px;
  }
}

/* ══════════════════════════════════════════
   REFINANCE CALCULATOR PAGE
   ══════════════════════════════════════════ */

.refcalc-page {
  background: #f4f4f4;
  min-height: calc(100vh - 60px);
  padding: 40px 24px 60px;
}

.refcalc-container {
  max-width: 1140px;
  margin: 0 auto;
}

.refcalc-title {
  font-size: 26px;
  font-weight: 700;
  color: #141e28;
  text-align: center;
  margin-bottom: 28px;
}

/* ── Step block ── */
.refcalc-step {
  border: 1px solid #d0d0d0;
  margin-bottom: 20px;
  background: #fff;
}

.refcalc-step__header {
  background: #1e1e1e;
  padding: 18px 28px;
}

.refcalc-step__header h2 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.refcalc-step__body {
  padding: 32px 28px;
}

/* ── Fields row ── */
.refcalc-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.refcalc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.refcalc-field__label {
  font-size: 14px;
  font-weight: 700;
  color: #141e28;
  display: flex;
  align-items: center;
  gap: 6px;
}

.refcalc-field__hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* ── Input wrapper ── */
.refcalc-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #bbb;
  background: #fff;
}

.refcalc-input-wrap:focus-within {
  border-color: #3278be;
  outline: 2px solid rgba(50, 120, 190, 0.2);
}

.refcalc-affix {
  padding: 0 10px;
  font-size: 14px;
  color: #555;
  background: #f7f7f7;
  border-right: 1px solid #bbb;
  height: 40px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.refcalc-input-wrap--suffix .refcalc-affix {
  border-right: none;
  border-left: 1px solid #bbb;
}

.calc-input {
  width: 100%;
  height: 40px;
  border: none;
  outline: none;
  padding: 0 10px;
  font-size: 15px;
  color: #141e28;
  background: transparent;
}

/* ── Select ── */
.refcalc-select-wrap {
  position: relative;
}

.calc-select {
  width: 100%;
  height: 40px;
  border: 1px solid #bbb;
  padding: 0 36px 0 10px;
  font-size: 15px;
  color: #141e28;
  background: #fff;
  appearance: none;
  cursor: pointer;
  outline: none;
}

.calc-select:focus {
  border-color: #3278be;
  outline: 2px solid rgba(50, 120, 190, 0.2);
}

.refcalc-select-wrap::after {
  content: '▼';
  font-size: 10px;
  color: #555;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ── Tooltip ── */
.refcalc-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #6b7280;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
}

/* ── Results ── */
.refcalc-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.refcalc-result-card {
  border: 1px solid #ddd;
  padding: 20px 16px;
  text-align: center;
}

.refcalc-result-card__label {
  font-size: 14px;
  font-weight: 600;
  color: #3278be;
  margin-bottom: 12px;
}

.refcalc-result-card__row {
  font-size: 14px;
  color: #141e28;
  line-height: 1.8;
}

.calc-val--good {
  color: #3278be;
}

.calc-val--bad {
  color: #e02d3d;
}

/* ── Next Steps ── */
.refcalc-next {
  text-align: center;
  border-top: 1px solid #eee;
  padding-top: 28px;
}

.refcalc-next__title {
  font-size: 20px;
  font-weight: 700;
  color: #3278be;
  margin-bottom: 8px;
}

.refcalc-next__sub {
  font-size: 14px;
  color: #555;
  margin-bottom: 24px;
}

.refcalc-lenders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.refcalc-lender-card {
  border: 1px solid #ddd;
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.refcalc-lender-logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Quicken Loans logo */
.lender-quicken {
  font-family: Georgia, serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.lender-quicken__name {
  font-size: 26px;
  font-weight: 700;
  font-style: italic;
  color: #c0392b;
}

.lender-quicken__loans {
  font-size: 26px;
  font-weight: 700;
  font-style: italic;
  color: #1a1a1a;
}

/* Rocket Mortgage logo */
.lender-rocket {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.lender-rocket__name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #1a1a1a;
}

.lender-rocket__sub {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.lender-rocket__by {
  font-size: 10px;
  color: #777;
  margin-top: 2px;
}

/* AmeriSave logo */
.lender-amerisave {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
}

.lender-amerisave__icon {
  font-size: 16px;
  color: #1e5fa8;
  margin-bottom: 2px;
}

.lender-amerisave__name {
  font-size: 20px;
  font-weight: 700;
  color: #1e5fa8;
}

.lender-amerisave__sub {
  font-size: 11px;
  color: #444;
}

.lender-amerisave__nmls {
  font-size: 10px;
  color: #888;
}

/* Visit Lender button */
.refcalc-btn-visit {
  display: inline-block;
  background: #3278be;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 28px;
  text-decoration: none;
  border-radius: 3px;
  transition: opacity 0.15s;
}

.refcalc-btn-visit:hover {
  opacity: 0.85;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .refcalc-results {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .refcalc-fields {
    grid-template-columns: 1fr;
  }

  .refcalc-lenders {
    grid-template-columns: 1fr;
  }

  .refcalc-results {
    grid-template-columns: repeat(2, 1fr);
  }

  .refcalc-step__header {
    padding: 14px 16px;
  }

  .refcalc-step__body {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .refcalc-results {
    grid-template-columns: 1fr;
  }
}

/* ── Refinance Calculator — Intro & Article Content ── */
.refcalc-intro {
  margin-bottom: 32px;
}

.refcalc-intro p {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 12px;
}

.refcalc-section-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 24px;
}

.refcalc-article {
  padding: 48px 0 64px;
  background: #fff;
}

.refcalc-article__section {
  max-width: 780px;
  margin: 0 auto 48px;
}

.refcalc-article__section h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8f0fe;
}

.refcalc-article__section h4 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 24px 0 8px;
}

.refcalc-article__section p {
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  margin-bottom: 14px;
}

.refcalc-article__section ul {
  margin: 8px 0 16px 20px;
  padding: 0;
}

.refcalc-article__section li {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 6px;
}

.refcalc-disclaimer {
  font-size: 13px;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 24px;
}

/* ── FAQ Accordion ── */
.faq {
  border-top: 1px solid #ddd;
  margin-top: 8px;
}

.faq__item {
  border-bottom: 1px solid #ddd;
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: left;
  cursor: pointer;
  gap: 16px;
}

.faq__question:hover {
  color: #1565c0;
}

.faq__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #1976d2;
  transition: transform 0.25s ease;
}

.faq__question[aria-expanded="true"] .faq__icon {
  transform: rotate(180deg);
}

.faq__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq__answer--open {
  max-height: 400px;
  padding-bottom: 16px;
}

.faq__answer p {
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  margin: 0;
}

@media (max-width: 700px) {
  .faq__question {
    font-size: 15px;
    padding: 16px 0;
  }
}

@media (max-width: 700px) {
  .refcalc-article__section h2 {
    font-size: 20px;
  }

  .refcalc-article__section h4 {
    font-size: 16px;
  }

  .refcalc-article__section p,
  .refcalc-article__section li {
    font-size: 15px;
  }
}

/* ════════════════════════════════════════
   VA LOAN CALCULATOR PAGE
   ════════════════════════════════════════ */

.va-page {
  padding: 40px 20px 0;
  background: #fff;
}

.va-container {
  max-width: 900px;
  margin: 0 auto;
}

.va-title {
  font-size: 32px;
  font-weight: 400;
  color: #141e28;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 24px;
}

.va-intro {
  margin-bottom: 32px;
}

.va-intro p {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 10px;
}

/* ── Calculator Box ── */
.va-calc {
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 48px;
}

.va-calc__header {
  background: #1a1a1a;
  padding: 16px 24px;
}

.va-calc__header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.va-calc__body {
  padding: 28px 24px 20px;
}

/* ── Field Grid ── */
.va-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 16px;
  margin-bottom: 20px;
}

.va-fields--narrow {
  grid-template-columns: repeat(2, 1fr);
}

.va-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.va-field__label {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.va-field__note {
  font-weight: 400;
  color: #777;
  font-size: 12px;
}

/* ── Inputs ── */
.va-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 3px;
  overflow: hidden;
  height: 38px;
}

.va-input-wrap--prefix .va-affix {
  padding: 0 8px;
  font-size: 14px;
  color: #555;
  background: #f5f5f5;
  border-right: 1px solid #ccc;
  height: 100%;
  display: flex;
  align-items: center;
}

.va-input-wrap--suffix .va-affix {
  padding: 0 8px;
  font-size: 14px;
  color: #555;
  background: #f5f5f5;
  border-left: 1px solid #ccc;
  height: 100%;
  display: flex;
  align-items: center;
}

.va-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 10px;
  font-size: 15px;
  color: #1a1a1a;
  height: 100%;
  background: #fff;
  min-width: 0;
}

.va-input--narrow {
  width: 60px;
}

.va-field__hint-inline {
  padding: 0 8px;
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

/* ── Down payment dual input ── */
.va-down-payment {
  display: flex;
  gap: 6px;
}

.va-down-payment .va-input-wrap {
  flex: 1;
}

/* ── Loan term toggle ── */
.va-term-toggle {
  display: flex;
  height: 38px;
}

.va-term-btn {
  flex: 1;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
}

.va-term-btn:first-child {
  border-radius: 3px 0 0 3px;
  border-right: none;
}

.va-term-btn:last-child {
  border-radius: 0 3px 3px 0;
}

.va-term-btn--active {
  background: #3ba6b9;
  color: #fff;
  border-color: #3ba6b9;
}

/* ── Select ── */
.va-select-wrap {
  position: relative;
}

.va-select {
  width: 100%;
  height: 38px;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 0 28px 0 10px;
  font-size: 14px;
  color: #1a1a1a;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 10px center;
  cursor: pointer;
}

/* ── Funding Fee Row ── */
.va-funding-row {
  display: flex;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid #eee;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.va-funding-item {
  font-size: 13px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 5px;
}

.va-funding-item strong {
  font-weight: 700;
}

.va-funding-item__icon {
  color: #1976d2;
  cursor: help;
  font-size: 14px;
}

/* ── Actions ── */
.va-calc__actions {
  text-align: center;
  margin-bottom: 12px;
}

.va-btn-results {
  padding: 12px 40px;
  font-size: 16px;
  color: #e8315f;
  background: #fff;
  border: 2px solid #e8315f;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.va-btn-results:hover {
  background: #e8315f;
  color: #fff;
}

.va-rate-disclaimer {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin: 0;
}

/* ── Results ── */
.va-results {
  border-top: 1px solid #eee;
  padding: 32px 24px;
}

.va-results__inner {
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 24px;
  align-items: center;
}

/* Donut */
.va-donut-wrap {
  display: flex;
  justify-content: center;
}

.va-donut {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(#e8315f 0deg 310deg, #f5c518 310deg 340deg, #3ba6b9 340deg 355deg, #4a90d9 355deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.va-donut::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  background: #fff;
  border-radius: 50%;
}

.va-donut__center {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 8px;
}

.va-donut__label {
  display: block;
  font-size: 12px;
  color: #555;
  line-height: 1.3;
  margin-bottom: 4px;
}

.va-donut__amount {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}

/* Breakdown */
.va-breakdown__title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 14px;
}

.va-breakdown__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.va-breakdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: #333;
}

.va-breakdown__dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.va-breakdown__dot--pi  { background: #e8315f; }
.va-breakdown__dot--tax { background: #f5c518; }
.va-breakdown__dot--ins { background: #3ba6b9; }
.va-breakdown__dot--hoa { background: #4a90d9; }

.va-breakdown__name {
  flex: 1;
}

.va-breakdown__val {
  font-weight: 600;
}

/* CTA box */
.va-results__cta {
  text-align: center;
  padding: 20px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.va-results__cta p {
  font-size: 14px;
  color: #333;
  margin-bottom: 14px;
  line-height: 1.5;
}

.va-btn-cta {
  display: inline-block;
  padding: 10px 24px;
  background: #1976d2;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s;
}

.va-btn-cta:hover {
  background: #1565c0;
}

/* ── Article ── */
.va-article {
  padding: 48px 20px 64px;
  background: #fff;
}

.va-article__section {
  max-width: 780px;
  margin: 0 auto 48px;
}

.va-article__section h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8f0fe;
}

.va-article__section p {
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  margin-bottom: 14px;
}

.va-article__section ul {
  margin: 8px 0 16px 20px;
  padding: 0;
}

.va-article__section li {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 6px;
}

/* ── Funding fee table ── */
.va-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

.va-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.va-table th,
.va-table td {
  border: 1px solid #ddd;
  padding: 10px 14px;
  text-align: center;
}

.va-table th {
  background: #1a1a1a;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.va-table td:first-child {
  text-align: left;
  font-weight: 600;
  background: #f9f9f9;
}

.va-table tbody tr:nth-child(even) td:not(:first-child) {
  background: #f5f5f5;
}

.va-disclaimer {
  font-size: 13px;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 24px;
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .va-fields {
    grid-template-columns: repeat(2, 1fr);
  }

  .va-results__inner {
    grid-template-columns: 1fr 1fr;
  }

  .va-results__cta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .va-title {
    font-size: 24px;
  }

  .va-calc__body {
    padding: 20px 16px;
  }

  .va-fields {
    grid-template-columns: 1fr;
  }

  .va-fields--narrow {
    grid-template-columns: 1fr;
  }

  .va-results__inner {
    grid-template-columns: 1fr;
  }

  .va-donut {
    width: 160px;
    height: 160px;
  }

  .va-donut::after {
    width: 96px;
    height: 96px;
  }

  .va-donut__amount {
    font-size: 18px;
  }

  .va-article__section h2 {
    font-size: 20px;
  }

  .va-article__section p,
  .va-article__section li {
    font-size: 15px;
  }
}

/* ── FHA-specific ── */
.fha-note {
  font-size: 13px;
  color: #888;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

/* ════════════════════════════════════════
   MORTGAGE CALCULATOR PAGE
   ════════════════════════════════════════ */

.mc-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 0;
}

.mc-title {
  font-size: 28px;
  font-weight: 400;
  color: #141e28;
  margin-bottom: 20px;
}

/* ── Tabs ── */
.mc-tabs {
  display: flex;
  margin-bottom: 0;
}

.mc-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 20px;
  border: none;
  cursor: pointer;
  background: #3d5166;
  color: #fff;
  text-align: left;
  opacity: 0.75;
}

.mc-tab--active {
  background: #2980b9;
  opacity: 1;
}

.mc-tab:hover {
  opacity: 1;
}

.mc-tab__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mc-tab__sub {
  font-size: 12px;
  margin-top: 2px;
  opacity: 0.85;
}

/* ── Body layout ── */
.mc-body {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
  border: 1px solid #e0e0e0;
  border-top: none;
}

.mc-left {
  padding: 24px;
  border-right: 1px solid #e0e0e0;
}

/* ── Results ── */
.mc-results {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}

.mc-donut-wrap {
  flex-shrink: 0;
}

.mc-donut {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(#e8315f 0deg 299deg, #4caf50 299deg 347deg, #4a90d9 347deg 359deg, #9b59b6 359deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mc-donut::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  background: #fff;
  border-radius: 50%;
}

.mc-donut__center {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 8px;
}

.mc-donut__label {
  display: block;
  font-size: 12px;
  color: #555;
  line-height: 1.3;
  margin-bottom: 4px;
}

.mc-donut__amount {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
}

.mc-breakdown__title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 14px;
}

.mc-breakdown__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mc-breakdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 14px;
  color: #333;
}

.mc-breakdown__dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.mc-breakdown__name { flex: 1; }
.mc-breakdown__val  { font-weight: 600; }

/* ── Fields ── */
.mc-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.mc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mc-field--action {
  justify-content: flex-end;
}

.mc-field__label {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
}

.mc-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 3px;
  height: 38px;
  overflow: hidden;
}

.mc-input-wrap--prefix .mc-affix {
  padding: 0 8px;
  font-size: 13px;
  color: #555;
  background: #f5f5f5;
  border-right: 1px solid #ccc;
  height: 100%;
  display: flex;
  align-items: center;
}

.mc-input-wrap--suffix .mc-affix {
  padding: 0 8px;
  font-size: 13px;
  color: #555;
  background: #f5f5f5;
  border-left: 1px solid #ccc;
  height: 100%;
  display: flex;
  align-items: center;
}

.mc-input-wrap--hint .mc-affix {
  padding: 0 8px;
  font-size: 13px;
  color: #555;
  background: #f5f5f5;
  border-right: 1px solid #ccc;
  height: 100%;
  display: flex;
  align-items: center;
}

.mc-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 8px;
  font-size: 14px;
  color: #1a1a1a;
  height: 100%;
  background: #fff;
  min-width: 0;
}

.mc-input--narrow { max-width: 52px; }

.mc-hint {
  padding: 0 8px;
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

.mc-down {
  display: flex;
  gap: 6px;
}

.mc-down .mc-input-wrap { flex: 1; }

/* ── Term toggle ── */
.mc-term-toggle {
  display: flex;
  height: 38px;
}

.mc-term-btn {
  flex: 1;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
}

.mc-term-btn:first-child {
  border-radius: 3px 0 0 3px;
  border-right: none;
}

.mc-term-btn:last-child {
  border-radius: 0 3px 3px 0;
}

.mc-term-btn--active {
  background: #3ba6b9;
  color: #fff;
  border-color: #3ba6b9;
}

/* ── Select ── */
.mc-select-wrap { position: relative; }

.mc-select {
  width: 100%;
  height: 38px;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 0 28px 0 10px;
  font-size: 14px;
  color: #1a1a1a;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 10px center;
  cursor: pointer;
}

/* ── View Full Report ── */
.mc-btn-report {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid #2980b9;
  border-radius: 3px;
  color: #2980b9;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.mc-btn-report:hover {
  background: #2980b9;
  color: #fff;
}

.mc-source {
  font-size: 11px;
  color: #999;
  margin-top: 12px;
  line-height: 1.5;
}

/* ── CTA sidebar ── */
.mc-cta {
  padding: 24px 20px;
  background: #2980b9;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.mc-cta__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.mc-cta__text {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.9;
}

.mc-cta__btn {
  display: inline-block;
  padding: 12px 20px;
  background: #e8315f;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
  transition: background 0.2s;
}

.mc-cta__btn:hover { background: #c0284f; }

/* ── Article ── */
.mc-article {
  padding: 48px 20px 64px;
  background: #fff;
}

.mc-article__container {
  max-width: 780px;
  margin: 0 auto;
}

.mc-article__section {
  margin-bottom: 48px;
}

.mc-article__section h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8f0fe;
}

.mc-article__section h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 24px 0 8px;
}

.mc-article__section p {
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  margin-bottom: 14px;
}

.mc-article__section ul,
.mc-article__section ol {
  margin: 8px 0 16px 20px;
  padding: 0;
}

.mc-article__section li {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 8px;
}

.mc-formula {
  background: #f5f7fa;
  border-left: 3px solid #2980b9;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 15px;
  border-radius: 0 4px 4px 0;
}

.mc-disclaimer {
  font-size: 13px;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 24px;
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .mc-body {
    grid-template-columns: 1fr;
  }

  .mc-left {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }

  .mc-cta {
    padding: 20px;
  }

  .mc-results {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .mc-tabs {
    flex-direction: column;
  }

  .mc-row {
    grid-template-columns: 1fr;
  }

  .mc-donut {
    width: 160px;
    height: 160px;
  }

  .mc-donut::after {
    width: 96px;
    height: 96px;
  }

  .mc-donut__amount {
    font-size: 20px;
  }

  .mc-article__section h2 { font-size: 20px; }
  .mc-article__section p,
  .mc-article__section li { font-size: 15px; }
}

/* =============================================
   USDA INCOME LIMITS PAGE
   ============================================= */

.uil-page {
  background: #fff;
  min-height: 100vh;
  padding: 48px 16px 60px;
}

.uil-container {
  max-width: 900px;
  margin: 0 auto;
}

.uil-title {
  font-size: 40px;
  font-weight: 400;
  color: #222;
  text-align: center;
  margin: 0 0 24px;
}

.uil-intro {
  font-size: 16px;
  color: #444;
  text-align: center;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto 40px;
}

/* Tool — no card, just centered content */
.uil-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 48px;
}

.uil-step {
  width: 100%;
  max-width: 320px;
  margin-bottom: 20px;
}

.uil-step__label {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: #555;
  margin-bottom: 8px;
}

.uil-select-wrap {
  position: relative;
}

.uil-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #555;
  font-size: 14px;
}

.uil-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 15px;
  color: #333;
  background: #fff;
  appearance: none;
  cursor: pointer;
}

.uil-select:focus {
  outline: none;
  border-color: #3ba6b9;
  box-shadow: 0 0 0 3px rgba(59,166,185,0.15);
}

/* Result */
.uil-result {
  width: 100%;
  max-width: 420px;
  margin-top: 16px;
}

.uil-result__headline {
  font-size: 16px;
  color: #444;
  margin: 0 0 20px;
  text-align: center;
  line-height: 1.5;
}

.uil-result__boxes {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.uil-box {
  position: relative;
  border-radius: 4px;
  border: 1px solid #d6e8ef;
  background: #eaf4f8;
  padding: 20px 20px 20px 20px;
}

.uil-box__label {
  position: absolute;
  top: -1px;
  left: -1px;
  display: inline-block;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #fff;
  text-transform: uppercase;
  border-radius: 4px 0 4px 0;
}

.uil-box--one .uil-box__label   { background: #c0395a; }
.uil-box--five .uil-box__label  { background: #3a8fa0; }

.uil-box__amount {
  display: block;
  padding-top: 28px;
  font-size: 38px;
  font-weight: 600;
  color: #1d3557;
  text-align: center;
  letter-spacing: 0.02em;
}

/* Article */
.uil-article {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  padding: 32px;
  margin-bottom: 40px;
}

.uil-article__section {
  margin-bottom: 28px;
}

.uil-article__section:last-child { margin-bottom: 0; }

.uil-article__section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 10px;
}

.uil-article__section p {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin: 0 0 10px;
}

/* Free tools */
.uil-tools {
  margin-bottom: 20px;
}

.uil-tools__title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 16px;
}

.uil-tools__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.uil-tool-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.uil-tool-card:hover {
  border-color: #3ba6b9;
  box-shadow: 0 2px 8px rgba(59,166,185,0.15);
}

.uil-tool-card__name {
  font-size: 14px;
  font-weight: 600;
  color: #3ba6b9;
  margin-bottom: 4px;
}

.uil-tool-card__desc {
  font-size: 13px;
  color: #666;
}

.uil-loan-limits-note {
  font-size: 12px;
  color: #777;
  line-height: 1.5;
  margin-top: 24px;
  max-width: 380px;
}

/* Compare Offers */
.uil-compare {
  border-top: 1px solid #e0e0e0;
  padding-top: 36px;
  margin-bottom: 40px;
}

.uil-compare__title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin: 0 0 16px;
}

.uil-compare__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 14px;
  color: #555;
}

.uil-compare__sort-select {
  font-size: 14px;
  padding: 3px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-left: 4px;
}

.uil-compare__disclosure {
  font-size: 13px;
  color: #888;
}

.uil-lender {
  display: grid;
  grid-template-columns: 160px 1fr 140px;
  gap: 20px;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 12px;
  background: #fff;
}

.uil-lender__left {
  text-align: center;
}

.uil-lender__img {
  max-width: 110px;
  max-height: 60px;
  object-fit: contain;
  margin-bottom: 4px;
}

.uil-lender__nmls {
  font-size: 10px;
  color: #999;
  margin-bottom: 8px;
}

.uil-lender__score-label {
  font-size: 11px;
  color: #555;
  margin-bottom: 2px;
}

.uil-lender__score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}

.uil-stars {
  color: #f0a500;
  font-size: 13px;
  letter-spacing: 1px;
}

.uil-lender__score-num {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}

.uil-lender__originations {
  font-size: 10px;
  color: #888;
  font-style: italic;
}

.uil-lender__headline {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 10px;
}

.uil-lender__features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.uil-lender__features li {
  font-size: 13px;
  color: #444;
  padding: 2px 0 2px 18px;
  position: relative;
}

.uil-lender__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #3ba6b9;
  font-weight: 700;
}

.uil-lender__right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.uil-btn-rates {
  display: block;
  width: 100%;
  padding: 12px 0;
  background: #2980b9;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.2s;
}

.uil-btn-rates:hover { background: #1f6a9a; }

.uil-lender__review {
  font-size: 13px;
  color: #555;
  text-decoration: none;
}

.uil-lender__review:hover { text-decoration: underline; }

.uil-compare__source {
  font-size: 11px;
  color: #999;
  text-align: right;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .uil-title { font-size: 24px; }
  .uil-tool  { padding: 20px; }
  .uil-result__boxes { flex-direction: column; }
  .uil-select { max-width: 100%; }
  .uil-tools__grid { grid-template-columns: 1fr 1fr; }
  .uil-box__amount { font-size: 22px; }
  .uil-lender { grid-template-columns: 1fr; }
  .uil-lender__left { text-align: left; }
}

/* =============================================
   LEGAL PAGES (license, privacy, terms, cookies)
   ============================================= */

.legal-page {
  background: #fff;
  min-height: 100vh;
  padding: 48px 16px 60px;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
}

.legal-updated {
  font-size: 14px;
  color: #888;
  margin: 0 0 28px;
}

.legal-lead {
  font-size: 16px;
  color: #444;
  line-height: 1.7;
  margin: 0 0 32px;
}

.legal-section {
  margin-bottom: 36px;
}

.legal-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.legal-section p {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin: 0 0 12px;
}

.legal-section a {
  color: #2980b9;
  text-decoration: none;
}

.legal-section a:hover { text-decoration: underline; }

.legal-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-list li {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.legal-list li:last-child { border-bottom: none; }

/* Cookie settings */
.cookie-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 12px;
}

.cookie-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cookie-item__name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 6px;
}

.cookie-item__desc {
  font-size: 14px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.cookie-item__badge--required {
  flex-shrink: 0;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.cookie-toggle {
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.cookie-toggle input { opacity: 0; width: 0; height: 0; }

.cookie-toggle__slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background 0.2s;
}

.cookie-toggle__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle__slider { background: #3ba6b9; }
.cookie-toggle input:checked + .cookie-toggle__slider::before { transform: translateX(20px); }

.cookie-actions {
  display: flex;
  gap: 12px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}

.cookie-btn:hover { opacity: 0.85; }
.cookie-btn--reject  { background: #f0f0f0; color: #333; }
.cookie-btn--save    { background: #e0f0f4; color: #1a6e7e; }
.cookie-btn--accept  { background: #3ba6b9; color: #fff; }

.cookie-confirm {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
}

@media (max-width: 600px) {
  .legal-title { font-size: 24px; }
  .cookie-actions { flex-direction: column; }
  .cookie-btn { width: 100%; }
}
}
