/* ============================================
   SolarSavingsHome.com - Global Stylesheet
   Complete unified stylesheet for all pages
   ============================================ */

/* ============================================
   CSS VARIABLES - COMPLETE SET
   Includes aliases for backward compatibility
   ============================================ */
:root {
  /* Primary palette */
  --navy: #0c2461;
  --primary: #0c2461;
  --primary-dark: #071a45;
  --primary-light: #2980b9;
  --blue-light: #dceefb;
  --blue-accent: #2563eb;
  
  /* Accent colors */
  --amber: #f39c12;
  --amber-dark: #e67e22;
  --amber-light: rgba(243, 156, 18, 0.08);
  --accent: #f39c12;
  --accent-dark: #e67e22;

  /* Success / Danger */
  --success: #27ae60;
  --green: #27ae60;
  --green-light: rgba(39, 174, 96, 0.08);
  --danger: #e74c3c;
  --red: #e74c3c;

  /* Neutral grays */
  --dark: #212529;
  --text: #343a40;
  --text2: #5a6577;
  --text3: #8892a4;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;

  /* Backgrounds */
  --white: #ffffff;
  --bg: #ffffff;
  --bg2: #f4f6f9;
  --bg3: #eef2f7;
  --surface: #ffffff;
  --light: #f4f6f9;
  --muted: #8892a4;
  --teal: #0d9488;

  /* Borders */
  --border: #dee2e6;
  --border2: #ced4da;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);

  /* Border radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Transitions */
  --transition: all 0.25s ease;
}

/* Dark Mode */
[data-theme="dark"] {
  --navy: #2980b9;
  --primary: #1a5276;
  --primary-dark: #0e2f44;
  --primary-light: #3498db;
  --blue-light: #1a2a44;
  --blue-accent: #3498db;
  --dark: #e0e0e0;
  --text: #d0d0d0;
  --text2: #a0a0b0;
  --text3: #808098;
  --white: #12121e;
  --bg: #16162a;
  --bg2: #0e0e20;
  --bg3: #1a1a35;
  --surface: #1c1c30;
  --light: #1c1c30;
  --muted: #808098;
  --teal: #14b8a6;
  --border: #2a2a48;
  --border2: #333360;
  --gray-100: #18182e;
  --gray-200: #202038;
  --gray-300: #2a2a50;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

/* Dark Mode — hardcoded color overrides */
[data-theme="dark"] .nav-row-2 { background: #0a1628; }
[data-theme="dark"] .nav-row-1 { background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 100%); }
[data-theme="dark"] .site-footer { background: #0a0f1e; }
[data-theme="dark"] .dark-toggle-nav { background: #1a1a35; border-color: #3a3a5a; color: #b0b0c0; }
[data-theme="dark"] .dark-toggle-nav:hover { background: #252545; border-color: #3498db; }

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, 'Inter', sans-serif;
  line-height: 1.7; color: var(--text); background: var(--bg); transition: var(--transition);
}
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--navy); text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--primary-light), var(--amber));
  z-index: 9999; pointer-events: none; transition: none;
}

/* SCROLL TO TOP BUTTON */
#scroll-top {
  display: none; position: fixed; bottom: 28px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 1.25rem;
  align-items: center; justify-content: center; cursor: pointer;
  border: none; box-shadow: var(--shadow-md); z-index: 999;
}
#scroll-top.show { display: flex; }
#scroll-top:hover { background: var(--primary-light); transform: translateY(-2px); }

/* ============================================
   3-ROW NAVIGATION
   Row 1: Logo (left)
   Row 2: Home + Calculators (centered)
   Row 3: Blog/FAQ/About/Privacy + Dark mode
   ============================================ */
.nav-wrapper {
  position: sticky; top: 0; z-index: 1000;
}

/* Shared inner container — centers all rows with same width */
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 28px !important;
  padding-right: 28px !important;
}

