/* ================================================================
   FamilyBudgetCalc — Complete Stylesheet
   ================================================================
   US family budget calculator, mobile-first responsive.
   Color scheme: Trustworthy financial navy + emerald green #059669.
   ================================================================ */

/* ── CSS Custom Properties ─────────────────────── */
:root {
  --color-primary: #0B1F3B;
  --color-primary-dark: #061429;
  --color-primary-light: #D6E4F0;
  --color-primary-bg: #EEF3F9;
  --color-accent: #059669;
  --color-accent-light: #D1FAE5;
  --color-accent-dark: #047857;
  --color-warning: #D97706;
  --color-warning-light: #FEF3C7;
  --color-warning-border: #F59E0B;
  --color-danger: #DC2626;
  --color-danger-light: #FEF2F2;
  --color-danger-border: #EF4444;
  --color-twitter: #1DA1F2;
  --color-facebook: #1877F2;
  --color-reddit: #FF4500;
  --color-linkedin: #0A66C2;
  --color-text: #1E293B;
  --color-text-secondary: #475569;
  --color-text-muted: #94A3B8;
  --color-border: #E2E8F0;
  --color-border-light: #F1F5F9;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8FAFC;
  --color-bg-card: #FFFFFF;
  --color-surface: #F1F5F9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  --max-width: 1200px;
  --transition: 0.2s ease;
}

/* ── Dark Mode ──────────────────────────────── */
/* System preference fallback (prevents FOUC for dark-mode users) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #3B82F6;
    --color-primary-dark: #1D4ED8;
    --color-primary-light: #1E3A5F;
    --color-primary-bg: #0F2744;
    --color-accent: #10B981;
    --color-accent-light: #064E3B;
    --color-accent-dark: #059669;
    --color-warning: #F59E0B;
    --color-warning-light: #451A03;
    --color-warning-border: #92400E;
    --color-danger: #EF4444;
    --color-danger-light: #450A0A;
    --color-danger-border: #991B1B;
    --color-text: #E2E8F0;
    --color-text-secondary: #94A3B8;
    --color-text-muted: #64748B;
    --color-border: #334155;
    --color-border-light: #1E293B;
    --color-bg: #0F172A;
    --color-bg-alt: #1E293B;
    --color-bg-card: #1E293B;
    --color-surface: #1E293B;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.6);
  }
}

/* Manual toggle (overrides system preference) */
body.light {
  --color-primary: #0B1F3B;
  --color-primary-dark: #061429;
  --color-primary-light: #D6E4F0;
  --color-primary-bg: #EEF3F9;
  --color-accent: #059669;
  --color-accent-light: #D1FAE5;
  --color-accent-dark: #047857;
  --color-warning: #D97706;
  --color-warning-light: #FEF3C7;
  --color-warning-border: #F59E0B;
  --color-danger: #DC2626;
  --color-danger-light: #FEF2F2;
  --color-danger-border: #EF4444;
  --color-text: #1E293B;
  --color-text-secondary: #475569;
  --color-text-muted: #94A3B8;
  --color-border: #E2E8F0;
  --color-border-light: #F1F5F9;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8FAFC;
  --color-bg-card: #FFFFFF;
  --color-surface: #F1F5F9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

body.dark {
  --color-primary: #3B82F6;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #1E3A5F;
  --color-primary-bg: #0F2744;
  --color-accent: #10B981;
  --color-accent-light: #064E3B;
  --color-accent-dark: #059669;
  --color-warning: #F59E0B;
  --color-warning-light: #451A03;
  --color-warning-border: #92400E;
  --color-danger: #EF4444;
  --color-danger-light: #450A0A;
  --color-danger-border: #991B1B;
  --color-text: #E2E8F0;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;
  --color-border: #334155;
  --color-border-light: #1E293B;
  --color-bg: #0F172A;
  --color-bg-alt: #1E293B;
  --color-bg-card: #1E293B;
  --color-surface: #1E293B;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.6);
}

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg-alt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-accent-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Layout ────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Disclaimer Bar (fixed, top) ────────────── */
.disclaimer-bar {
  background: var(--color-warning-light);
  border-bottom: 1px solid var(--color-warning-border);
  color: #92400e;
  font-size: 0.78rem;
  text-align: center;
  padding: 8px 16px;
  line-height: 1.5;
  position: sticky;
  top: 0;
  z-index: 101;
}
body.dark .disclaimer-bar { color: #FCD34D; }

/* Inline YMYL disclaimer (hard-coded in <main> for crawlers) — quiet note box,
   visually distinct from the top warning bar, not sticky, width-capped */
div.disclaimer-bar[role="note"] {
  position: static;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-left: 3px solid var(--color-primary);
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: left;
  max-width: 860px;
  margin: 0 auto 24px;
  padding: 12px 16px;
}
body.dark div.disclaimer-bar[role="note"] {
  background: #1E293B;
  border-color: #334155;
  color: #CBD5E1;
}

/* ── Header ───────────────────────────────────── */
.site-header {
  background: var(--color-primary);
  border-bottom: 2px solid var(--color-primary-dark);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header.has-disclaimer { top: 33px; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; color: #fff; }
.site-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--color-accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem;
}

/* Dark mode toggle button in header */
.dark-toggle-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dark-toggle-btn:hover { background: rgba(255,255,255,0.25); }

/* Show correct icon based on mode */
.dark-toggle-btn .dark-icon-sun { display: none; }
.dark-toggle-btn .dark-icon-moon { display: inline; }
body.dark .dark-toggle-btn .dark-icon-sun { display: inline; }
body.dark .dark-toggle-btn .dark-icon-moon { display: none; }

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  transition: all var(--transition);
}
.site-nav a:hover,
.site-nav a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}

/* ── Main Content ──────────────────────────── */
.main-content {
  padding: 24px 0 80px;
}

/* Core value props bar */
.value-props {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}
.value-props span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.value-props .vp-icon { color: var(--color-accent); font-weight: 700; }

/* ── Trust Stats Bar ───────────────────────────── */
.trust-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto 8px;
  padding: 0 8px;
}
.trust-stat {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.trust-stat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.trust-stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.2;
  margin-bottom: 2px;
}
.trust-stat-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}
.trust-stat-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
body.dark .trust-stat {
  background: var(--color-bg-card);
  border-color: var(--color-border);
}
body.dark .trust-stat-number { color: var(--color-accent); }

