﻿/* Shared theme tokens for blog pages */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Light Mode Colors - Primary */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-accent: #f0f7ff;
  --bg-highlight: #fff9e6;

  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --text-muted: #718096;

  /* Accent Colors */
  --accent-primary: #2563eb;
  --accent-secondary: #059669;
  --accent-warning: #f59e0b;
  --accent-success: #10b981;
  --accent-info: #3b82f6;

  /* Borders & Shadows */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);

  /* Surface tokens */
  --surface-raised: #ffffff;
  --surface-soft: #f8fafc;
  --success-bg: #f0fdf4;
  --warning-bg: #fffbeb;
  --info-bg: #f0f9ff;
  --key-bg: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  --key-title: #92400e;
  --toc-border: #dbeafe;
  --toc-bg: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  --toc-link: #475569;
  --toc-hover-bg: #eef4ff;
  --toc-hover-text: #1d4ed8;
  --toc-active-text: #1e3a8a;
  --toc-active-bg: linear-gradient(90deg, #dbeafe 0%, #eef4ff 100%);

  /* Typography */
  --font-serif: 'Merriweather', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.theme-dark .blog-page {
  --bg-primary: #0f172a;
  --bg-secondary: #020617;
  --bg-accent: #0f1f3a;
  --bg-highlight: #2a220f;
  --text-primary: #e5e7eb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-primary: #60a5fa;
  --accent-secondary: #34d399;
  --accent-warning: #fbbf24;
  --accent-success: #22c55e;
  --accent-info: #60a5fa;
  --border-light: #334155;
  --border-medium: #475569;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.45);
  --shadow-lg: 0 10px 24px rgba(0,0,0,0.5);
  --surface-raised: #111b2f;
  --surface-soft: #0d1628;
  --success-bg: #0f2c23;
  --warning-bg: #35290f;
  --info-bg: #0f213d;
  --key-bg: linear-gradient(135deg, #3c2f10 0%, #2f250b 100%);
  --key-title: #fbbf24;
  --toc-border: #2f3f5b;
  --toc-bg: linear-gradient(180deg, #111b2e 0%, #0d1626 100%);
  --toc-link: #cbd5e1;
  --toc-hover-bg: #1a2a46;
  --toc-hover-text: #93c5fd;
  --toc-active-text: #bfdbfe;
  --toc-active-bg: linear-gradient(90deg, #1f3153 0%, #1a2a46 100%);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
  /* Remove overflow to allow sticky children */
  /* overflow: visible; */
}

/* ============================================
   ARTICLE LAYOUT — Sticky TOC on right + Content on left
   Applied globally for all guides
   ============================================ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: start;
}

/* Explicit order so HTML source order doesn't matter */
.article-content-col { order: 1; min-width: 0; margin-top: 12px;}
.toc-sidebar { order: 2; }


.toc-sidebar::-webkit-scrollbar { width: 4px; }
.toc-sidebar::-webkit-scrollbar-track { background: transparent; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.toc-header {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.toc-list { list-style: none; padding-left: 0; }
.toc-list li { margin: 8px 0; }
.toc-list a { color: var(--text-secondary); text-decoration: none; font-weight: 600; }
.toc-list a.toc-active { color: var(--accent-primary); }

/* Mobile: collapse to single column and provide bottom TOC/CTA */
@media (max-width: 999px) {
  .article-layout { grid-template-columns: 1fr; }

  /* Mobile TOC button (float) */
  .mobile-toc-btn {
    display: none; /* default hidden, will be shown by pages that need it */
    position: fixed;
    right: 14px;
    bottom: 80px;
    z-index: 1600;
    background: var(--accent-primary);
    color: #fff;
    border: 0;
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(16,24,40,0.18);
    font-weight: 700;
  }

  .mobile-toc-panel { z-index: 1610; }
  .mobile-toc-overlay.open { display: block; }
}

/* ============================================
   Calculator embed: sticky left on desktop, bottom sheet on mobile
   (reusable across guides and embedded calculators)
   ============================================ */
.calc-embed-card {
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  border-radius: 10px;
  overflow: hidden;
}
.calc-embed-iframe, .calc-iframe { width: 100%; border: 0; display: block; }

@media (min-width: 1000px) {
  .calc-content {
    display: grid;
    gap: 24px;
    align-items: start;
  }

  .calc-embed-card {
    position: sticky;
    top: 110px;
    height: calc(100vh - 140px);
    overflow: auto;
    box-shadow: var(--shadow-md);
  }
}




/* ============================================
   HEADER SECTION
   ============================================ */
.article-header {
  background: var(--bg-primary);
  padding: 24px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
  text-align: center;
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--accent-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.article-category {
  display: inline-block;
  background: var(--bg-accent);
  color: var(--accent-primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.article-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.content-wrapper {
  background: var(--bg-primary);
  padding: 12px 10px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.content-section {
  margin-bottom: 40px;
}

.content-section:last-child {
  margin-bottom: 0;
}

/* Typography */
h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-primary);
}

h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 12px;
}

h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 18px;
  margin-bottom: 8px;
}

p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ============================================
   LISTS
   ============================================ */
ul, ol {
  margin: 20px 0 20px 24px;
}

li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-left: 8px;
}

ul li::marker {
  color: var(--accent-primary);
}

ol li::marker {
  color: var(--accent-primary);
  font-weight: 600;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
  margin: 32px 0;
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  font-size: 14px;
}

thead {
  background: linear-gradient(135deg, var(--accent-primary), #1e40af);
  color: white;
}

th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
}

tbody tr:hover {
  background: var(--bg-accent);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Special table styles */
.highlight-row {
  background: var(--bg-highlight) !important;
  font-weight: 600;
}

.number-cell {
  font-weight: 600;
  color: var(--accent-secondary);
}

.currency-cell {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--accent-primary);
}

/* ============================================
   CALLOUT BOXES
   ============================================ */
.callout {
  margin: 32px 0;
  padding: 24px;
  border-radius: 8px;
  border-left: 4px solid;
}

.callout-success {
  background: var(--success-bg);
  border-color: var(--accent-success);
}

.callout-info {
  background: var(--bg-accent);
  border-color: var(--accent-info);
}

.callout-warning {
  background: var(--warning-bg);
  border-color: var(--accent-warning);
}

.callout-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-success .callout-title {
  color: var(--accent-success);
}

.callout-info .callout-title {
  color: var(--accent-info);
}

.callout-warning .callout-title {
  color: var(--accent-warning);
}

.callout-content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.callout-content p:last-child {
  margin-bottom: 0;
}

/* ============================================
   EXAMPLE BOXES
   ============================================ */
.example-box {
  background: var(--info-bg);
  border: 2px solid var(--accent-info);
  border-radius: 8px;
  padding: 24px;
  margin: 32px 0;
}

.example-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-info);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.example-content {
  font-size: 16px;
  line-height: 1.7;
}

.calculation-steps {
  background: var(--surface-raised);
  padding: 16px;
  border-radius: 6px;
  margin-top: 16px;
}

.calculation-step {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-light);
}

.calculation-step:last-child {
  border-bottom: none;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 2px solid var(--accent-primary);
  font-weight: 700;
  font-size: 17px;
}

/* ============================================
   COMPARISON CARDS
   ============================================ */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.comparison-card {
  background: var(--surface-raised);
  border: 2px solid var(--border-light);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s ease;
}

.comparison-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.comparison-card.recommended {
  border-color: var(--accent-success);
  background: var(--success-bg);
}

.card-badge {
  display: inline-block;
  background: var(--accent-success);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.card-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.card-highlight {
  background: var(--surface-soft);
  padding: 12px;
  border-radius: 6px;
  margin-top: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  text-align: center;
  font-size: 24px;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--accent-primary), #1e40af);
  color: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  margin: 48px 0;
  box-shadow: var(--shadow-lg);
}

.cta-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  font-family: var(--font-serif);
}

.cta-description {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 24px;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--accent-primary);
  padding: 16px 40px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.cta-button:active {
  transform: translateY(0);
}

/* ============================================
   KEY TAKEAWAYS BOX
   ============================================ */
.key-takeaways {
  background: var(--key-bg);
  border: 3px solid var(--accent-warning);
  border-radius: 8px;
  padding: 32px;
  margin: 40px 0;
}

.key-takeaways-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--key-title);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.key-takeaways ul {
  margin: 0;
}

.key-takeaways li {
  background: var(--surface-raised);
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  list-style: none;
  box-shadow: var(--shadow-sm);
}

.key-takeaways li::before {
  content: "✓";
  color: var(--accent-success);
  font-weight: 700;
  margin-right: 12px;
  font-size: 18px;
}

/* ============================================
   QUICK STATS GRID
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.stat-card {
  background: var(--surface-raised);
  border: 2px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .container {
    padding: 24px 16px;
  }

  .article-header {
    padding: 32px 24px;
  }

  .article-title {
    font-size: 20px;
  }

  .article-subtitle {
    font-size: 15px;
  }

  .content-wrapper {
    padding: 24px 16px;
  }

  h2 {
    font-size: 17px;
  }

  h3 {
    font-size: 15px;
  }

  h4 {
    font-size: 14px;
  }

  p, li {
    font-size: 12px;
  }

  .table-wrapper {
    margin: 20px 0;
    border-radius: 6px;
    overflow-x: auto;
  }

  table {
    font-size: 12px;
  }

  th, td {
    padding: 10px 6px;
    font-size: 12px;
  }

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

  .cta-section {
    padding: 24px 16px;
  }

  .cta-title {
    font-size: 18px;
  }

  .cta-description {
    font-size: 14px;
  }

  .cta-button {
    font-size: 14px;
    padding: 12px 32px;
  }

  .callout {
    padding: 16px;
    margin: 20px 0;
    box-shadow: none;
  }

  .callout-title {
    font-size: 15px;
  }

  .callout-content {
    font-size: 14px;
  }

  .example-box {
    padding: 16px;
    margin: 20px 0;
    box-shadow: none;
  }

  .example-title {
    font-size: 15px;
  }

  .example-content {
    font-size: 14px;
  }

  .key-takeaways {
    padding: 20px 16px;
    margin: 24px 0;
    box-shadow: none;
  }

  .key-takeaways-title {
    font-size: 17px;
  }

  .key-takeaways li {
    font-size: 14px;
    padding: 10px 12px;
    box-shadow: var(--shadow-sm);
  }

  .stat-number {
    font-size: 20px;
  }

  .stat-label {
    font-size: 13px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-content {
    font-size: 14px;
  }

  .card-highlight {
    font-size: 18px;
    padding: 10px;
  }

  .comparison-card {
    padding: 16px;
    box-shadow: var(--shadow-sm);
  }

  .article-category {
    font-size: 12px;
    padding: 5px 14px;
  }

  .article-meta {
    font-size: 13px;
  }

  .calculation-steps {
    padding: 12px;
  }

  .calculation-step {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .article-meta {
    flex-direction: column;
    gap: 8px;
  }

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

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  body {
    background: white;
  }

  .container {
    max-width: 100%;
  }

  .cta-section {
    display: none;
  }
}

.blog-page .calculator-box {
  max-width: 1000px !important;
  flex: 0 0 1000px !important;
} 


/* 🔥 FORCE FIX FOR STICKY TOC */
.article-layout {
  display: grid !important;
  grid-template-columns: 1fr 240px !important;
  align-items: start !important;
  overflow: visible !important;
}

.container {
  overflow: visible !important;
}

.toc-sidebar {
  position: sticky !important;
  top: 120px !important;
  align-self: start !important;
  height: max-content !important;
  margin-top: 12px;
}

/* ============================================
   Shared Guide TOC System (v2)
   ============================================ */
.article-layout {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px) !important;
  gap: 12px !important;
  position: relative;
}

