:root {
  --green-900: #064233;
  --green-700: #0b6e4f;
  --green-600: #0f855f;
  --green-100: #e2f2eb;
  --green-50: #f0f9f5;
  --ink: #1f2a26;
  --ink-soft: #55635d;
  --line: #e4eae7;
  --cream: #fbf9f4;
  --paper: #ffffff;
  --amber: #b45309;
  --amber-bg: #fff7e6;
  --red: #9b1c1c;
  --red-bg: #fdf1f1;
  --radius: 12px;
  --maxw: 720px;
  --nav-w: 980px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* ---------- header / nav ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-wrap {
  max-width: var(--nav-w);
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--green-700);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand span { color: var(--ink); font-weight: 600; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem; justify-content: flex-end; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-weight: 500;
}
.nav a:hover { background: var(--green-50); color: var(--green-700); }
.nav a.active { color: var(--green-700); background: var(--green-100); }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: var(--nav-w); margin: 0 auto; padding: 0 1.25rem; }

main { padding: 2.5rem 0 3.5rem; }

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.7rem;
  color: var(--ink);
}
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; color: var(--ink); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1.2rem 1.25rem; padding: 0; }
li { margin-bottom: 0.4rem; }
strong { color: var(--ink); }
a { color: var(--green-700); }
a:hover { color: var(--green-900); }

.lede { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 1.5rem; }

/* ---------- components ---------- */
.hero {
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem 1.75rem;
  margin-bottom: 2rem;
}
.hero h1 { color: #fff; }
.hero p { color: #e0f3eb; font-size: 1.1rem; }
.hero .btn {
  background: #fff;
  color: var(--green-900);
  font-weight: 700;
}
.hero .notes { font-size: 0.85rem; color: #cfe7dd; margin-top: 1rem; }

.btn {
  display: inline-block;
  background: var(--green-700);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
}
.btn:hover { background: var(--green-900); color: #fff; }
.btn-outline { background: none; color: var(--green-700); }
.btn-outline:hover { background: var(--green-50); color: var(--green-900); }

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem;
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card-grid .card { background: var(--paper); }
.card h3 { margin-top: 0; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { font-size: 0.98rem; color: var(--ink-soft); }

.tagline { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--green-700); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.4rem; }

.steps { list-style: none; margin: 1.5rem 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  padding: 0.9rem 0 0.9rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 1rem;
  width: 2rem; height: 2rem;
  background: var(--green-700);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
}

/* disclaimer */
.disclaimer {
  background: var(--amber-bg);
  border: 1px solid #f0dcc0;
  border-left: 4px solid var(--amber);
  color: #6b3e05;
  padding: 1rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 1.8rem 0;
}
.disclaimer strong { color: #6b3e05; }

.note {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-left: 4px solid var(--green-700);
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  margin: 1.4rem 0;
}
.warn {
  background: var(--red-bg);
  border: 1px solid #f0c9c9;
  border-left: 4px solid var(--red);
  color: var(--red);
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  margin: 1.4rem 0;
}

/* table (compare template) */
.table-scroll { overflow-x: auto; margin: 1.4rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--paper); }
th, td { padding: 0.7rem 0.75rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--green-100); color: var(--green-900); font-weight: 700; }
tbody tr:nth-child(even) { background: var(--green-50); }

/* lenders table on wider screens */
.lenders { min-width: 560px; }
.compare { min-width: 540px; }

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--cream);
  margin-top: 3rem;
}
.footer-inner { max-width: var(--nav-w); margin: 0 auto; padding: 2rem 1.25rem; font-size: 0.9rem; color: var(--ink-soft); }
.footer-top { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; }
.footer-top .brand { font-size: 1rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--green-700); }
.footer-disclaimer { background: var(--paper); border: 1px solid var(--line); padding: 0.8rem 1rem; border-radius: 8px; font-size: 0.85rem; margin: 1rem 0 0.5rem; }
.footer-copy { font-size: 0.82rem; }
.footer-copy a { color: var(--ink-soft); }

/* breadcrumbs */
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--green-700); }

/* guides index list */
.guide-list { list-style: none; margin: 1.5rem 0 0; }
.guide-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.guide-list li:last-child { border-bottom: 0; }
.guide-list a { font-weight: 600; text-decoration: none; font-size: 1.05rem; }
.guide-list a:hover { text-decoration: underline; }
.guide-list small { display: block; color: var(--ink-soft); margin-top: 0.2rem; font-size: 0.9rem; }

/* article content */
.article-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
article.content h2 { margin-top: 2.2rem; }
.toc { background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.25rem; margin: 1.5rem 0; font-size: 0.95rem; }
.toc strong { display: block; margin-bottom: 0.3rem; }
.toc ol { margin: 0; }

.pagination { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: 0.9rem; }

/* cta strip B2B */
.cta-strip { background: var(--green-900); color: #fff; border-radius: var(--radius); padding: 2rem 1.75rem; margin: 2rem 0; }
.cta-strip h2 { color: #fff; margin-top: 0; }
.cta-strip p { color: #dcefe7; }
.cta-strip .btn { background: #fff; color: var(--green-900); }
.cta-strip .btn:hover { background: #e6f2ec; color: var(--green-900); }
.cta-strip code { background: rgba(255,255,255,0.15); padding: 0.2rem 0.4rem; border-radius: 4px; }

/* responsive */
@media (max-width: 640px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  .nav-wrap { flex-wrap: wrap; }
}
