/* ============================================================
   FUNDSLENDER — DESIGN SYSTEM
   Single stylesheet. No frameworks. Navy + Teal only.
   ============================================================ */

/* ============================================================
   1. CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Colors — Primary */
  --color-navy:        #0D1F3C;
  --color-navy-mid:    #1A3560;

  /* Colors — Accent */
  --color-teal:        #007F7F;
  --color-teal-light:  #009999;

  /* Colors — Neutrals */
  --color-slate:       #4A5568;
  --color-mist:        #F4F6F9;
  --color-white:       #FFFFFF;
  --color-border:      #DDE3EC;

  /* Colors — Feedback */
  --color-success:     #1A7A4A;
  --color-warning:     #B45309;
  --color-error:       #9B1C1C;

  /* Gradients */
  --gradient-hero: linear-gradient(160deg, #0D1F3C 0%, #1A3560 100%);
  --gradient-card: linear-gradient(180deg, #FFFFFF 0%, #F4F6F9 100%);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* Typography — Families */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Typography — Scale */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.375rem;   /* 22px */
  --text-2xl:  1.75rem;    /* 28px */
  --text-3xl:  2.25rem;    /* 36px */
  --text-4xl:  3rem;       /* 48px */
  --text-hero: 3.75rem;    /* 60px — homepage only */

  /* Typography — Weight */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Typography — Line Heights */
  --leading-tight:   1.2;
  --leading-snug:    1.4;
  --leading-normal:  1.6;
  --leading-relaxed: 1.8;

  /* Spacing — 8px base grid */
  --space-1:  0.25rem;   /*  4px */
  --space-2:  0.5rem;    /*  8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--color-slate);
  background-color: var(--color-mist);
  line-height: var(--leading-relaxed);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--color-teal-light); }

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

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  color: var(--color-navy);
  line-height: var(--leading-tight);
  font-family: var(--font-body);
}

h2 { font-size: var(--text-3xl); font-weight: var(--weight-semibold); }
h3 { font-size: var(--text-2xl); font-weight: var(--weight-semibold); }
h4 { font-size: var(--text-xl);  font-weight: var(--weight-semibold); }

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

p:last-child { margin-bottom: 0; }

strong { font-weight: var(--weight-semibold); color: var(--color-navy); }

/* ============================================================
   3. ACCESSIBILITY
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-teal);
  color: var(--color-white);
  padding: var(--space-3) var(--space-6);
  border-radius: 0 0 4px 4px;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  z-index: 9999;
  transition: top 0.2s;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  outline: none;
  color: var(--color-white);
}

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

.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;
}

/* ============================================================
   4. LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: 760px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.layout-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-12);
  align-items: start;
}

.section {
  padding: var(--space-20) 0;
}

.section--mist  { background: var(--color-mist); }
.section--white { background: var(--color-white); }

.section__heading {
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.section__subheading {
  font-size: var(--text-lg);
  color: var(--color-slate);
  max-width: 720px;
  margin-bottom: var(--space-12);
  line-height: var(--leading-normal);
}

/* ============================================================
   5. NAVIGATION
   ============================================================ */
.nav {
  background: var(--color-navy);
  height: 68px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(13, 31, 60, 0.15);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-6);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo:hover { color: var(--color-white); }

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.80);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-2) var(--space-3);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-white);
  border-bottom-color: var(--color-teal);
}

.nav__trust-badge {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Hamburger button */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* -- NAV DROPDOWNS (desktop) -- */
.nav__item { position: relative; }

/* Top-level toggle link — styled to match .nav__link */
.nav__toggle {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.80);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.nav__toggle:hover,
.nav__toggle.nav__link--active {
  color: var(--color-white);
  border-bottom-color: var(--color-teal);
}

.nav__toggle-icon {
  width: 10px;
  height: 6px;
  flex-shrink: 0;
  transition: transform 0.2s;
  display: block;
}

.nav__item:hover .nav__toggle-icon,
.nav__item--open .nav__toggle-icon {
  transform: rotate(180deg);
}

.nav__dropdown {
  position: absolute;
  top: 100%;            /* flush to nav bottom — no gap */
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(13, 31, 60, 0.14);
  min-width: 220px;
  padding: var(--space-2) 0 var(--space-3);
  margin-top: 10px;     /* visual offset — arrow sits 10px below nav */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  z-index: 200;
  list-style: none;
}

/* Invisible hover bridge fills the 10px gap above the panel */
.nav__dropdown::after {
  content: '';
  position: absolute;
  top: -14px;           /* reaches up through margin-top + a little extra */
  left: 0;
  right: 0;
  height: 14px;
}

/* arrow pointer */
.nav__dropdown::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--color-white);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
}

.nav__item:hover .nav__dropdown,
.nav__item--open .nav__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-link {
  display: block;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-slate);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  border-bottom: none;
}

