/* ============================================================
   Wise and Faithful — Design System
   Palette: Forest green + warm gold + parchment
   Type: Plus Jakarta Sans throughout (bold headings, clean sans-serif)
   ============================================================ */

:root {
  /* Brand greens — brighter, more confident */
  --ink:         #0c1a14;   /* near-black with green */
  --forest:      #064e3b;   /* deep brand green */
  --emerald:     #059669;   /* vibrant brand green */
  --sage:        #10b981;   /* bright mid-green */
  --mint:        #34d399;   /* light accent */
  --mint-lt:     #6ee7b7;

  /* Warm amber (upgraded from muted gold) */
  --gold:        #d97706;
  --gold-bright: #f59e0b;
  --gold-pale:   #fffbeb;

  /* Clean neutrals (less earthy, more crisp) */
  --cream:       #f8fafc;
  --parchment:   #f1f5f9;
  --linen:       #e2e8f0;

  /* Text */
  --text:        #0f172a;
  --text-mid:    #475569;
  --text-light:  #94a3b8;
  --white:       #ffffff;

  /* Legacy category accents */
  --cat-biblical-teaching: #4f46e5;
  --cat-guides:            #059669;
  --cat-reviews:           #ea580c;
  --cat-breakdowns:        #2563eb;
  --cat-tools:             #ea580c;

  /* Home category tag accents — vibrant, distinct */
  --cat-faith-money:       #4f46e5;
  --cat-budgeting:         #059669;
  --cat-debt:              #dc2626;
  --cat-investing:         #2563eb;
  --cat-taxes-accounts:    #0891b2;
  --cat-tools-resources:   #ea580c;
  --cat-tithing-giving:    #7c3aed;

  --max-w:   1120px;
  --nav-h:   68px;
  --radius:  8px;
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --ink:         #f0ede8;
  --forest:      #0f3320;
  --emerald:     #4ade90;
  --sage:        #6ee7a8;
  --mint:        #3db87a;
  --gold:        #e8a018;
  --gold-bright: #f5b840;
  --gold-pale:   #2a2210;
  --cream:       #1a1f1c;
  --parchment:   #141918;
  --linen:       #2a312d;
  --text:        #ddd8d0;
  --text-mid:    #9aaa9c;
  --text-light:  #6a7a6c;
  --white:       #111714;
  --cat-biblical-teaching: #7b77c0;
  --cat-guides:            #3db87a;
  --cat-reviews:           #e07050;
  --cat-breakdowns:        #5080a0;
  --cat-tools:             #c09050;

  /* Home category tag accents — dark mode */
  --cat-faith-money:       #818cf8;
  --cat-budgeting:         #34d399;
  --cat-debt:              #f87171;
  --cat-investing:         #60a5fa;
  --cat-taxes-accounts:    #22d3ee;
  --cat-tools-resources:   #fb923c;
  --cat-tithing-giving:    #a78bfa;
}
[data-theme="dark"] body { background: #111714; color: var(--text); }
[data-theme="dark"] .site-header { background: rgba(20,30,24,0.97); border-bottom-color: var(--linen); }
[data-theme="dark"] .prose blockquote { border-left-color: var(--emerald); background: var(--cream); }
[data-theme="dark"] .sidebar-card { background: var(--cream); }
[data-theme="dark"] .email-signup { background: linear-gradient(135deg, #050d09 0%, #022c22 100%); border-top-color: var(--linen); }
[data-theme="dark"] .email-signup__fields input { background: #1f2820; border-color: var(--linen); color: var(--text); }
[data-theme="dark"] .article-card { background: var(--cream); }
[data-theme="dark"] .home-topic-item:hover { filter: brightness(1.18); }
[data-theme="dark"] .prose table th { background: var(--emerald); color: #111714; }
[data-theme="dark"] .prose td { border-bottom-color: var(--linen); }
[data-theme="dark"] .prose tr:nth-child(even) td { background: var(--cream); }
[data-theme="dark"] .toc-list__item a:hover { background: rgba(255,255,255,.04); }

/* Dark mode toggle icons */
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
.icon-sun  { display: none; }
.icon-moon { display: block; }

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--sage); }

/* ============================================================
   ACCESSIBILITY — focus indicators + skip link
   ============================================================ */
:focus { outline: none; } /* reset; we use :focus-visible below */
:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 2px;
}
[data-theme="dark"] :focus-visible {
  outline-color: var(--mint);
}
/* Buttons and inputs get a softer ring + offset adjusted */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.18);
}
[data-theme="dark"] button:focus-visible,
[data-theme="dark"] input:focus-visible,
[data-theme="dark"] select:focus-visible,
[data-theme="dark"] textarea:focus-visible {
  box-shadow: 0 0 0 4px rgba(74, 222, 144, 0.22);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  transition: top .15s ease-out;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 16px;
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
  color: var(--white);
}

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

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linen);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  color: var(--ink);
}
.site-logo:hover { color: var(--emerald); }
.logo-mark { color: var(--emerald); flex-shrink: 0; }
.logo-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
  color: inherit;
}
.logo-text em { font-style: italic; font-weight: 700; color: var(--gold); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto;
}
.site-nav a {
  position: relative;
  color: var(--text-mid);
  font-size: .875rem;
  font-weight: 700;
  padding: 8px 18px;
  letter-spacing: .01em;
  text-decoration: none;
  transition: color .2s;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: var(--emerald);
  transform: scaleX(0);
  transition: transform .2s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a.active { color: var(--emerald); }
.site-nav a.active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--linen);
  padding: 5px 2px;
  color: var(--text-light);
}
.search-form:focus-within { border-color: var(--emerald); color: var(--emerald); }
.search-form input {
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: .83rem;
  width: 120px;
  font-family: inherit;
  padding: 0;
}
.search-form input::placeholder { color: var(--text-light); }