/* Row 1: Logo bar — LEFT-ALIGNED inside .nav-inner, same indent as row-2 */
.nav-row-1 {
  background: linear-gradient(135deg, var(--navy) 0%, #154360 100%);
  min-height: 48px;
}
.nav-row-1 > .nav-inner {
  display: flex; align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
}
.nav-logo-row {
  font-size: 1.15rem; font-weight: 800; color: #fff !important;
  text-decoration: none !important;
  line-height: 1;
}
.logo-svg-nav { width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; }
.logo-icon { margin-right: 8px; display: inline-flex; align-items: center; }


/* Row 2: Calculators — CENTERED, fills space nicely */
.nav-row-2 {
  background: #0a1d42;
  position: relative;
}
.nav-row-2 > .nav-inner {
  display: flex; align-items: center; justify-content: center;
  padding-top: 8px;
  padding-bottom: 8px;
}
.nav-links-center {
  display: flex; align-items: center; justify-content: center;
  gap: 2px; flex-wrap: wrap;
  list-style: none; margin: 0; padding: 0;
}
.nav-row-2 .nav-links-center a {
  color: rgba(255,255,255,0.88); padding: 6px 12px;
  border-radius: var(--radius-sm); font-size: 0.84rem; font-weight: 600;
  white-space: nowrap; transition: var(--transition); text-decoration: none !important;
}
.nav-row-2 .nav-links-center a:hover,
.nav-row-2 .nav-links-center a.active {
  background: rgba(255,255,255,0.15); color: #fff !important;
}

/* Row 3: Blog/FAQ/About — links centered inside nav-inner, Dark absolute right */
.nav-row-3 {
  display: flex; align-items: center; justify-content: center;
  padding: 7px 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm); min-height: 42px;
  position: relative;
}
.nav-row-3 .nav-links-center {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; flex-wrap: wrap;
  list-style: none; margin: 0; padding: 0;
}
.nav-row-3 .nav-links-center a {
  color: var(--text2); padding: 5px 14px; border-radius: var(--radius-sm);
  font-size: 0.83rem; font-weight: 500; white-space: nowrap;
  transition: var(--transition); text-decoration: none !important;
}
.nav-row-3 .nav-links-center a:hover {
  background: var(--bg2); color: var(--navy) !important;
}
.dark-toggle-nav {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text2);
  padding: 4px 14px; border-radius: 20px; cursor: pointer; pointer-events: auto;
  font-size: 0.8rem; font-weight: 600; transition: var(--transition); white-space: nowrap;
  flex-shrink: 0;
}
.dark-toggle-nav:hover { background: var(--bg3); border-color: var(--navy); color: var(--navy); }

/* Nav Active Highlight — Row 3 (Blog/FAQ/About) — MUST be very visible */
.nav-row-3 .nav-links-center a.active {
  background: #2563eb !important; color: #fff !important; font-weight: 700;
  border-bottom: 3px solid #1d4ed8;
}
[data-theme="dark"] .nav-row-3 .nav-links-center a.active {
  background: #2563eb !important; color: #fff !important;
  border-bottom: 3px solid #60a5fa;
}
.nav-mobile-toggle {
  display: none; background: none; border: none; color: #fff;
  font-size: 1.3rem; cursor: pointer; padding: 4px 8px;
}

@media (max-width: 960px) {
  .nav-mobile-toggle { display: block; }
  .nav-row-2 .nav-links-center,
  .nav-row-3 .nav-links-center { display: none; }
  .nav-wrapper.open .nav-row-2 .nav-links-center,
  .nav-wrapper.open .nav-row-3 .nav-links-center {
    display: flex; flex-direction: column;
  }
}

/* ============================================
   HERO SECTION (Homepage)
   ============================================ */