.nav__dropdown-link:hover,
.nav__dropdown-link--active {
  color: var(--color-teal);
  background: rgba(0, 127, 127, 0.05);
}

.nav__dropdown-label {
  display: block;
  padding: var(--space-3) var(--space-6) var(--space-1);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  color: rgba(13, 31, 60, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* Wide two-column dropdown (used for Lenders) */
.nav__dropdown--wide {
  column-count: 2;
  column-gap: 0;
  min-width: 480px;
}
.nav__dropdown--wide .nav__dropdown-item--span {
  column-span: all;
}

/* ============================================================
   6. HERO
   ============================================================ */
.hero {
  background: var(--gradient-hero);
  padding: var(--space-20) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 50%, rgba(0, 127, 127, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container { position: relative; }

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-teal-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.hero__h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  line-height: var(--leading-tight);
  max-width: 680px;
  margin-bottom: var(--space-6);
}

/* Homepage hero H1 override */
.hero__h1--home {
  font-size: var(--text-hero);
}

.hero__subtext {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-8);
}

.hero__trust-strip {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.03em;
}

/* Inner-page hero: fix text classes used on sub-pages (.eyebrow, h1, .hero__sub) */
.hero .eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-teal-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.hero .eyebrow a {
  color: var(--color-teal-light);
  text-decoration: none;
}

.hero .eyebrow a:hover { color: var(--color-white); }

.hero--inner h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  line-height: var(--leading-tight);
  max-width: 680px;
  margin-bottom: var(--space-6);
}

.hero .hero__sub {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-8);
}

/* ============================================================
   7. BUTTONS / CTA
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-teal);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  padding: var(--space-4) var(--space-8);
  border-radius: 4px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 127, 127, 0.30);
}

.btn-primary:hover {
  background: var(--color-teal-light);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 127, 127, 0.40);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 127, 127, 0.25);
}

.btn-primary--full {
  width: 100%;
  justify-content: center;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--color-teal);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-6);
  border: 1.5px solid var(--color-teal);
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: var(--color-teal);
  color: var(--color-white);
}

.cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.cta-subtext {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.50);
  margin: 0;
  line-height: var(--leading-normal);
}

.cta-block--centered {
  align-items: center;
  text-align: center;
}

/* Bottom CTA section */
.cta-section {
  background: var(--gradient-hero);
  padding: var(--space-20) 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 50% 50%, rgba(0, 127, 127, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section .container { position: relative; }

.cta-section__heading {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.cta-section__subtext {
  color: rgba(255, 255, 255, 0.70);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--leading-normal);
}

/* Bare headings/text inside dark CTA sections (sub-silo pages don't use BEM classes) */
.cta-section h1,
.cta-section h2,
.cta-section h3 {
  color: var(--color-white);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.70);
}

.cta-section a:not(.btn-primary):not(.btn-secondary) {
  color: var(--color-teal-light);
}

/* ============================================================
   8. CARDS
   ============================================================ */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-8);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  display: block;
  color: inherit;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(13, 31, 60, 0.10);
  transform: translateY(-2px);
  color: inherit;
}

.card__icon {
  width: 40px;
  height: 40px;
  background: rgba(0, 127, 127, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.card__title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-3);
}