@media (max-width: 768px) {
  .trust-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .trust-stats {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .trust-stat { padding: 10px 8px; }
  .trust-stat-number { font-size: 1.3rem; }
  .trust-stat-label { font-size: 0.75rem; }
  .trust-stat-desc { font-size: 0.7rem; }
}

/* ── Page Hero ─────────────────────────────────── */
.page-hero {
  text-align: center;
  padding: 32px 0 16px;
}
.page-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.25;
  margin-bottom: 8px;
}
.page-hero p {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

/* ── Tab Navigation (Desktop) ──────────────────── */
.tab-nav-desktop {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 24px 0 0;
  padding: 4px;
  background: var(--color-surface);
  border-radius: var(--radius);
}
.tab-btn {
  flex: 1;
  min-width: 130px;
  padding: 12px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  font-family: var(--font-sans);
  white-space: nowrap;
}
.tab-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.tab-btn.active {
  background: var(--color-bg);
  color: var(--color-accent);
  box-shadow: var(--shadow-md);
  border-bottom: 3px solid var(--color-accent);
  border-radius: var(--radius-sm) var(--radius-sm) 2px 2px;
}

/* ── Tab Navigation (Mobile Dropdown) ──────────── */
.tab-nav-mobile {
  display: none;
  margin: 16px 0 0;
  position: relative;
}
.tab-select {
  width: 100%;
  padding: 14px 42px 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  cursor: pointer;
  font-family: var(--font-sans);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color var(--transition);
}
.tab-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

/* ── Tab Content ────────────────────────────── */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease;
}
.tab-content.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-inner {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 28px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

/* ── Warning Banners ─────────────────────────── */
.warning-banner {
  background: var(--color-warning-light);
  border: 1px solid var(--color-warning-border);
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
body.dark .warning-banner { color: #FCD34D; }
.warning-banner .warn-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.warning-banner strong { display: block; margin-bottom: 2px; }

/* Info banner (used for general info messages) */
.info-banner {
  background: var(--color-primary-bg);
  border: 1px solid var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
body.dark .info-banner { color: var(--color-text); background: var(--color-primary-light); }
.info-banner .info-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.info-banner strong { display: block; margin-bottom: 2px; color: var(--color-primary); }
body.dark .info-banner strong { color: #93C5FD; }

/* Result label/value/sub (used in health score, scenarios, etc.) */
.result-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.result-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
}
.result-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ── Forms ──────────────────────────────────── */
.calc-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.calc-form.single-col { grid-template-columns: 1fr; }
.calc-form.two-col { grid-template-columns: repeat(2, 1fr); }
.calc-form.three-col { grid-template-columns: repeat(3, 1fr); }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
}
.form-group .label-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.form-input {
  padding: 8px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}
.form-input.input-error {
  border-color: var(--color-danger);
}
.form-input.input-error:focus {
  box-shadow: 0 0 0 3px var(--color-danger-light);
}

.input-prefix {
  position: relative;
}
.input-prefix .prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  pointer-events: none;
}
.input-prefix .form-input { padding-left: 28px; }

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-input {
  resize: vertical;
  min-height: 60px;
  font-family: var(--font-sans);
}

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-border-light); }
.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent-light); }
.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}
.btn-danger-text {
  background: transparent;
  color: var(--color-danger);
  border: none;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
}
.btn-danger-text:hover {
  text-decoration: underline;
  background: var(--color-danger-light);
  border-radius: var(--radius-sm);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Results Section ──────────────────────────── */
.results-section {
  margin-top: 8px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.result-card.highlight {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
}
.result-card.danger {
  background: var(--color-danger-light);
  border-color: var(--color-danger-border);
}
.result-card .card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.result-card .card-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.result-card .card-value.savings { color: var(--color-accent); font-weight: 800; }
.result-card .card-value.warning { color: var(--color-warning); font-weight: 800; }
.result-card .card-value.danger { color: var(--color-danger); font-weight: 800; }
.result-card.highlight .card-value { font-size: 1.85rem; }

/* ── Privacy Badge (merged) ───────────────── */
.privacy-badge {
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.privacy-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.privacy-badge .shield-icon { font-size: 1.1rem; }

/* ── Budget Breakdown / Pie Chart Category Cards ─ */
.category-section {
  margin-top: 24px;
}
.category-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.category-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.category-card.overspent {
  border-color: var(--color-danger-border);
  background: var(--color-danger-light);
}
.category-card .cat-label { font-size: 0.85rem; font-weight: 600; color: var(--color-text); }
.category-card .cat-amount { font-size: 0.95rem; font-weight: 700; color: var(--color-text); text-align: right; }
.category-card .cat-percent { font-size: 0.75rem; color: var(--color-text-muted); }
.category-card.overspent .cat-amount { color: var(--color-danger); }

/* Comparison Table */
.compare-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 600px;
}
.compare-table thead th {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: 700;
  padding: 12px 14px;
  text-align: center;
  border-bottom: 2px solid var(--color-primary);
  font-size: 0.85rem;
  white-space: nowrap;
}
.compare-table thead th:first-child {
  text-align: left;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-weight: 600;
  position: sticky;
  left: 0;
  z-index: 2;
}
.compare-table tbody td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--color-border-light);
}
.compare-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  background: var(--color-bg-alt);
  position: sticky;
  left: 0;
  z-index: 1;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
}
.compare-table tbody tr:hover td { background: var(--color-primary-bg); }
.compare-table .best-cell { color: var(--color-accent); font-weight: 700; }