.hero-home {
  padding: 70px 24px 55px; text-align: center;
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--bg) 95%);
}
.hero-home h1 {
  font-size: clamp(1.75rem, 4vw, 2.8rem); font-weight: 800;
  color: var(--navy); line-height: 1.15; margin-bottom: 18px;
}
.hero-home h1 em { font-style: normal; color: var(--amber); }
.hero-sub {
  font-size: 1.08rem; color: var(--text2); max-width: 700px;
  margin: 0 auto 26px; line-height: 1.72;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px;
  border: none; border-radius: var(--radius-sm); font-size: 0.92rem;
  font-weight: 700; cursor: pointer; transition: var(--transition);
  text-decoration: none !important;
}
.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn-primary {
  background: var(--amber); color: #fff !important;
  box-shadow: 0 3px 12px rgba(243,156,18,0.3);
}
.btn-primary:hover { background: var(--amber-dark); transform: translateY(-2px); box-shadow: 0 5px 16px rgba(243,156,18,0.4); }
.btn-outline {
  background: transparent; color: var(--navy) !important; border: 2px solid var(--border2);
}
.btn-outline:hover { background: var(--navy); color: #fff !important; border-color: var(--navy); }

/* ============================================
   CALCULATOR CARDS GRID (Homepage)
   ============================================ */
.calc-cards-section { padding: 52px 24px; background: var(--bg); }
.calc-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px; max-width: 1200px; margin: 0 auto;
}
.calc-card-home {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: var(--transition); cursor: pointer; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.calc-card-home:hover {
  border-color: var(--navy); transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.calc-card-home .card-icon { font-size: 2.4rem; margin-bottom: 14px; display: block; }
.calc-card-home .card-title { font-size: 1.18rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.calc-card-home .card-desc { font-size: 0.89rem; color: var(--text3); line-height: 1.62; margin-bottom: 16px; }
.calc-card-home .card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.calc-card-home .card-tag {
  font-size: 0.73rem; font-weight: 600; padding: 3px 11px;
  border-radius: 14px; background: var(--bg3); color: var(--text2);
}
.calc-card-home .card-arrow {
  position: absolute; right: 20px; top: 28px; font-size: 1.4rem;
  color: var(--text3); transition: transform 0.2s;
}
.calc-card-home:hover .card-arrow { transform: translateX(5px); color: var(--navy); }

/* ============================================
   BLOG PREVIEW (Homepage)
   ============================================ */
.blog-preview { padding: 52px 24px; background: var(--bg2); }
.blog-preview-inner { max-width: 1200px; margin: 0 auto; }
.blog-grid-home {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px; margin-top: 28px;
}
.blog-card-home {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.blog-card-home:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-card-thumb {
  height: 150px; background: linear-gradient(135deg, var(--navy), var(--blue-accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem; color: rgba(255,255,255,0.78);
}
.blog-card-body { padding: 20px; }
.blog-card-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.33; }
.blog-card-excerpt { font-size: 0.86rem; color: var(--text3); line-height: 1.62; }

/* ============================================
   FEATURES SECTION (Homepage)
   ============================================ */
.features-section { padding: 52px 24px; background: var(--bg); }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px; max-width: 1200px; margin: 0 auto;
}
.feature-item { text-align: center; padding: 24px 16px; }
.feature-icon { font-size: 2.4rem; margin-bottom: 14px; }
.feature-title { font-size: 1.08rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.feature-desc { font-size: 0.89rem; color: var(--text3); line-height: 1.62; }

/* ============================================
   FAQ PREVIEW (Homepage)
   ============================================ */
.faq-preview { padding: 52px 24px; background: var(--bg2); }
.faq-preview-inner { max-width: 1200px; margin: 0 auto; }
.faq-item-home {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 10px; overflow: hidden; background: var(--surface);
}
.faq-q-home {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: transparent; border: none;
  font-size: 0.93rem; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left; transition: background 0.2s;
}
.faq-q-home:hover { background: var(--bg2); }
.faq-a-home {
  display: none; padding: 0 20px 16px; font-size: 0.89rem;
  color: var(--text2); line-height: 1.68;
}
.faq-a-home.visible { display: block; }

/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
  background: var(--navy); color: #94a3b8; padding: 52px 24px 36px;
  margin-top: 52px;
}

/* ============================================
   BREADCRUMB NAVIGATION
   ============================================ */
.breadcrumb {
  font-size: 0.88rem; color: var(--text2);
  line-height: 1.5; padding: 10px 20px;
  max-width: 1200px; margin: 0 auto;
}
.breadcrumb a {
  color: var(--accent-dark); text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

/* ============================================
   BLOG ARTICLE PAGES - WIDTH CONSTRAINT
   ============================================ */
/* Style B: Light card + left blue accent border */
.hero {
  max-width: 1200px; margin: 30px auto 0;
  padding: 36px 28px 32px; text-align: left;
  background: #f8fafc;
  border-radius: var(--radius);
  border-left: 5px solid #2563eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.hero h1 {
  font-size: clamp(1.65rem, 4vw, 2.6rem); font-weight: 800;
  color: #0f172a; line-height: 1.25; margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 0.92rem; color: #64748b; max-width: 760px; line-height: 1.5;
  margin: 0;
}
.article-body {
  max-width: 1200px; margin: 0 auto; padding: 0 20px 60px;
  overflow-x: hidden;
  font-size: 1.04rem; line-height: 1.76; color: var(--text);
}
.article-body p { margin-bottom: 18px; }

/* ============================================
   CALCULATOR PAGES - ARTICLE STYLES
   ============================================ */
/* Style B: Light card + left blue accent border (calculator pages) */
.page-hero {
  max-width: 1200px; margin: 30px auto 0;
  padding: 36px 28px 32px; text-align: left;
  background: #f8fafc;
  border-radius: var(--radius);
  border-left: 5px solid #2563eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.page-hero h1 {
  font-size: clamp(1.65rem, 4vw, 2.6rem); font-weight: 800;
  color: #0f172a; margin: 0 0 10px; line-height: 1.25;
  letter-spacing: -0.02em;
}
.page-hero .article-meta {
  font-size: 0.88rem; color: #64748b; margin: 0;
  display: flex; gap: 18px; flex-wrap: wrap;
}
.page-hero .article-meta span {
  display: inline-flex; align-items: center; gap: 5px;
}

.article-section {
  max-width: 1200px; margin: 0 auto; padding: 50px 20px 60px;
  background: var(--bg);
}
.article-section h1 {
  font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 800;
  color: var(--navy); margin-bottom: 16px; line-height: 1.25;
}
.article-meta {
  font-size: 0.84rem; color: var(--text3); margin-bottom: 24px;
  display: flex; gap: 16px; flex-wrap: wrap;
}
.article-body h2 { font-size: 1.38rem; font-weight: 700; color: var(--navy); margin: 34px 0 14px; }
.article-body h3 { font-size: 1.12rem; font-weight: 700; color: var(--navy); margin: 24px 0 10px; }
.article-body ul, .article-body ol { margin: 0 0 18px 22px; line-height: 1.76; }
.article-body li { margin-bottom: 8px; }
.article-body table {
  width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 0.93rem;
  border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm);
  table-layout: fixed;
}
.article-body th {
  background: var(--navy); color: #fff; padding: 11px 14px; text-align: left;
  font-weight: 600; word-wrap: break-word;
}
.article-body td { padding: 10px 14px; border-bottom: 1px solid var(--border); word-wrap: break-word; }
.article-body tr:nth-child(even) { background: var(--bg2); }

.info-box {
  background: var(--amber-light); border-left: 4px solid var(--amber);
  padding: 17px 21px; margin: 22px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.tip-box {
  background: var(--green-light); border-left: 4px solid var(--green);
  padding: 17px 21px; margin: 22px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.warning-box {
  background: #fef3cd; border-left: 4px solid var(--amber-dark);
  padding: 17px 21px; margin: 22px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ============================================
   CALCULATOR TOOL EMBEDDED IN PAGES
   ============================================ */
.calc-embed-section { padding: 42px 20px; background: var(--bg2); }
.calc-embed-inner { max-width: 1200px; margin: 0 auto; }
.calc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
.wizard-header { margin-bottom: 26px; }
.wizard-header h2 { font-size: 1.35rem; color: var(--navy); margin-bottom: 6px; }
.wizard-header p { color: var(--text3); font-size: 0.92rem; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text); font-size: 0.92rem; }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm); font-size: 1rem; background: var(--white);
  color: var(--text); transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(41,128,185,0.1); }
.range-slider { width: 100%; margin: 8px 0; height: 6px; border-radius: 3px; appearance: none; background: var(--gray-300); }
.range-slider::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--navy); cursor: pointer; }

.wizard-step { display: none; animation: fadeIn 0.35s ease; }
.wizard-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.results-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; margin-top: 24px;
  display: none;
}
.results-box.show, [style*="display:block"].results-box { display: block; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 16px; }
.result-item { text-align: center; padding: 16px 10px; background: var(--bg2); border-radius: var(--radius-sm); }
.result-value { font-size: 1.45rem; font-weight: 800; color: var(--navy); }
.result-label { font-size: 0.81rem; color: var(--text3); margin-top: 4px; }

/* ============================================
   FAQ SECTION — GLOBAL ACCORDION STYLES
   Complete FAQ accordion for ALL pages.
   ============================================ */
.faq-section {
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
}
.faq-section h2 {
  font-size: 1.45rem;
  color: #1e3a5f;
  margin-bottom: 18px;
  font-weight: 800;
}
.faq-item {
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: visible;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.faq-item:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #f5f8fc;
  padding: 15px 20px;
  font-weight: 600;
  color: #1e3a5f;
  cursor: pointer;
  user-select: none;
  text-align: left;
  border: none;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: background 0.2s ease;
  box-sizing: border-box;
}
.faq-q:hover {
  background: #e8f0fe;
}
.faq-q-icon {
  font-size: 0.75rem;
  color: #6b7280;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item.open .faq-q-icon {
  transform: rotate(180deg);
}
.faq-item.open .faq-q {
  background: #2563eb;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.faq-item.open .faq-q .faq-q-icon {
  color: rgba(255,255,255,0.8);
}
.faq-a {
  display: none;
  overflow: visible;
  opacity: 0;
  padding: 0 20px;
  background: #fff;
  transition: opacity 0.3s ease;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.75;
}
.faq-a p {
  margin-bottom: 8px;
}
.faq-a p:last-child {
  margin-bottom: 0;
}
.faq-item.open .faq-a {
  display: block;
  opacity: 1;
  padding: 16px 20px;
}

/* Dark mode FAQ overrides */
[data-theme="dark"] .faq-item {
  border-color: #2a3a5a;
  background: #16162a;
}
[data-theme="dark"] .faq-item:hover {
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52,152,219,0.12);
}
[data-theme="dark"] .faq-section h2 {
  color: #60a5fa;
}
[data-theme="dark"] .faq-q {
  background: #1a1a35;
  color: #c0d0e8;
}
[data-theme="dark"] .faq-q:hover {
  background: #222248;
}
[data-theme="dark"] .faq-item.open .faq-q {
  background: #2563eb;
  color: #fff;
}
[data-theme="dark"] .faq-a {
  background: #12122a;
  color: #9898b8;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .hero-home { padding: 44px 18px 36px; }
  .hero-home h1 { font-size: 1.65rem; }
  .calc-cards-grid { grid-template-columns: 1fr; }
  .blog-grid-home { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .article-section { padding: 40px 16px; }
  .calc-card { padding: 22px 18px; }
  .nav-row-1 { padding: 8px 16px; }
  .nav-row-2 { padding: 6px 12px; }
  .nav-row-3 { padding: 6px 14px; }
  .site-footer { padding: 36px 18px 28px; }
}

@media (max-width: 480px) {
  .hero-home { padding: 34px 14px 28px; }
  .hero-home h1 { font-size: 1.42rem; }
  .calc-card-home { padding: 22px 18px; }
  .results-grid { grid-template-columns: 1fr 1fr; }
}

/* ========== Data Sources & Methodology ========== */
.data-sources {
  max-width: 1200px;
  margin: 40px auto 20px;
  padding: 28px 32px;
  background: var(--bg2);
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.7;
}
.data-sources h3 {
  color: var(--accent-dark);
  margin-bottom: 10px;
  font-size: 1.05rem;
}
.data-sources > p:first-of-type {
  margin-bottom: 4px;
}
.data-sources ul {
  margin-top: 10px;
  padding-left: 20px;
}
.data-sources li {
  margin-bottom: 6px;
  font-size: 0.85rem;
  line-height: 1.6;
}
.data-sources li strong {
  color: var(--text);
}
.data-sources a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.data-sources a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}
.data-sources p:last-child {
  margin-top: 16px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text2);
}