.card__body {
  font-size: var(--text-base);
  color: var(--color-slate);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ============================================================
   9. COMPARISON TABLE
   ============================================================ */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll__label {
  display: none;
  font-size: var(--text-xs);
  color: var(--color-slate);
  text-align: right;
  margin-bottom: var(--space-2);
  font-style: italic;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  min-width: 0;
}

.comparison-table th {
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: var(--weight-semibold);
  text-align: left;
  padding: var(--space-4) var(--space-6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: var(--text-xs);
}

.comparison-table td {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-slate);
  vertical-align: top;
  line-height: var(--leading-normal);
}

.comparison-table th,
.comparison-table td {
  overflow-wrap: anywhere;
  word-break: normal;
}

.formula-card {
  background: var(--color-navy-light, #f0f4fa);
  border-left: 3px solid var(--color-teal);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  font-family: monospace;
  overflow-wrap: anywhere;
}

.comparison-table tr:nth-child(even) td {
  background: var(--color-mist);
}

.comparison-table tr:hover td {
  background: rgba(0, 127, 127, 0.04);
}

.comparison-table .col-highlight {
  background: rgba(0, 127, 127, 0.06);
  border-left: 3px solid var(--color-teal);
}

/* Highlighted column header needs dark text — it sits on a light teal bg, not navy */
.comparison-table thead .col-highlight {
  background: rgba(0, 127, 127, 0.15);
  color: var(--color-navy);
}

/* ============================================================
   10. DISCLAIMER BAR
   ============================================================ */
.disclaimer-bar {
  background: var(--color-mist);
  border-top: 3px solid var(--color-teal);
  padding: var(--space-4) 0;
}

.disclaimer-bar p {
  font-size: var(--text-xs);
  color: var(--color-slate);
  line-height: var(--leading-normal);
  margin: 0;
}

.disclaimer-bar strong {
  color: var(--color-navy);
  font-weight: var(--weight-semibold);
}

/* ============================================================
   11. RISK WARNING (payday pages only)
   ============================================================ */
.risk-warning {
  background: #FEF3C7;
  border: 1.5px solid #B45309;
  border-radius: 6px;
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.risk-warning__title {
  font-weight: var(--weight-semibold);
  color: #92400E;
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.risk-warning__body {
  font-size: var(--text-sm);
  color: #78350F;
  line-height: var(--leading-normal);
  margin: 0;
}

/* ============================================================
   12. TRUST BLOCK
   ============================================================ */
.trust-block {
  background: var(--color-white);
  padding: var(--space-12) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.trust-block__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.trust-block__icon {
  font-size: var(--text-2xl);
  flex-shrink: 0;
  line-height: 1;
}

.trust-block__text {
  font-size: var(--text-sm);
  color: var(--color-slate);
  line-height: var(--leading-normal);
}

.trust-block__text strong {
  display: block;
  color: var(--color-navy);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
  font-size: var(--text-base);
}

/* ============================================================
   13. INTERNAL LINKS
   ============================================================ */
.internal-links {
  padding: var(--space-16) 0;
  background: var(--color-mist);
}

.internal-links__heading {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-8);
}

/* ============================================================
   14. FAQ
   ============================================================ */
.faq {
  padding: var(--space-20) 0;
  background: var(--color-white);
}

.faq__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-6) 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.faq__question::after {
  content: '+';
  font-size: var(--text-xl);
  color: var(--color-teal);
  transition: transform 0.2s;
  flex-shrink: 0;
  line-height: 1;
  font-weight: var(--weight-light);
}

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

.faq__answer {
  font-size: var(--text-base);
  color: var(--color-slate);
  line-height: var(--leading-relaxed);
  padding: var(--space-4) 0 var(--space-6);
  display: none;
}

.faq__answer.open {
  display: block;
}

.faq__answer a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   15. PROS & CONS
   ============================================================ */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.pros-cons__list {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-6);
}

.pros-cons__heading {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pros-cons__item {
  font-size: var(--text-sm);
  color: var(--color-slate);
  line-height: var(--leading-normal);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.pros-cons__item:last-child { border-bottom: none; }

.pros-cons__item::before {
  content: '✓';
  color: var(--color-success);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.pros-cons__list--cons .pros-cons__item::before {
  content: '✕';
  color: var(--color-error);
}

/* ============================================================
   16. REQUIREMENTS LIST
   ============================================================ */
.requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requirements-list li {
  display: block;
  position: relative;
  padding: var(--space-3) 0 var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-base);
  color: var(--color-slate);
  line-height: var(--leading-normal);
}

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

.requirements-list li::before {
  content: '→';
  color: var(--color-teal);
  font-weight: var(--weight-semibold);
  position: absolute;
  left: 0;
  top: var(--space-3);
}

/* ============================================================
   17. SIDEBAR STICKY CARD
   ============================================================ */
.sidebar-card {
  position: static;
}

.sidebar-card--plain {
  position: static;
}

.sidebar-links {
  margin-top: var(--space-6);
}

.sidebar-links__heading {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.sidebar-links__link {
  display: block;
  color: var(--color-teal);
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-links__link:last-child { border-bottom: none; }

/* ============================================================
   18. FOOTER
   ============================================================ */
.footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.60);
  padding: var(--space-16) 0 var(--space-8);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.footer__columns {
  margin-bottom: var(--space-8);
}

.footer__logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-white);
  margin-bottom: var(--space-4);
  display: block;
}

.footer__description {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.55);
  line-height: var(--leading-normal);
  max-width: 260px;
  margin: 0;
}

.footer__nav-heading {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.footer__link {
  color: rgba(255, 255, 255, 0.55);
  display: block;
  margin-bottom: var(--space-2);
  transition: color 0.2s;
  text-decoration: none;
  font-size: var(--text-sm);
}

.footer__link:hover { color: var(--color-white); }

.footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
  line-height: var(--leading-normal);
}

.footer__legal p { margin-bottom: var(--space-2); }

.footer__legal .footer__link {
  display: inline;
  margin: 0;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.45);
}

/* ============================================================
   19. UTILITY
   ============================================================ */
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

.text-sm    { font-size: var(--text-sm); }
.text-xs    { font-size: var(--text-xs); color: var(--color-slate); }
.text-note  { font-size: var(--text-xs); color: var(--color-slate); font-style: italic; margin-top: var(--space-2); }

/* ============================================================
   20. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --text-hero: 3rem;
    --text-4xl:  2.5rem;
  }
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .layout-sidebar,
  .pros-cons {
    grid-template-columns: 1fr;
  }

  .table-scroll__label { display: block; }

  .footer__columns { grid-template-columns: 1fr; gap: var(--space-8); }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }

  #main-content {
    padding-top: 68px;
  }

  .table-scroll--wide {
    overflow-x: visible;
  }

  .table-scroll--wide .table-scroll__label {
    display: none;
  }

  .comparison-table--wide {
    border-collapse: separate;
    border-spacing: 0;
  }

  .comparison-table--wide thead {
    display: none;
  }

  .comparison-table--wide tbody,
  .comparison-table--wide tr,
  .comparison-table--wide td {
    display: block;
    width: 100%;
  }

  .comparison-table--wide tr {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-white);
    margin-bottom: var(--space-4);
    overflow: hidden;
  }

  .comparison-table--wide tr:nth-child(even) td,
  .comparison-table--wide tr:hover td {
    background: transparent;
  }

  .comparison-table--wide td {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-3) var(--space-4);
  }

  .comparison-table--wide td:last-child {
    border-bottom: 0;
  }

  .comparison-table--wide td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-navy);
    margin-bottom: var(--space-1);
  }

  .comparison-table--wide .col-highlight {
    border-left: 0;
    background: rgba(0, 127, 127, 0.06);
  }

  /* Mobile nav drawer */
  .nav__menu {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-navy);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--space-6);
    gap: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .nav__menu.is-open {
    transform: translateX(0);
  }

  .nav__menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav__link {
    display: block;
    padding: var(--space-4) 0;
    font-size: var(--text-base);
    border-bottom: none;
    text-transform: none;
    letter-spacing: 0;
  }

  /* Mobile dropdown toggle link */
  .nav__toggle {
    width: 100%;
    justify-content: space-between;
    padding: var(--space-4) 0;
    font-size: var(--text-base);
    text-transform: none;
    letter-spacing: 0;
    border-bottom: none;
    border-top: none;
  }

  /* Hide desktop arrow pointer */
  .nav__dropdown::before { display: none; }
  .nav__dropdown::after  { display: none; }

  /* 2-class selector beats desktop 1-class base rule on every property */
  .nav__dropdown--wide {
    column-count: 1;
    min-width: 0;
  }

  .nav__menu .nav__dropdown {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    margin: 0;
    width: 100%;
    min-width: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
    padding: var(--space-1) 0 var(--space-2);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
    display: none;
    z-index: auto;
  }

  /* 3-class selector beats desktop 2-class open-state rule */
  .nav__menu .nav__item--open .nav__dropdown {
    display: block;
    transform: none;
  }

  .nav__item--open .nav__toggle-icon { transform: rotate(180deg); }

  .nav__dropdown-link {
    color: rgba(255, 255, 255, 0.95);
    padding: var(--space-2) 0 var(--space-2) var(--space-4);
    white-space: normal;
  }

  .nav__dropdown-link:hover,
  .nav__dropdown-link--active {
    color: var(--color-teal-light);
    background: transparent;
  }

  .nav__dropdown-label {
    color: rgba(255, 255, 255, 0.60);
    padding: var(--space-2) 0 var(--space-1) var(--space-4);
  }

  .nav__toggle-icon path { stroke: rgba(255, 255, 255, 0.80); }

  .nav__hamburger { display: flex; }
  .nav__trust-badge { display: none; }

  .section { padding: var(--space-12) 0; }
  .hero    { padding: var(--space-12) 0; }
  .faq     { padding: var(--space-12) 0; }
  .cta-section { padding: var(--space-12) 0; }

  .card { padding: var(--space-6); }

  .layout-sidebar {
    grid-template-columns: 1fr;
  }

  .cta-block { align-items: stretch; }
  .btn-primary,
  .btn-secondary { text-align: center; justify-content: center; }
}

