:root {
  --green: #123c2f;
  --green2: #16845b;
  --ink: #17201d;
  --muted: #66736d;
  --bg: #f6f8f7;
  --card: #fff;
  --line: #e2e8e5;
  --soft: #e8f3ee;
  --max: 1180px;
  --shadow: 0 4px 20px rgba(18, 60, 47, 0.08);
  --shadow-hover: 0 12px 32px rgba(18, 60, 47, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.72;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max);
  margin: auto;
  padding: 0 20px;
}

/* Header / Nav */
header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--green2);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 6px 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav a {
  font-size: 14px;
  font-weight: 600;
  color: #34413b;
  padding: 8px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--green2);
  background: var(--soft);
}

/* Hero */
.hero {
  background: linear-gradient(145deg, var(--green) 0%, #1a4f3c 50%, #1b5744 100%);
  color: #fff;
  padding: 88px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 55%);
  pointer-events: none;
}

.hero-inner {
  max-width: 820px;
  text-align: center;
  margin: auto;
  position: relative;
}

.eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
  margin: 20px 0 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 18px;
  color: #d4e5dc;
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: #fff;
  color: var(--green);
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 8px;
  margin-top: 0;
  border: 2px solid #fff;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  box-shadow: none;
}

/* Fade-in on page load (no jQuery required) */
.fade-in {
  opacity: 0;
  animation: moneywiseFadeIn 0.7s ease forwards;
}
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.15s; }
.fade-in:nth-child(3) { animation-delay: 0.25s; }
.fade-in:nth-child(4) { animation-delay: 0.35s; }

@keyframes moneywiseFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    animation: none;
  }
}

/* Ensure homepage hero text is always visible */
.hero-inner {
  position: relative;
  z-index: 2;
}
.hero h1,
.hero .eyebrow {
  color: #fff !important;
}
.hero p,
.hero .lead {
  color: #d4e5dc !important;
}
.hero .btn {
  color: #123c2f !important;
}
.hero .btn-outline {
  color: #fff !important;
}

/* Stats bar */
.stats-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  box-shadow: 0 2px 12px rgba(18, 60, 47, 0.04);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-item {
  padding: 8px 12px;
  border-right: 1px solid var(--line);
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--green2);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Main content */
main {
  padding: 50px 0;
}

.section {
  margin: 0 0 60px;
}

.section-header {
  margin-bottom: 28px;
}

.section h2 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green);
}

.lead {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

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

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.card-bordered {
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
}

.card-bordered:hover,
.card-bordered.is-hovered {
  border-color: var(--green2);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

a.card:hover {
  border-color: var(--green2);
}

.card h3 {
  margin: 6px 0 10px;
  line-height: 1.35;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.card p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  line-height: 1;
}

.card-arrow {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green2);
}

.tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--green2);
  font-weight: 700;
}

.read {
  display: inline-block;
  color: var(--green2);
  font-weight: 700;
  margin-top: 14px;
  font-size: 14px;
}

.read:hover {
  text-decoration: underline;
}

/* Scroll reveal */
[data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

.ad {
  min-height: 100px;
  border: 1px dashed #cbd6d0;
  background: #f0f3f1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a9791;
  font-size: 12px;
  margin: 30px auto;
  max-width: 970px;
  border-radius: 8px;
}

/* Article pages — base layout; detailed book styles at end of file */
.article {
  max-width: 920px;
  margin: auto;
}

/* Newsletter */
.newsletter {
  background: var(--soft);
  padding: 44px 28px;
  border-radius: 14px;
  text-align: center;
  border: 1.5px solid #d4e8de;
}

.newsletter-enhanced h2 {
  color: var(--green);
  margin: 0 0 8px;
}

.newsletter form {
  display: flex;
  max-width: 480px;
  margin: 22px auto 0;
  gap: 10px;
}

.newsletter input {
  flex: 1;
  padding: 14px 16px;
  border: 1.5px solid #cbd8d2;
  border-radius: 8px;
  font: inherit;
  transition: border-color 0.2s;
}

.newsletter input:focus {
  outline: none;
  border-color: var(--green2);
}

.newsletter button {
  border: 0;
  background: var(--green);
  color: #fff;
  padding: 14px 22px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.newsletter button:hover {
  background: var(--green2);
  transform: translateY(-1px);
}

.form-note {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
}

/* ===== Footer (enhanced) ===== */
.site-footer {
  margin-top: 64px;
  background: #0c1411;
  color: #a8b8b1;
}

.footer-top {
  padding: 56px 0 40px;
  border-top: 3px solid var(--green2);
  background:
    radial-gradient(ellipse at 15% 0%, rgba(22, 132, 91, 0.12) 0%, transparent 50%),
    #0c1411;
}

.footergrid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px 28px;
}

.footer-brand .footer-logo {
  display: inline-block;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.footer-brand .footer-logo span {
  color: #3dba88;
}

.footer-brand p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #8a9b94;
  max-width: 280px;
}

.site-footer h3 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #24332d;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin: 0 0 10px;
}