/* ── Chart Container ────────────────────────── */
.chart-container {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  position: relative;
}
.chart-container canvas { max-height: 400px; }

/* ── Budget Log (Tab 6) ────────────────────── */
.log-list { list-style: none; }
.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--color-bg);
  gap: 12px;
  flex-wrap: wrap;
  transition: box-shadow var(--transition);
}
.log-item:hover { box-shadow: var(--shadow-md); }
.log-item-info { flex: 1; min-width: 200px; }
.log-item-name { font-weight: 600; font-size: 0.95rem; color: var(--color-text); }
.log-item-meta { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 2px; }
.log-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.log-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}
.log-empty .empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.log-empty p { font-size: 0.95rem; }

/* ── Tooltip Help Icons ──────────────────────── */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  margin-left: 4px;
  position: relative;
  vertical-align: middle;
  line-height: 1;
  transition: background var(--transition), color var(--transition);
}
.tooltip-trigger:hover {
  background: var(--color-accent);
  color: #fff;
}
.tooltip-trigger::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: var(--color-bg);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 200;
}
.tooltip-trigger::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-text);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
.tooltip-trigger:hover::after,
.tooltip-trigger:hover::before { opacity: 1; }

/* ── Next Steps Checklist ─────────────────────── */
.next-steps {
  background: var(--color-accent-light);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 24px;
}
body.dark .next-steps {
  background: #064E3B;
  border-color: #047857;
}
.next-steps h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.dark .next-steps h4 { color: #6EE7B7; }
.next-steps ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.next-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(5,150,105,0.15);
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.5;
}
.next-steps li:last-child { border-bottom: none; padding-bottom: 0; }
.next-steps .ns-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 2px;
}
.next-steps a {
  color: var(--color-accent-dark);
  font-weight: 600;
  text-decoration: underline;
}
body.dark .next-steps a { color: #6EE7B7; }

/* ── Email Subscribe Box (Footer) ─────────────── */
.subscribe-box {
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 32px auto 0;
  max-width: 600px;
  text-align: center;
}
.subscribe-box h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.subscribe-box p {
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  margin: 0 0 16px;
}
.subscribe-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}
.subscribe-form input[type="email"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border var(--transition);
}
.subscribe-form input[type="email"]::placeholder { color: rgba(255,255,255,0.5); }
.subscribe-form input[type="email"]:focus {
  border-color: var(--color-accent);
  background: rgba(255,255,255,0.18);
}
.subscribe-form .btn-subscribe {
  flex-shrink: 0;
  padding: 10px 20px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background var(--transition);
}
.subscribe-form .btn-subscribe:hover { background: var(--color-accent-dark); }
.subscribe-privacy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  margin-top: 10px;
}
.subscribe-privacy a { color: rgba(255,255,255,0.6); text-decoration: underline; }

@media (max-width: 480px) {
  .subscribe-form {
    flex-direction: column;
  }
  .subscribe-box { padding: 20px 16px; }
}

/* ── Tab 7: Dual Income Split Method Buttons ── */
.split-method-btn {
  padding: 8px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.split-method-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.split-method-btn.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ── Tab 8: Inflation Table ── */
#inf-table-wrap .compare-table th,
#inf-table-wrap .compare-table td {
  font-size: 0.85rem;
  white-space: nowrap;
}
#inf-tfoot td {
  border-top: 2px solid var(--color-accent) !important;
}

/* ── Dual Income partner cards ── */
.dual-income-flag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.dual-income-flag.a { background: #DBEAFE; color: #1D4ED8; }
.dual-income-flag.b { background: #FEF3C7; color: #B45309; }

/* ── Social Share Bar ────────────────────────── */
.share-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.share-section .share-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.share-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Floating Share Bar ──────────────────── */
.share-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  margin-top: 32px;
}
.share-bar .share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}
.share-bar .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  padding: 0;
  gap: 0;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}
.share-bar .share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #fff;
  text-decoration: none;
}
.share-bar .share-twitter  { background: var(--color-twitter); }
.share-bar .share-facebook { background: var(--color-facebook); }
.share-bar .share-reddit   { background: var(--color-reddit); }
.share-bar .share-linkedin { background: var(--color-linkedin); }
.share-bar .share-email    { background: var(--color-text-secondary); }
.share-bar .share-copy {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.share-bar .share-copy:hover {
  background: var(--color-border);
  color: var(--color-text);
}

/* ── Bookmark Toast ──────────────────────────── */
.bookmark-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  background: var(--color-bg);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  box-shadow: var(--shadow-xl);
  display: none;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  animation: slideUp 0.4s ease;
  font-size: 0.85rem;
}
.bookmark-toast.show { display: flex; }
.bookmark-toast .toast-icon { font-size: 1.3rem; }
.bookmark-toast .toast-text { flex: 1; color: var(--color-text); }
.bookmark-toast .toast-text strong { color: var(--color-accent); }
.bookmark-toast .toast-text kbd,
.bookmark-toast .toast-kbd {
  display: inline-block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  margin: 2px 2px 0;
}
.bookmark-toast .toast-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.bookmark-toast .toast-close:hover { color: var(--color-text); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Monthly/Annual Toggle ────────────────────── */
.toggle-period {
  display: inline-flex;
  border: 1px solid var(--color-border,var(--border));
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg-card,var(--card-bg));
}
.toggle-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--color-text,var(--text));
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-btn.active {
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
}
.toggle-btn:not(.active):hover {
  background: var(--color-accent-light);
}

