/* ============================================================
   HomeMortgageSuccess.com — Main Stylesheet
   Design: Premium Financial Intelligence Platform
   Aesthetic: Calm authority, precise typography, measured warmth
   Fonts: DM Serif Display (headings) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── CSS VARIABLES ─────────────────────────────────────── */
:root {
  --navy:       #0f1f3d;
  --navy-mid:   #1a3260;
  --blue:       #1d4ed8;
  --blue-light: #3b6fef;
  --teal:       #0d9488;
  --teal-light: #14b8a6;
  --gold:       #d97706;
  --green:      #059669;

  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-600:   #475569;
  --gray-700:   #334155;
  --gray-800:   #1e293b;
  --gray-900:   #0f172a;

  --white:      #ffffff;

  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-sm:  0 1px 3px rgba(15,31,61,.06), 0 1px 2px rgba(15,31,61,.04);
  --shadow:     0 4px 16px rgba(15,31,61,.08), 0 2px 4px rgba(15,31,61,.04);
  --shadow-md:  0 8px 32px rgba(15,31,61,.10), 0 2px 8px rgba(15,31,61,.06);
  --shadow-lg:  0 16px 48px rgba(15,31,61,.12), 0 4px 12px rgba(15,31,61,.08);

  --transition: .2s ease;

  --max-w:      1160px;
  --max-w-text: 720px;
}

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-light); }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ── TYPOGRAPHY ────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.2; color: var(--navy); }
h4, h5, h6  { font-weight: 600; line-height: 1.3; color: var(--gray-800); }

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.1rem; }

p { color: var(--gray-700); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.15rem; color: var(--gray-600); line-height: 1.7; font-weight: 300; }
.label-sm { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500); }

strong { color: var(--gray-900); }

/* ── LAYOUT ────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: var(--max-w-text); margin: 0 auto; padding: 0 20px; }

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-lg { padding: 120px 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; } .gap-4 { gap: 32px; }

.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 40px; }

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(29,78,216,.35);
}
.btn-primary:hover { background: #1741b0; box-shadow: 0 6px 20px rgba(29,78,216,.45); transform: translateY(-1px); color: var(--white); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); background: var(--gray-50); }

.btn-teal {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(13,148,136,.35);
}
.btn-teal:hover { background: #0b7a72; transform: translateY(-1px); color: var(--white); }

.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 18px; font-size: .85rem; border-radius: var(--radius-sm); }

/* ── NAVIGATION ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { color: var(--white); width: 20px; height: 20px; }
.logo-text { font-family: var(--font-serif); font-size: 1.15rem; color: var(--navy); line-height: 1; }
.logo-text span { color: var(--blue); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { background: var(--gray-100); color: var(--navy); }

.nav-cta { flex-shrink: 0; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
}
.nav-toggle:hover { background: var(--gray-100); }
.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle .bar + .bar { margin-top: 5px; }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  gap: 4px;
}
.mobile-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--gray-700);
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.mobile-menu a:hover { background: var(--gray-100); color: var(--navy); }
.mobile-menu.open { display: flex; }

/* ── HERO ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--gray-50) 0%, #eef2ff 100%);
  border-bottom: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 70% 50%, rgba(29,78,216,.06) 0%, transparent 70%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(29,78,216,.08);
  color: var(--blue);
  padding: 5px 12px;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--teal); }
.hero .lead { margin-bottom: 36px; font-size: 1.2rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--gray-200);
}
.hero-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.hero-card-label { font-size: .8rem; font-weight: 600; color: var(--gray-500); letter-spacing: .06em; text-transform: uppercase; }
.hero-card-stat { font-family: var(--font-serif); font-size: 2.4rem; color: var(--navy); line-height: 1; }
.hero-card-stat span { font-size: 1.2rem; color: var(--gray-500); font-family: var(--font-sans); font-weight: 400; }
.hero-bar { height: 8px; background: var(--gray-100); border-radius: 99px; margin-top: 20px; overflow: hidden; }
.hero-bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); border-radius: 99px; animation: barFill 1.5s ease forwards; }
@keyframes barFill { from { width: 0; } to { width: 67%; } }

.hero-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.hero-metric {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--gray-200);
}
.hero-metric-val { font-size: 1.4rem; font-weight: 700; color: var(--navy); display: block; }
.hero-metric-lbl { font-size: .75rem; color: var(--gray-500); margin-top: 2px; }

/* ── TRUST BAR ─────────────────────────────────────────── */
.trust-bar {
  background: var(--navy);
  padding: 20px 0;
}
.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.8);
  font-size: .875rem;
  font-weight: 500;
}
.trust-item svg { color: var(--teal-light); flex-shrink: 0; }