.site-footer a {
  font-size: 14px;
  color: #9aaba4;
  transition: color 0.2s, padding-left 0.2s;
  display: inline-block;
}

.site-footer a:hover {
  color: #3dba88;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid #1a2621;
  background: #080e0c;
  padding: 18px 0;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.copy-text {
  margin: 0;
  font-size: 13px;
  color: #7a8a84;
}

.copy-note {
  margin: 0;
  font-size: 12px;
  color: #5c6b65;
}

/* Legacy footer class safety */
footer {
  background: #0c1411;
  color: #a8b8b1;
}

.copy {
  border-top: 1px solid #1a2621;
  margin-top: 0;
  padding: 18px 0;
  font-size: 13px;
}

/* Contact form */
form.contact {
  max-width: 720px;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid #cbd6d0;
  border-radius: 6px;
  margin: 6px 0 16px;
  font: inherit;
}

.contact textarea {
  min-height: 170px;
}

.contact button {
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 13px 22px;
  font-weight: 800;
  cursor: pointer;
}

.contact button:hover {
  background: var(--green2);
}

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

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

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 16px 8px;
  }

  .stat-item:nth-child(3),
  .stat-item:nth-child(4) {
    border-bottom: none;
  }
}

@media (max-width: 800px) {
  /* mobile nav handled in app-header block */
  .nav {
    flex-direction: row;
    align-items: center;
  }

  .grid3,
  .grid2 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 60px 0 56px;
  }

  .newsletter form {
    flex-direction: column;
  }

  .article p,
  .article li {
    font-size: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 20px;
  }

  nav a {
    font-size: 13px;
    padding: 6px 10px;
  }

  .section h2 {
    font-size: 26px;
  }

  .stat-num {
    font-size: 26px;
  }
}

/* ===== Calculators ===== */
.hero-compact {
  padding: 56px 0 48px;
}

.hero-compact h1 {
  font-size: clamp(28px, 5vw, 42px);
}

.calc-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 36px;
  padding: 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.calc-jump a {
  font-size: 13px;
  font-weight: 700;
  color: var(--green2);
  background: var(--soft);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d4e8de;
  transition: background 0.2s, color 0.2s;
}

.calc-jump a:hover {
  background: var(--green2);
  color: #fff;
  border-color: var(--green2);
}

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

.calc-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.calc-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fafcfb 0%, #fff 100%);
}

.calc-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.calc-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.01em;
}

.calc-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.calc-body {
  padding: 20px 24px 22px;
  flex: 1;
}

.calc-body label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #34413b;
  margin: 12px 0 6px;
}

.calc-body label:first-child {
  margin-top: 0;
}

.calc-body input,
.calc-body select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #cbd8d2;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calc-body input:focus,
.calc-body select:focus {
  outline: none;
  border-color: var(--green2);
  box-shadow: 0 0 0 3px rgba(22, 132, 91, 0.15);
}

.calc-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.calc-btn:hover {
  background: var(--green2);
  transform: translateY(-1px);
}

.calc-result {
  margin-top: 18px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid #d4e8de;
  border-radius: 10px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #d4e8de;
  font-size: 14px;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row span {
  color: var(--muted);
  font-weight: 500;
}

.result-row strong {
  color: var(--green);
  font-size: 16px;
  font-weight: 800;
}

.result-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.calc-note {
  margin: 0;
  padding: 12px 24px 18px;
  font-size: 12px;
  color: #8a9791;
  line-height: 1.5;
  border-top: 1px solid var(--line);
  background: #fafcfb;
}

@media (max-width: 800px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}


/* Sub-page hero (matches home style, compact) */
.hero-page {
  background: linear-gradient(145deg, var(--green) 0%, #1a4f3c 50%, #1b5744 100%);
  color: #fff;
  padding: 52px 0 48px;
  position: relative;
  overflow: hidden;
}

.hero-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 55%);
  pointer-events: none;
}

.hero-page .hero-inner {
  max-width: 820px;
  text-align: center;
  margin: 0 auto;
  position: relative;
}

.hero-page .eyebrow,
.hero-page .tag-hero {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
}

.hero-page h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  margin: 14px 0 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-page .lead,
.hero-page p.hero-lead {
  font-size: 17px;
  color: #d4e5dc;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}

.hero-page .article-meta {
  color: #b8d0c4;
  font-size: 14px;
  margin: 10px 0 0;
}

.hero-page .hero-inner.center {
  text-align: center;
  margin: auto;
}

.hero-page .hero-inner.center .lead {
  margin-left: auto;
  margin-right: auto;
}


/* ===== Enhanced headings ===== */
.section-header {
  margin-bottom: 32px;
  position: relative;
}

.section h2,
.section-header h2 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.25;
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--green);
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section h2::after,
.section-header h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--green2), transparent);
  border-radius: 2px;
}