/* ── Preset Dropdown ──────────────────────────── */
.preset-dropdown {
  appearance: auto;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--color-border,var(--border));
  background: var(--color-bg-card,var(--card-bg));
  color: var(--color-text,var(--text));
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.preset-dropdown:focus {
  border-color: var(--color-accent);
  outline: none;
}

/* ── Health Score Card ────────────────────────── */
.health-score-card {
  animation: slideUp 0.4s ease;
}

/* ── What-If Sliders ──────────────────────────── */
.whatif-section input[type="range"] {
  accent-color: var(--color-accent);
  height: 6px;
  cursor: pointer;
}

/* ── Benchmark Warnings ───────────────────────── */
.benchmark-list {
  animation: slideUp 0.4s ease;
}

/* ── Net Worth Input Forms ────────────────────── */
#nw-assets-form input,
#nw-liabilities-form input {
  transition: border-color 0.2s;
}
#nw-assets-form input:focus,
#nw-liabilities-form input:focus {
  border-color: var(--color-accent);
}

/* ── PWA Install Banner ─────────────────────── */
.pwa-banner {
  display: none;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #fff;
  padding: 12px 20px;
  text-align: center;
  font-size: 0.875rem;
  position: relative;
}
.pwa-banner.show { display: block; }
.pwa-banner .pwa-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
}
.pwa-banner .pwa-icon { font-size: 1.5rem; }
.pwa-banner .pwa-text { font-weight: 500; }
.pwa-banner .pwa-install-btn {
  background: #fff;
  color: var(--color-accent);
  border: none;
  border-radius: var(--radius);
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}
.pwa-banner .pwa-install-btn:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
}
.pwa-banner .pwa-dismiss {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}
.pwa-banner .pwa-dismiss:hover { color: #fff; }

/* ── Debt Multi-Entry ──────────────────────── */
.debt-entries { margin-bottom: 16px; }
.debt-entry {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.debt-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.debt-entry-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
}
.debt-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.add-debt-btn { margin-top: 8px; }

/* ── Winner Card (Debt comparison) ──────────── */
.winner-card {
  background: var(--color-accent-light);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  margin-bottom: 20px;
}
.winner-card .winner-icon { font-size: 2rem; margin-bottom: 8px; }
.winner-card .winner-title { font-size: 1.1rem; font-weight: 700; color: var(--color-accent); }
.winner-card .winner-detail { font-size: 0.9rem; color: var(--color-text-secondary); margin-top: 4px; }

/* ── Sinking Fund Cards ──────────────────────── */
.sinking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.sinking-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.sinking-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 8px; color: var(--color-text); }
.sinking-card .annual { font-size: 0.8rem; color: var(--color-text-muted); }
.sinking-card .monthly {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 6px 0;
}
.sinking-card .monthly-label { font-size: 0.75rem; color: var(--color-text-muted); }

/* ── Slider for 50/30/20 ───────────────────── */
.ratio-slider-group {
  margin-bottom: 16px;
}
.ratio-slider-group .slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ratio-slider-group .slider-label {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 80px;
}
.ratio-slider-group .slider-label.needs-label { color: #DC2626; }
.ratio-slider-group .slider-label.wants-label { color: #D97706; }
.ratio-slider-group .slider-label.savings-label { color: #059669; }
.ratio-slider-group input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-border);
  border-radius: 3px;
  outline: none;
}
.ratio-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}
.ratio-slider-group .slider-value {
  font-size: 0.95rem;
  font-weight: 700;
  min-width: 40px;
  text-align: right;
}
.ratio-slider-total {
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.ratio-slider-total.invalid { color: var(--color-danger); }

/* ── FAQ Section ────────────────────────────── */
.faq-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.faq-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}
.faq-list { max-width: 1200px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  padding: 16px 44px 16px 18px;
  text-align: left;
  background: var(--color-bg);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  font-family: var(--font-sans);
  position: relative;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--color-bg-alt); }
.faq-question::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--color-accent);
  font-weight: 700;
}
.faq-item.open .faq-question::after { content: '\2212'; }
.faq-answer {
  display: none;
  padding: 0 18px 16px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ── Footer ──────────────────────────────────── */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-align: center;
}
.site-footer .disclaimer {
  max-width: 800px;
  margin: 0 auto 16px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.site-footer .disclaimer strong { color: var(--color-text-secondary); }
.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.site-footer nav a { font-size: 0.8rem; }
.site-footer .review-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* ── Breadcrumb ────────────────────────────── */
.breadcrumb {
  padding: 12px 0 0;
  margin-bottom: 4px;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}
.breadcrumb li { color: var(--color-text-muted); }
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin: 0 6px;
  color: var(--color-border);
}
.breadcrumb a { color: var(--color-text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-accent); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--color-text); font-weight: 500; }

/* ── Static Pages ───────────────────────────── */
.static-page {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 36px;
  margin: 24px auto;
  max-width: 1200px;
}
.static-page h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.static-page h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
.static-page h3 { font-size: 1.05rem; font-weight: 700; margin: 20px 0 8px; }
.static-page p {
  margin-bottom: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.static-page ul, .static-page ol {
  margin: 0 0 14px 24px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.static-page li { margin-bottom: 6px; }
.static-page .methodology-block {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.static-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.875rem;
}
.static-page table th,
.static-page table td {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  text-align: left;
}
.static-page table th { background: var(--color-surface); font-weight: 600; }

/* ── Blog Pages ──────────────────────────────── */
.blog-post {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 36px;
  margin: 24px auto;
  max-width: 1200px;
}
.blog-post h1 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}
.blog-post .post-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.blog-post h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
.blog-post h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 8px; }
.blog-post p {
  margin-bottom: 16px;
  line-height: 1.8;
  color: var(--color-text-secondary);
}
.blog-post ul, .blog-post ol {
  margin: 0 0 16px 24px;
  line-height: 1.8;
  color: var(--color-text-secondary);
}
.blog-post li { margin-bottom: 6px; }
.blog-post blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 12px 18px;
  margin: 16px 0;
  background: var(--color-accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}