.article-content-col {
  min-width: 0;
  margin-top: 0 !important;
}

.toc-sidebar {
  top: 16px !important;
  max-height: calc(100vh - 28px) !important;
  overflow: auto !important;
  margin-top: 0 !important;
  border: 1px solid var(--toc-border);
  border-radius: 14px;
  padding: 12px 10px;
  background: var(--toc-bg);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.11);
}

.toc-sidebar.toc-force-fixed {
  position: fixed !important;
  top: 16px !important;
  z-index: 40;
}

.toc-sidebar.toc-force-bottom {
  position: absolute !important;
  right: 0;
  top: auto !important;
  bottom: 0;
}

.toc-header {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  padding: 0 8px 10px;
  margin-bottom: 8px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li { margin: 0; }

.toc-list a {
  display: block;
  border-radius: 10px;
  margin-bottom: 2px;
  padding: 7px 9px;
  color: var(--toc-link);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.toc-list a:hover {
  background: var(--toc-hover-bg);
  color: var(--toc-hover-text);
  transform: translateX(2px);
}

.toc-list a.toc-active {
  color: var(--toc-active-text);
  background: var(--toc-active-bg);
  font-weight: 700;
}

.toc-list a.toc-calc-link {
  color: var(--toc-hover-text);
  background: var(--surface-soft);
  padding-left: 15px;
  font-size: 0.74rem;
}

.toc-inline-mobile {
  display: none;
}

.guide-mobile-jump {
  display: none;
  position: fixed;
  right: 14px;
  bottom: 80px;
  z-index: 1600;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.35);
}

@media (max-width: 999px) {
  .article-layout {
    grid-template-columns: 1fr !important;
  }

  .toc-sidebar {
    display: none !important;
  }

  .toc-inline-mobile {
    display: block !important;
  }

  .guide-mobile-jump,
  .mobile-toc-btn {
    display: flex !important;
  }
}

/* ============================================
   BLOG HOME (index.html)
   ============================================ */
.bh-shell {
  max-width: 1160px;
  margin: 28px auto;
  padding: 22px;
}

.bh-breadcrumb {
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bh-hero {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
  background:
    radial-gradient(900px 260px at -8% -40%, color-mix(in srgb, var(--accent-primary) 22%, transparent), transparent 62%),
    radial-gradient(700px 220px at 110% -45%, color-mix(in srgb, var(--accent-secondary) 20%, transparent), transparent 58%),
    var(--surface-raised);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--accent-primary) 12%, transparent);
  margin-bottom: 18px;
}

.bh-hero::before,
.bh-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.45;
}

.bh-hero::before {
  width: 220px;
  height: 220px;
  right: -84px;
  bottom: -110px;
  background: color-mix(in srgb, var(--accent-primary) 35%, transparent);
}

.bh-hero::after {
  width: 170px;
  height: 170px;
  left: -70px;
  top: -78px;
  background: color-mix(in srgb, var(--accent-secondary) 28%, transparent);
}

.bh-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.bh-title {
  font-size: 1.85rem;
  color: var(--primary);
  margin: 8px 0;
  line-height: 1.2;
}

.bh-sub {
  color: var(--text-muted);
  margin-bottom: 14px;
  max-width: 70ch;
}

.bh-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.bh-search {
  width: 100%;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 11px 12px;
  font-size: 0.95rem;
}

.bh-search:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 22%, transparent);
}

.bh-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bh-filter {
  border: 1.5px solid var(--border-light);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.18s;
}

.bh-filter:hover {
  transform: translateY(-1px);
}

.bh-filter.is-active {
  border-color: color-mix(in srgb, var(--accent-primary) 65%, var(--border-light));
  color: var(--accent-primary);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-primary) 16%, transparent), color-mix(in srgb, var(--accent-primary) 6%, transparent));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent-primary) 20%, transparent);
}

.bh-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.bh-card {
  position: relative;
  grid-column: span 6;
  text-decoration: none;
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  background: var(--surface-raised);
  padding: 14px;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

.bh-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-primary) 80%, #fff), color-mix(in srgb, var(--accent-secondary) 72%, #fff));
  opacity: 0.8;
}

.bh-card[data-topic="loans"]::before {
  background: linear-gradient(90deg, #ea580c, #fb923c);
}

.bh-card[data-topic="retirement"]::before {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.bh-card[data-topic="beginners"]::before {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.bh-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent-primary) 20%, transparent);
}

.bh-card[data-hidden="true"] {
  display: none;
}

.bh-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 8px;
}

.bh-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--text-muted);
  background: var(--bg-primary);
}

.bh-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.bh-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.bh-card-with-image {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.bh-card-thumb {
  width: 100%;

  max-height: 210px;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--border-light);
  background: color-mix(in srgb, var(--bg-primary) 86%, #eef2ff 14%);
  padding: 4px;
}

.bh-card-copy {
  min-width: 0;
}

.bh-tools {
  margin-top: 20px;
}

.bh-tools h2 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.bh-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.bh-tool {
  border: 1.5px solid var(--border-light);
  border-radius: 11px;
  padding: 11px;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--surface-raised);
  font-weight: 700;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.bh-tool:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px color-mix(in srgb, var(--accent-primary) 18%, transparent);
}

.bh-empty {
  margin-top: 12px;
  border: 1.5px dashed var(--border-light);
  border-radius: 12px;
  padding: 18px;
  color: var(--text-muted);
  display: none;
}

.theme-dark .blog-page .bh-hero {
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38);
}

