/* =========================================================
   CORE PERSONAL LOANS — Design System
   ========================================================= */

/* 1. VARIABLES */
:root {
  --navy:       #1B3A6B;
  --navy-dark:  #122848;
  --navy-light: #2A4F8F;
  --sky:        #0EA5E9;
  --green:      #16A34A;
  --green-light:#22C55E;
  --gold:       #F59E0B;
  --red:        #DC2626;
  --dark:       #0F172A;
  --text:       #1E293B;
  --muted:      #64748B;
  --border:     #E2E8F0;
  --bg:         #F8FAFC;
  --bg-alt:     #F1F5F9;
  --white:      #FFFFFF;

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.14);

  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:       'SFMono-Regular', Consolas, monospace;

  --max-w:      1200px;
  --nav-h:      72px;
  --transition: .22s ease;
}

/* 2. RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }

/* 3. TYPOGRAPHY */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; color: var(--dark); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--muted); line-height: 1.75; }
p + p { margin-top: .75rem; }
.lead { font-size: 1.15rem; color: var(--text); line-height: 1.7; }

/* 4. LAYOUT */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-alt { background: var(--bg); }
.section-navy { background: var(--navy); }
.section-dark { background: var(--dark); }
.row { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.col { flex: 1 1 0; min-width: 280px; }
.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.text-white p, .text-white h1, .text-white h2, .text-white h3, .text-white h4 { color: var(--white); }
.section-label { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sky); margin-bottom: .75rem; }

/* 5. BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; transition: background var(--transition), transform var(--transition), box-shadow var(--transition); white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); color: var(--white); box-shadow: 0 4px 14px rgba(22,163,74,.35); }
.btn-primary:hover { background: var(--green-light); box-shadow: 0 6px 20px rgba(22,163,74,.45); }
.btn-secondary { background: var(--white); color: var(--navy); border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--navy); background: var(--bg); }
.btn-navy { background: var(--navy); color: var(--white); box-shadow: 0 4px 14px rgba(27,58,107,.3); }
.btn-navy:hover { background: var(--navy-light); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: var(--white); }
.btn-lg { padding: 18px 36px; font-size: 1.1rem; }
.btn-sm { padding: 10px 20px; font-size: .9rem; }
.btn-block { width: 100%; justify-content: center; }

/* 6. NAVIGATION */
/* Top accent bar — visual separation from browser chrome */
.nav-topbar {
  background: var(--navy);
  color: rgba(255,255,255,.8);
  font-size: .72rem;
  font-weight: 500;
  text-align: center;
  padding: 7px 24px;
  letter-spacing: .02em;
}
.nav-topbar a { color: rgba(255,255,255,.95); text-decoration: underline; }
.nav-topbar strong { color: #fff; }

.nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  transition: box-shadow .25s ease, background .25s ease;
}
.nav.scrolled { box-shadow: 0 4px 28px rgba(0,0,0,.11); border-bottom-color: transparent; background: rgba(255,255,255,.99); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: 8px;
  /* explicit vertical centering fallback */
  min-height: var(--nav-h);
  padding-top: 0; padding-bottom: 0;
}

/* Logo */
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--navy); flex-shrink: 0; }
.nav-logo-icon { width: 38px; height: 38px; background: linear-gradient(135deg, var(--navy), var(--sky)); border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(27,58,107,.25); }
.nav-logo-icon svg { color: var(--white); }
.nav-logo-name { line-height: 1; }
.nav-logo-name em { display: block; font-style: normal; font-size: .65rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }

/* Menu items */
.nav-menu { display: flex; align-items: center; gap: 2px; margin: 0 auto; padding: 0 12px; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--text);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap; cursor: pointer;
}
.nav-link:hover { background: var(--bg); color: var(--navy); }
.nav-link.active { background: #EFF6FF; color: var(--navy); font-weight: 600; }
.nav-link .nav-arrow {
  width: 14px; height: 14px; flex-shrink: 0; opacity: .6;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-item:hover > .nav-link .nav-arrow,
.nav-item.open  > .nav-link .nav-arrow { transform: rotate(180deg); opacity: 1; }

/* Dropdown */
.dropdown {
  visibility: hidden; opacity: 0; pointer-events: none;
  position: absolute; top: 100%; left: 0;  /* NO gap — gap causes hover flicker */
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  min-width: 230px;
  padding: 14px 6px 6px; /* top padding replaces visual gap */
  z-index: 200;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
/* Bridge element: invisible area between nav-link bottom and dropdown top */
.dropdown::before {
  content: '';
  position: absolute;
  top: -12px; left: 0; right: 0; height: 12px;
}
.nav-item:hover > .dropdown {
  visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear 0s;
}
.dropdown-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 8px 12px 4px; display: block;
}
.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: .875rem; color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.dropdown a:hover { background: var(--bg); color: var(--navy); }
.dropdown a .dd-icon {
  width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; background: var(--bg);
}
.dropdown a:hover .dd-icon { background: #EFF6FF; }
.dropdown-divider { height: 1px; background: var(--border); margin: 5px 6px; }

/* CTA button in nav */
.nav-cta { margin-left: 8px; flex-shrink: 0; }
.nav-cta .btn {
  background: var(--green);
  color: var(--white);
  font-size: .875rem;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(22,163,74,.3);
  display: flex; align-items: center; gap: 6px;
}
.nav-cta .btn:hover { background: var(--green-light); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(22,163,74,.4); }

/* Hamburger */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; border-radius: 8px; transition: background var(--transition); }
.nav-hamburger:hover { background: var(--bg); }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 2px; transition: transform .25s ease, opacity .25s ease, width .25s ease; }
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 1024px) {
  .nav-hamburger { display: flex; }
  .nav-menu {
    display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: var(--white); flex-direction: column; align-items: stretch;
    gap: 0; padding: 12px 16px 32px; overflow-y: auto;
    border-top: 1px solid var(--border); z-index: 999; margin: 0;
  }
  .nav-menu.open { display: flex; }
  .nav-item { width: 100%; }
  .nav-link { width: 100%; justify-content: space-between; padding: 14px 12px; border-radius: 10px; border-bottom: 1px solid var(--bg); font-size: .95rem; }
  .nav-link:hover, .nav-link.active { background: var(--bg); }
  .dropdown {
    visibility: visible; opacity: 1; pointer-events: auto;
    display: none; position: static; box-shadow: none; border: none;
    border-radius: 10px; padding: 4px 0 4px 12px; background: var(--bg-alt);
    transform: none; margin: 4px 0 8px;
  }
  .nav-item.open > .dropdown { display: block; }
  .dropdown a { font-size: .88rem; padding: 10px 12px; }
  .dropdown-label { display: none; }
  .dropdown-divider { display: none; }
  .nav-cta { margin: 16px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; font-size: 1rem; padding: 14px; }
}

/* 7. HERO */
.hero { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%); color: var(--white); padding: 100px 0 80px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero .lead { color: rgba(255,255,255,.85); margin-bottom: 2rem; font-size: 1.2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2.5rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 20px; }
.hero-trust-item { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.8); font-size: .88rem; }
.hero-trust-item svg { color: var(--green-light); flex-shrink: 0; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 100px; padding: 6px 14px; font-size: .82rem; color: rgba(255,255,255,.9); margin-bottom: 1.5rem; }

/* 8. RATE BAR */
.rate-bar { background: var(--green); padding: 14px 0; }
.rate-bar-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 48px; }
.rate-item { display: flex; align-items: center; gap: 10px; color: var(--white); }
.rate-item-value { font-size: 1.3rem; font-weight: 800; }
.rate-item-label { font-size: .82rem; opacity: .88; }