@media (max-width: 600px) {
  :root {
    --text-4xl: 2.25rem;
    --text-3xl: 2rem;
  }

  .hero__h1,
  .hero--inner h1 {
    margin-bottom: var(--space-4);
  }

  .lf-page-intro__heading {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 480px) {
  :root {
    --text-3xl: 1.75rem;
    --text-2xl: 1.5rem;
  }

  .section__heading { font-size: var(--text-2xl); }
  .cta-section__heading { font-size: var(--text-2xl); }
  .container { padding: 0 var(--space-4); }
}

/* ============================================================
   21. LEAD FORM WIZARD
   ============================================================ */

/* Outer wrapper */
.lf-wrap {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: var(--space-10) var(--space-12);
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}

/* ---- Progress bar ---- */
.lf-progress {
  margin-bottom: var(--space-8);
}

.lf-progress__track {
  height: 4px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.lf-progress__bar {
  height: 100%;
  background: var(--color-teal);
  border-radius: 999px;
  transition: width 0.35s ease;
  width: 0%;
}

/* ---- Step dots ---- */
.lf-dots {
  display: flex;
  align-items: center;
  gap: 0;
}

.lf-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.lf-dot--active {
  border-color: var(--color-teal);
  background: var(--color-teal);
}

.lf-dot--done {
  border-color: var(--color-teal);
  background: var(--color-teal);
}

.lf-dot--skip {
  opacity: 0.25;
}

.lf-dot-line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  transition: background 0.35s;
}

.lf-dot-line--done {
  background: var(--color-teal);
}

/* ---- Step panels ---- */
.lf-step {
  display: none;
}

.lf-step--active {
  display: block;
}

/* ---- Step labels / heading ---- */
.lf-step-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: var(--space-2);
}