.dark-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--linen);
  color: var(--text-mid);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
}
.dark-toggle:hover { color: var(--ink); border-color: var(--ink); }

.gospel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(192, 57, 43, 0.35);
  color: #c0392b;
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.gospel-btn:hover {
  color: #96281b;
  border-color: #96281b;
  background: none;
}
.gospel-btn svg {
  animation: cross-pulse 3.5s ease-in-out infinite;
}
@keyframes cross-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.15); }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}
.nav-mobile-search { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 28px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 50px;
  transition: all .18s;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--emerald); color: var(--white); border-color: var(--emerald); }
.btn-primary:hover { background: var(--forest); border-color: var(--forest); color: var(--white); }

.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.07); color: var(--white); }

.btn-ghost { background: transparent; color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); color: var(--white); }

.btn-outline-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: var(--white); }

.btn-sm { padding: 9px 18px; font-size: .78rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: #c0392b; color: var(--white); border-color: #c0392b; }
.btn-danger:hover { background: #a93226; }

/* ============================================================
   HOME PAGE — Minimal
   ============================================================ */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 80px;
  text-align: center;
}
.home-hero__parallax {
  position: absolute;
  top: -40%;
  left: 0;
  right: 0;
  bottom: -40%;
  background: linear-gradient(145deg, #0c2d1e 0%, #065f46 35%, #047857 65%, #064e3b 100%);
  will-change: transform;
  pointer-events: none;
}
.home-hero .container {
  position: relative;
  z-index: 1;
}
.home-hero__eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--mint);
  margin-bottom: 20px;
}
.home-hero__heading {
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.04;
  color: var(--white);
  margin-bottom: 20px;
}
.home-hero__heading .accent { color: var(--gold-bright); font-style: italic; font-weight: 700; }
.home-hero__sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.home-hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Topics grid */
.home-topics {
  border-bottom: 1px solid var(--linen);
  padding: 0;
}
.home-topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.home-topic-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px 18px;
  border-right: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
  color: #ffffff;
  transition: filter .15s, opacity .15s;
}
.home-topic-item:last-child { border-right: none; }
.home-topic-item:hover { filter: brightness(1.12); }

/* Per-topic full box colours — vibrant, distinct */
.home-topic-item--faith-money  { background: #4f46e5; }
.home-topic-item--budgeting    { background: #059669; }
.home-topic-item--debt         { background: #dc2626; }
.home-topic-item--investing    { background: #2563eb; }
.home-topic-item--taxes        { background: #0891b2; }
.home-topic-item--tools        { background: #ea580c; }
.home-topic-item--tithing      { background: #7c3aed; }
.home-topic-item--marriage     { background: #db2777; }

.home-topic-item__name {
  font-size: .82rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.home-topic-item__desc {
  font-size: .72rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.45;
}

/* Calculator section */
.home-calculators {
  background: linear-gradient(135deg, #0c1a14 0%, #064e3b 60%, #047857 100%);
  padding: 72px 0 80px;
  margin: 56px 0 0;
}
.home-calculators .home-section-header {
  border-bottom-color: rgba(52,211,153,.35);
  margin-bottom: 10px;
}
.home-calculators .home-section-header h2 {
  color: #ffffff;
}
.home-calculators__sub {
  color: rgba(255,255,255,.6);
  margin: 0 0 40px;
  font-size: 1rem;
}
.home-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) {
  .home-calc-grid { grid-template-columns: 1fr; }
}
.home-calc-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 36px 32px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  text-decoration: none;
  color: #ffffff;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
  backdrop-filter: blur(4px);
}
.home-calc-card:hover {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0,0,0,.3);
  color: #ffffff;
}
.home-calc-card__icon {
  font-size: 2.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
}
.home-calc-card--tithe .home-calc-card__icon { color: var(--gold-bright); }
.home-calc-card--tax   .home-calc-card__icon { color: var(--mint); }
.home-calc-card__body h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: #ffffff;
  letter-spacing: -.02em;
}
.home-calc-card__body p {
  font-size: .95rem;
  color: rgba(255,255,255,.7);
  margin: 0;
  line-height: 1.6;
}
.home-calc-card .btn {
  align-self: flex-start;
  margin-top: auto;
}
.home-calc-card .btn-primary {
  background: #ffffff;
  color: var(--forest);
  border-color: #ffffff;
}
.home-calc-card .btn-primary:hover {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--forest);
}

/* Featured / Recent sections */
.home-featured {
  padding: 56px 0 0;
}
.home-recent {
  padding: 48px 0 72px;
}
.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--emerald);
}
.home-section-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-transform: none;
  color: var(--ink);
}
.home-see-all {
  font-size: .8rem;
  font-weight: 700;
  color: var(--emerald);
  text-decoration: none;
  letter-spacing: .04em;
}
.home-see-all:hover { color: var(--sage); }

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-list__item {
  border-bottom: 1px solid var(--linen);
}
.article-list__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  text-decoration: none;
  transition: color .12s;
}
.article-list__rank {
  font-size: .78rem;
  font-weight: 800;
  color: var(--emerald);
  min-width: 22px;
  flex-shrink: 0;
  line-height: 1;
}
.article-list__link:hover .article-list__title { color: var(--emerald); }
.article-list__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  flex: 1;
}
.article-list__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}
.article-list__meta time {
  font-size: .75rem;
  color: var(--text-light);
}

/* ============================================================
   HERO — Diagonal cut at bottom
   ============================================================ */