/* 9. CARDS */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon { width: 52px; height: 52px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.card-icon-navy { background: #EFF6FF; color: var(--navy); }
.card-icon-green { background: #F0FDF4; color: var(--green); }
.card-icon-sky { background: #F0F9FF; color: var(--sky); }
.card-icon-gold { background: #FFFBEB; color: var(--gold); }
.card h3 { margin-bottom: .5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

/* 10. STATS ROW */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.stat-item { text-align: center; padding: 28px 16px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); }
.stat-value { font-size: 2.2rem; font-weight: 800; color: var(--navy); }
.stat-label { font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* 11. HOW IT WORKS */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; position: relative; }
.step { text-align: center; padding: 32px 20px; }
.step-num { width: 60px; height: 60px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.step h3 { margin-bottom: .5rem; }

/* 12. FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 8px; transition: box-shadow var(--transition); }
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: 1rem; color: var(--dark); transition: background var(--transition); width: 100%; text-align: left; background: none; border: none; font-family: inherit; }
.faq-q:hover { background: var(--bg); }
.faq-q:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.faq-q svg { flex-shrink: 0; transition: transform .3s ease; color: var(--navy); margin-left: 12px; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-item.open .faq-q { background: var(--bg); color: var(--navy); }
.faq-a { display: block; max-height: 0; overflow: hidden; padding: 0 22px; transition: max-height .35s cubic-bezier(0.4,0,0.2,1), padding .35s; }
.faq-a p { color: var(--muted); }
.faq-item.open .faq-a { max-height: 600px; padding: 0 22px 18px; }

/* 13. CTA SECTION */
.cta-section { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); padding: 80px 0; text-align: center; color: var(--white); }
.cta-section h2 { color: var(--white); margin-bottom: .75rem; }
.cta-section p { color: rgba(255,255,255,.8); font-size: 1.1rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-section .btn-group { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* 14. BREADCRUMB */
.breadcrumb { padding: 14px 0; }
.breadcrumb-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; }
.breadcrumb-list li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.breadcrumb-list li:last-child { color: var(--dark); font-weight: 500; }
.breadcrumb-list a { color: var(--navy); }
.breadcrumb-list a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }

/* Breadcrumb on dark (page-hero) background — white */
.page-hero .breadcrumb-list li,
.page-hero .breadcrumb-list li:last-child { color: rgba(255,255,255,.7); }
.page-hero .breadcrumb-list li:last-child { color: rgba(255,255,255,.95); font-weight: 600; }
.page-hero .breadcrumb-list a { color: rgba(255,255,255,.85); }
.page-hero .breadcrumb-list a:hover { color: #fff; text-decoration: underline; }
.page-hero .breadcrumb-sep { color: rgba(255,255,255,.35); }

/* 15. SECTION HEADER */
.section-header { text-align: center; margin-bottom: 56px; max-width: 680px; margin-left: auto; margin-right: auto; }
.section-header h2 { margin-bottom: .75rem; }

/* 16. BADGE / TAGS */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 100px; font-size: .78rem; font-weight: 600; }
.badge-green { background: #F0FDF4; color: var(--green); }
.badge-navy { background: #EFF6FF; color: var(--navy); }
.badge-gold { background: #FFFBEB; color: #92400E; }
.badge-red { background: #FEF2F2; color: var(--red); }

/* 17. LOAN RANGE WIDGET */
.loan-preview { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.loan-preview h3 { margin-bottom: 1.5rem; font-size: 1.1rem; }
.range-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: .9rem; }
.range-label { color: var(--muted); }
.range-val { font-weight: 700; color: var(--navy); }
input[type="range"] { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: var(--border); outline: none; margin: 12px 0 20px; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); border: 3px solid var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.2); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); border: 3px solid var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.2); cursor: pointer; }
.loan-result { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; text-align: center; margin-top: 16px; }
.loan-result-val { font-size: 2rem; font-weight: 800; color: var(--navy); }
.loan-result-label { font-size: .82rem; color: var(--muted); }

/* 18. PROS/CONS TABLE */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pros-list, .cons-list { border-radius: var(--radius); padding: 24px; }
.pros-list { background: #F0FDF4; border: 1px solid #BBF7D0; }
.cons-list { background: #FEF2F2; border: 1px solid #FECACA; }
.pros-list h4 { color: var(--green); margin-bottom: 12px; }
.cons-list h4 { color: var(--red); margin-bottom: 12px; }
.pros-list li, .cons-list li { padding: 6px 0; font-size: .9rem; display: flex; gap: 8px; align-items: flex-start; color: var(--text); }
.pros-list li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.cons-list li::before { content: '✗'; color: var(--red); font-weight: 700; flex-shrink: 0; }

/* 19. FORM STYLES */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: .9rem; color: var(--dark); margin-bottom: 6px; }
.form-control { width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 1rem; color: var(--dark); background: var(--white); transition: border-color var(--transition), box-shadow var(--transition); outline: none; }
.form-control:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27,58,107,.1); }
.form-control::placeholder { color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.form-check { display: flex; gap: 10px; align-items: flex-start; }
.form-check input { margin-top: 3px; accent-color: var(--navy); }
.form-check label { font-size: .9rem; color: var(--muted); }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 8px; }
.form-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: var(--muted); font-size: .88rem; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* 20. CALCULATOR */
.calc-box { background: var(--white); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.calc-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 28px; }
.calc-result-item { background: var(--bg); border-radius: var(--radius-sm); padding: 20px; text-align: center; border: 1px solid var(--border); }
.calc-result-value { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.calc-result-label { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.calc-table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: .9rem; }
.calc-table th { background: var(--navy); color: var(--white); padding: 12px 16px; text-align: left; font-weight: 600; }
.calc-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); }
.calc-table tr:nth-child(even) td { background: var(--bg); }
.calc-table tbody tr:hover td { background: #EFF6FF; }

/* 21. LENDER COMPARISON TABLE */
.compare-table { width: 100%; border-collapse: collapse; font-size: .9rem; overflow-x: auto; display: block; }
.compare-table th { background: var(--navy); color: var(--white); padding: 14px 18px; text-align: left; white-space: nowrap; }
.compare-table td { padding: 13px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.compare-table tr:nth-child(even) td { background: var(--bg); }
.compare-table .highlight td { background: #EFF6FF !important; font-weight: 600; }
.rate-cell { font-weight: 700; color: var(--green); }

/* 22. TESTIMONIALS */
.testimonial { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.testimonial-stars { color: var(--gold); font-size: 1.1rem; margin-bottom: 12px; }
.testimonial-text { font-style: italic; color: var(--text); margin-bottom: 16px; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--sky)); display: flex; align-items: center; justify-content: center; color: var(--white); font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.testimonial-name { font-weight: 600; font-size: .9rem; color: var(--dark); }
.testimonial-meta { font-size: .8rem; color: var(--muted); }

/* 23. ALERT BOXES */
.alert { border-radius: var(--radius-sm); padding: 16px 20px; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }
.alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }

/* 24. FOOTER */
.footer { background: var(--dark); color: rgba(255,255,255,.7); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand h3 { color: var(--white); font-size: 1.2rem; margin-bottom: .5rem; }
.footer-brand p { font-size: .9rem; line-height: 1.7; margin-top: .5rem; }
.footer-col h4 { color: var(--white); font-size: .9rem; font-weight: 600; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .88rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 24px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.footer-bottom p { font-size: .83rem; color: rgba(255,255,255,.45); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: .83rem; color: rgba(255,255,255,.45); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.8); }
.footer-disclaimer { font-size: .8rem; color: rgba(255,255,255,.35); line-height: 1.6; margin-top: 16px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.07); }

/* 25. TRUST BAR */
.trust-bar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; background: var(--bg-alt); }
.trust-bar-inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 32px; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); font-weight: 500; }
.trust-item svg { color: var(--green); }

/* 26. INTERNAL LINK CARDS */
.link-card { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; transition: all var(--transition); }
.link-card:hover { border-color: var(--navy); box-shadow: var(--shadow); transform: translateX(4px); }
.link-card-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: #EFF6FF; color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.link-card-text { flex: 1; }
.link-card-title { font-weight: 600; font-size: .95rem; color: var(--dark); }
.link-card-desc { font-size: .8rem; color: var(--muted); }
.link-card-arrow { color: var(--navy); }

/* 27. PROGRESS / APPROVAL METER */
.approval-bar { background: var(--bg); border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); }
.approval-track { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; margin: 12px 0 6px; }
.approval-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--green), var(--green-light)); }