.theme-dark .blog-page .bh-card {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.theme-dark .blog-page .bh-card:hover,
.theme-dark .blog-page .bh-tool:hover,
.theme-dark .blog-page .bh-filter.is-active {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

@media (max-width: 900px) {
  .bh-controls {
    grid-template-columns: 1fr;
  }

  .bh-card {
    grid-column: span 12;
    padding: 12px;
  }

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

  .bh-name {
    font-size: 1rem;
  }

  .bh-desc {
    font-size: 0.88rem;
    line-height: 1.42;
  }

  .bh-pill {
    font-size: 0.68rem;
    padding: 2px 7px;
  }
}

@media (max-width: 560px) {
  .bh-shell {
    padding: 14px;
  }

  .bh-title {
    font-size: 1.45rem;
  }

  .bh-tool-grid {
    grid-template-columns: 1fr;
  }

  .bh-card {
    padding: 10px;
  }

  .bh-card-thumb {
    max-height: 180px;
  }

  .bh-name {
    font-size: 0.96rem;
  }

  .bh-desc {
    font-size: 0.84rem;
    line-height: 1.38;
  }

  .bh-pill {
    font-size: 0.64rem;
  }

  .bh-meta {
    margin-bottom: 6px;
  }
}


/* EPF vs PPF vs NPS GUIDE (moved from inline styles) */
/* --- Reading Progress Bar --- */
    #reading-progress {
      position: fixed;
      top: 0;
      left: 0;
      width: 0%;
      height: 3px;
      background: linear-gradient(90deg, #2563eb, #16a34a);
      z-index: 9999;
      transition: width 0.1s linear;
      border-radius: 0 2px 2px 0;
    }

    /* --- Layout Wrapper --- */



    .toc-sidebar::-webkit-scrollbar { width: 4px; }
    .toc-sidebar::-webkit-scrollbar-track { background: transparent; }
    .toc-sidebar::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

    .toc-header {
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #94a3b8;
      padding: 0 0 12px 12px;
      margin-bottom: 4px;
      border-bottom: 1px solid #f1f5f9;
    }
    .toc-list { list-style: none; margin: 0; padding: 0; }
    .toc-list li { margin: 0; }
    .toc-list a {
      display: block;
      padding: 7px 12px;
      font-size: 0.8rem;
      line-height: 1.4;
      color: #64748b;
      text-decoration: none;
      border-left: 2px solid transparent;
      border-radius: 0 4px 4px 0;
      transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }
    .toc-list a:hover { color: #1e40af; background: #eff6ff; border-left-color: #93c5fd; }
    .toc-list a.toc-active { color: #1d4ed8; font-weight: 600; background: #eff6ff; border-left-color: #2563eb; }
    /* Calculator TOC links styled distinctly */
    .toc-list a.toc-calc-link {
      font-size: 0.75rem;
      padding: 5px 12px 5px 22px;
      color: #2563eb;
      opacity: 0.8;
    }
    .toc-list a.toc-calc-link:hover { opacity: 1; }

    /* --- Content Column --- */
    .article-content-col { min-width: 0; }

    /* --- Mobile Jump Button --- */
    .mobile-toc-btn {
      display: none;
      position: fixed;
      bottom: 80px;
      right: 20px;
      z-index: 1000;
      background: #1d4ed8;
      color: #fff;
      border: none;
      border-radius: 24px;
      padding: 10px 18px;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 4px 16px rgba(29, 78, 216, 0.35);
      align-items: center;
      gap: 6px;
      transition: background 0.15s, transform 0.15s;
      font-family: inherit;
    }
    .mobile-toc-btn:hover { background: #1e40af; transform: translateY(-1px); }

    /* --- Mobile TOC Dropdown --- */
    .mobile-toc-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.45);
      z-index: 1001;
    }
    .mobile-toc-panel {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: #fff;
      border-radius: 20px 20px 0 0;
      z-index: 1002;
      padding: 0 0 env(safe-area-inset-bottom, 16px) 0;
      max-height: 72vh;
      overflow-y: auto;
      transform: translateY(100%);
      transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    }
    .mobile-toc-panel.open { transform: translateY(0); }
    .mobile-toc-overlay.open { display: block; }
    .mobile-toc-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 20px 14px;
      border-bottom: 1px solid #f1f5f9;
      position: sticky;
      top: 0;
      background: #fff;
    }
    .mobile-toc-panel-header span {
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #94a3b8;
    }
    .mobile-toc-close {
      background: none;
      border: none;
      cursor: pointer;
      font-size: 1.3rem;
      color: #64748b;
      padding: 0 4px;
      line-height: 1;
    }
    .mobile-toc-list { list-style: none; margin: 0; padding: 8px 0 16px; }
    .mobile-toc-list a {
      display: block;
      padding: 12px 20px;
      font-size: 0.82rem;
      color: #334155;
      text-decoration: none;
      border-bottom: 1px solid #f8fafc;
      transition: background 0.1s, color 0.1s;
    }
    .mobile-toc-list a:hover, .mobile-toc-list a:active { background: #eff6ff; color: #1d4ed8; }
    .mobile-toc-list a.mobile-calc-link {
      font-size: 0.82rem;
      padding: 9px 20px 9px 36px;
      color: #2563eb;
      background: #f8fbff;
    }
    .mobile-toc-list a.mobile-calc-link:hover { background: #dbeafe; }

    /* --- Table fixes --- */
    table td { color: #111 !important; }
    table th { color: #111 !important; }
    .table-wrapper table { background: #ffffff; }
    .table-wrapper th, .table-wrapper td { color: #111827; }

    /* ------------------------------------
       EXISTING ENHANCEMENT STYLES
    ------------------------------------ */

    /* --- Updated Badge + Trust Bar --- */
    .article-trust-bar {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 20px;
    }
    .badge-updated {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: #dcfce7;
      color: #166534;
      border: 1px solid #bbf7d0;
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 4px 10px;
      border-radius: 20px;
    }
    .badge-reviewed {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: #eff6ff;
      color: #1d4ed8;
      border: 1px solid #bfdbfe;
      font-size: 0.72rem;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 20px;
    }

    /* --- Featured Snippet Block --- */
    .featured-snippet {
      background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
      border: 1.5px solid #bae6fd;
      border-left: 4px solid #0284c7;
      border-radius: 10px;
      padding: 20px 24px;
      margin: 0 0 28px 0;
    }
    .featured-snippet-label {
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: #0284c7;
      margin-bottom: 12px;
    }
    .featured-snippet-rows {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }
    .snippet-item {
      background: #fff;
      border-radius: 8px;
      padding: 12px 14px;
      border: 1px solid #e0f2fe;
    }
    .snippet-item-label {
      font-size: 0.72rem;
      font-weight: 700;
      color: #64748b;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 4px;
    }
    .snippet-item-value {
      font-size: 1.1rem;
      font-weight: 800;
      color: #0f172a;
      line-height: 1.2;
    }
    .snippet-item-sub {
      font-size: 0.72rem;
      color: #64748b;
      margin-top: 2px;
    }
    @media (max-width: 600px) {
      .featured-snippet-rows { grid-template-columns: 1fr; gap: 8px; }
    }

    /* --- Quick Decision Card --- */
    .quick-decision-card {
      background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
      border-radius: 14px;
      padding: 28px 28px 24px;
      margin: 28px 0;
      color: #fff;
    }
    .quick-decision-title {
      font-size: 0.95rem;
      font-weight: 800;
      color: #fff;
      margin-bottom: 18px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .quick-decision-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .qd-item {
      background: rgba(255,255,255,0.1);
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 8px;
      padding: 12px 14px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
    }
    .qd-item:last-child:nth-child(odd) {
      grid-column: 1 / -1;
    }
    .qd-icon {
      font-size: 1.2rem;
      flex-shrink: 0;
      margin-top: 1px;
    }
    .qd-label {
      font-size: 0.72rem;
      font-weight: 700;
      color: rgba(255,255,255,0.6);
      text-transform: uppercase;
      letter-spacing: 0.06em;
      margin-bottom: 3px;
    }
    .qd-value {
      font-size: 0.88rem;
      font-weight: 600;
      color: #fff;
      line-height: 1.3;
    }
    @media (max-width: 600px) {
      .quick-decision-grid { grid-template-columns: 1fr; }
      .qd-item:last-child:nth-child(odd) { grid-column: auto; }
    }

    /* --- Section Dividers --- */
    .section-divider {
      display: flex;
      align-items: center;
      gap: 16px;
      margin: 40px 0 32px;
    }
    .section-divider-line {
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, #e2e8f0, transparent);
    }
    .section-divider-line.right {
      background: linear-gradient(270deg, #e2e8f0, transparent);
    }
    .section-divider-icon {
      font-size: 1.4rem;
      background: #f8fafc;
      border: 1.5px solid #e2e8f0;
      border-radius: 50%;
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    /* --- Calculator Embed Card --- */
    .calc-embed-card {
      background: #f8fafc;
      border: 2px solid #e2e8f0;
      border-radius: 14px;
      overflow: hidden;
      margin: 0;
    }
    .calc-embed-header {
      background: #fff;
      padding: 14px 20px;
      border-bottom: 1px solid #e2e8f0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
    }
    .calc-embed-title {
      font-size: 0.88rem;
      font-weight: 700;
      color: #1e293b;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .calc-embed-title span.calc-badge {
      background: #2563eb;
      color: #fff;
      font-size: 0.65rem;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 10px;
      letter-spacing: 0.04em;
    }
    .calc-embed-body {
      padding: 20px;
    }
    .calc-embed-iframe {
      width: 100%;
      height: 580px;
      border: none;
      border-radius: 8px;
      background: #fff;
      display: block;
    }
    .calc-embed-prompt {
      font-size: 0.82rem;
      color: #64748b;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .calc-embed-prompt::before {
      content: '->';
    }
    .calc-open-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.82rem;
      color: #2563eb;
      text-decoration: none;
      font-weight: 600;
      padding: 6px 12px;
      border: 1.5px solid #bfdbfe;
      border-radius: 6px;
      background: #eff6ff;
      transition: background 0.15s;
    }
    .calc-open-link:hover { background: #dbeafe; }

    /* --- Inline CTA Prompt --- */
    .inline-calc-prompt {
      background: linear-gradient(135deg, #eff6ff, #f0fdf4);
      border: 1.5px dashed #93c5fd;
      border-radius: 10px;
      padding: 14px 18px;
      margin: 20px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
    }
    .inline-calc-prompt p {
      margin: 0;
      font-size: 0.88rem;
      color: #1e40af;
      font-weight: 500;
    }
    .inline-calc-prompt a {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: #2563eb;
      color: #fff;
      font-size: 0.82rem;
      font-weight: 700;
      padding: 8px 16px;
      border-radius: 6px;
      text-decoration: none;
      white-space: nowrap;
      transition: background 0.15s;
    }
    .inline-calc-prompt a:hover { background: #1d4ed8; }

    /* --- FAQ Accordion --- */
    .faq-accordion { margin-top: 16px; }
    .faq-item {
      border: 1.5px solid #e2e8f0;
      border-radius: 10px;
      margin-bottom: 10px;
      overflow: hidden;
      transition: box-shadow 0.15s;
    }
    .faq-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
    .faq-question {
      width: 100%;
      background: #fff;
      border: none;
      padding: 16px 20px;
      text-align: left;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s;
    }
    .faq-question:hover { background: #f8fafc; }
    .faq-item.open .faq-question { background: #eff6ff; }
    .faq-question-text {
      font-size: 0.95rem;
      font-weight: 600;
      color: #1e293b;
      line-height: 1.4;
    }
    .faq-chevron {
      flex-shrink: 0;
      width: 22px;
      height: 22px;
      background: #f1f5f9;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.65rem;
      color: #64748b;
      transition: transform 0.22s ease, background 0.15s;
      margin-top: 1px;
    }
    .faq-item.open .faq-chevron {
      transform: rotate(180deg);
      background: #dbeafe;
      color: #2563eb;
    }
    .faq-answer {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    }
    .faq-item.open .faq-answer {
      max-height: 1000px;
      transition: max-height 0.5s ease-in-out;
    }
    .faq-answer-inner {
      padding: 0 20px 18px;
      font-size: 0.92rem;
      line-height: 1.7;
      color: #334155;
      border-top: 1px solid #f1f5f9;
      padding-top: 14px;
    }

    /* --- Section Heading Icons --- */
    .section-icon-heading {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .section-icon-heading .section-icon-badge {
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.3rem;
      width: 44px;
      height: 44px;
      border-radius: 10px;
      flex-shrink: 0;
    }
    .icon-badge-epf { background: #fef3c7; }
    .icon-badge-ppf { background: #dcfce7; }
    .icon-badge-nps { background: #ede9fe; }

    /* ------------------------------------
       COLLAPSIBLE CALCULATOR STYLES
    ------------------------------------ */

    /* --- Section Heading for Calculator Blocks --- */
    .calc-section-heading {
      font-size: 1.05rem;
      font-weight: 700;
      color: #1e293b;
      margin: 32px 0 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* --- Collapsible Wrapper --- */
    .calc-collapsible {
      margin: 4px 0 32px;
    }

    /* --- Toggle Button --- */
    .calc-toggle {
      width: 100%;
      text-align: left;
      font-weight: 700;
      font-size: 0.95rem;
      font-family: inherit;
      padding: 14px 18px;
      border-radius: 10px;
      background: #eff6ff;
      border: 1.5px solid #bfdbfe;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      color: #1e40af;
      transition: background 0.15s, border-color 0.15s, border-radius 0.1s;
    }
    .calc-toggle:hover {
      background: #dbeafe;
      border-color: #93c5fd;
    }
    .calc-collapsible.open .calc-toggle {
      background: #dbeafe;
      border-color: #93c5fd;
      border-radius: 10px 10px 0 0;
    }

    /* --- Arrow Icon --- */
    .toggle-icon {
      font-size: 0.7rem;
      flex-shrink: 0;
      width: 24px;
      height: 24px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(29, 78, 216, 0.12);
      border-radius: 50%;
      transition: transform 0.28s ease;
    }
    .calc-collapsible.open .toggle-icon {
      transform: rotate(180deg);
    }

    /* --- Helper Text --- */
    .calc-helper-text {
      font-size: 0.78rem;
      color: #64748b;
      margin: 7px 4px 10px;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .calc-helper-text::before {
      content: '?';
    }

    /* --- Collapsible Content Panel --- */
    .calc-content {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .calc-collapsible.open .calc-content {
      max-height: 900px;
    }

    /* --- Responsive: Mobile --- */
    @media (max-width: 999px) {
      .article-layout { grid-template-columns: 1fr; }
      .toc-sidebar { display: none; }
      .mobile-toc-btn { display: flex; }
      .calc-collapsible { margin: 4px 0 24px; }
      .calc-section-heading { font-size: 0.95rem; }
    }
  
    /* --- Guide utility classes (UX optimization) --- */
    .guide-lead {
      font-size: 1.05rem;
      color: var(--text-secondary);
      line-height: 1.75;
      margin-bottom: 4px;
      padding: 16px 20px;
      background: #f8fafc;
      border-left: 3px solid var(--accent-primary);
      border-radius: 0 8px 8px 0;
    }
    .guide-disclaimer {
      font-size: 0.78rem;
      color: #94a3b8;
      margin: 0 0 24px;
      padding: 8px 14px;
      background: #f8fafc;
      border-radius: 6px;
      border: 1px solid #f1f5f9;
    }
    /* --- Quick-facts stat bar --- */
    .quick-facts-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
      margin: 16px 0 28px;
    }
    .qf-item {
      background: #f8fafc;
      border: 1px solid var(--border-light);
      border-radius: 8px;
      padding: 12px 10px;
      text-align: center;
    }
    .qf-num {
      display: block;
      font-size: 1.1rem;
      font-weight: 800;
      color: var(--accent-primary);
      line-height: 1.2;
    }
    .qf-label {
      display: block;
      font-size: 0.66rem;
      color: #94a3b8;
      margin-top: 4px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      line-height: 1.3;
    }
    /* --- Mistakes list --- */
    .mistakes-list { list-style: none; margin: 0; padding: 0; }
    .mistake-item {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 0 14px;
      align-items: start;
      padding: 16px 0;
      border-bottom: 1px solid #f1f5f9;
    }
    .mistake-item:last-child { border-bottom: none; }
    .mistake-num {
      font-size: 1.4rem;
      font-weight: 900;
      color: #e2e8f0;
      line-height: 1;
      min-width: 32px;
      padding-top: 2px;
    }
    .mistake-body h4 {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--text-primary);
      margin: 0 0 4px;
    }
    .mistake-body p {
      font-size: 0.88rem;
      line-height: 1.6;
      color: var(--text-secondary);
      margin: 0 0 6px;
    }
    .mistake-fix {
      font-size: 0.82rem;
      color: #059669;
      font-weight: 600;
    }
    .mistake-fix::before { content: 'Fix: '; }
    /* --- Kavya example &ndash; compact --- */
    .strategy-example {
      background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
      border: 1.5px solid #e0f2fe;
      border-radius: 12px;
      padding: 20px 22px;
      margin: 20px 0;
    }
    .strategy-example-title {
      font-size: 0.88rem;
      font-weight: 700;
      color: #1e40af;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .strategy-row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 4px 16px;
      padding: 8px 0;
      border-bottom: 1px dashed #e2e8f0;
      font-size: 0.88rem;
    }
    .strategy-row:last-child { border-bottom: none; padding-bottom: 0; }
    .strategy-instrument { font-weight: 700; color: var(--text-primary); min-width: 120px; }
    .strategy-amount { font-family: 'Courier New', monospace; font-weight: 700; color: var(--accent-primary); }
    .strategy-why { font-size: 0.78rem; color: #64748b; flex: 1; text-align: right; }
    .strategy-total {
      margin-top: 12px;
      padding: 10px 0 0;
      border-top: 2px solid var(--accent-primary);
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 4px;
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--text-primary);
    }
    @media (max-width: 600px) {
      .quick-facts-row { grid-template-columns: repeat(2, 1fr); }
      .strategy-why { display: none; }
    }

    /* Page-specific visual refresh */
    .blog-page {
      background:
        radial-gradient(1200px 400px at 20% -12%, #e0f2fe 0%, transparent 55%),
        radial-gradient(1000px 420px at 92% -24%, #dcfce7 0%, transparent 52%),
        #f8fafc;
    }
    .container {
      max-width: 1180px;
      padding: 24px 16px 52px;
    }
    .article-header {
      text-align: left;
      border: 1px solid #dbeafe;
      background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.94) 0%, rgba(248, 250, 252, 0.94) 52%, rgba(240, 253, 244, 0.94) 100%);
      box-shadow: 0 14px 44px rgba(15, 23, 42, 0.08);
      border-radius: 18px;
      padding: 28px 30px;
    }
    .article-title {
      font-size: clamp(1.75rem, 2.8vw, 2.5rem);
      line-height: 1.15;
      letter-spacing: -0.02em;
      margin-bottom: 12px;
    }
    .article-subtitle {
      max-width: 70ch;
      font-size: clamp(1rem, 1.8vw, 1.18rem);
      line-height: 1.65;
      color: #334155;
      margin-bottom: 16px;
    }
    .article-meta {
      justify-content: flex-start;
      gap: 14px 20px;
    }
    .article-hero-image {
      max-width: 780px;
      margin: 12px auto 18px;
      border-radius: 14px;
      overflow: hidden;
      border: 1px solid #dbeafe;
      box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
      background: #fff;
    }
    .article-hero-image img {
      display: block;
      width: 100%;
      height: auto;
    }
    .article-hero-image figcaption {
      padding: 7px 11px;
      font-size: 0.74rem;
      color: #64748b;
      background: #f8fafc;
      border-top: 1px solid #e2e8f0;
      text-align: center;
    }
    .meta-item {
      background: rgba(255, 255, 255, 0.84);
      border: 1px solid #dbeafe;
      border-radius: 999px;
      padding: 6px 12px;
    }
    .article-layout {
      position: relative;
      grid-template-columns: minmax(0, 1fr) minmax(180px, 200px) !important;
      gap: 22px !important;
      align-items: start !important;
      overflow: visible !important;
    }
    .article-content-col {
      margin-top: 0;
    }
    .content-wrapper {
      border-radius: 18px;
      border: 1px solid #e2e8f0;
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
      background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
      padding: clamp(14px, 1.7vw, 20px);
    }
    .content-wrapper p,
    .content-wrapper li {
      font-size: 0.96rem;
      line-height: 1.68;
    }
    .content-wrapper h2 {
      font-size: clamp(1.3rem, 1.95vw, 1.56rem);
      line-height: 1.28;
      margin-bottom: 10px;
    }
    .content-section {
      background: #ffffff;
      border: 1px solid #f1f5f9;
      border-radius: 14px;
      padding: clamp(10px, 1.2vw, 14px);
      margin-bottom: 14px;
      box-shadow: 0 4px 12px rgba(148, 163, 184, 0.06);
    }
    .content-section h2 {
      margin-top: 0;
    }
    .toc-sidebar {
      position: sticky !important;
      top: 16px !important;
      align-self: start !important;
      max-height: calc(100vh - 28px) !important;
      overflow: auto !important;
      margin-top: 0 !important;
      border: 1px solid #dbeafe;
      border-radius: 16px;
      padding: 12px 10px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
      box-shadow: 0 16px 34px rgba(37, 99, 235, 0.11);
    }
    .toc-sidebar.toc-force-fixed {
      position: fixed !important;
      top: 16px !important;
      z-index: 40;
    }
    .toc-sidebar.toc-force-bottom {
      position: absolute !important;
      right: 0;
      top: auto !important;
      bottom: 0;
    }
    .toc-header {
      color: #0f172a;
      font-size: 0.72rem;
      letter-spacing: 0.12em;
      border-bottom: 1px solid #e2e8f0;
      padding: 0 8px 10px;
      margin-bottom: 8px;
    }
    .toc-list a {
      border-radius: 10px;
      border-left: none;
      margin-bottom: 2px;
      padding: 7px 9px;
      color: #475569;
      font-size: 0.79rem;
      font-weight: 500;
    }
    .toc-list a:hover {
      background: #eef4ff;
      color: #1d4ed8;
      border-left-color: transparent;
      transform: translateX(2px);
    }
    .toc-list a.toc-active {
      color: #1e3a8a;
      background: linear-gradient(90deg, #dbeafe 0%, #eef4ff 100%);
      border-left-color: transparent;
      font-weight: 700;
    }
    .toc-list a.toc-calc-link {
      color: #1d4ed8;
      background: #f8fbff;
      padding-left: 15px;
      font-size: 0.74rem;
    }
    .table-wrapper {
      border-radius: 12px;
      border: 1px solid #dbeafe;
      box-shadow: 0 8px 26px rgba(37, 99, 235, 0.08);
      background: #fff;
    }
    .callout,
    .example-box,
    .key-takeaways,
    .cta-section {
      border-radius: 14px;
      box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    }
    .cta-section {
      background: linear-gradient(125deg, #eff6ff 0%, #ecfeff 48%, #f0fdf4 100%);
      border: 1px solid #bfdbfe;
    }
    .cta-button {
      border-radius: 999px;
      box-shadow: 0 6px 18px rgba(37, 99, 235, 0.26);
    }

    .theme-dark .blog-page {
      background:
        radial-gradient(1000px 380px at 10% -8%, rgba(37, 99, 235, 0.22) 0%, transparent 58%),
        radial-gradient(900px 360px at 90% -20%, rgba(16, 185, 129, 0.15) 0%, transparent 52%),
        #0b1220;
    }
    .theme-dark .blog-page .container {
      color: #d1d5db;
    }
    .theme-dark .blog-page .article-header,
    .theme-dark .blog-page .content-wrapper,
    .theme-dark .blog-page .content-section,
    .theme-dark .blog-page .toc-sidebar {
      background: #111827;
      border-color: #334155;
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    }
    .theme-dark .blog-page .article-title,
    .theme-dark .blog-page .content-wrapper h2,
    .theme-dark .blog-page .content-wrapper h3,
    .theme-dark .blog-page .toc-header {
      color: #f8fafc;
    }
    .theme-dark .blog-page .article-subtitle,
    .theme-dark .blog-page .content-wrapper p,
    .theme-dark .blog-page .content-wrapper li,
    .theme-dark .blog-page .faq-answer-inner {
      color: #cbd5e1;
    }
    .theme-dark .blog-page .toc-list a {
      color: #cbd5e1;
    }
    .theme-dark .blog-page .toc-list a:hover {
      background: #1e293b;
      color: #93c5fd;
    }
    .theme-dark .blog-page .toc-list a.toc-active {
      background: linear-gradient(90deg, #1e3a8a 0%, #1e293b 100%);
      color: #bfdbfe;
    }
    .theme-dark .blog-page .table-wrapper,
    .theme-dark .blog-page .faq-item,
    .theme-dark .blog-page .meta-item {
      border-color: #334155;
      background: #0f172a;
    }
    .theme-dark .blog-page .article-hero-image {
      border-color: #334155;
      background: #0f172a;
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    }
    .theme-dark .blog-page .article-hero-image figcaption {
      color: #94a3b8;
      background: #111827;
      border-top-color: #334155;
    }
    .theme-dark .blog-page .featured-snippet,
    .theme-dark .blog-page .callout,
    .theme-dark .blog-page .inline-calc-prompt,
    .theme-dark .blog-page .guide-lead,
    .theme-dark .blog-page .guide-disclaimer,
    .theme-dark .blog-page .example-box,
    .theme-dark .blog-page .calc-embed-card,
    .theme-dark .blog-page .calc-embed-header,
    .theme-dark .blog-page .calc-embed-body,
    .theme-dark .blog-page .faq-question,
    .theme-dark .blog-page .quick-facts-row .qf-item,
    .theme-dark .blog-page .strategy-example {
      background: #0f172a !important;
      border-color: #334155 !important;
      color: #dbe5f1 !important;
    }
    .theme-dark .blog-page .snippet-item,
    .theme-dark .blog-page .comparison-card,
    .theme-dark .blog-page .table-wrapper table {
      background: #111827 !important;
      border-color: #334155 !important;
    }
    .theme-dark .blog-page .faq-question:hover,
    .theme-dark .blog-page .faq-item.open .faq-question {
      background: #1e293b !important;
    }
    .theme-dark .blog-page .inline-calc-prompt a,
    .theme-dark .blog-page .calc-open-link,
    .theme-dark .blog-page .cta-button {
      color: #e2e8f0;
    }
    .theme-dark .blog-page .guide-disclaimer,
    .theme-dark .blog-page .snippet-item-sub,
    .theme-dark .blog-page .strategy-why,
    .theme-dark .blog-page .qf-label {
      color: #94a3b8 !important;
    }
    .theme-dark .blog-page .content-section p[style*="background"] {
      background: #0f172a !important;
      color: #dbe5f1 !important;
      border-left-color: #3b82f6 !important;
      border-color: #334155 !important;
    }
    .theme-dark .blog-page table td,
    .theme-dark .blog-page table th {
      color: #e5e7eb !important;
    }

    @media (max-width: 1100px) {
      .article-layout {
        grid-template-columns: minmax(0, 1fr) 200px !important;
        gap: 14px !important;
      }
      .article-header {
        padding: 18px 14px;
      }
      .content-wrapper p,
      .content-wrapper li {
        font-size: 0.93rem;
        line-height: 1.64;
      }
    }
    @media (max-width: 999px) {
      .container {
        padding: 14px 10px 68px;
      }
      .article-hero-image {
        margin: 10px 0 14px;
        max-width: 100%;
        border-radius: 12px;
      }
      .article-hero-image figcaption {
        font-size: 0.72rem;
      }
      .article-layout {
        grid-template-columns: 1fr !important;
      }
      .content-wrapper {
        padding: 10px;
      }
      .content-section {
        padding: 9px 8px;
      }
      .article-header {
        border-radius: 14px;
        padding: 18px 14px;
      }
      .article-title {
        font-size: 1.58rem;
      }
      .article-subtitle {
        font-size: 0.93rem;
      }
      .article-meta {
        gap: 10px;
      }
      .meta-item {
        font-size: 0.79rem;
        padding: 5px 10px;
      }
      .mobile-toc-btn {
        background: linear-gradient(135deg, #1d4ed8, #1e40af);
        border-radius: 999px;
      }
      .mobile-toc-panel {
        border-radius: 18px 18px 0 0;
      }
      .mobile-toc-list a {
        font-size: 0.88rem;
      }
    }

.nav-button { display:inline-flex;align-items:center;justify-content:center;padding:14px 32px;border-radius:8px;text-decoration:none;font-weight:600;margin:8px;min-height:44px;transition:all 0.2s ease; }
    .nav-button-primary { background:var(--primary,#2563eb);color:#fff; }
    .nav-button-primary:hover { opacity:0.9;transform:translateY(-1px); }
    .nav-button-secondary { background:transparent;color:var(--text-primary,#111);border:2px solid var(--border,#ddd); }
    .nav-button-secondary:hover { border-color:var(--primary,#2563eb); }
    @media (max-width:480px) { .nav-button { display:block;width:100%;margin:8px 0; } }



/* first-salary-financial-plan.html (moved from inline styles) */
#reading-progress {
      position: fixed; top: 0; left: 0;
      width: 0%; height: 3px;
      background: linear-gradient(90deg, #2563eb, #059669);
      z-index: 9999; transition: width 0.1s linear;
      border-radius: 0 2px 2px 0;
    }

    /* Step card */
    .step-header {
      display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
    }
    .step-badge {
      width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 1rem; font-weight: 900; color: #fff;
      box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    }
    .step-badge-1 { background: linear-gradient(135deg, #2563eb, #1e40af); }
    .step-badge-2 { background: linear-gradient(135deg, #0891b2, #0e7490); }
    .step-badge-3 { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
    .step-badge-4 { background: linear-gradient(135deg, #059669, #047857); }
    .step-badge-5 { background: linear-gradient(135deg, #d97706, #b45309); }
    .step-badge-6 { background: linear-gradient(135deg, #dc2626, #b91c1c); }
    .step-title { font-size: 1.15rem; font-weight: 800; color: #0f172a; line-height: 1.2; margin: 0; }
    .step-subtitle { font-size: 0.82rem; color: #64748b; margin: 2px 0 0; }

    /* TL;DR pill summary */
    .tldr-card {
      background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
      border-radius: 14px; padding: 26px 28px 22px; margin: 20px 0; color: #fff;
    }
    .tldr-card-title { font-size: 0.92rem; font-weight: 800; color: #fff; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
    .tldr-steps { display: flex; flex-direction: column; gap: 10px; }
    .tldr-step { display: flex; align-items: flex-start; gap: 12px; }
    .tldr-num {
      width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.25);
      display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; color: #fff; flex-shrink: 0;
    }
    .tldr-step-text { font-size: 0.88rem; font-weight: 600; color: rgba(255,255,255,0.92); line-height: 1.4; }
    .tldr-step-why { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 2px; }

    /* Quick facts */
    .quick-facts-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 24px; }
    .qf-item { background: #f8fafc; border: 1px solid var(--border-light); border-radius: 8px; padding: 12px 10px; text-align: center; }
    .qf-num { display: block; font-size: 1.1rem; font-weight: 800; color: var(--accent-primary); line-height: 1.2; }
    .qf-label { display: block; font-size: 0.66rem; color: #94a3b8; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.3; }
    @media (max-width: 600px) { .quick-facts-row { grid-template-columns: repeat(2, 1fr); } }

    /* Section divider */
    .section-divider { display: flex; align-items: center; gap: 16px; margin: 36px 0 28px; }
    .section-divider-line { flex: 1; height: 1px; background: linear-gradient(90deg, #e2e8f0, transparent); }
    .section-divider-line.right { background: linear-gradient(270deg, #e2e8f0, transparent); }
    .section-divider-icon {
      font-size: 1.2rem; background: #f8fafc; border: 1.5px solid #e2e8f0;
      border-radius: 50%; width: 40px; height: 40px;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }

    /* Budget bar */
    .budget-bar {
      background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden;
      margin: 16px 0;
    }
    .budget-bar-label {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 14px 0;
      font-size: 0.82rem; font-weight: 700; color: #1e293b;
    }
    .budget-bar-track {
      height: 10px; background: #e2e8f0; margin: 8px 14px 12px; border-radius: 5px; overflow: hidden;
    }
    .budget-bar-fill { height: 100%; border-radius: 5px; }

    /* Example plan */
    .example-plan {
      background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
      border: 1.5px solid #e0f2fe; border-radius: 12px; padding: 20px 22px; margin: 20px 0;
    }
    .example-plan-title { font-size: 0.88rem; font-weight: 700; color: #1e40af; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
    .plan-row {
      display: flex; align-items: baseline; justify-content: space-between;
      flex-wrap: wrap; gap: 4px 16px; padding: 9px 0; border-bottom: 1px dashed #e2e8f0; font-size: 0.88rem;
    }
    .plan-row:last-child { border-bottom: none; }
    .plan-item { font-weight: 700; color: #1e293b; min-width: 160px; }
    .plan-amount { font-family: 'Courier New', monospace; font-weight: 800; color: var(--accent-primary); }
    .plan-why { font-size: 0.78rem; color: #64748b; flex: 1; text-align: right; }
    .plan-total { margin-top: 12px; padding: 10px 0 0; border-top: 2px solid var(--accent-primary); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
    @media (max-width: 600px) { .plan-why { display: none; } }

    /* Nominee visual */
    .nominee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
    .nominee-card {
      background: #fff; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 14px 16px;
    }
    .nominee-card-icon { font-size: 1.4rem; margin-bottom: 6px; }
    .nominee-card-title { font-size: 0.85rem; font-weight: 800; color: #1e293b; margin-bottom: 4px; }
    .nominee-card p { font-size: 0.8rem; color: #475569; line-height: 1.5; margin: 0; }
    @media (max-width: 600px) { .nominee-grid { grid-template-columns: 1fr; } }

    /* Mistakes */
    .mistakes-list { list-style: none; margin: 0; padding: 0; }
    .mistake-item { display: grid; grid-template-columns: auto 1fr; gap: 0 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid #f1f5f9; }
    .mistake-item:last-child { border-bottom: none; }
    .mistake-num { font-size: 1.4rem; font-weight: 900; color: #e2e8f0; line-height: 1; min-width: 32px; padding-top: 2px; }
    .mistake-body h4 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
    .mistake-body p { font-size: 0.88rem; line-height: 1.6; color: var(--text-secondary); margin: 0 0 6px; }
    .mistake-fix { font-size: 0.82rem; color: #059669; font-weight: 600; }
    .mistake-fix::before { content: 'â†’ '; }

    /* Checklist */
    .action-checklist { list-style: none; margin: 0; padding: 0; }
    .checklist-item {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 12px 14px; border-radius: 8px; margin-bottom: 8px;
      background: #f8fafc; border: 1px solid #e2e8f0;
    }
    .check-box {
      width: 22px; height: 22px; border-radius: 50%; border: 2px solid #2563eb;
      flex-shrink: 0; margin-top: 1px;
      display: flex; align-items: center; justify-content: center;
    }
    .checklist-item-text { font-size: 0.88rem; color: #1e293b; line-height: 1.5; }
    .checklist-item-text strong { color: #1e40af; }

    /* Guide styles */
    .guide-lead {
      font-size: 1.02rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: 4px;
      padding: 16px 20px; background: #f8fafc;
      border-left: 3px solid var(--accent-primary); border-radius: 0 8px 8px 0;
    }
    .guide-disclaimer { font-size: 0.78rem; color: #94a3b8; margin: 8px 0 20px; padding: 8px 14px; background: #f8fafc; border-radius: 6px; border: 1px solid #f1f5f9; }

    /* Page */
    .blog-page {
      background:
        radial-gradient(1200px 400px at 20% -12%, #e0f2fe 0%, transparent 55%),
        radial-gradient(1000px 420px at 92% -24%, #dcfce7 0%, transparent 52%),
        #f8fafc;
    }
    .container { max-width: 1180px; padding: 24px 16px 52px; }
    .article-header {
      text-align: left; border: 1px solid #dbeafe;
      background: linear-gradient(135deg, rgba(239,246,255,0.94) 0%, rgba(248,250,252,0.94) 52%, rgba(240,253,244,0.94) 100%);
      box-shadow: 0 14px 44px rgba(15,23,42,0.08); border-radius: 18px; padding: 28px 30px;
    }
    .article-title { font-size: clamp(1.75rem, 2.8vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 12px; }
    .article-subtitle { max-width: 70ch; font-size: clamp(1rem, 1.8vw, 1.18rem); line-height: 1.65; color: #334155; margin-bottom: 16px; }
    .article-meta { justify-content: flex-start; gap: 14px 20px; }
    .meta-item { background: rgba(255,255,255,0.84); border: 1px solid #dbeafe; border-radius: 999px; padding: 6px 12px; }
    .article-layout {
      position: relative;
      grid-template-columns: minmax(0, 1fr) minmax(180px, 200px) !important;
      gap: 22px !important; align-items: start !important; overflow: visible !important;
    }
    .content-wrapper {
      border-radius: 18px; border: 1px solid #e2e8f0;
      box-shadow: 0 18px 40px rgba(15,23,42,0.08);
      background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
      padding: clamp(14px, 1.7vw, 20px);
    }
    .content-wrapper p, .content-wrapper li { font-size: 0.96rem; line-height: 1.68; }
    .content-wrapper h2 { font-size: clamp(1.3rem, 1.95vw, 1.56rem); line-height: 1.28; margin-bottom: 10px; }
    .content-section {
      background: #ffffff; border: 1px solid #f1f5f9; border-radius: 14px;
      padding: clamp(10px, 1.2vw, 14px); margin-bottom: 14px;
      box-shadow: 0 4px 12px rgba(148,163,184,0.06);
    }
    .content-section h2 { margin-top: 0; }
    .toc-sidebar {
      position: sticky !important; top: 16px !important; align-self: start !important;
      max-height: calc(100vh - 28px) !important; overflow: auto !important; margin-top: 0 !important;
      border: 1px solid #dbeafe; border-radius: 16px; padding: 12px 10px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
      box-shadow: 0 16px 34px rgba(37,99,235,0.11);
    }
    .toc-header { color: #0f172a; font-size: 0.72rem; letter-spacing: 0.12em; border-bottom: 1px solid #e2e8f0; padding: 0 8px 10px; margin-bottom: 8px; }
    .toc-list a { border-radius: 10px; border-left: none; margin-bottom: 2px; padding: 7px 9px; color: #475569; font-size: 0.79rem; font-weight: 500; }
    .toc-list a:hover { background: #eef4ff; color: #1d4ed8; transform: translateX(2px); }
    .toc-list a.toc-active { color: #1e3a8a; background: linear-gradient(90deg, #dbeafe 0%, #eef4ff 100%); font-weight: 700; }
    .table-wrapper { border-radius: 12px; border: 1px solid #dbeafe; box-shadow: 0 8px 26px rgba(37,99,235,0.08); background: #fff; }
    .callout, .example-box, .key-takeaways, .cta-section { border-radius: 14px; box-shadow: 0 8px 22px rgba(15,23,42,0.08); }
    .cta-section { background: linear-gradient(125deg, #eff6ff 0%, #ecfeff 48%, #f0fdf4 100%); border: 1px solid #bfdbfe; }
    .cta-button { border-radius: 999px; box-shadow: 0 6px 18px rgba(37,99,235,0.26); }

    /* FAQ Accordion */
    .faq-accordion { margin-top: 16px; }
    .faq-item { border: 1.5px solid #e2e8f0; border-radius: 10px; margin-bottom: 10px; overflow: hidden; transition: box-shadow 0.15s; }
    .faq-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
    .faq-question { width: 100%; background: #fff; border: none; padding: 16px 20px; text-align: left; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; cursor: pointer; font-family: inherit; transition: background 0.15s; }
    .faq-question:hover { background: #f8fafc; }
    .faq-item.open .faq-question { background: #eff6ff; }
    .faq-question-text { font-size: 0.95rem; font-weight: 600; color: #1e293b; line-height: 1.4; }
    .faq-chevron { flex-shrink: 0; width: 22px; height: 22px; background: #f1f5f9; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; color: #64748b; transition: transform 0.22s ease, background 0.15s; margin-top: 1px; }
    .faq-item.open .faq-chevron { transform: rotate(180deg); background: #dbeafe; color: #2563eb; }
    .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0, 1, 0, 1); }
    .faq-item.open .faq-answer { max-height: 1000px; transition: max-height 0.5s ease-in-out; }
    .faq-answer-inner { padding: 0 20px 18px; font-size: 0.92rem; line-height: 1.7; color: #334155; border-top: 1px solid #f1f5f9; padding-top: 14px; }

    /* Dark-mode fixes for page-specific custom styles */
    .theme-dark .blog-page {
      background:
        radial-gradient(1200px 400px at 20% -12%, rgba(30, 58, 95, 0.45) 0%, transparent 55%),
        radial-gradient(1000px 420px at 92% -24%, rgba(22, 101, 52, 0.3) 0%, transparent 52%),
        var(--bg-secondary);
    }
    .theme-dark .blog-page .article-header {
      border-color: #334155;
      background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 28, 46, 0.94) 55%, rgba(10, 30, 24, 0.94) 100%);
      box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
    }
    .theme-dark .blog-page .step-title,
    .theme-dark .blog-page .budget-bar-label,
    .theme-dark .blog-page .plan-item,
    .theme-dark .blog-page .nominee-card-title,
    .theme-dark .blog-page .checklist-item-text {
      color: var(--text-primary);
    }
    .theme-dark .blog-page .step-subtitle,
    .theme-dark .blog-page .article-subtitle,
    .theme-dark .blog-page .plan-why,
    .theme-dark .blog-page .nominee-card p,
    .theme-dark .blog-page .faq-answer-inner,
    .theme-dark .blog-page .qf-label {
      color: var(--text-secondary);
    }
    .theme-dark .blog-page .qf-item,
    .theme-dark .blog-page .budget-bar,
    .theme-dark .blog-page .example-plan,
    .theme-dark .blog-page .nominee-card,
    .theme-dark .blog-page .checklist-item,
    .theme-dark .blog-page .faq-item {
      background: var(--surface-raised);
      border-color: var(--border-light);
    }
    .theme-dark .blog-page .guide-lead,
    .theme-dark .blog-page .guide-disclaimer,
    .theme-dark .blog-page .faq-question,
    .theme-dark .blog-page .faq-question:hover,
    .theme-dark .blog-page .faq-item.open .faq-question {
      background: var(--surface-soft);
      color: var(--text-secondary);
      border-color: var(--border-light);
    }
    .theme-dark .blog-page .section-divider-icon {
      background: var(--surface-soft);
      border-color: var(--border-light);
    }
    .theme-dark .blog-page .section-divider-line {
      background: linear-gradient(90deg, var(--border-light), transparent);
    }
    .theme-dark .blog-page .section-divider-line.right {
      background: linear-gradient(270deg, var(--border-light), transparent);
    }
    .theme-dark .blog-page .budget-bar-track {
      background: #1e293b;
    }
    .theme-dark .blog-page .content-wrapper {
      border-color: var(--border-light);
      background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    }
    .theme-dark .blog-page .content-section {
      background: #0f172a;
      border-color: #1e293b;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    }
    .theme-dark .blog-page .toc-sidebar {
      border-color: var(--toc-border);
      background: var(--toc-bg);
      box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
    }
    .theme-dark .blog-page .toc-header {
      color: var(--text-primary);
      border-bottom-color: var(--border-light);
    }
    .theme-dark .blog-page .toc-list a {
      color: var(--toc-link);
    }
    .theme-dark .blog-page .toc-list a:hover {
      background: var(--toc-hover-bg);
      color: var(--toc-hover-text);
    }
    .theme-dark .blog-page .toc-list a.toc-active {
      color: var(--toc-active-text);
      background: var(--toc-active-bg);
    }
    .theme-dark .blog-page .table-wrapper {
      border-color: var(--border-light);
      background: var(--surface-raised);
      box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
    }
    .theme-dark .blog-page .cta-section {
      background: linear-gradient(125deg, #13223d 0%, #0f2136 48%, #0f2a21 100%);
      border-color: #334155;
    }
    .theme-dark .blog-page .meta-item {
      background: rgba(15, 23, 42, 0.8);
      border-color: #334155;
      color: var(--text-secondary);
    }

    @media (max-width: 999px) {
      .container { padding: 14px 10px 68px; }
      .article-layout { grid-template-columns: 1fr !important; }
      .content-wrapper { padding: 10px; }
      .content-section { padding: 9px 8px; }
      .article-header { border-radius: 14px; padding: 18px 14px; }
      .article-title { font-size: 1.58rem; }
    }

.nav-button { display:inline-flex;align-items:center;justify-content:center;padding:14px 32px;border-radius:8px;text-decoration:none;font-weight:600;margin:8px;min-height:44px;transition:all 0.2s ease; }
    .nav-button-primary { background:var(--accent-primary,#2563eb);color:#fff; }
    .nav-button-primary:hover { opacity:0.9;transform:translateY(-1px); }
    .nav-button-secondary { background:transparent;color:var(--text-primary,#111);border:2px solid var(--border-medium,#ddd); }
    .nav-button-secondary:hover { border-color:var(--accent-primary,#2563eb); }
    @media (max-width:480px) { .nav-button { display:block;width:100%;margin:8px 0; } }



/* prepay-home-loan-vs-sip-guide.html (moved from inline styles) */
/* Reading progress bar */
    #reading-progress {
      position: fixed; top: 0; left: 0; width: 0%; height: 3px;
      background: linear-gradient(90deg, #2563eb, #059669);
      z-index: 9999; transition: width 0.1s linear; border-radius: 0 2px 2px 0;
    }

    /* TL;DR card */
    .tldr-card {
      background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
      border-radius: 14px; padding: 22px 24px 18px; margin-bottom: 0; color: #fff;
    }
    .tldr-label { font-size: 0.88rem; font-weight: 800; color: #fff; margin-bottom: 14px; }
    .tldr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .tldr-item {
      background: rgba(255,255,255,0.1); border-radius: 10px; padding: 12px 14px;
      border: 1px solid rgba(255,255,255,0.15);
    }
    .tldr-cond { font-size: 0.8rem; font-weight: 700; color: rgba(255,255,255,0.65); margin-bottom: 4px; }
    .tldr-val  { font-size: 0.83rem; color: rgba(255,255,255,0.9); line-height: 1.4; margin-bottom: 8px; }
    .tldr-pill { display: inline-block; font-size: 0.74rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
    .pill-prepay { background: #fef3c7; color: #92400e; }
    .pill-split  { background: #e0f2fe; color: #0c4a6e; }
    .pill-sip    { background: #dcfce7; color: #14532d; }
    .pill-none   { background: #fee2e2; color: #7f1d1d; }
    @media (max-width: 600px) { .tldr-grid { grid-template-columns: 1fr; } }

    /* Widget */
    .widget-wrap {
      background: #fff; border: 1.5px solid #dbeafe; border-radius: 14px;
      padding: 20px 18px; box-shadow: 0 8px 24px rgba(37,99,235,0.09);
    }
    .widget-title { font-size: 0.98rem; font-weight: 800; color: #1e293b; margin-bottom: 4px; border: none; padding: 0; }
    .widget-sub   { font-size: 0.8rem; color: #64748b; margin-bottom: 14px; }

    .input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
    .field-wrap { display: flex; flex-direction: column; gap: 4px; }
    .field-label { font-size: 0.76rem; font-weight: 700; color: #475569; }
    .input-inner {
      display: flex; align-items: center; border: 1.5px solid #e2e8f0; border-radius: 8px;
      overflow: hidden; background: #f8fafc;
    }
    .input-prefix, .input-suffix {
      padding: 0 9px; font-size: 0.83rem; font-weight: 700; color: #64748b;
      background: #f1f5f9; align-self: stretch; display: flex; align-items: center;
    }
    .field-input {
      border: none; background: transparent; padding: 8px 10px;
      font-size: 0.88rem; font-weight: 600; color: #1e293b; width: 100%; outline: none;
    }
    @media (max-width: 560px) { .input-grid { grid-template-columns: 1fr; } }

    .toggle-row { margin-bottom: 14px; }
    .toggle-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .toggle-label { font-size: 0.78rem; font-weight: 700; color: #475569; }
    .btn-group { display: flex; gap: 6px; }
    .btn-opt {
      padding: 6px 14px; border-radius: 999px; border: 1.5px solid #e2e8f0;
      background: #f8fafc; font-size: 0.8rem; font-weight: 700; color: #475569; cursor: pointer;
    }
    .btn-opt.active { background: #2563eb; color: #fff; border-color: #2563eb; }

    .results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
    .result-card { border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; background: #f8fafc; }
    .result-card.winner { border-color: #059669; background: #f0fdf4; }
    .result-card-label { font-size: 0.8rem; font-weight: 800; color: #1e293b; margin-bottom: 8px; }
    .result-line { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: 0.78rem; }
    .result-key { color: #64748b; }
    .result-val { font-weight: 700; color: #1e293b; text-align: right; }
    .result-val.big { font-size: 0.96rem; }
    .result-val.green { color: #059669; }
    @media (max-width: 560px) { .results-grid { grid-template-columns: 1fr; } }

    .verdict-box {
      border-radius: 10px; padding: 12px 16px; margin-bottom: 12px;
      text-align: center; border: 1.5px solid #e2e8f0; background: #f8fafc;
    }
    .verdict-box.sip-wins    { background: #f0fdf4; border-color: #059669; }
    .verdict-box.prepay-wins { background: #fffbeb; border-color: #d97706; }
    .verdict-box.split-rec   { background: #eff6ff; border-color: #2563eb; }
    .verdict-text { font-size: 0.98rem; font-weight: 800; color: #1e293b; margin-bottom: 3px; }
    .verdict-sub  { font-size: 0.8rem; color: #64748b; }

    .widget-cta { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
    .wcta-btn {
      display: block; text-align: center; padding: 10px 16px; border-radius: 8px;
      font-size: 0.8rem; font-weight: 700; text-decoration: none;
    }
    .wcta-primary   { background: #2563eb; color: #fff; }
    .wcta-secondary { background: #f1f5f9; color: #1e293b; border: 1.5px solid #e2e8f0; }

    /* Example boxes */
    .ex-box { border: 1.5px solid #e2e8f0; border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
    .ex-head {
      background: linear-gradient(135deg, #1e40af, #2563eb); color: #fff;
      font-size: 0.86rem; font-weight: 700; padding: 10px 14px;
    }
    .ex-body { padding: 10px 14px; }
    .ex-row {
      display: flex; justify-content: space-between; gap: 10px; padding: 6px 0;
      border-bottom: 1px dashed #e2e8f0; font-size: 0.83rem; color: #475569;
    }
    .ex-row:last-child { border-bottom: none; }
    .ex-row.highlight { font-weight: 700; color: #1e293b; }
    .ex-row span:last-child { font-weight: 600; color: #059669; text-align: right; }

    /* Wins grid */
    .wins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
    .win-card { border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 14px; background: #f8fafc; }
    .win-card-title { font-size: 0.86rem; font-weight: 800; color: #1e293b; margin-bottom: 8px; }
    .win-card ul { margin: 0; padding-left: 16px; }
    .win-card li { font-size: 0.81rem; color: #475569; margin-bottom: 4px; padding-left: 0; }
    @media (max-width: 560px) { .wins-grid { grid-template-columns: 1fr; } }

    /* Split / rule box */
    .split-box {
      background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
      border: 1.5px solid #bfdbfe; border-radius: 12px; padding: 16px 18px; margin-bottom: 12px;
    }
    .split-box h3 { font-size: 0.92rem; font-weight: 800; color: #1e40af; margin: 0 0 8px; border: none; padding: 0; }
    .rule-box { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 14px 18px; }
    .rule-box h3 { font-size: 0.88rem; font-weight: 800; color: #1e293b; margin: 0 0 10px; border: none; padding: 0; }
    .rule-item { font-size: 0.82rem; color: #475569; margin-bottom: 7px; }
    .rule-item strong { color: #1e293b; }

    /* Mistakes */
    .mistakes { list-style: none; margin: 0; padding: 0; }
    .mist {
      display: grid; grid-template-columns: auto 1fr; gap: 0 12px;
      padding: 14px 0; border-bottom: 1px solid #f1f5f9; align-items: start;
    }
    .mist:last-child { border-bottom: none; }
    .mist-n { font-size: 1.3rem; font-weight: 900; color: #e2e8f0; line-height: 1; min-width: 28px; padding-top: 2px; }
    .mist h4 { font-size: 0.9rem; font-weight: 700; color: #1e293b; margin: 0 0 4px; border: none; padding: 0; }
    .mist p  { font-size: 0.82rem; color: #475569; margin: 0 0 5px; line-height: 1.55; }
    .mist-fix { font-size: 0.79rem; color: #059669; font-weight: 600; }
    .mist-fix::before { content: 'â†’ '; }

    /* Final verdict card */
    .verdict-final {
      background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
      border-radius: 14px; padding: 22px 24px; color: #fff; margin-bottom: 14px;
    }
    .verdict-final h2 { color: #fff; border-bottom-color: rgba(255,255,255,0.2); font-size: 1.05rem; }
    .verdict-final p  { color: rgba(255,255,255,0.88); }
    .verdict-cta-row  { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
    .vcta-btn {
      display: block; text-align: center; padding: 10px 18px; border-radius: 8px;
      font-size: 0.81rem; font-weight: 700; text-decoration: none;
    }
    .vcta-primary   { background: #fff; color: #1e40af; }
    .vcta-secondary { background: rgba(255,255,255,0.15); color: #fff; border: 1.5px solid rgba(255,255,255,0.3); }

    /* FAQ */
    .faq-accordion { margin-top: 10px; }
    .faq-item { border: 1.5px solid #e2e8f0; border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
    .faq-q {
      width: 100%; background: #fff; border: none; padding: 14px 16px;
      text-align: left; display: flex; align-items: flex-start; justify-content: space-between;
      gap: 10px; cursor: pointer; font-family: inherit; font-size: 0.9rem; font-weight: 600;
      color: #1e293b; transition: background 0.15s; line-height: 1.4;
    }
    .faq-q:hover { background: #f8fafc; }
    .faq-q.open  { background: #eff6ff; }
    .chevron { flex-shrink: 0; font-size: 0.88rem; color: #64748b; transition: transform 0.22s ease; }
    .faq-q.open .chevron { transform: rotate(180deg); }
    .faq-a {
      max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0,1,0,1);
      font-size: 0.86rem; line-height: 1.7; color: #334155; border-top: 1px solid #f1f5f9; padding: 0 16px;
    }
    .faq-a.open { max-height: 800px; padding: 12px 16px 14px; transition: max-height 0.5s ease-in-out; }
    .faq-a a { color: #2563eb; text-decoration: underline; }



/* sip-complete-guide.html (moved from inline styles) */
.nav-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 14px 32px;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 600;
      margin: 8px;
      min-height: 44px;
      transition: all 0.2s ease;
    }
    .nav-button-primary { background: var(--accent-primary); color: white; }
    .nav-button-primary:hover { background: #1d4ed8; transform: translateY(-1px); }
    .nav-button-secondary { background: var(--bg-secondary); color: var(--text-primary); border: 2px solid var(--border-medium); }
    .nav-button-secondary:hover { border-color: var(--accent-primary); background: var(--bg-accent); }
    @media (max-width: 480px) {
      .nav-button { display: block; width: 100%; margin: 8px 0; padding: 12px 24px; }
    }

/* Unified mobile typography override for all blog guides */
@media (max-width: 999px) {
  .blog-page .content-wrapper p,
  .blog-page .content-wrapper li {
    font-size: 0.88rem !important;
    line-height: 1.62 !important;
  }

  .blog-page .content-wrapper h2 {
    font-size: 1.16rem !important;
  }

  .blog-page .content-wrapper h3 {
    font-size: 1rem !important;
  }

  .blog-page .content-wrapper h4 {
    font-size: 0.92rem !important;
  }
}

@media (max-width: 600px) {
  .blog-page .content-wrapper p,
  .blog-page .content-wrapper li {
    font-size: 0.84rem !important;
    line-height: 1.56 !important;
  }
}



/* under-construction-home-loan-guide.html (moved from inline styles) */
/* -------------------------------------------
       ENHANCEMENT STYLES v1   hl.html upgrades
    ------------------------------------------- */

    /* -- Reading Progress Bar -- */
    #reading-progress {
      position: fixed;
      top: 0; left: 0;
      width: 0%;
      height: 3px;
      background: linear-gradient(90deg, #0284c7, #0ea5e9, #38bdf8);
      z-index: 9999;
      transition: width 0.1s linear;
      border-radius: 0 2px 2px 0;
    }

    /* -- Table of Contents -- */
    .toc-block {
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      border-left: 4px solid #0284c7;
      border-radius: 10px;
      padding: 20px 24px;
      margin: 28px 0;
    }
    .toc-title {
      font-size: 0.88rem;
      font-weight: 700;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: #0284c7;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .toc-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px 20px;
      list-style: none;
      margin: 0;
      padding: 0;
    }
    .toc-grid li a {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 6px 8px;
      font-size: 0.88rem;
      color: #334155;
      text-decoration: none;
      border-radius: 5px;
      transition: background 0.12s, color 0.12s;
    }
    .toc-grid li a:hover { background: #e0f2fe; color: #0284c7; }
    .toc-grid li a.toc-active { color: #0369a1; font-weight: 600; background: #e0f2fe; }
    .toc-num {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px; height: 20px;
      background: #0284c7;
      color: #fff;
      border-radius: 50%;
      font-size: 0.65rem;
      font-weight: 700;
      flex-shrink: 0;
    }
    @media (max-width: 600px) {
      .toc-grid { grid-template-columns: 1fr; }
    }


    /* -- Authority Signal -- */
    .authority-line {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
      padding: 10px 14px;
      background: #f1f5f9;
      border-radius: 6px;
      font-size: 0.78rem;
      color: #64748b;
      margin: 16px 0;
    }
    .authority-line a {
      color: #0369a1;
      font-weight: 600;
      text-decoration: none;
    }
    .authority-sep { color: #cbd5e1; }

    /* -- Collapsible Calculator -- */
    .calc-accordion {
      border: 2px solid #0ea5e9;
      border-radius: 10px;
      overflow: hidden;
      margin: 28px 0;
    }
    .calc-accordion-trigger {
      width: 100%;
      background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
      color: #fff;
      border: none;
      padding: 16px 20px;
      text-align: left;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.95rem;
      font-weight: 700;
      font-family: inherit;
      transition: opacity 0.15s;
      gap: 12px;
    }
    .calc-accordion-trigger:hover { opacity: 0.92; }
    .calc-accordion-trigger-text { display: flex; align-items: center; gap: 10px; }
    .calc-accordion-sub {
      font-size: 0.78rem;
      font-weight: 400;
      opacity: 0.85;
      display: block;
      margin-top: 2px;
    }
    .calc-chevron {
      width: 20px; height: 20px;
      flex-shrink: 0;
      transition: transform 0.25s ease;
    }
    .calc-accordion-trigger[aria-expanded="true"] .calc-chevron {
      transform: rotate(180deg);
    }
    .calc-accordion-body {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      background: #fff;
    }
    .calc-accordion-inner {
      padding: 20px;
    }
    .calc-helper {
      font-size: 0.82rem;
      color: #64748b;
      margin-bottom: 14px;
      padding: 10px 14px;
      background: #f0f9ff;
      border-radius: 6px;
      border-left: 3px solid #38bdf8;
    }
    .calc-iframe {
      width: 100%;
      height: 520px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      display: block;
    }
    @media (max-width: 600px) {
      .calc-iframe { height: 420px; }
    }

    /* -- Disbursement Timeline Visual -- */
    .timeline-visual {
      margin: 28px 0;
      padding: 24px;
      background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
      border: 1px solid #7dd3fc;
      border-radius: 12px;
    }
    .timeline-visual-title {
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #0284c7;
      margin-bottom: 20px;
      text-align: center;
    }
    .timeline-steps {
      display: flex;
      align-items: flex-start;
      gap: 0;
      position: relative;
      overflow-x: auto;
      padding-bottom: 4px;
    }
    .timeline-step {
      flex: 1;
      min-width: 90px;
      text-align: center;
      position: relative;
    }
    .timeline-step:not(:last-child)::after {
      content: '';
      position: absolute;
      top: 18px;
      left: 50%;
      width: 100%;
      height: 2px;
      background: linear-gradient(90deg, #0284c7, #38bdf8);
      z-index: 0;
    }
    .timeline-dot {
      width: 36px; height: 36px;
      background: #0284c7;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 0.75rem;
      font-weight: 800;
      margin: 0 auto 10px;
      position: relative;
      z-index: 1;
      border: 3px solid #fff;
      box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
    }
    .timeline-step-label {
      font-size: 0.72rem;
      font-weight: 600;
      color: #0369a1;
      margin-bottom: 3px;
      line-height: 1.3;
    }
    .timeline-step-amount {
      font-size: 0.78rem;
      font-weight: 800;
      color: #0c4a6e;
    }
    .timeline-step-pct {
      font-size: 0.68rem;
      color: #64748b;
      background: #fff;
      border-radius: 10px;
      padding: 1px 6px;
      margin-top: 4px;
      display: inline-block;
    }

    /* -- Engagement Prompt Box -- */
    .engagement-prompt {
      background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
      border: 1px solid #fde047;
      border-left: 4px solid #eab308;
      border-radius: 8px;
      padding: 16px 20px;
      margin: 24px 0;
      font-size: 0.9rem;
      color: #713f12;
      line-height: 1.6;
    }
    .engagement-prompt strong { color: #92400e; }
    .engagement-prompt a {
      color: #0284c7;
      font-weight: 700;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    /* -- Tax Shortcut Box -- */
    .tax-shortcut {
      display: flex;
      align-items: flex-start;
      gap: 14px;
      background: #fff7ed;
      border: 1px solid #fed7aa;
      border-left: 4px solid #f97316;
      border-radius: 8px;
      padding: 16px 20px;
      margin: 0 0 24px;
    }
    .tax-shortcut-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
    .tax-shortcut-content { font-size: 0.88rem; color: #7c2d12; line-height: 1.6; }
    .tax-shortcut-content strong { color: #9a3412; font-size: 0.95rem; display: block; margin-bottom: 4px; }

    /* -- Decision Rule Box -- */
    .decision-rule {
      background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
      border: 1px solid #86efac;
      border-radius: 10px;
      padding: 18px 22px;
      margin: 28px 0;
      display: flex;
      align-items: flex-start;
      gap: 14px;
    }
    .decision-rule-icon { font-size: 1.6rem; flex-shrink: 0; }
    .decision-rule-text { font-size: 0.9rem; color: #14532d; line-height: 1.6; }
    .decision-rule-text strong { font-size: 1rem; color: #166534; display: block; margin-bottom: 4px; }

    /* -- Related Calculators -- */
    .related-calcs {
      margin: 32px 0;
    }
    .related-calcs-title {
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 0.09em;
      text-transform: uppercase;
      color: #64748b;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .related-calcs-title::after {
      content: '';
      flex: 1;
      height: 1px;
      background: #e2e8f0;
    }
    .related-calcs-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }
    .related-calc-card {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      padding: 14px 16px;
      background: #fff;
      border: 1.5px solid #e2e8f0;
      border-radius: 8px;
      text-decoration: none;
      transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    }
    .related-calc-card:hover {
      border-color: #0284c7;
      box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
      transform: translateY(-2px);
    }
    .related-calc-icon { font-size: 1.4rem; }
    .related-calc-name { font-size: 0.85rem; font-weight: 700; color: #0f172a; }
    .related-calc-desc { font-size: 0.75rem; color: #64748b; line-height: 1.4; }
    .related-calc-arrow {
      font-size: 0.78rem;
      color: #0284c7;
      font-weight: 700;
      margin-top: auto;
    }
    @media (max-width: 600px) {
      .related-calcs-grid { grid-template-columns: 1fr; }
    }

    /* -- Before You Decide Section -- */
    .before-decide {
      background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
      color: #fff;
      border-radius: 12px;
      padding: 28px 28px 24px;
      margin: 36px 0;
    }
    .before-decide h2 {
      color: #f0f9ff !important;
      font-size: 1.2rem !important;
      margin-bottom: 14px !important;
    }
    .before-decide p { color: #cbd5e1; font-size: 0.9rem; line-height: 1.7; margin-bottom: 14px; }
    .before-decide-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin: 18px 0 22px;
    }
    .before-decide-item {
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px;
      padding: 13px 15px;
      font-size: 0.83rem;
      color: #e2e8f0;
      line-height: 1.5;
    }
    .before-decide-item strong {
      display: block;
      color: #38bdf8;
      margin-bottom: 3px;
      font-size: 0.85rem;
    }
    .before-decide-cta {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #0284c7;
      color: #fff;
      text-decoration: none;
      padding: 12px 24px;
      border-radius: 8px;
      font-weight: 700;
      font-size: 0.9rem;
      transition: background 0.15s, transform 0.15s;
    }
    .before-decide-cta:hover { background: #0369a1; transform: translateY(-1px); }
    @media (max-width: 600px) {
      .before-decide-grid { grid-template-columns: 1fr; }
      .before-decide { padding: 20px 18px; }
    }

    /* -- Sticky Floating CTA -- */
    .sticky-cta-fab {
      position: fixed;
      bottom: 28px;
      right: 24px;
      z-index: 1000;
      background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
      color: #fff;
      text-decoration: none;
      padding: 12px 22px;
      border-radius: 28px;
      font-weight: 700;
      font-size: 0.88rem;
      box-shadow: 0 4px 20px rgba(2, 132, 199, 0.4);
      display: flex;
      align-items: center;
      gap: 8px;
      transition: transform 0.15s, box-shadow 0.15s;
    }
    .sticky-cta-fab:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(2, 132, 199, 0.5);
    }
    .sticky-cta-mobile-bar {
      display: none;
      position: fixed;
      bottom: 0; left: 0; right: 0;
      z-index: 1000;
      background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
      padding: 12px 20px;
      padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
      box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    }
    .sticky-cta-mobile-bar a {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: #0284c7;
      color: #fff;
      text-decoration: none;
      font-weight: 700;
      font-size: 0.95rem;
      padding: 13px;
      border-radius: 8px;
      transition: opacity 0.15s;
    }
    .sticky-cta-mobile-bar a:hover { opacity: 0.92; }
    @media (max-width: 768px) {
      .sticky-cta-fab { display: none; }
      .sticky-cta-mobile-bar { display: block; }
      body { padding-bottom: 74px; }
    }

    /* -- Section Divider -- */
    .section-break {
      display: flex;
      align-items: center;
      gap: 14px;
      margin: 36px 0 28px;
    }
    .section-break::before, .section-break::after {
      content: '';
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    }
    .section-break-label {
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #94a3b8;
      padding: 4px 12px;
      border: 1px solid #e2e8f0;
      border-radius: 20px;
      background: #f8fafc;
      white-space: nowrap;
    }

    /* -- Enhanced CTA Buttons -- */
    .cta-button-enhanced {
      background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
      transition: transform 0.15s, box-shadow 0.15s;
    }
    .cta-button-enhanced:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
    }
    .cta-section-enhanced {
      position: relative;
      overflow: hidden;
    }
    .cta-section-enhanced::before {
      content: '';
      position: absolute;
      top: -40px; right: -40px;
      width: 160px; height: 160px;
      background: rgba(255,255,255,0.04);
      border-radius: 50%;
      pointer-events: none;
    }

    /* -- Improved Opening -- */
    .hook-stat-row {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin: 18px 0;
    }
    .hook-stat {
      flex: 1;
      min-width: 130px;
      background: #fff;
      border: 1.5px solid #e2e8f0;
      border-top: 3px solid #0284c7;
      border-radius: 8px;
      padding: 14px 16px;
      text-align: center;
    }
    .hook-stat-value {
      font-size: 1.4rem;
      font-weight: 800;
      color: #0284c7;
      display: block;
    }
    .hook-stat-label {
      font-size: 0.75rem;
      color: #64748b;
      margin-top: 3px;
      line-height: 1.3;
    }

    /* -- Table scroll on mobile -- */
    .table-wrapper {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    /* Ensure desktop TOC remains sticky even if shared CSS order changes */
    .article-layout,
    .container {
      overflow: visible;
    }
    .toc-sidebar {
      position: sticky;
      top: 16px;
      align-self: start;
      max-height: calc(100vh - 28px);
      overflow: auto;
    }
    @media (max-width: 640px) {
      .table-wrapper table { min-width: 520px; }
    }

.nav-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 14px 32px;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 600;
      margin: 8px;
      min-height: 44px;
      transition: all 0.2s ease;
    }
    .nav-button-primary { background: var(--accent-primary, #2563eb); color: white; }
    .nav-button-primary:hover { background: #1d4ed8; transform: translateY(-1px); }
    .nav-button-secondary { background: var(--bg-secondary, #f8fafc); color: var(--text-primary, #111); border: 2px solid var(--border-medium, #ddd); }
    .nav-button-secondary:hover { border-color: var(--accent-primary, #2563eb); background: var(--bg-accent, #eff6ff); }
    @media (max-width: 480px) {
      .nav-button { display: block; width: 100%; margin: 8px 0; padding: 12px 24px; }
    }