.lf-step__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-2);
  line-height: var(--leading-snug);
}

.lf-step__sub {
  font-size: var(--text-sm);
  color: var(--color-slate);
  margin-bottom: var(--space-6);
  line-height: var(--leading-normal);
}

/* ---- Section dividers within a step ---- */
.lf-section-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  margin: var(--space-6) 0 var(--space-4);
}

/* ---- Loan type cards (Step 1) ---- */
.lf-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.lf-type-card {
  cursor: pointer;
  display: block;
}

.lf-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.lf-type-card__body {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  cursor: pointer;
  height: 100%;
  user-select: none;
}

.lf-type-card__body:hover {
  border-color: var(--color-teal-light);
  box-shadow: 0 2px 10px rgba(0, 127, 127, 0.12);
}

.lf-type-card input:checked + .lf-type-card__body,
.lf-type-card--selected .lf-type-card__body {
  border-color: var(--color-teal);
  background: rgba(0, 127, 127, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 127, 127, 0.14);
}

.lf-type-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 22px;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.lf-type-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  line-height: var(--leading-snug);
  margin: 0 0 var(--space-1);
}

.lf-type-card__sub {
  font-size: var(--text-xs);
  color: var(--color-slate);
  line-height: var(--leading-normal);
  margin: 0;
}

/* ---- Field grids ---- */
.lf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4) var(--space-6);
}

.lf-grid-2 > .lf-field--full {
  grid-column: 1 / -1;
}

/* ---- Individual field ---- */
.lf-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-navy);
  margin-bottom: var(--space-2);
}

.lf-field input[type="text"],
.lf-field input[type="email"],
.lf-field input[type="tel"],
.lf-field textarea,
.lf-field select {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-white);
  color: var(--color-navy);
  font-family: var(--font-body);
  font-size: var(--text-base);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
  -webkit-appearance: none;
}

.lf-field textarea {
  height: auto;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}

.lf-field input:focus,
.lf-field textarea:focus,
.lf-field select:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0, 127, 127, 0.12);
}

.lf-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A5568' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
  cursor: pointer;
}

/* Error state on a field */
.lf-field--error input,
.lf-field--error textarea,
.lf-field--error select {
  border-color: var(--color-error) !important;
}

.lf-field__error {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-1);
}

/* Required asterisk */
.lf-required {
  color: var(--color-error);
  margin-left: 2px;
}

/* ---- Inline radio group (second_mortgage) ---- */
.lf-radio-group {
  display: flex;
  gap: var(--space-8);
  padding: 0 var(--space-4);
  height: 44px;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-white);
}

.lf-radio-group label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--color-navy);
  cursor: pointer;
  margin: 0;
}

.lf-radio-group input[type="radio"] {
  accent-color: var(--color-teal);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ---- Home-loan-only fields (JS shows them; --show is fallback for PHP error mode) ---- */
.lf-home-field {
  display: none;
}

.lf-home-field--show {
  display: block !important;
}

/* ---- PX mortgage conditional fields (JS shows + enables applicable fields) ---- */
.lf-loan-field,
.lf-condition-field {
  display: none;
}

/* ---- Step navigation (Next / Back buttons) ---- */
.lf-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.lf-nav--end {
  justify-content: flex-end;
}

/* Final step: keep back + submit in the nav */
.lf-nav--final {
  justify-content: space-between;
}

/* Always-visible submit row (shown in --all-visible mode; hidden in wizard mode) */
.lf-submit-row {
  display: none;
  justify-content: flex-end;
  margin-top: var(--space-6);
}

/* ---- Notices (success / error) ---- */
.lf-notice {
  border-radius: 8px;
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  outline: none;
}

.lf-notice--success {
  background: rgba(26, 122, 74, 0.07);
  border: 1.5px solid var(--color-success);
  color: #14532D;
}

.lf-notice--error {
  background: rgba(155, 28, 28, 0.06);
  border: 1.5px solid var(--color-error);
  color: var(--color-error);
}

.lf-notice__title {
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.lf-notice ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin: 0;
}

.lf-notice li { margin-bottom: var(--space-1); }

/* ---- TCPA consent block ---- */
.lf-tcpa {
  background: var(--color-mist);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}

.lf-tcpa__label {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  cursor: pointer;
}

.lf-tcpa__label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--color-teal);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.lf-tcpa__text {
  font-size: var(--text-xs);
  color: var(--color-slate);
  line-height: var(--leading-relaxed);
}