.hero {
  background:
    radial-gradient(ellipse 70% 50% at 15% 50%, rgba(61,184,122,.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 20%, rgba(200,136,10,.08) 0%, transparent 60%),
    linear-gradient(150deg, var(--ink) 0%, var(--forest) 45%, #193d27 100%);
  color: var(--white);
  padding: 96px 0 130px;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  margin-bottom: -48px;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--mint);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(61,184,122,.3);
}

.hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--white);
}
.hero h1 .accent {
  font-style: italic;
  font-weight: 700;
  color: var(--gold-bright);
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,.6);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 400;
}

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

.hero-verse {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,.08);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.hero-verse blockquote p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 10px;
  line-height: 1.65;
}
.hero-verse cite {
  font-size: .72rem;
  color: var(--gold-bright);
  font-style: normal;
  font-weight: 700;
  letter-spacing: .1em;
}

/* ============================================================
   START HERE STRIP
   ============================================================ */
.start-here-strip {
  background: var(--ink);
  padding: 14px 0;
  position: relative;
  z-index: 1;
}
.start-here-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.start-here-strip-text {
  font-size: .9rem;
  color: rgba(255,255,255,.75);
  line-height: 1.5;
}
.start-here-strip-text strong { font-weight: 800; color: var(--white); }
.start-here-strip .btn-primary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
  flex-shrink: 0;
  white-space: nowrap;
}
.start-here-strip .btn-primary:hover { background: var(--cream); border-color: var(--cream); }

/* ============================================================
   ABOUT STRIP
   ============================================================ */
.about-strip {
  background: var(--cream);
  padding: 16px 0;
  border-bottom: 1px solid var(--linen);
  position: relative;
  z-index: 1;
}
.about-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.about-strip-text {
  font-size: .84rem;
  color: var(--text-mid);
  max-width: 680px;
  line-height: 1.6;
}
.about-strip-text strong { color: var(--ink); }
.about-strip .btn-outline { font-size: .78rem; padding: 8px 16px; flex-shrink: 0; white-space: nowrap; border-color: var(--linen); color: var(--text-mid); }
.about-strip .btn-outline:hover { background: var(--white); border-color: var(--ink); color: var(--ink); }

/* ============================================================
   CATEGORY CARDS — Custom SVG icons, left-border accent
   ============================================================ */
.categories-section {
  background: var(--cream);
  padding: 80px 0 72px;
  position: relative;
  z-index: 1;
}
.section-label { text-align: center; margin-bottom: 52px; }
.section-label-tag {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--text-light);
  margin-bottom: 12px;
}
.section-label h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1.05;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.cat-card {
  background: var(--white);
  padding: 32px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  border-top: 3px solid transparent;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  box-shadow: 0 1px 4px rgba(12,31,20,.06);
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(12,31,20,.11);
  text-decoration: none;
  color: var(--text);
}
.cat-card.cat-biblical-teaching:hover { border-top-color: var(--cat-biblical-teaching); }
.cat-card.cat-guides:hover            { border-top-color: var(--cat-guides); }
.cat-card.cat-reviews:hover           { border-top-color: var(--cat-reviews); }
.cat-card.cat-breakdowns:hover        { border-top-color: var(--cat-breakdowns); }
.cat-card.cat-tools:hover             { border-top-color: var(--cat-tools); }

.cat-icon-wrap {
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
}
.cat-icon-wrap svg { width: 40px; height: 40px; }

.cat-card h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.cat-card p {
  font-size: .83rem;
  color: var(--text-mid);
  line-height: 1.6;
  flex: 1;
}
.cat-link {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-top: 8px;
}
.cat-biblical-teaching .cat-link { color: var(--cat-biblical-teaching); }
.cat-guides            .cat-link { color: var(--cat-guides); }
.cat-reviews           .cat-link { color: var(--cat-reviews); }
.cat-breakdowns        .cat-link { color: var(--cat-breakdowns); }
.cat-tools             .cat-link { color: var(--cat-tools); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 80px 0; }
.section--parchment { background: var(--white); }
.section--dark {
  background: var(--ink);
  color: var(--white);
}
.section--ink {
  background: var(--ink);
  color: var(--white);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--linen);
  gap: 1rem;
}
.section--dark .section-header,
.section--ink .section-header { border-color: rgba(255,255,255,.1); }

.section-header h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: inherit;
}

.see-all {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--sage);
  white-space: nowrap;
  flex-shrink: 0;
}
.see-all:hover { color: var(--emerald); }
.section--dark .see-all,
.section--ink .see-all { color: var(--mint); }
.section--dark .see-all:hover,
.section--ink .see-all:hover { color: var(--mint-lt); }

/* ============================================================
   ARTICLE CARDS — Editorial left-border style
   ============================================================ */
.cards-grid { display: grid; gap: 1px; background: var(--linen); }
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
.section--dark .cards-grid,
.section--ink .cards-grid { background: rgba(255,255,255,.08); }

.article-card {
  background: var(--white);
  border: 1px solid var(--linen);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background .15s, transform .15s, box-shadow .15s, border-color .15s;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.section--dark .article-card,
.section--ink  .article-card { background: rgba(255,255,255,.04); }

.article-card:hover { background: var(--cream); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.1); border-color: var(--sage); }
.section--dark .article-card:hover,
.section--ink  .article-card:hover { background: rgba(255,255,255,.08); }

/* Category-coloured left accent bar */
.article-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  opacity: 0;
  transition: opacity .2s;
}
.article-card:hover::before { opacity: 1; }
/* Per-category accent stripe */
.article-card[data-cat="biblical-teaching"]::before { background: var(--cat-biblical-teaching); }
.article-card[data-cat="guides"]::before             { background: var(--cat-guides); }
.article-card[data-cat="reviews"]::before            { background: var(--cat-reviews); }
.article-card[data-cat="breakdowns"]::before         { background: var(--cat-breakdowns); }
.article-card[data-cat="tools"]::before              { background: var(--cat-tools); }