@media (max-width: 600px) {
  .data-sources {
    padding: 20px 18px;
    margin-top: 36px;
  }
}

/* ============================================
   STATE PAGE CONTENT STYLES
   Missing classes used by state calculator pages
   ============================================ */

.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ============================================
   STATE CALCULATOR TOOL (CT, NH, NM, HI)
   ============================================ */
.calculator-tool {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background: var(--bg);
}

.calculator-tool .calc-inner > h2 {
  font-size: 1.5rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: 18px;
}

.calculator-tool .calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1200px) {
  .calculator-tool .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calculator-tool .input-group {
  margin-bottom: 18px;
}

.calculator-tool .input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
}

.calculator-tool .input-group input,
.calculator-tool .input-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
}

.calculator-tool .input-group input:focus,
.calculator-tool .input-group select:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.calculator-tool .cta-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
}

.calculator-tool .cta-btn:hover {
  background: var(--accent-dark);
}

.calculator-tool .calc-results {
  background: var(--bg2);
  border-radius: 12px;
  padding: 24px;
  min-height: 180px;
}

/* ============================================
   STATE ARTICLE (CT, NH, NM, HI)
   ============================================ */
.calc-article {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 60px;
  background: var(--bg);
}

.calc-article .article-inner {
  max-width: 100%;
}