/* ── CARDS ─────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all .25s ease;
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--gray-300); }

.card-body { padding: 28px; }
.card-icon {
  width: 48px; height: 48px;
  background: rgba(29,78,216,.07);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--blue);
}
.card-icon svg { width: 22px; height: 22px; }
.card-title { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy); margin-bottom: 8px; }
.card p { font-size: .9rem; color: var(--gray-600); }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 16px;
}
.card-link:hover { gap: 8px; }

.card-featured {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border: none;
  color: var(--white);
}
.card-featured .card-icon { background: rgba(255,255,255,.12); color: var(--white); }
.card-featured .card-title { color: var(--white); }
.card-featured p { color: rgba(255,255,255,.75); }
.card-featured .card-link { color: var(--teal-light); }

/* ── SECTION HEADERS ───────────────────────────────────── */
.section-header { margin-bottom: 48px; }
.section-header.text-center { text-align: center; }
.section-header.text-center p { max-width: 560px; margin: 12px auto 0; }
.section-kicker {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 12px; }

/* ── CALCULATOR LAYOUT ─────────────────────────────────── */
.tool-page { padding: 60px 0; }
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: start;
}

.calc-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.calc-card-head {
  background: var(--navy);
  padding: 28px 32px;
  color: var(--white);
}
.calc-card-head h2 { color: var(--white); font-size: 1.4rem; margin-bottom: 4px; }
.calc-card-head p { color: rgba(255,255,255,.65); font-size: .875rem; margin: 0; }
.calc-form { padding: 32px; }

/* ── FORM ELEMENTS ─────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label {
  display: block;
  font-size: .825rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-hint { font-size: .775rem; color: var(--gray-500); margin-top: 4px; }

.input-wrap { position: relative; }
.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: .9rem;
  font-weight: 500;
  pointer-events: none;
}
.input-prefix { left: 12px; }
.input-suffix { right: 12px; }
.input-wrap .form-control { padding-left: 28px; }
.input-wrap .form-control.has-suffix { padding-right: 36px; }

.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}
.form-control::placeholder { color: var(--gray-400); }
.form-control.error { border-color: #ef4444; }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

textarea.form-control { resize: vertical; min-height: 120px; }

.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.form-check input { width: 16px; height: 16px; accent-color: var(--blue); flex-shrink: 0; cursor: pointer; }
.form-check label { font-size: .9rem; color: var(--gray-700); cursor: pointer; }

/* ── RESULT CARDS ──────────────────────────────────────── */
.results-panel {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 28px;
}
.results-panel-head { margin-bottom: 24px; }
.results-panel-head h3 { font-size: 1.15rem; color: var(--navy); }