.card-image { display: block; aspect-ratio: 16/9; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.article-card:hover .card-image img { transform: scale(1.04); }

.card-body { padding: 24px 24px 22px 26px; display: flex; flex-direction: column; flex: 1; gap: 8px; }

.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-meta time { font-size: .73rem; color: var(--text-light); }
.section--dark .card-meta time,
.section--ink  .card-meta time { color: rgba(255,255,255,.35); }

.card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--emerald); }
.section--dark .card-title a,
.section--ink  .card-title a { color: var(--white); }
.section--dark .card-title a:hover,
.section--ink  .card-title a:hover { color: var(--mint-lt); }

.card-excerpt { font-size: .9rem; color: var(--text-mid); line-height: 1.65; flex: 1; }
.section--dark .card-excerpt,
.section--ink  .card-excerpt { color: rgba(255,255,255,.45); }

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--linen);
}
.section--dark .card-footer,
.section--ink  .card-footer { border-color: rgba(255,255,255,.08); }

.read-more {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--sage);
}
.read-more:hover { color: var(--emerald); }
.section--dark .read-more,
.section--ink  .read-more { color: var(--mint); }

/* Category badges */
.cat-badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--white);
  border-radius: 50px;
  flex-shrink: 0;
}
/* Per-category badge colours (legacy) */
.cat-badge.cat-biblical-teaching { background: var(--cat-biblical-teaching); }
.cat-badge.cat-guides            { background: var(--cat-guides); }
.cat-badge.cat-reviews           { background: var(--cat-reviews); }
.cat-badge.cat-breakdowns        { background: var(--cat-breakdowns); }
.cat-badge.cat-tools             { background: var(--cat-tools); }

/* Home category tag badge colours */
.cat-badge.cat-faith-money       { background: #eef2ff; color: #4f46e5; }
.cat-badge.cat-budgeting         { background: #ecfdf5; color: #059669; }
.cat-badge.cat-debt              { background: #fef2f2; color: #dc2626; }
.cat-badge.cat-investing         { background: #eff6ff; color: #2563eb; }
.cat-badge.cat-taxes-accounts    { background: #ecfeff; color: #0891b2; }
.cat-badge.cat-tools-resources   { background: #fff7ed; color: #ea580c; }
.cat-badge.cat-tithing-giving    { background: #f5f3ff; color: #7c3aed; }
.cat-badge.cat-marriage-family   { background: #fdf2f8; color: #db2777; }

/* Star ratings — SVG stars, not emoji */
.star-rating { display: flex; align-items: center; gap: 2px; }
.star-rating svg { width: 13px; height: 13px; }
.star-filled { fill: var(--gold-bright); }
.star-empty  { fill: var(--linen); }
.rating-num  { font-size: .76rem; color: var(--text-light); margin-left: 4px; font-weight: 700; }
.star-rating--lg svg { width: 18px; height: 18px; }
.rating-score { font-size: .9rem; font-weight: 700; color: var(--gold); margin-left: 6px; }

/* ============================================================
   PAGE HERO (category/search)
   ============================================================ */
.page-hero {
  background: var(--ink);
  padding: 56px 0 48px;
  border-bottom: none;
  color: var(--white);
}
.page-hero .cat-badge { margin-bottom: 16px; }
.page-hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 12px;
}
.page-hero p { color: rgba(255,255,255,.55); max-width: 600px; font-size: 1rem; }

/* ============================================================
   FULL ARTICLE
   ============================================================ */
.article-hero {
  background: var(--ink);
  padding: 52px 0 44px;
  border-bottom: none;
  color: var(--white);
}
.article-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.article-author { font-size: .78rem; color: rgba(255,255,255,.4); }
.reading-time { font-size: .72rem; color: rgba(255,255,255,.35); font-weight: 600; letter-spacing: .04em; }
.card-reading-time { font-size: .72rem; color: var(--text-light); font-weight: 600; letter-spacing: .03em; }

.article-hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.06;
  color: var(--white);
  margin-bottom: 20px;
  max-width: 860px;
}
.article-lead { font-size: 1.2rem; color: rgba(255,255,255,.65); font-style: italic; font-family: 'Plus Jakarta Sans', sans-serif; max-width: 680px; line-height: 1.65; }
.article-rating { display: flex; align-items: center; gap: 10px; margin-top: 14px; }

.article-featured-image img { width: 100%; max-height: 460px; object-fit: cover; }

.affiliate-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--gold-pale);
  border-left: 3px solid var(--gold-bright);
  padding: 14px 20px;
  margin: 28px 0;
  font-size: .84rem;
  color: #5c3e00;
  line-height: 1.6;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 52px;
  padding: 48px 0 72px;
  align-items: start;
}

/* Prose */
.prose {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
}
.prose h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.05rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--ink);
  margin: 3rem 0 .9rem;
  padding-bottom: .7rem;
  border-bottom: 2px solid var(--ink);
  line-height: 1.15;
}
.prose h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--ink);
  margin: 2.2rem 0 .7rem;
  line-height: 1.25;
}
.prose h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.8rem 0 .5rem;
}
.prose p { margin-bottom: 1.3rem; }
.prose a { color: var(--emerald); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(30,92,56,.4); }
.prose a:hover { color: var(--sage); }
.prose ul, .prose ol { margin: 1rem 0 1.2rem 1.4rem; }
.prose li { margin-bottom: .5rem; }
.prose blockquote {
  border-left: 3px solid var(--mint);
  margin: 2rem 0;
  padding: .8rem 1.5rem;
  background: var(--cream);
  color: var(--text-mid);
  font-style: italic;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.02rem;
}
.prose blockquote strong { color: var(--ink); font-style: normal; }
.prose img { width: 100%; margin: 1.5rem 0; }
/* GIFs — constrain width and center */
.prose img[src*="giphy.com"] {
  width: auto;
  max-width: min(480px, 100%);
  display: block;
  margin: 2rem auto;
  border-radius: 4px;
}
.prose hr { border: none; border-top: 1px solid var(--linen); margin: 2.5rem 0; }
.prose code { background: var(--cream); padding: 2px 7px; font-size: .85em; font-family: 'SF Mono', 'Fira Code', monospace; color: var(--emerald); }
.prose pre { background: var(--ink); color: #c8e6c4; padding: 22px; margin: 1.5rem 0; overflow-x: auto; font-size: .83rem; line-height: 1.7; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.prose th { background: var(--forest); color: var(--white); padding: 11px 16px; text-align: left; font-size: .75rem; font-weight: 700; letter-spacing: .06em; }
.prose td { padding: 11px 16px; border-bottom: 1px solid var(--linen); }
.prose tr:nth-child(even) td { background: var(--cream); }

.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--linen); }
.tag { background: var(--cream); color: var(--text-mid); padding: 4px 12px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; }

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--linen);
}
.share-bar__label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--text-light); margin-right: 4px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: .78rem;
  font-weight: 700;
  border: 1.5px solid var(--linen);
  background: none;
  color: var(--text-mid);
  cursor: pointer;
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
  font-family: inherit;
}
.share-btn:hover { color: var(--ink); border-color: var(--ink); background: var(--cream); }
.share-btn--x:hover { color: var(--ink); }
.share-btn--copied { color: var(--emerald) !important; border-color: var(--emerald) !important; }