.calc-article h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin: 34px 0 14px;
}

.calc-article h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin: 24px 0 10px;
}

.calc-article p {
  margin-bottom: 18px;
  line-height: 1.76;
}

.calc-article ul,
.calc-article ol {
  margin: 0 0 18px 22px;
  line-height: 1.76;
}

.calc-article li {
  margin-bottom: 8px;
}

.calc-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.92rem;
}

.calc-article th {
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

.calc-article td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.calc-article tr:nth-child(even) {
  background: var(--bg2);
}

.data-box {
  background: var(--bg2);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
}
.data-box h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 1rem;
}
.data-box p {
  margin-bottom: 6px;
}

.rate-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}
.rate-table th,
.data-table th {
  background: var(--navy);
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
}
.rate-table td,
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.rate-table tr:nth-child(even),
.data-table tr:nth-child(even) {
  background: var(--bg2);
}

.highlight-box {
  background: linear-gradient(135deg, var(--navy), #1a3a7a);
  color: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  margin: 24px 0;
}
.highlight-box h2 {
  margin-top: 0;
  color: #fff;
}
.highlight-box p {
  margin-bottom: 8px;
}
.highlight-box strong {
  color: var(--amber);
}

@media (max-width: 600px) {
  .content-section {
    padding: 24px 16px;
  }
  .rate-table, .data-table {
    font-size: 0.82rem;
  }
  .rate-table th, .rate-table td,
  .data-table th, .data-table td {
    padding: 8px 10px;
  }
}

/* ============================================
   STATE PAGE UNIVERSAL COMPONENTS
   Shared layout classes used across state pages
   ============================================ */

/* Generic container used by some state pages */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* State badge / back link */
.state-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.back-link {
  display: inline-block;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  margin: 16px 0;
}

/* Two-column layout wrapper: Georgia / Colorado / Maryland / Virginia */
.calc-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* When calc-wrap directly holds article + sidebar columns (Georgia style) */
.calc-wrap:not(:has(> .calc-grid)) {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* When calc-wrap contains a calc-grid (Michigan style), keep it as a container */
.calc-wrap:has(> .calc-grid) {
  display: block;
}

@media (max-width: 960px) {
  .calc-wrap:not(:has(> .calc-grid)) {
    grid-template-columns: 1fr;
  }
}

/* Card component */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 18px;
}

.card h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin: 24px 0 10px;
}