/* Disclosure below TCPA */
.lf-disclosure {
  font-size: var(--text-xs);
  color: var(--color-slate);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-6);
}

/* ---- Honeypot (visually hidden from humans) ---- */
.lf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-size: 0;
}

/* ============================================================
   21b. LEAD FORM — ALL-VISIBLE MODE (PHP error fallback)
   All steps render linearly; wizard nav is hidden.
   ============================================================ */
.lf-wrap--all-visible .lf-progress {
  display: none;
}

.lf-wrap--all-visible .lf-step {
  display: block;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-8);
  margin-top: var(--space-8);
}

.lf-wrap--all-visible .lf-step:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.lf-wrap--all-visible .lf-home-field {
  display: block;
}

/* Hide wizard nav buttons in flat mode */
.lf-wrap--all-visible .lf-nav {
  display: none;
}

/* Show the fallback submit row in flat mode */
.lf-wrap--all-visible .lf-submit-row {
  display: flex;
}

/* ============================================================
   21c. LEAD FORM — RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .lf-type-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .lf-wrap {
    padding: var(--space-6);
    border-radius: 6px;
  }

  .lf-grid-2 {
    grid-template-columns: 1fr;
  }

  .lf-grid-2 > .lf-field--full {
    grid-column: auto;
  }

  .lf-type-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .lf-step__heading {
    font-size: var(--text-xl);
  }
}

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

  .lf-dot {
    width: 22px;
    height: 22px;
  }

  .lf-nav {
    flex-direction: column-reverse;
    gap: var(--space-3);
  }

  .lf-nav .btn-primary,
  .lf-nav .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 var(--space-2);
  }

  .nav__inner {
    gap: var(--space-3);
  }

  .hero {
    padding: var(--space-12) 0 var(--space-8);
  }

  .hero__h1,
  .hero--inner h1 {
    font-size: var(--text-2xl);
  }

  .hero__subtext,
  .hero .hero__sub {
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
  }

  .layout-sidebar {
    gap: var(--space-6);
  }

  .lf-type-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   21d. /APPLY/ PAGE — above-fold section + compact intro
   ============================================================ */
.lf-apply-section {
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
  min-height: calc(100vh - 68px); /* 68px = nav height */
}

.lf-page-intro {
  text-align: center;
  margin-bottom: var(--space-8);
}

.lf-page-intro__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: var(--space-2);
}

.lf-page-intro__heading {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--color-navy);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.lf-page-intro__sub {
  font-size: var(--text-base);
  color: var(--color-slate);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-normal);
}

/* Silo sidebar: make the apply button full-width to match prior inline style */
.sidebar-card .btn-primary {
  width: 100%;
  justify-content: center;
}

@media (max-width: 768px) {
  .lf-apply-section {
    min-height: auto;
    padding-top: var(--space-6);
    padding-bottom: var(--space-10);
  }

  .lf-page-intro__heading {
    font-size: var(--text-2xl);
  }
}

/* ============================================================
   22. PAYDAY LOADING OVERLAY
   Covers #lead-form-wrap while the cURL cascade runs.
   Activated by adding .lf-loading--active via JS on submit.
   ============================================================ */
@keyframes lf-spin {
  to { transform: rotate(360deg); }
}

.lf-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  border-radius: inherit;
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  text-align: center;
  padding: var(--space-12);
}

.lf-loading--active {
  display: flex;
}

.lf-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-teal);
  border-radius: 50%;
  animation: lf-spin 0.85s linear infinite;
  flex-shrink: 0;
}

.lf-loading__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  margin: 0;
}

.lf-loading__msg {
  font-size: var(--text-sm);
  color: var(--color-slate);
  max-width: 360px;
  line-height: var(--leading-normal);
  margin: 0;
  min-height: 2.4em;
}

/* ============================================================
   22. TOOL PAGES
   ============================================================ */

/* ---- Tool wrapper card ---- */
.tool-wrap {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: var(--space-10) var(--space-12);
  max-width: 820px;
  margin: 0 auto var(--space-12);
}

/* ---- Field groups ---- */
.tool-input-group {
  margin-bottom: var(--space-6);
}

.tool-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-navy);
  margin-bottom: var(--space-2);
}