/* Sidebar */
.article-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--cream); padding: 22px; border-top: 2px solid var(--ink); }
.sidebar-card h4 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--linen); }
.sidebar-card p { font-size: .83rem; color: var(--text-mid); margin-bottom: 14px; line-height: 1.65; }
.sidebar-verse { border-top-color: var(--gold-bright); background: var(--gold-pale); }
.sidebar-verse p { font-family: 'Plus Jakarta Sans', sans-serif; font-style: italic; font-size: 1rem; color: var(--ink); margin-bottom: 8px; line-height: 1.6; }
.sidebar-verse cite { font-size: .72rem; color: var(--gold); font-weight: 700; letter-spacing: .06em; }
.related-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.related-list li { padding-left: 12px; border-left: 2px solid var(--linen); }
.related-list a { font-size: .84rem; color: var(--emerald); }

/* Inline TOC */
.article-toc {
  background: var(--parchment);
  border: 1px solid var(--linen);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius);
  padding: 22px 26px 22px 22px;
  margin-bottom: 36px;
}
.article-toc__label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--emerald);
  margin-bottom: 12px;
}
.article-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc-counter;
}
.article-toc__list li {
  counter-increment: toc-counter;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.article-toc__list li::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-size: .68rem;
  font-weight: 800;
  color: var(--text-light);
  flex-shrink: 0;
  min-width: 20px;
}
.article-toc__list a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
  line-height: 1.5;
  padding: 4px 0;
  transition: color .15s;
}
.article-toc__list a:hover { color: var(--emerald); }
[data-theme="dark"] .article-toc { background: var(--parchment); border-color: var(--linen); border-left-color: var(--emerald); }

/* Sidebar TOC (legacy, kept for sidebar-card) */
.toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.toc-list__item a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
  line-height: 1.5;
  display: block;
  padding: 5px 10px;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.toc-list__item a:hover {
  color: var(--ink);
  border-left-color: var(--emerald);
  background: rgba(0,0,0,.03);
}
.toc-list__item--h3 { padding-left: 14px; }
.toc-list__item--h3 a { font-size: .78rem; font-weight: 500; color: var(--text-light); }
.toc-list__item--h3 a:hover { color: var(--ink); }

/* Anchor offset for sticky nav */
.prose h2, .prose h3, .prose h4 { scroll-margin-top: calc(var(--nav-h) + 24px); }
.related-list a:hover { color: var(--sage); }

/* ============================================================
   PITCH BOX (Why This Exists)
   ============================================================ */