/* 28. PAGE HERO (inner pages - smaller) */
.page-hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); padding: 72px 0 64px; color: var(--white); position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); margin-bottom: .75rem; }
.page-hero .lead { color: rgba(255,255,255,.85); font-size: 1.1rem; }
.page-hero .hero-trust { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-top: 1.75rem; }
.page-hero .hero-trust-item { display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.8); font-size: .85rem; }
.page-hero .hero-trust-item svg { color: var(--green-light); flex-shrink: 0; }

/* 29. RESPONSIVE */
@media (max-width: 900px) {
  /* loan categories: 3-col → 2-col on tablet */
  [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .hero { padding: 72px 0 56px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .rate-bar-inner { gap: 16px 32px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .calc-box { padding: 24px; }
  .form-card { padding: 28px; }
  /* loan categories: 2-col → 1-col on mobile */
  [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 48px 0 40px; }
}

/* 30. APPLY MODAL */
.apl-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .28s ease, visibility .28s;
}
.apl-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }

.apl-box {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 36px 28px;
  max-width: 540px; width: 100%;
  max-height: 92vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.08);
  transform: scale(.96) translateY(12px);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1);
}
.apl-overlay.open .apl-box { transform: scale(1) translateY(0); }

.apl-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.apl-close:hover { background: var(--border); color: var(--dark); }