.section-header .lead,
.lead {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 16.5px;
  line-height: 1.65;
  max-width: 640px;
}

/* Article body headings */
.article h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  margin: 12px 0 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--green);
}

.article h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.3;
  margin-top: 42px;
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.article h3 {
  font-size: 20px;
  margin-top: 28px;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--ink);
}

.article p,
.article li {
  font-size: 17px;
  line-height: 1.75;
}

/* Card titles */
.card h3 {
  margin: 6px 0 10px;
  line-height: 1.35;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* Hero titles already strong — slight boost */
.hero h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-page h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Why / newsletter section titles */
.newsletter h2,
.why-section h2 {
  font-size: clamp(24px, 3.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green);
}

/* Responsive footer */
@media (max-width: 900px) {
  .footergrid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footergrid {
    grid-template-columns: 1fr;
  }
  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}



/* =========================================================
   BOOK-STYLE ARTICLE / BLOG READING EXPERIENCE
   ========================================================= */

/* Soft page canvas behind the "paper" */
main:has(.article) {
  background:
    linear-gradient(180deg, #eef3f0 0%, var(--bg) 120px);
  padding-top: 36px;
  padding-bottom: 60px;
}

/* The paper / book page */
.article {
  max-width: 920px;
  margin: 0 auto;
  background: #fffef9;
  border: 1px solid #d8e0db;
  border-radius: 4px;
  box-shadow:
    0 1px 2px rgba(18, 60, 47, 0.04),
    0 12px 40px rgba(18, 60, 47, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  padding: 52px 64px 60px;
  position: relative;
}

/* Subtle left "binding" accent */
.article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--green2), var(--green));
  opacity: 0.85;
}

/* Reading typography — book-like body */
.article p,
.article li {
  font-family: Georgia, "Times New Roman", "Liberation Serif", serif;
  font-size: 18px;
  line-height: 1.85;
  color: #1c2420;
  margin: 0 0 1.15em;
}

.article li {
  margin-bottom: 0.55em;
}

.article ul,
.article ol {
  padding-left: 1.35em;
  margin: 0 0 1.4em;
}

/* Headings stay clean sans-serif */
.article h1 {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: clamp(30px, 4.2vw, 42px);
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.04em;
  color: #0f2e24;
  margin: 0 0 14px;
}

.article h2 {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #123c2f;
  margin: 2.5em 0 0.85em;
  padding: 0 0 14px;
  border-bottom: 1px solid #e8eeea;
  position: relative;
}

.article h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 2.5px;
  background: linear-gradient(90deg, #16845b, #3dba88);
  border-radius: 2px;
}

.article h3 {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #1a2e26;
  margin: 1.9em 0 0.5em;
}

.article-meta {
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px dashed #d4ddd8;
}

/* Table of contents — bordered card inside the page */
.article > h2:first-of-type {
  margin-top: 0.5em;
}