.pitch-box {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
}
.pitch-content h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 22px;
}
.pitch-content p { color: rgba(255,255,255,.58); font-size: .93rem; line-height: 1.8; margin-bottom: 14px; }
.pitch-verse {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-top: 3px solid var(--gold-bright);
  padding: 28px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.pitch-verse blockquote p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  margin-bottom: 14px;
}
.pitch-verse cite { font-size: .7rem; color: var(--gold-bright); font-style: normal; font-weight: 700; letter-spacing: .1em; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { padding: 13px 18px; margin-bottom: 20px; font-size: .87rem; font-weight: 500; border-left: 3px solid; }
.alert-success { background: #f0faf4; color: #1a4d30; border-color: var(--mint); }
.alert-error   { background: #fef3f0; color: #7a2010; border-color: var(--cat-reviews); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 80px 24px; max-width: 460px; margin: 0 auto; }
.empty-icon { margin-bottom: 20px; color: var(--sage); }
.empty-icon svg { margin: 0 auto; }
.empty-state h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.empty-state p { color: var(--text-mid); font-size: .9rem; margin-bottom: 24px; }

/* ============================================================
   STATIC PAGES (about, start-here, resources, legal)
   ============================================================ */
.static-page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  align-items: start;
}
.static-page-layout--wide {
  grid-template-columns: 1fr 260px;
}
.static-sidebar { display: flex; flex-direction: column; gap: 20px; }

.prose-lead {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 1.4rem;
}
.prose-link { color: var(--emerald); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   GOSPEL PAGE
   ============================================================ */
.gospel-hero {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
}
.gospel-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #fff;
  margin: 1.25rem 0 1rem;
  letter-spacing: -.02em;
}
.gospel-hero__sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}
.gospel-cross {
  color: var(--gold);
  margin-bottom: .5rem;
}
.gospel-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 0 4rem;
}
.gospel-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--linen);
  border-radius: 0 4px 4px 0;
}
.gospel-body blockquote p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 .5rem;
  line-height: 1.6;
}
.gospel-body blockquote cite {
  font-size: .85rem;
  color: var(--text-mid);
  font-style: normal;
  font-weight: 600;
}
.gospel-cta-block {
  margin-top: 3rem;
  padding: 2rem 2rem 2rem;
  border: 1px solid var(--linen);
  border-top: 3px solid var(--gold);
  background: var(--paper);
}
.gospel-cta-block h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 .75rem;
  color: var(--ink);
}
[data-theme="dark"] .gospel-body blockquote { background: rgba(255,255,255,.05); }
[data-theme="dark"] .gospel-body blockquote p { color: var(--text); }
[data-theme="dark"] .gospel-cta-block { background: var(--paper); border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .gospel-hero { background: #0d0d0d; }

/* Footer is always dark — lock its background so dark mode var(--ink) flip doesn't make it light */
[data-theme="dark"] .site-footer {
  background: #0a0f0c;
  border-top-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .footer-brand .site-logo { color: #e8e4dc; }
[data-theme="dark"] .footer-nav h4 { color: rgba(255,255,255,.7); }
[data-theme="dark"] .footer-nav a { color: rgba(255,255,255,.45); }
[data-theme="dark"] .footer-tagline { color: rgba(255,255,255,.8) !important; }
[data-theme="dark"] .footer-sub { color: rgba(255,255,255,.4) !important; }
[data-theme="dark"] .footer-brand p { color: rgba(255,255,255,.45); }
[data-theme="dark"] .footer-bottom { color: rgba(255,255,255,.35); }
[data-theme="dark"] .footer-disclaimer a { color: rgba(255,255,255,.35); }

/* ============================================================
   CALCULATOR PAGES
   ============================================================ */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
.calc-main { display: flex; flex-direction: column; gap: 24px; }
.calc-card {
  background: var(--cream);
  padding: 32px;
  border-top: 3px solid var(--ink);
}
.calc-card__title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-bottom: 28px; }
.calc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.calc-field label { font-size: .82rem; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.calc-label-hint { font-weight: 400; text-transform: none; color: var(--text-light); letter-spacing: 0; }
.calc-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--linen);
  background: var(--white);
  transition: border-color .15s;
}
.calc-input-wrap:focus-within { border-color: var(--emerald); }
.calc-prefix, .calc-suffix { padding: 0 12px; font-size: .9rem; color: var(--text-light); font-weight: 600; background: var(--cream); border-right: 1.5px solid var(--linen); }
.calc-suffix { border-right: none; border-left: 1.5px solid var(--linen); }
.calc-input-wrap input[type="number"],
.calc-input-wrap input[type="range"] {
  flex: 1;
  border: none;
  padding: 11px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  outline: none;
  min-width: 0;
}
.calc-input-wrap input[type="range"] { padding: 0 12px; cursor: pointer; accent-color: var(--emerald); }
.calc-toggle-group { display: flex; gap: 0; }
.calc-toggle {
  flex: 1;
  padding: 9px 12px;
  font-size: .78rem;
  font-weight: 700;
  font-family: inherit;
  border: 1.5px solid var(--linen);
  border-right: none;
  background: var(--white);
  color: var(--text-mid);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.calc-toggle:last-child { border-right: 1.5px solid var(--linen); }
.calc-toggle.active { background: var(--ink); color: var(--white); border-color: var(--ink); }

.calc-results {
  margin-top: 12px;
  padding-top: 28px;
  border-top: 2px solid var(--ink);
}
.calc-result-primary { text-align: center; margin-bottom: 24px; }
.calc-result-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--text-light); margin-bottom: 6px; }
.calc-result-value { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; color: var(--ink); line-height: 1; }
.calc-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--linen); border: 1px solid var(--linen); margin-bottom: 20px; }
.calc-result-item { background: var(--white); padding: 14px 16px; }
.calc-result-item__label { font-size: .7rem; font-weight: 700; letter-spacing: .07em; color: var(--text-light); margin-bottom: 4px; }
.calc-result-item__value { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.calc-basis-note { font-size: .78rem; color: var(--text-light); text-align: center; }

.calc-card--compare .calc-card__title { font-size: 1.1rem; margin-bottom: 6px; }
.calc-compare-sub { font-size: .83rem; color: var(--text-light); margin-bottom: 20px; }
.calc-compare-table { display: flex; flex-direction: column; gap: 2px; }
.calc-compare-row { display: grid; grid-template-columns: 60px 1fr 1fr; align-items: center; padding: 10px 14px; background: var(--white); border: 1px solid var(--linen); font-size: .85rem; transition: background .1s; }
.calc-compare-row--active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.calc-compare-pct { font-weight: 800; }
.calc-compare-monthly, .calc-compare-annual { font-weight: 700; }
.calc-compare-monthly small, .calc-compare-annual small { font-weight: 400; opacity: .6; font-size: .7em; }

/* Tax calc specific */
.tax-breakdown { display: flex; flex-direction: column; gap: 2px; margin: 20px 0; }
.tax-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; background: var(--white); border: 1px solid var(--linen); font-size: .88rem; }
.tax-row--total { background: var(--ink); color: var(--white); border-color: var(--ink); font-weight: 800; font-size: 1rem; }
.tax-row--credit { color: var(--emerald); }
.tax-row__label { color: inherit; }
.tax-row__value { font-weight: 700; font-family: 'SF Mono', 'Fira Code', monospace; }
.tax-section-head { font-size: .7rem; font-weight: 700; letter-spacing: .1em; color: var(--text-light); padding: 16px 0 6px; }
.tax-rates { display: flex; gap: 20px; margin: 16px 0; flex-wrap: wrap; }
.tax-rate-badge { background: var(--cream); border: 1px solid var(--linen); padding: 10px 16px; text-align: center; }
.tax-rate-badge__num { font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; color: var(--ink); line-height: 1; }
.tax-rate-badge__label { font-size: .68rem; font-weight: 700; letter-spacing: .07em; color: var(--text-light); margin-top: 2px; }