.result-primary {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}
.result-primary-label { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 8px; }
.result-primary-value { font-family: var(--font-serif); font-size: 2.8rem; color: var(--white); line-height: 1; }
.result-primary-sub { font-size: .85rem; color: rgba(255,255,255,.55); margin-top: 6px; }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.result-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
}
.result-item-label { font-size: .75rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.result-item-value { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.result-item-value.positive { color: var(--green); }
.result-item-value.negative { color: #ef4444; }

.result-breakdown { margin-top: 20px; }
.result-breakdown-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-200); font-size: .9rem; }
.result-breakdown-row:last-child { border-bottom: none; }
.result-breakdown-row .label { color: var(--gray-600); }
.result-breakdown-row .value { font-weight: 600; color: var(--gray-800); }

/* ── AMORTIZATION TABLE ────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table thead { background: var(--navy); }
.data-table thead th { padding: 12px 16px; color: rgba(255,255,255,.85); font-weight: 600; text-align: left; white-space: nowrap; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.data-table tbody tr { border-bottom: 1px solid var(--gray-200); transition: background var(--transition); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody tr.year-row { background: rgba(29,78,216,.04); font-weight: 600; }
.data-table td { padding: 11px 16px; color: var(--gray-700); }

/* ── GUIDE CONTENT ─────────────────────────────────────── */
.guide-hero {
  background: linear-gradient(160deg, var(--gray-50) 0%, rgba(238,242,255,.8) 100%);
  border-bottom: 1px solid var(--gray-200);
  padding: 64px 0 48px;
}
.guide-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.guide-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(29,78,216,.08);
  color: var(--blue);
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.guide-meta-text { font-size: .85rem; color: var(--gray-500); }

.guide-content { padding: 60px 0; }
.guide-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
}

.prose h2 { margin: 40px 0 16px; }
.prose h3 { margin: 32px 0 12px; font-family: var(--font-sans); font-size: 1.1rem; font-weight: 700; }
.prose p { margin-bottom: 18px; line-height: 1.8; }
.prose ul, .prose ol { margin: 0 0 18px 20px; color: var(--gray-700); line-height: 1.8; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--gray-900); }

.summary-box {
  background: rgba(13,148,136,.06);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.summary-box h4 { color: var(--teal); font-size: .95rem; margin-bottom: 8px; }
.summary-box p { color: var(--gray-700); font-size: .9rem; margin: 0; }

.info-box {
  background: rgba(29,78,216,.05);
  border: 1px solid rgba(29,78,216,.15);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
}
.info-box h4 { color: var(--blue); font-size: .95rem; margin-bottom: 8px; }
.info-box p { color: var(--gray-700); font-size: .9rem; margin: 0; }

/* Sidebar */
.guide-sidebar { position: sticky; top: 88px; }
.sidebar-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}
.sidebar-card h4 { font-size: .9rem; color: var(--gray-800); margin-bottom: 16px; }
.sidebar-toc a { display: block; padding: 5px 0; font-size: .85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.sidebar-toc a:hover { color: var(--blue); }
.sidebar-toc a:last-child { border: none; }

/* ── CTA BLOCKS ────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(29,78,216,.2) 0%, transparent 70%);
  right: -200px; top: -200px;
  border-radius: 50%;
}
.cta-section-inner { position: relative; text-align: center; }
.cta-section h2 { color: var(--white); margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,.7); font-size: 1.1rem; margin-bottom: 36px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.inline-cta {
  background: linear-gradient(135deg, rgba(13,148,136,.07) 0%, rgba(29,78,216,.05) 100%);
  border: 1px solid rgba(29,78,216,.15);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 40px 0;
}
.inline-cta-text h4 { color: var(--navy); margin-bottom: 4px; }
.inline-cta-text p { color: var(--gray-600); font-size: .9rem; margin: 0; }

/* ── FAQ ───────────────────────────────────────────────── */
.faq-list { max-width: 760px; }
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 18px 24px;
  text-align: left;
  font-size: .95rem;
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--gray-50); }
.faq-question.open { color: var(--navy); }
.faq-chevron { flex-shrink: 0; transition: transform var(--transition); color: var(--gray-400); }
.faq-question.open .faq-chevron { transform: rotate(180deg); color: var(--blue); }
.faq-answer {
  display: none;
  padding: 0 24px 18px;
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.7;
}
.faq-answer.open { display: block; }