.apl-header { margin-bottom: 24px; }
.apl-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: #F0FDF4; color: var(--green); border: 1px solid #BBF7D0;
  border-radius: 100px; padding: 4px 12px; font-size: .75rem; font-weight: 600;
  margin-bottom: 12px;
}
.apl-header h2 { font-size: 1.5rem; color: var(--dark); margin-bottom: 6px; }
.apl-header p  { color: var(--muted); font-size: .9rem; }

.apl-step-bar { display: flex; align-items: center; gap: 0; margin-bottom: 14px; }
.apl-step-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.apl-step-dot.active { background: var(--navy); color: #fff; }
.apl-step-dot.done { background: var(--green); color: #fff; }
.apl-step-dot.done::after { content: '✓'; }
.apl-step-line { flex: 1; height: 3px; background: var(--border); margin: 0 6px; border-radius: 2px; }
.apl-step-line.active { background: var(--green); }
.apl-step-label { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }

.apl-amount-display { text-align: center; margin-bottom: 8px; }
.apl-amount-display span:first-child { display: block; font-size: 2.8rem; font-weight: 800; color: var(--navy); line-height: 1; }
.apl-amt-label { font-size: .78rem; color: var(--muted); margin-top: 4px; }

.apl-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; outline: none; cursor: pointer; margin: 10px 0 6px; }
.apl-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); border: 3px solid var(--white); box-shadow: 0 2px 8px rgba(27,58,107,.35); cursor: pointer; }
.apl-slider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); border: 3px solid var(--white); cursor: pointer; }
.apl-range-ends { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-bottom: 16px; }

.apl-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Progress bar */
.apl-progress { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 24px; overflow: hidden; }
.apl-progress-bar { height: 100%; background: linear-gradient(90deg, var(--navy), var(--sky)); border-radius: 2px; transition: width .4s ease; }