@media (max-width: 860px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-result-value { font-size: 2.2rem; }
}

/* Resource list */
.resource-list { display: flex; flex-direction: column; gap: 20px; margin: 1.2rem 0 2rem; }
.resource-item { padding: 18px 20px; border-left: 3px solid var(--linen); background: var(--cream); }
.resource-item--featured { border-left-color: var(--mint); background: var(--gold-pale); }
.resource-item__name { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.resource-item__name a { color: var(--emerald); }
.resource-item__name a:hover { color: var(--sage); }
.resource-item p { font-size: .9rem; color: var(--text-mid); margin: 0; line-height: 1.6; }
.resource-badge { display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; background: var(--forest); color: var(--white); margin-left: 8px; vertical-align: middle; }
.resource-badge--affiliate { background: var(--gold); color: var(--white); }
.resource-note { font-size: .85rem; color: var(--text-light); margin-top: 1.5rem; }

/* Start Here path cards */
.start-intro { font-size: 1.1rem; color: var(--text-mid); max-width: 700px; margin-bottom: 48px; line-height: 1.75; }
.path-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 60px; }
.path-card {
  background: var(--cream);
  padding: 36px 40px;
  border-left: 4px solid var(--linen);
  transition: border-color .15s, background .15s;
  position: relative;
}
.path-card:hover { border-left-color: var(--emerald); background: var(--parchment); }
.path-card--highlight { background: var(--forest); color: var(--white); border-left-color: var(--mint); }
.path-card--highlight p { color: rgba(255,255,255,.7); }
.path-card--highlight .path-links a { color: var(--mint-lt); }
.path-card--highlight:hover { background: var(--forest); }

/* Counter number */
.path-card__num {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text-light);
  margin-bottom: 10px;
}
.path-card__num--light { color: var(--mint-lt); }

/* Situation heading — the dominant visual element */
.path-card__heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -.02em;
  margin: 0 0 16px;
}
.path-card__heading--light { color: var(--white); }
.path-card:hover .path-card__heading { color: var(--emerald); }
.path-card--highlight:hover .path-card__heading { color: var(--white); }

.path-card p { font-size: .92rem; color: var(--text-mid); line-height: 1.7; margin-bottom: 16px; }
.path-card--highlight p { color: rgba(255,255,255,.7); }
.path-links { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.path-links li { font-size: .9rem; }
.path-links a { color: var(--emerald); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.path-links a:hover { color: var(--sage); }
.path-links--plain a { font-weight: 400; }
.path-note { font-size: .83rem !important; color: var(--text-light) !important; margin-top: 12px !important; }

.page-hero--tall { padding: 80px 0 72px; }

/* ============================================================
   TRUST BAR
   ============================================================ */
.home-trust {
  background: var(--parchment);
  border-top: 1px solid var(--linen);
  border-bottom: 1px solid var(--linen);
  padding: 40px 0;
}
.home-trust__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.home-trust__stat {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--emerald);
}
.home-trust__quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}
.home-trust__quote {
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.home-trust__quote p {
  font-size: .88rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 10px;
  font-style: italic;
}
.home-trust__quote cite {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: .04em;
  font-style: normal;
}
[data-theme="dark"] .home-trust { background: var(--parchment); border-color: var(--linen); }
[data-theme="dark"] .home-trust__quote { background: var(--cream); }
@media (max-width: 768px) {
  .home-trust__quotes { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .home-trust { padding: 28px 0; }
  .home-trust__quotes { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   AUTHOR BIO STRIP
   ============================================================ */
.home-author {
  padding: 64px 0;
  background: var(--cream);
  border-top: 1px solid var(--linen);
  border-bottom: 1px solid var(--linen);
}
.home-author__inner {
  display: flex;
  gap: 40px;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
}
.home-author__photo { flex-shrink: 0; }
.home-author__avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--linen);
}
.home-author__avatar svg { width: 100%; height: 100%; display: block; }
.home-author__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-author__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--emerald);
  margin-bottom: 4px;
}
.home-author__name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.1;
}
.home-author__bio {
  font-size: .93rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 18px;
}
@media (max-width: 640px) {
  .home-author__inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .home-author__avatar { width: 72px; height: 72px; }
}

/* ============================================================
   EMAIL SIGNUP
   ============================================================ */