/* ── RATES TABLE ───────────────────────────────────────── */
.rates-table-wrap { overflow-x: auto; }
.rates-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-200); }
.rates-table thead { background: var(--navy); }
.rates-table thead th { padding: 14px 20px; color: rgba(255,255,255,.85); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-align: left; }
.rates-table tbody tr { transition: background var(--transition); border-bottom: 1px solid var(--gray-200); }
.rates-table tbody tr:hover { background: var(--gray-50); }
.rates-table td { padding: 16px 20px; color: var(--gray-700); font-size: .9rem; }
.rates-table td strong { color: var(--navy); font-size: 1.05rem; }
.rates-table td .rate-val { font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.rate-badge { display: inline-block; padding: 2px 8px; background: rgba(13,148,136,.1); color: var(--teal); border-radius: 99px; font-size: .75rem; font-weight: 600; }

/* ── BREADCRUMBS ───────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .825rem;
  color: var(--gray-500);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { color: var(--gray-400); }

/* ── STATS / FEATURES GRID ─────────────────────────────── */
.stat-item { text-align: center; padding: 24px; }
.stat-val { font-family: var(--font-serif); font-size: 2.5rem; color: var(--navy); line-height: 1; }
.stat-label { font-size: .875rem; color: var(--gray-500); margin-top: 4px; }

/* ── FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.65);
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo-text { color: var(--white); }
.footer-brand p { font-size: .875rem; line-height: 1.7; color: rgba(255,255,255,.5); margin-bottom: 20px; }
.footer-col h5 { color: var(--white); font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; font-size: .875rem; color: rgba(255,255,255,.5); padding: 4px 0; transition: color var(--transition); text-decoration: none; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.35); line-height: 1.6; max-width: 700px; }
.footer-legal { display: flex; gap: 16px; flex-shrink: 0; }
.footer-legal a { font-size: .8rem; color: rgba(255,255,255,.4); text-decoration: none; }
.footer-legal a:hover { color: rgba(255,255,255,.7); }

/* ── ADMIN ─────────────────────────────────────────────── */
.admin-body { background: #f5f7fa; font-family: var(--font-sans); }
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 240px;
  background: var(--navy);
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}
.admin-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 8px;
}
.admin-logo span { font-family: var(--font-serif); color: var(--white); font-size: 1rem; display: block; }
.admin-logo small { color: rgba(255,255,255,.4); font-size: .75rem; }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.65);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
  border-radius: 0;
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,.08);
  color: var(--white);
}
.admin-nav a.active { border-left: 3px solid var(--teal); }
.admin-nav .nav-group { padding: 16px 20px 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); }

.admin-main { margin-left: 240px; flex: 1; }
.admin-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}
.admin-topbar h1 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 700; color: var(--navy); }

.admin-content { padding: 32px; }