.card > label,
.calc-wrap label,
.calculator-section label,
.calc-form-section label,
.calc-card label {
  display: block;
  font-weight: 600;
  margin: 18px 0 6px;
  color: var(--navy);
  font-size: 0.95rem;
}

.card > input,
.card > select,
.card > textarea,
.calc-wrap input,
.calc-wrap select,
.calc-wrap textarea,
.calculator-section input,
.calculator-section select,
.calculator-section textarea,
.calc-form-section input,
.calc-form-section select,
.calc-form-section textarea,
.calc-card input,
.calc-card select,
.calc-card textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}

.card > input:focus,
.card > select:focus,
.calc-wrap input:focus,
.calc-wrap select:focus,
.calculator-section input:focus,
.calculator-section select:focus,
.calc-form-section input:focus,
.calc-form-section select:focus,
.calc-card input:focus,
.calc-card select:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Row for two-column inputs inside cards */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; }
}

/* Input row and group (Arizona / California / Florida / New York calc-card style) */
.input-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.input-group input,
.input-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}
.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Calculate buttons */
.btn-calc {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--teal);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 22px;
  transition: background 0.2s;
  box-sizing: border-box;
}

.btn-calc:hover {
  background: #0f766e;
}

[data-theme="dark"] .btn-calc:hover {
  background: #0d9488;
}