.email-signup {
  background: linear-gradient(135deg, #0c1a14 0%, #064e3b 100%);
  border-top: 1px solid var(--linen);
  padding: 72px 0;
}
.email-signup__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.email-signup__eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--mint);
  margin-bottom: 10px;
}
.email-signup__copy h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.12;
}
.email-signup__copy p {
  font-size: .95rem;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  margin-bottom: 20px;
}
.email-signup__benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.email-signup__benefits li {
  font-size: .88rem;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
}
.email-signup__form-label {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 14px;
  font-weight: 600;
}
.email-signup__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}
.email-signup__fields input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-size: .95rem;
  font-family: inherit;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: var(--white);
  outline: none;
  transition: border-color .15s, background .15s;
}
.email-signup__fields input[type="email"]::placeholder { color: rgba(255,255,255,.4); }
.email-signup__fields input[type="email"]:focus { border-color: var(--mint); background: rgba(255,255,255,.12); }
.email-signup__fields .btn-primary { width: 100%; justify-content: center; }
.email-signup__fine {
  font-size: .72rem;
  color: rgba(255,255,255,.35);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.5);
  padding: 64px 0 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }

.footer-brand .site-logo { color: var(--white); margin-bottom: 16px; }
.footer-brand .site-logo:hover { color: var(--mint-lt); }
.footer-brand p { font-size: .84rem; line-height: 1.75; color: rgba(255,255,255,.4); }
.footer-tagline { font-size: .9rem !important; font-weight: 700; color: rgba(255,255,255,.75) !important; margin-bottom: 4px !important; }
.footer-sub { font-size: .82rem !important; color: rgba(255,255,255,.35) !important; margin-bottom: 12px !important; }
.footer-verse { font-family: 'Plus Jakarta Sans', sans-serif; font-style: italic; font-size: .88rem; color: var(--gold-bright); margin-top: 14px; opacity: .8; }

.footer-nav h4 { color: rgba(255,255,255,.85); font-size: .7rem; font-weight: 700; letter-spacing: .1em; margin-bottom: 16px; }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-nav a { font-size: .85rem; color: rgba(255,255,255,.4); transition: color .15s; }
.footer-nav a:hover { color: var(--mint-lt); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .76rem;
  color: rgba(255,255,255,.28);
}
.footer-disclaimer a { color: rgba(255,255,255,.28); text-decoration: underline; text-underline-offset: 2px; }
.footer-disclaimer a:hover { color: rgba(255,255,255,.55); }

/* ============================================================
   ADMIN LOGIN
   ============================================================ */
.admin-body { background: var(--cream); }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.admin-login-box {
  background: var(--white);
  border-top: 3px solid var(--mint);
  border-left: 1px solid var(--linen);
  border-right: 1px solid var(--linen);
  border-bottom: 1px solid var(--linen);
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(12,31,20,.08);
}
.admin-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.admin-logo .logo-mark { color: var(--mint); }
.admin-logo .logo-text { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.admin-login-box h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 2rem; font-weight: 800; color: var(--ink); margin-bottom: 24px; }
.login-back { text-align: center; margin-top: 16px; font-size: .83rem; color: var(--text-light); }
.login-back a { color: var(--emerald); }

/* ============================================================
   SHARED FORMS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .78rem; font-weight: 700; color: var(--text-mid); letter-spacing: .04em; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--linen);
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(46,138,85,.1); }
.form-group textarea { resize: vertical; line-height: 1.65; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .home-topics-grid { grid-template-columns: repeat(4, 1fr); }
  .home-topic-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
  .email-signup__inner { grid-template-columns: 1fr; gap: 28px; }
  .category-cards { grid-template-columns: repeat(3, 1fr); }
  .cards-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { order: -1; display: grid; grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pitch-box { grid-template-columns: 1fr; }
  .pitch-verse { position: static; }
  .about-strip-inner { flex-direction: column; align-items: flex-start; }
  .start-here-strip-inner { flex-direction: column; align-items: flex-start; }
  .hero { clip-path: polygon(0 0, 100% 0, 100% 93%, 0 100%); }
  .static-page-layout { grid-template-columns: 1fr; }
  .static-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .path-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Header — trim down to logo + hamburger only */
  .search-form { display: none; }
  .gospel-btn { display: none; }
  .header-actions { gap: 8px; }
  .nav-toggle { display: block; }
  .nav-mobile-search { display: block; }

  /* Mobile nav overlay */
  .site-nav {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: rgba(7,28,16,.97);
    flex-direction: column;
    gap: 0;
    padding: 28px;
    overflow-y: auto;
    z-index: 199;
  }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 1.15rem; padding: 16px 0; color: rgba(255,255,255,.8); border-bottom: 1px solid rgba(255,255,255,.07); }
  .site-nav a::after { display: none; }

  /* Topics grid — 2 cols, last item spans full width */
  .home-topics-grid { grid-template-columns: repeat(2, 1fr); }
  .home-topic-item:last-child { grid-column: 1 / -1; }

  /* Calculator section padding */
  .home-calculators { padding: 52px 0 60px; }
  .home-calc-card { padding: 24px 20px; }

  /* Article cards — single column */
  .category-cards { grid-template-columns: 1fr; }
  .cards-grid--3 { grid-template-columns: 1fr; }

  /* Article sidebar stacked */
  .article-sidebar { grid-template-columns: 1fr; }

  /* Tables — scroll horizontally */
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Email signup */
  .email-signup__fields { flex-direction: column; }
  .email-signup__inner { gap: 20px; }

  /* Hero */
  .hero { padding: 72px 0 110px; clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); }

  /* Popular list — stack meta below title */
  .article-list__link { flex-wrap: wrap; gap: 6px; }
  .article-list__rank { min-width: 18px; }

  /* Misc */
  .home-hero { padding: 64px 0 56px; }
  .static-sidebar { grid-template-columns: 1fr; }
  .path-grid { grid-template-columns: 1fr; }
  .email-signup { padding: 48px 0; }
}