.blog-post .references-section {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid var(--color-border);
}
.blog-post .references-section h2 {
  font-size: 1.1rem;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 12px;
}
.blog-post .references-section ol { font-size: 0.85rem; }
.blog-post .references-section a { word-break: break-all; }
.blog-post .blog-faq {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}
.blog-post .blog-faq h2 { border-bottom: none; padding-bottom: 0; }

/* ── 404 Page ────────────────────────────── */
.not-found {
  text-align: center;
  padding: 80px 20px;
}
.not-found h1 { font-size: 5rem; font-weight: 800; color: var(--color-accent); }
.not-found p { font-size: 1.1rem; color: var(--color-text-secondary); margin: 16px 0 24px; }

/* ── Print Buttons ──────────────────────────── */
.print-btn-top {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.print-btn-bottom {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 90;
  display: flex;
  gap: 8px;
}
.print-btn-bottom .btn {
  box-shadow: var(--shadow-lg);
  padding: 14px 22px;
  border-radius: 50px;
  font-size: 0.9rem;
}

/* ── Toast notification ──────────────────── */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  animation: fadeIn 0.3s ease;
  pointer-events: none;
}

/* ── FAB: Floating Action Button ──────────── */
.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 280;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
}
.fab-main {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(5,150,105,0.45);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
  z-index: 2;
}
.fab-main:hover { transform: scale(1.06); box-shadow: 0 8px 26px rgba(5,150,105,0.55); }
.fab-main:active { transform: scale(0.96); }

.fab-actions {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
}
.fab-actions .fab-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--color-primary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(11,31,59,0.18);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(12px) scale(0.6);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, background .15s ease, color .15s ease;
}
.fab.open .fab-actions .fab-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fab.open .fab-actions .fab-btn:nth-child(1) { transition-delay: .02s; }
.fab.open .fab-actions .fab-btn:nth-child(2) { transition-delay: .05s; }
.fab.open .fab-actions .fab-btn:nth-child(3) { transition-delay: .08s; }
.fab.open .fab-actions .fab-btn:nth-child(4) { transition-delay: .11s; }
.fab-actions .fab-btn:hover {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  transform: scale(1.08);
}
.fab.open .fab-main { box-shadow: 0 6px 20px rgba(5,150,105,0.55); }

/* FAB print toast (bottom center) */
.fab-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: var(--color-bg);
  padding: 13px 22px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  max-width: min(90vw, 420px);
  text-align: center;
}
.fab-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* share-bar pulse when triggered from FAB */
.share-bar.pulse {
  animation: sharePulse .5s ease 2;
}
@keyframes sharePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5,150,105,0); }
  50% { box-shadow: 0 0 0 6px rgba(5,150,105,0.4); }
}

/* dark mode */
body.dark .fab-main { background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark)); }
body.dark .fab-actions .fab-btn { background: var(--color-surface); color: var(--color-primary); }

/* responsive */
@media (max-width: 680px) {
  .fab { right: 14px; bottom: 14px; }
  .fab-main { width: 52px; height: 52px; font-size: 1.35rem; }
  .fab-actions .fab-btn { width: 44px; height: 44px; font-size: 1.15rem; }
}

/* ── Copy Report Modal ────────────────────── */
.copy-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
  align-items: center;
  justify-content: center;
}
.copy-modal.show { display: flex; }
.copy-modal .modal-content {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.copy-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.copy-modal .modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
.copy-modal .modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--color-text-muted);
}
.copy-modal .modal-text {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
  color: var(--color-text-secondary);
}
.copy-modal .modal-actions { display: flex; gap: 8px; }