/* Results container */
.results {
  display: none;
  margin-top: 24px;
  padding: 20px;
  background: var(--light);
  border-radius: 12px;
}

.results.show {
  display: block;
}

/* Stat row (sidebar quick facts) */
.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.stat:last-child {
  border-bottom: none;
}

.stat span {
  color: var(--text2);
  font-weight: 500;
  padding-right: 12px;
}

.stat strong {
  color: var(--navy);
  text-align: right;
  font-weight: 700;
}

/* Calc grid (Michigan/Minnesota/Oregon/South Carolina/Wisconsin style) */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 960px) {
  .calc-grid { grid-template-columns: 1fr; }
}

.calc-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.calc-box h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 18px;
}

/* Result box */
.result-box {
  display: none;
  margin-top: 24px;
  padding: 20px;
  background: var(--bg2);
  border-radius: 12px;
}

.result-box h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0 0 14px;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.stat-card {
  background: var(--bg2);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.stat-card .num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}

.stat-card .label {
  font-size: 0.82rem;
  color: var(--text3);
  line-height: 1.4;
}

/* Calc cards section (embedded calculators in many state pages) */
.calc-cards-section {
  padding: 52px 24px;
  background: var(--bg);
}

/* Calc form section (Illinois/Massachusetts style) */
.calc-form-section {
  padding: 52px 24px;
  background: var(--bg2);
}

.calc-form {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
}

.form-row input,
.form-row select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}

.form-row small {
  display: block;
  font-size: 0.82rem;
  color: var(--text3);
  margin-top: 4px;
}

/* Calc results (Illinois/Massachusetts style) */
.calc-results {
  max-width: 1200px;
  margin: 28px auto 0;
  background: var(--bg2);
  border-radius: 12px;
  padding: 24px;
  display: none;
}

.calc-results h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.result-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.result-card .result-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text3);
  margin-bottom: 6px;
}

.result-card .result-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
}

/* Result grid and items (Arizona/California/Florida/New York style) */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.result-item {
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.result-item .result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
}

.result-item .result-label {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 4px;
}

/* Result row (used in many state calculators for simple text results) */
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.result-row:last-child {
  border-bottom: none;
}
.result-row .result-label {
  color: var(--text2);
  font-weight: 500;
}
.result-row .result-value {
  color: var(--teal);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Legacy / miscellaneous helper classes used in state pages */
.content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.cta-box {
  background: var(--light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin: 24px 0;
}
.highlight {
  background: var(--light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--navy);
}
.warning {
  background: #fef3cd;
  border-left: 4px solid var(--amber-dark);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.success {
  background: #d1fae5;
  border-left: 4px solid #059669;
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.subtitle {
  font-size: 1.05rem;
  color: var(--text2);
  margin-top: -8px;
  margin-bottom: 16px;
}

/* Calculator section (Indiana style) */
.calculator-section {
  padding: 52px 24px;
  background: var(--bg);
}

.calculator-section .calc-card {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

.calculator-section .calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Article content section (Indiana style) */
.article-content {
  padding: 52px 24px;
  background: var(--bg2);
}

.article-content .content {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

/* Generic content wrapper */
.content {
  max-width: 1200px;
  margin: 0 auto;
}

/* FAQ class used in some state pages */
.faq {
  margin: 20px 0;
}

/* Ad slot placeholders */
.adslot {
  min-height: 90px;
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 0.85rem;
  margin: 16px 0;
}

/* ===== Floating Action Buttons (FAB) ===== */
.fab-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 9998;
}
.fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.fab:hover {
  background: var(--accent);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 28px rgba(243,156,18,0.45);
}
.fab:active { transform: translateY(0) scale(.96); }
.fab:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 3px; }

/* Back-to-top revealed after scrolling */
.fab-top {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease, box-shadow .2s ease;
}
.fab-container.scrolled .fab-top {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Toast */
.fab-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  max-width: min(92vw, 520px);
  text-align: center;
}
.fab-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media print {
  .fab-container, .fab-toast { display: none !important; }
}