.article ol {
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  background: #f4f8f6;
  border: 1.5px solid #d4e3db;
  border-radius: 10px;
  padding: 18px 18px 18px 40px;
  margin: 0 0 2em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.article ol a {
  color: var(--green);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

.article ol a:hover {
  color: var(--green2);
  border-bottom-color: var(--green2);
}

/* Editorial note — soft bordered callout */
.note {
  background: #eef7f2;
  border: 1.5px solid #c5ddd0;
  border-left: 5px solid var(--green2);
  padding: 18px 20px;
  border-radius: 8px;
  margin: 0 0 28px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: #2a3d34;
}

.note strong {
  color: var(--green);
}

/* Disclaimer at end */
.article .disclaimer,
.disclaimer {
  background: #fff8eb;
  border: 1.5px solid #ead9b0;
  border-radius: 10px;
  padding: 20px 22px;
  color: #5c5340;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13.5px;
  line-height: 1.7;
  margin-top: 42px;
}

/* Drop-cap on first body paragraph after TOC for book feel */
.article > ol + h2 + p:first-letter {
  font-family: Georgia, "Times New Roman", serif;
  float: left;
  font-size: 3.4em;
  line-height: 0.75;
  padding: 0.12em 0.12em 0 0;
  font-weight: 700;
  color: var(--green);
}

/* Strong tags inside body */
.article p strong {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.95em;
  color: var(--green);
}

/* Ad slots inside article flow — quieter */
.article + .ad,
main .ad {
  border-radius: 10px;
  margin: 28px auto;
}

/* Links in body */
.article p a,
.article li a {
  color: var(--green2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.article p a:hover,
.article li a:hover {
  color: var(--green);
}

/* Mobile: reduce paper padding, keep book feel */
@media (max-width: 700px) {
  .article {
    padding: 28px 22px 36px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: 0 4px 20px rgba(18, 60, 47, 0.06);
  }

  .article::before {
    display: none;
  }

  .article p,
  .article li {
    font-size: 17px;
    line-height: 1.8;
  }

  .article > ol + h2 + p:first-letter {
    font-size: 2.8em;
  }
}

@media (max-width: 480px) {
  main:has(.article) {
    padding-top: 16px;
  }

  .article {
    padding: 22px 16px 30px;
  }
}


/* =========================================================
   MOBILE APP-STYLE HEADER & NAVIGATION (fixed)
   ========================================================= */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: #eef5f1;
  border-radius: 12px;
  cursor: pointer;
  z-index: 10002;
  position: relative;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #123c2f;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 17, 0.5);
  z-index: 10000;
}

.nav-backdrop.is-open {
  display: block;
}

@media (max-width: 900px) {
  header {
    position: sticky;
    top: 0;
    z-index: 9990;
    background: #ffffff;
    border-bottom: 1px solid #e2e8e5;
    box-shadow: 0 2px 12px rgba(18, 60, 47, 0.06);
  }

  .nav {
    min-height: 58px;
    padding: 8px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .logo {
    font-size: 20px;
    z-index: 9991;
  }

  .nav-toggle {
    display: inline-flex !important;
    margin-left: auto;
  }

  nav.site-nav {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: min(320px, 88vw) !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 72px 16px 40px !important;
    background: #ffffff !important;
    z-index: 10001 !important;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
    transform: translateX(110%) !important;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  nav.site-nav.is-open {
    transform: translateX(0) !important;
  }

  nav.site-nav ul {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100%;
  }

  nav.site-nav li {
    width: 100%;
    margin: 0;
  }

  nav.site-nav a {
    display: flex !important;
    align-items: center;
    width: 100%;
    padding: 14px 16px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a2e26 !important;
    border-radius: 12px !important;
    background: transparent !important;
  }

  nav.site-nav a:active,
  nav.site-nav a:hover {
    background: #e8f3ee !important;
    color: #16845b !important;
  }

  nav.site-nav a.active {
    background: #e8f3ee !important;
    color: #123c2f !important;
    font-weight: 700 !important;
  }

  body.nav-open {
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .nav { min-height: 54px; }
  .logo { font-size: 18px; }
  nav.site-nav { width: 100% !important; }
}

@media (min-width: 901px) {
  .nav-toggle { display: none !important; }
  .nav-backdrop { display: none !important; }

  .nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
  }

  nav.site-nav {
    display: block !important;
    position: static !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    z-index: auto !important;
  }

  nav.site-nav ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  nav.site-nav li {
    width: auto !important;
  }

  nav.site-nav a {
    display: inline-flex !important;
    width: auto !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #34413b !important;
    border-radius: 6px !important;
    background: transparent !important;
  }

  nav.site-nav a:hover,
  nav.site-nav a.active {
    color: #16845b !important;
    background: #e8f3ee !important;
  }
}


/* Related guides internal linking block */
.related-guides {
  margin-top: 2.5em;
  padding: 22px 24px;
  background: #f4f8f6;
  border: 1.5px solid #d4e3db;
  border-radius: 12px;
}
.related-guides h2 {
  margin-top: 0 !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  font-size: 1.25rem !important;
}
.related-guides h2::after { display: none !important; }
.related-guides ul {
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding-left: 1.2em !important;
  margin: 12px 0 !important;
}
.related-guides li { margin: 6px 0; }
.related-guides a { font-weight: 600; color: #16845b; }
.related-hub {
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 14px !important;
  margin: 14px 0 0 !important;
  color: #66736d;
}

/* WordPress compatibility */
.wp-block-image img,
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.25em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.25em; }
.entry-content > *:first-child { margin-top: 0; }
.custom-logo-wrap img { max-height: 48px; width: auto; }
.nav .menu { display: flex; list-style: none; gap: 6px 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav .menu a { display: inline-flex; padding: 8px 12px; font-size: 14px; font-weight: 600; border-radius: 6px; color: #34413b; }
.nav .menu a:hover,
.nav .menu .current-menu-item > a,
.nav .menu .current_page_item > a { color: #16845b; background: #e8f3ee; }
.pagination, .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.page-numbers { padding: 8px 12px; background: #fff; border: 1px solid #e2e8e5; border-radius: 8px; font-weight: 600; }
.page-numbers.current { background: #123c2f; color: #fff; border-color: #123c2f; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