.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.admin-card-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-card-head h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; color: var(--gray-800); }
.admin-card-body { padding: 24px; }

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-card-icon.blue { background: rgba(29,78,216,.1); color: var(--blue); }
.stat-card-icon.teal { background: rgba(13,148,136,.1); color: var(--teal); }
.stat-card-icon.gold { background: rgba(217,119,6,.1); color: var(--gold); }
.stat-card-icon.green { background: rgba(5,150,105,.1); color: var(--green); }
.stat-card-val { font-size: 1.8rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-card-label { font-size: .8rem; color: var(--gray-500); margin-top: 2px; }

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-table thead tr { border-bottom: 2px solid var(--gray-200); }
.admin-table th { padding: 10px 16px; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); }
.admin-table td { padding: 12px 16px; color: var(--gray-700); border-bottom: 1px solid var(--gray-100); }
.admin-table tr:hover td { background: var(--gray-50); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.badge-green { background: rgba(5,150,105,.1); color: var(--green); }
.badge-blue { background: rgba(29,78,216,.1); color: var(--blue); }
.badge-gold { background: rgba(217,119,6,.1); color: var(--gold); }
.badge-red { background: rgba(239,68,68,.1); color: #ef4444; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

.action-links a { font-size: .8rem; font-weight: 600; margin-right: 10px; text-decoration: none; }
.action-links a.edit { color: var(--blue); }
.action-links a.delete { color: #ef4444; }

/* ── ALERTS ────────────────────────────────────────────── */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: rgba(5,150,105,.06); border-color: rgba(5,150,105,.3); color: #065f46; }
.alert-error   { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.3); color: #991b1b; }
.alert-info    { background: rgba(29,78,216,.05); border-color: rgba(29,78,216,.2); color: #1e40af; }

/* ── PAGINATION ────────────────────────────────────────── */
.pagination ul { display: flex; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination li a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}
.pagination li a:hover, .pagination li.active a { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* ── TAGS / CHIPS ──────────────────────────────────────── */
.tag { display: inline-block; padding: 3px 10px; background: var(--gray-100); color: var(--gray-600); border-radius: 99px; font-size: .78rem; font-weight: 600; text-decoration: none; }
.tag:hover { background: var(--gray-200); color: var(--gray-800); }

/* ── TOOLS FILTER ──────────────────────────────────────── */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-btn {
  padding: 7px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 99px;
  font-size: .85rem;
  font-weight: 600;
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ── QUOTE FORM ────────────────────────────────────────── */
.quote-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 80px 0;
  text-align: center;
  color: var(--white);
}
.quote-hero h1 { color: var(--white); margin-bottom: 12px; }
.quote-hero p { color: rgba(255,255,255,.7); font-size: 1.1rem; margin: 0; }

.quote-form-section { padding: 72px 0; background: var(--gray-50); }
.quote-form-wrap {
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.quote-form-head { background: var(--gray-50); border-bottom: 1px solid var(--gray-200); padding: 24px 40px; }
.quote-form-head p { font-size: .9rem; color: var(--gray-600); margin: 0; }
.quote-form-body { padding: 40px; }

.step-indicator {
  display: flex;
  gap: 0;
  margin-bottom: 36px;
  counter-reset: step;
}
.step { flex: 1; text-align: center; position: relative; }
.step::before {
  content: counter(step);
  counter-increment: step;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  font-weight: 700;
  font-size: .85rem;
  margin: 0 auto 8px;
  position: relative;
  z-index: 1;
}
.step.done::before { background: var(--teal); color: var(--white); }
.step.active::before { background: var(--blue); color: var(--white); }
.step-label { font-size: .75rem; color: var(--gray-500); font-weight: 600; }
.step.active .step-label { color: var(--blue); }
.step::after { content: ''; position: absolute; top: 16px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 2px; background: var(--gray-200); }
.step:last-child::after { display: none; }
.step.done::after { background: var(--teal); }

/* ── PROGRESS BAR (rate comparison) ───────────────────── */
.progress-bar { background: var(--gray-100); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; transition: width .6s ease; }
.progress-fill.blue { background: var(--blue); }
.progress-fill.teal { background: var(--teal); }

/* ── MOBILE / RESPONSIVE ───────────────────────────────── */
@media (max-width: 1024px) {
  .tool-layout { grid-template-columns: 1fr; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --max-w: 100%; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; flex-direction: column; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 60px 0 50px; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .admin-sidebar { width: 100%; position: fixed; bottom: 0; top: auto; height: 60px; overflow: visible; display: flex; flex-direction: row; align-items: center; padding: 0 20px; }
  .admin-main { margin-left: 0; padding-bottom: 70px; }
  .trust-items { gap: 24px; }
}

@media (max-width: 480px) {
  .result-grid { grid-template-columns: 1fr; }
  .step-label { display: none; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ── UTILITY ───────────────────────────────────────────── */
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-muted { color: var(--gray-500); }
.text-success { color: var(--green); }
.text-danger { color: #ef4444; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