/* Credit score card grid */
.apl-score-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 4px; }
.apl-score-card {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px; border: 2px solid var(--border); border-radius: 10px;
  background: var(--white); cursor: pointer; transition: all .18s ease;
  outline: none; text-align: center;
}
.apl-score-card:hover { border-color: var(--navy); background: #F0F4FF; }
.apl-score-card.selected { border-color: var(--navy); background: #EFF6FF; box-shadow: 0 0 0 3px rgba(27,58,107,.12); }
.score-num  { font-size: .82rem; font-weight: 800; color: var(--navy); line-height: 1; }
.score-tier { font-size: .65rem; font-weight: 600; color: var(--dark); }
.score-apr  { font-size: .6rem; color: var(--muted); }
.apl-score-card.selected .score-num { color: var(--navy); }

/* Ghost button */
.btn-ghost { background: transparent; border: 2px solid var(--border); color: var(--muted); padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; transition: all .18s; flex-shrink: 0; }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.apl-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.apl-trust span { display: flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--muted); font-weight: 500; }
.apl-trust svg { color: var(--green); }

.apl-done { text-align: center; padding: 16px 0; }
.apl-done-icon { font-size: 3.5rem; margin-bottom: 12px; line-height: 1; }
.apl-done h3 { font-size: 1.4rem; color: var(--navy); margin-bottom: 8px; }
.apl-done p { color: var(--muted); max-width: 320px; margin: 0 auto; }
.apl-done-tags { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.apl-done-tags span { background: #F0FDF4; color: var(--green); border-radius: 100px; padding: 5px 14px; font-size: .8rem; font-weight: 600; }

@media (max-width: 600px) {
  .apl-box { padding: 28px 16px 24px; }
  .apl-grid2 { grid-template-columns: 1fr; }
  .apl-amount-display span:first-child { font-size: 2.2rem; }
  .apl-score-grid { grid-template-columns: repeat(3, 1fr); }
  .apl-score-grid .apl-score-card:last-child { grid-column: 2; }
}

/* 31. EXTRA COMPONENTS (apply, contact pages) */
.form-section-title { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sky); margin-bottom: 16px; margin-top: 8px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.gap-16 { gap: 16px; }
.check-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { font-size: .88rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.check-list li::before { content: '✓'; font-weight: 700; color: var(--white); background: var(--green); border-radius: 50%; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; flex-shrink: 0; }
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-card-sm { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500; color: var(--navy); transition: all var(--transition); }
.link-card-sm:hover { border-color: var(--navy); background: var(--bg); }
.trust-bar-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 40px; }
.trust-icon { font-size: 1.5rem; }
.trust-text { display: flex; flex-direction: column; }
.trust-text strong { font-size: .9rem; color: var(--dark); }
.trust-text span { font-size: .78rem; color: var(--muted); }

/* 32. BACK TO TOP */
.back-to-top {
  position: fixed; bottom: 88px; right: 20px; z-index: 800;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(27,58,107,.35);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .28s, transform .28s, background .2s;
  cursor: pointer; border: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--navy-light); transform: translateY(-2px) !important; }
.back-to-top:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

/* 33. STICKY MOBILE CTA */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 700;
  background: var(--navy-dark); padding: 12px 16px;
  display: none; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: nowrap;
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  border-top: 1px solid rgba(255,255,255,.08);
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-cta-text { flex: 1; min-width: 0; }
.sticky-cta-text strong { display: block; font-size: .88rem; font-weight: 700; color: var(--white); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta-text span { font-size: .75rem; color: rgba(255,255,255,.65); }
.sticky-cta .btn { flex-shrink: 0; font-size: .88rem; padding: 11px 20px; }
@media (max-width: 768px) { .sticky-cta { display: flex; } }

/* 34. INLINE CTA STRIP */
.inline-cta {
  background: #EFF6FF; border: 1px solid #BFDBFE;
  border-radius: var(--radius); padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin: 48px 0;
}
.inline-cta-text h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: .25rem; }
.inline-cta-text p { color: var(--muted); font-size: .88rem; margin: 0; }
.inline-cta .btn { flex-shrink: 0; }
@media (max-width: 600px) { .inline-cta { flex-direction: column; text-align: center; } .inline-cta .btn { width: 100%; justify-content: center; } }

/* 35. UTILITIES */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }
.fw-700 { font-weight: 700; }
.color-navy { color: var(--navy); }
.color-green { color: var(--green); }
.color-muted { color: var(--muted); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