/* ── Responsive: Tablet ────────────────────── */
@media (max-width: 768px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .site-nav { justify-content: flex-start; }

  .page-hero h1 { font-size: 1.5rem; }
  .page-hero p { font-size: 0.9rem; }

  .tab-nav-desktop { display: none; }
  .tab-nav-mobile { display: block; }

  .calc-form { grid-template-columns: 1fr; }
  .calc-form.two-col, .calc-form.three-col { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .tab-inner { padding: 16px; }

  .static-page, .blog-post { padding: 20px; }
  .static-page h1, .blog-post h1 { font-size: 1.4rem; }

  .compare-table-wrapper { margin: 12px -16px; }

  .chart-container canvas { max-height: 280px; }

  .print-btn-bottom { bottom: 10px; right: 10px; }
  .print-btn-bottom .btn { padding: 12px 18px; font-size: 0.85rem; }

  .share-bar { gap: 6px; padding: 10px 12px; }
  .share-bar .share-btn { width: 34px; height: 34px; font-size: 0.9rem; }

  .sinking-grid { grid-template-columns: repeat(2, 1fr); }
  .debt-entry-grid { grid-template-columns: 1fr; }

  .copy-modal .modal-content { width: 95%; padding: 16px; }
}

/* ── Responsive: Tablet (calc-form 2-col) ─────── */
@media (max-width: 920px) {
  .calc-form { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .calc-form.three-col { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive: Phone ──────────────────────── */
@media (max-width: 480px) {
  html { font-size: 15px; }
  .container { padding: 0 12px; }

  .site-logo { font-size: 1.15rem; }
  .site-nav a { padding: 5px 10px; font-size: 0.8rem; }

  .page-hero { padding: 20px 0 8px; }
  .page-hero h1 { font-size: 1.3rem; }
  .results-grid { grid-template-columns: 1fr; }

  .tab-inner { padding: 14px; }
  .warning-banner { font-size: 0.8rem; padding: 10px 14px; }

  .log-item { flex-direction: column; align-items: flex-start; }
  .log-item-actions { width: 100%; justify-content: flex-end; }

  .print-btn-top { justify-content: center; }
  .share-bar .share-label { display: none; }
  .sinking-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }

  .disclaimer-bar { font-size: 0.7rem; padding: 6px 12px; }
}

/* ── Blog Post Meta & Author Box ──────────────── */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 12px 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.post-meta .post-author { color: var(--color-text); }
.post-meta .post-author strong { color: var(--color-accent); }
.post-meta .post-date,
.post-meta .post-reading-time {
  display: flex;
  align-items: center;
  gap: 4px;
}
.about-author {
  background: var(--color-primary-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 32px;
}
.about-author h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 8px;
}
.about-author p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
}
.about-author a {
  color: var(--color-accent-dark);
  font-weight: 600;
}
body.dark .about-author {
  background: var(--color-primary-light);
  border-color: rgba(255,255,255,0.1);
}
body.dark .about-author h4 { color: #fff; }
body.dark .about-author p { color: rgba(255,255,255,0.7); }
body.dark .about-author a { color: var(--color-accent); }
body.dark .post-meta { border-color: rgba(255,255,255,0.1); }

/* ── Print Styles ──────────────────────────── */
@media print {
  /* Reset sticky/fixed elements to static for print flow */
  .site-header, .disclaimer-bar, .dark-toggle-btn,
  .print-btn-bottom, .share-bar, .toast, .copy-modal,
  .pwa-banner, .tab-nav-desktop { position: static !important; }

  .site-header,
  .disclaimer-bar,
  .dark-toggle-btn {
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: none !important;
  }

  .site-footer,
  .tab-nav-desktop,
  .tab-nav-mobile,
  .print-btn-top,
  .print-btn-bottom,
  .privacy-badge,
  .faq-section,
  .site-nav,
  .btn-danger-text,
  .log-item-actions,
  .spinner,
  .share-section,
  .share-bar,
  .bookmark-toast,
  .pwa-banner,
  .tooltip-trigger,
  .add-debt-btn,
  .info-banner,
  .value-props,
  .trust-stats,
  .next-steps,
  .subscribe-box,
  .about-author,
  .post-meta,
  #input-validation-banner {
    display: none !important;
  }

  .tab-content:not(.active) { display: none !important; }
  .tab-content.active { display: block !important; }

  body, html {
    background: #fff;
    color: #000;
    font-size: 11pt;
    margin: 0;
    padding: 0;
  }
  .main-content { padding: 0; margin: 0; }
  .container { max-width: 100%; padding: 0; }

  .page-hero { padding: 8px 0 4px; }
  .page-hero h1 { font-size: 18pt; margin-bottom: 4px; }
  .page-hero p { font-size: 10pt; color: #333; }

  .tab-inner { border: none; box-shadow: none; padding: 0; margin-top: 0; }

  .results-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .result-card { border: 1px solid #ccc; box-shadow: none; }
  .compare-table-wrapper { overflow-x: visible; }

  .chart-container canvas { max-height: 300px; }
  .calc-form { grid-template-columns: repeat(2, 1fr); }
  .warning-banner, .danger-banner { border: 1px solid #ccc; background: #fff; }

  a { color: #000; text-decoration: underline; }

  @page { margin: 0; }
  body { padding: 12mm; }
}

/* ============================================================
   Three-row navigation (injected by js/common.js)
   ============================================================ */
/* avoid disclaimer/header sticky overlap */
.disclaimer-bar { position: static; }

.site-header {
  background: var(--color-primary);
  border-bottom: none;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header.has-disclaimer { top: 0; }

.nav-row { width: 100%; }
.nav-row-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
}

/* Row 1 — brand bar (navy) */
.nav-row-1 { background: var(--color-primary); }
.nav-row-1 .nav-row-inner { justify-content: space-between; min-height: 54px; gap: 12px; }
.nav-row-1-right { display: flex; align-items: center; gap: 12px; }
.trust-pill { color: rgba(255,255,255,0.85); font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background-color: var(--color-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.21 15.89A10 10 0 1 1 8 2.83'/%3E%3Cpath d='M22 12A10 10 0 0 0 12 2v10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 17px;
  display: inline-block; flex: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}

/* Row 2 — calculators (emerald) */
.nav-row-2 { background: var(--color-accent); }
.nav-row-2 .nav-row-inner { padding-top: 6px; padding-bottom: 6px; }
.nav-row-3 .nav-row-inner { justify-content: center; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }

/* Row 3 — site links (light) */
.nav-row-3 { background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }

.nav-row-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav-row-3 .nav-row-nav { justify-content: center; }
.nav-row-nav a { display: inline-flex; align-items: center; gap: 6px; }
.nav-row-nav .nav-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; line-height: 0; opacity: 0.92; }
.nav-row-nav .nav-icon svg { display: block; }

.nav-row-2 .nav-row-nav a {
  color: #fff; text-decoration: none; font-size: 0.78rem; font-weight: 500;
  padding: 5px 9px; border-radius: 5px; transition: background .15s; white-space: nowrap;
}
.nav-row-2 .nav-row-nav a:hover { background: rgba(255,255,255,0.18); color: #fff; text-decoration: none; }
.nav-row-2 .nav-row-nav a.nav-active { background: rgba(255,255,255,0.30); color: #fff; }

.nav-row-3 .nav-row-nav a {
  color: #334155; text-decoration: none; font-size: 0.83rem; font-weight: 500;
  padding: 5px 11px; border-radius: 6px; transition: background .15s;
}
.nav-row-3 .nav-row-nav a:hover { background: #e2e8f0; color: #0B1F3B; text-decoration: none; }
.nav-row-3 .nav-row-nav a.nav-active { background: #fff; border: 1px solid #cbd5e1; color: #0B1F3B; }

/* Dark toggle inside secondary row (after Privacy) */
.nav-dark-toggle {
  margin-left: 6px; padding: 5px 11px; border-radius: 6px;
  background: #0B1F3B; color: #fff; border: 1px solid #1e3a5f; cursor: pointer;
  font-size: 0.83rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.nav-dark-toggle:hover { background: #143056; }
body.dark .nav-dark-toggle { background: #1e293b; border-color: #334155; color: #e2e8f0; }
/* Icon swap (later in file → overrides .dark-toggle-btn defaults) */
.nav-dark-toggle .dark-icon-sun { display: none; }
.nav-dark-toggle .dark-icon-moon { display: inline; }
body.dark .nav-dark-toggle .dark-icon-sun { display: inline; }
body.dark .nav-dark-toggle .dark-icon-moon { display: none; }

/* Burger (mobile) */
.nav-burger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { width: 22px; height: 2px; background: #fff; border-radius: 2px; display: block; }

/* Footer */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,0.85); margin-top: 44px; padding: 38px 0 0; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; display: flex; gap: 32px; flex-wrap: wrap; box-sizing: border-box; }
.footer-brand { flex: 0 0 240px; min-width: 0; }
.footer-logo { color: #fff; font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.footer-tag { font-size: 0.82rem; line-height: 1.55; margin: 10px 0 0; color: rgba(255,255,255,0.7); max-width: 240px; }
.footer-cols { display: flex; gap: 28px; flex: 1 1 auto; }
.footer-col { flex: 1 1 0; min-width: 120px; }
.footer-col h4 { color: #fff; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.85rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 28px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.78rem; color: rgba(255,255,255,0.55); max-width: var(--max-width); margin-left: auto; margin-right: auto; box-sizing: border-box; }
.footer-disclaimer { font-style: italic; }

@media (max-width: 860px) {
  .nav-burger { display: flex; }
  .trust-pill { display: none; }
  .nav-row-2, .nav-row-3 { display: none; }
  body.nav-open .nav-row-2, body.nav-open .nav-row-3 { display: block; }
  .nav-row-2 .nav-row-nav, .nav-row-3 .nav-row-nav { flex-direction: column; align-items: stretch; }
  .nav-row-2 .nav-row-nav a, .nav-row-3 .nav-row-nav a { padding: 11px 12px; border-radius: 0; }
  .nav-row-2 .nav-row-nav a.nav-active, .nav-row-3 .nav-row-nav a.nav-active { border-left: 3px solid #fff; }
}

@media (max-width: 680px) {
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-brand { flex: auto; max-width: none; }
  .footer-tag { max-width: none; }
  .footer-cols { flex-direction: column; gap: 20px; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ============================================================
   Hub / Landing page
   ============================================================ */
.hero { text-align: center; padding: 40px 0 18px; }
.hero h1 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 12px; color: var(--color-primary); }
.hero .lede { font-size: 1.05rem; line-height: 1.6; color: var(--color-text-secondary); max-width: 720px; margin: 0 auto 10px; }
.hero .hero-cta { margin-top: 18px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.section-head { text-align: center; margin: 38px 0 18px; }
.section-head h2 { font-size: 1.5rem; margin: 0 0 6px; color: var(--color-primary); }
.section-head p { margin: 0; color: var(--color-text-muted); font-size: 0.92rem; }

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 22px 0 8px;
}
.calc-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px; padding: 18px; text-decoration: none;
  color: inherit; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.calc-card:hover { box-shadow: 0 6px 22px rgba(11,31,59,0.10); transform: translateY(-2px); border-color: var(--color-accent, #10b981); text-decoration: none; }
.calc-card .cc-icon { font-size: 1.6rem; }
.calc-card h3 { margin: 10px 0 6px; font-size: 1.06rem; color: var(--color-primary); }
.calc-card p { margin: 0 0 14px; font-size: 0.88rem; line-height: 1.5; color: var(--color-text-secondary); flex: 1; }
.calc-card .cc-link { font-size: 0.85rem; font-weight: 600; color: var(--color-accent, #10b981); }
.calc-card.feature { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 20px; background: linear-gradient(120deg, #ecfdf5, #fff); }
.calc-card.feature h3 { font-size: 1.2rem; }
.calc-card.feature .cc-text { flex: 1; }

.hub-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0; }
.hub-promo { background: #f8fafc; border: 1px solid var(--color-border, #e2e8f0); border-radius: 12px; padding: 20px; }
.hub-promo h3 { margin: 0 0 8px; color: var(--color-primary); }
.hub-promo p { margin: 0 0 14px; font-size: 0.9rem; color: var(--color-text-secondary); }

@media (max-width: 700px) {
  .hub-grid-2 { grid-template-columns: 1fr; }
  .calc-card.feature { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Result cards (net worth + state relocation calc)
   ============================================================ */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.result-card { background: #fff; border: 1px solid var(--color-border, #e2e8f0); border-radius: 10px; padding: 12px; }
.result-card.highlight { border-color: var(--color-accent, #10b981); }

/* ============================================================
   State pages
   ============================================================ */
.state-section { margin: 28px 0; }
.state-section h2 { font-size: 1.3rem; color: var(--color-primary); margin: 0 0 10px; }
.tax-fact { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0; }
.tax-fact .tf { background: #f8fafc; border: 1px solid var(--color-border, #e2e8f0); border-radius: 10px; padding: 14px 16px; min-width: 165px; }
.tax-fact .tf .tf-label { font-size: 0.76rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.tax-fact .tf .tf-value { font-size: 1.25rem; font-weight: 800; color: var(--color-primary); margin-top: 4px; line-height: 1.2; }
.source-note { font-size: 0.82rem; color: var(--color-text-secondary); margin-top: 10px; }
.source-note a { color: var(--color-accent, #10b981); }

.relocation-calc { background: #f8fafc; border: 1px solid var(--color-border, #e2e8f0); border-radius: 12px; padding: 20px; margin: 22px 0; }
.relocation-calc h2 { margin-top: 0; }
.state-calc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.state-calc-form .form-group { margin-bottom: 0; }
.rpp-presets { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 8px; }
.rpp-presets code { background: #eef2f7; padding: 1px 6px; border-radius: 4px; }

.state-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 18px 0; }
.state-index-grid a { display: block; padding: 12px 14px; background: #fff; border: 1px solid var(--color-border, #e2e8f0); border-radius: 8px; color: var(--color-primary); text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: border-color .15s, box-shadow .15s; }
.state-index-grid a:hover { border-color: var(--color-accent, #10b981); box-shadow: 0 3px 12px rgba(11,31,59,0.08); text-decoration: none; }
.state-index-grid a .si-tax { display: block; font-size: 0.72rem; font-weight: 500; color: var(--color-text-muted); margin-top: 3px; }

/* ── Long-Form Article Body (calculator pages) ─────────────── */
.article-body {
  max-width: 100%;
  margin: 22px 0 8px;
}
.article-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-accent, #10b981);
  color: var(--color-text, #0B1F3B);
}
.article-body h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--color-text, #0B1F3B);
}
.article-body p {
  margin-bottom: 15px;
  line-height: 1.78;
  color: var(--color-text-secondary, #475569);
  font-size: 1rem;
}
.article-body ul, .article-body ol {
  margin: 0 0 16px 22px;
  color: var(--color-text-secondary, #475569);
  line-height: 1.75;
}
.article-body li { margin-bottom: 8px; }
.article-body a.inline-link {
  color: var(--color-primary, #0B1F3B);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-accent, #10b981);
  text-underline-offset: 2px;
}
.article-body a.inline-link:hover { color: var(--color-accent, #10b981); }
.article-body strong { color: var(--color-text, #0B1F3B); }
.article-body .example-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 0.92rem;
}
.article-body .example-table th, .article-body .example-table td {
  border: 1px solid var(--color-border, #e2e8f0);
  padding: 9px 12px;
  text-align: left;
}
.article-body .example-table th { background: var(--color-bg-alt, #f1f5f9); font-weight: 700; }
.article-body .example-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.article-body blockquote {
  border-left: 4px solid var(--color-accent, #10b981);
  background: var(--color-bg-alt, #f1f5f9);
  margin: 16px 0;
  padding: 12px 18px;
  border-radius: 0 8px 8px 0;
  color: var(--color-text-secondary, #475569);
  font-style: italic;
}
.section-divider {
  margin: 30px 0 10px;
  border: 0;
  border-top: 1px solid var(--color-border, #e2e8f0);
}

/* ── E-E-A-T Byline ──────────────────────────── */
.eeat-byline {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-bg-alt, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-left: 4px solid var(--color-accent, #10b981);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 30px 0;
  font-size: 0.88rem;
  color: var(--color-text-secondary, #475569);
}
.eeat-byline .eeat-avatar {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-accent, #10b981);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.eeat-byline .eeat-meta strong { color: var(--color-text, #0B1F3B); }
.eeat-byline .eeat-meta a { color: var(--color-primary, #0B1F3B); font-weight: 600; }

/* ── Related / Cross-Link Widget ─────────────── */
.related-widget {
  margin: 34px 0 10px;
  padding: 24px;
  background: linear-gradient(180deg, var(--color-bg-card, #fff), var(--color-bg-alt, #f8fafc));
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
}
.related-widget h2 {
  font-size: 1.25rem; font-weight: 800; margin: 0 0 6px;
  color: var(--color-text, #0B1F3B);
}
.related-widget > p.sub { margin: 0 0 18px; font-size: 0.9rem; color: var(--color-text-muted); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.related-card {
  display: block;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text, #0B1F3B);
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.related-card:hover {
  border-color: var(--color-accent, #10b981);
  box-shadow: 0 4px 16px rgba(11,31,59,0.10);
  transform: translateY(-2px);
  text-decoration: none;
}
.related-card .rc-icon { font-size: 1.4rem; }
.related-card .rc-title { display: block; font-weight: 700; margin: 6px 0 4px; font-size: 0.98rem; }
.related-card .rc-desc { display: block; font-size: 0.82rem; color: var(--color-text-muted); line-height: 1.5; }
.related-card .rc-tag {
  display: inline-block; margin-top: 8px; font-size: 0.7rem; font-weight: 600;
  color: var(--color-accent, #10b981); background: var(--color-accent-light, #ecfdf5);
  padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .03em;
}

/* ── Breadcrumb path on article pages ──────── */
.breadcrumb a { color: var(--color-primary, #0B1F3B); }

/* EXT-LINKS-BLOCKS */
.authority-resources,
.related-calc-block {
  max-width: var(--max-width);
  margin: 34px auto;
  padding: 20px 22px;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  background: #f8fafc;
}
.authority-resources h2,
.related-calc-block h2 {
  font-size: 1.05rem;
  margin: 0 0 10px;
  color: #0B1F3B;
}
.authority-resources ul,
.related-calc-block ul {
  margin: 0;
  padding-left: 18px;
}
.authority-resources li,
.related-calc-block li {
  margin: 7px 0;
  font-size: 0.92rem;
  line-height: 1.55;
}
.authority-resources a,
.related-calc-block a {
  color: #059669;
  font-weight: 600;
  text-decoration: none;
}
.authority-resources a:hover,
.related-calc-block a:hover {
  text-decoration: underline;
}