.tool-input,
.tool-select {
  width: 100%;
  height: 46px;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-white);
  color: var(--color-navy);
  font-family: var(--font-body);
  font-size: var(--text-base);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
  -webkit-appearance: none;
}

.tool-input:focus,
.tool-select:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0, 127, 127, 0.12);
}

.tool-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A5568' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
  cursor: pointer;
}

.tool-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
}

/* ---- Calculate button ---- */
.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-teal);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  padding: var(--space-4) var(--space-10);
  border-radius: 4px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 127, 127, 0.25);
  margin-top: var(--space-2);
}

.tool-btn:hover {
  background: var(--color-teal-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 127, 127, 0.35);
}

.tool-btn--full {
  width: 100%;
}

/* ---- Result card (hidden until calculated) ---- */
.tool-result {
  display: none;
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 2px solid var(--color-teal);
}

.tool-result--visible {
  display: block;
}

.tool-result__headline {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-slate);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.tool-result__value {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-teal);
  line-height: 1;
  margin-bottom: var(--space-6);
}

.tool-result__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.tool-result__stat {
  background: var(--color-mist);
  border-radius: 8px;
  padding: var(--space-4) var(--space-6);
}

.tool-result__stat-label {
  font-size: var(--text-xs);
  color: var(--color-slate);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-1);
}

.tool-result__stat-value {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
}

/* ---- Tool disclaimer (beneath results) ---- */
.tool-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-slate);
  font-style: italic;
  line-height: var(--leading-normal);
  margin-top: var(--space-4);
}

/* ---- Rate tier badge (rate checker) ---- */
.rate-tier {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(0, 127, 127, 0.08);
  border: 1px solid var(--color-teal);
  border-radius: 4px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-teal);
  margin-bottom: var(--space-4);
}

/* ============================================================
   23. QUIZ (READINESS)
   ============================================================ */

.quiz-wrap {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: var(--space-10) var(--space-12);
  max-width: 760px;
  margin: 0 auto var(--space-12);
}

/* ---- Progress bar ---- */
.quiz-progress {
  margin-bottom: var(--space-8);
}

.quiz-progress__track {
  height: 4px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.quiz-progress__bar {
  height: 100%;
  background: var(--color-teal);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.quiz-progress__label {
  font-size: var(--text-xs);
  color: var(--color-slate);
  font-weight: var(--weight-medium);
}

/* ---- Step panels ---- */
.quiz-step {
  display: none;
}

.quiz-step--active {
  display: block;
}

.quiz-step__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-6);
  line-height: var(--leading-snug);
}

/* ---- Choice buttons ---- */
.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-navy);
  text-align: left;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  width: 100%;
}

.quiz-option:hover {
  border-color: var(--color-teal-light);
  box-shadow: 0 2px 10px rgba(0, 127, 127, 0.12);
}

.quiz-option--selected {
  border-color: var(--color-teal);
  background: rgba(0, 127, 127, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 127, 127, 0.12);
}

/* ---- Nav row ---- */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.quiz-nav--end {
  justify-content: flex-start;
}

.quiz-back {
  background: none;
  border: none;
  color: var(--color-slate);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  padding: var(--space-2) 0;
}

.quiz-back:hover { color: var(--color-navy); }

/* ---- Result panel ---- */
.quiz-result {
  display: none;
  text-align: center;
  padding: var(--space-8) 0 var(--space-4);
}

.quiz-result--visible {
  display: block;
}

.quiz-tier {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: var(--space-2) var(--space-6);
  border-radius: 999px;
  margin-bottom: var(--space-6);
}

.quiz-tier--strong {
  background: rgba(26, 122, 74, 0.10);
  color: var(--color-success);
  border: 1.5px solid var(--color-success);
}

.quiz-tier--fair {
  background: rgba(180, 83, 9, 0.08);
  color: var(--color-warning);
  border: 1.5px solid var(--color-warning);
}

.quiz-tier--needs-work {
  background: rgba(74, 85, 104, 0.10);
  color: var(--color-slate);
  border: 1.5px solid var(--color-slate);
}

.quiz-result__heading {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--color-navy);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.quiz-result__body {
  font-size: var(--text-lg);
  color: var(--color-slate);
  max-width: 520px;
  margin: 0 auto var(--space-8);
  line-height: var(--leading-normal);
}

.quiz-result__restart {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--color-slate);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  background: none;
  border: none;
  margin-top: var(--space-6);
  font-family: var(--font-body);
}

.quiz-result__restart:hover { color: var(--color-navy); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .tool-wrap,
  .quiz-wrap {
    padding: var(--space-8) var(--space-6);
  }

  .tool-grid-2,
  .quiz-options {
    grid-template-columns: 1fr;
  }

  .tool-result__grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

/* ============================================================
   24. PRIVACY + QA
   ============================================================ */

.privacy-toggle {
  position: fixed;
  left: 50%;
  bottom: var(--safe-area-bottom);
  transform: translateX(-50%);
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(21rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  border: 1px solid rgba(14, 43, 71, 0.15);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-navy);
  box-shadow: 0 8px 24px rgba(14, 43, 71, 0.16);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  padding: 0.85rem 1.2rem;
  cursor: pointer;
}

.privacy-toggle--attention {
  background: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-teal);
}

.privacy-toggle--with-qa {
  bottom: calc(var(--safe-area-bottom) + 18rem);
}

.privacy-panel {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-area-bottom) + 4.75rem);
  z-index: 1199;
  width: min(30rem, calc(100vw - 2rem));
  max-height: min(70vh, 34rem);
  overflow-y: auto;
  background: var(--color-white);
  color: var(--color-navy);
  border: 1px solid rgba(14, 43, 71, 0.12);
  border-radius: 20px;
  box-shadow: 0 16px 42px rgba(14, 43, 71, 0.22);
  padding: var(--space-6);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.privacy-panel--visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.privacy-panel--with-qa {
  bottom: calc(var(--safe-area-bottom) + 21rem);
}

.privacy-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.privacy-panel__eyebrow,
.qa-bar__eyebrow {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-teal);
  font-weight: var(--weight-semibold);
}

.privacy-panel__close {
  border: none;
  background: transparent;
  color: var(--color-slate);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.privacy-panel__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  margin: 0 0 var(--space-3);
}

.privacy-panel__body,
.privacy-panel__note,
.privacy-panel__status {
  margin: 0 0 var(--space-4);
  color: var(--color-slate);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.privacy-panel__note {
  padding: var(--space-3);
  border-radius: 10px;
  background: rgba(0, 127, 127, 0.08);
  color: var(--color-navy);
}

.privacy-panel__actions {
  display: grid;
  gap: var(--space-3);
}

.privacy-panel__actions .btn-primary,
.privacy-panel__actions .btn-secondary {
  width: 100%;
  justify-content: center;
}

.privacy-panel__reset {
  background: transparent;
  border: none;
  color: var(--color-slate);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.privacy-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  color: var(--color-slate);
}

.privacy-panel__link {
  color: var(--color-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.qa-bar {
  position: fixed;
  left: var(--space-5);
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 1180;
  background: rgba(14, 43, 71, 0.96);
  color: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  padding: var(--space-5);
}

.qa-bar__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.qa-bar__title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
}

.qa-bar__clear {
  color: #dff7f7;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: var(--text-sm);
}

.qa-bar__form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: end;
}

.qa-bar__field {
  display: grid;
  gap: 0.35rem;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.86);
}

.qa-bar__field span {
  color: rgba(255, 255, 255, 0.92);
  font-weight: var(--weight-semibold);
}

.qa-bar__field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font-family: var(--font-body);
}

.qa-bar__field select option,
.qa-bar__field select optgroup {
  color: var(--color-navy);
  background: var(--color-white);
}

.qa-bar__apply {
  border: none;
  border-radius: 999px;
  background: #f6d26d;
  color: #372b03;
  font-weight: var(--weight-semibold);
  padding: 0.8rem 1.1rem;
  cursor: pointer;
}

.qa-bar__debug {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.82);
}

.qa-bar strong,
.qa-bar__debug strong {
  color: var(--color-white);
}

.contact-marketing-optin {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: rgba(0, 127, 127, 0.03);
  margin-bottom: var(--space-6);
}

.contact-marketing-optin input {
  margin-top: 0.2rem;
}

.contact-marketing-optin__text {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-slate);
}

@media (max-width: 960px) {
  .qa-bar__form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .privacy-toggle {
    left: 50%;
    bottom: var(--safe-area-bottom);
    min-width: min(20rem, calc(100vw - 1rem));
    text-align: center;
  }

  .privacy-toggle--with-qa {
    bottom: calc(var(--safe-area-bottom) + 25rem);
  }

  .privacy-panel {
    right: var(--space-4);
    left: var(--space-4);
    bottom: calc(var(--safe-area-bottom) + 4.25rem);
    width: auto;
    max-height: min(68vh, 30rem);
    transform: translateY(14px);
  }

  .privacy-panel--visible {
    transform: translateY(0);
  }

  .privacy-panel--with-qa {
    bottom: calc(var(--safe-area-bottom) + 28.5rem);
  }

  .privacy-panel__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .qa-bar {
    left: var(--space-4);
    right: var(--space-4);
    bottom: calc(var(--space-4) + 4.75rem);
  }

  .qa-bar__form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .qa-bar__header,
  .qa-bar__form {
    grid-template-columns: 1fr;
  }

  .qa-bar__header {
    display: grid;
  }
}

