/* ============================================
   GreenEnergyCalc — Design System
   Font: DM Sans (body) + Fraunces (display)
   Palette: Deep forest green + warm amber accent
   ============================================ */

/* Fonts loaded via <link> in <head> for performance — see baseof.html */

/* ---- Tokens ---- */
:root {
  --green-950: #0a1a0f;
  --green-900: #0f2918;
  --green-800: #1a3d25;
  --green-700: #215a30;
  --green-600: #2d7a42;
  --green-500: #3a9952;
  --green-400: #52b96e;
  --green-300: #7dd494;
  --green-200: #b4e8c1;
  --green-100: #dff5e5;
  --green-50:  #f2faf4;

  --amber-500: #e8930a;
  --amber-400: #f5a623;
  --amber-300: #fbbf47;
  --amber-100: #fef3d0;

  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif; /* Fallback prevents LCP delay */
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
  --shadow-green: 0 4px 20px rgba(42,122,66,.18);

  --transition: 180ms cubic-bezier(.4,0,.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-600); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-500); }

/* ---- Layout ---- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  /* Explicit height prevents CLS from layout recalculation */
  height: 64px;
  contain: layout;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 24px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  color: var(--green-800); text-decoration: none; flex-shrink: 0;
  white-space: nowrap;
}
.site-logo svg { width: 32px; height: 32px; flex-shrink: 0; }
.site-logo span em { font-style: normal; color: var(--green-500); font-weight: 400; }
@media (max-width: 480px) {
  .site-logo { font-size: 15px; gap: 8px; }
  .site-logo svg { width: 28px; height: 28px; }
}

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500; color: var(--slate-700);
  transition: all var(--transition);
}
.site-nav a:hover { background: var(--green-50); color: var(--green-700); }
.site-nav a.active { background: var(--green-100); color: var(--green-700); }

.header-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-full);
  background: var(--green-600); color: var(--white);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-green);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  /* Explicit dimensions prevent CLS */
  height: 36px;
  white-space: nowrap;
}
.header-cta:hover { background: var(--green-500); color: var(--white); transform: translateY(-1px); }

.hamburger { display: none; border: none; background: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--slate-700); margin: 4px 0; border-radius: 2px; transition: all var(--transition); }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(160deg, var(--green-950) 0%, var(--green-800) 55%, var(--green-700) 100%);
  color: var(--white); overflow: hidden; position: relative;
  padding: 80px 0 72px;
  min-height: 480px; /* Prevents reflow when web fonts load */
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; text-align: center; max-width: 760px; margin: 0 auto; padding: 0 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: var(--green-200); font-size: 13px; font-weight: 500;
  padding: 5px 14px; border-radius: var(--radius-full);
  margin-bottom: 24px; backdrop-filter: blur(4px);
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(36px, 6vw, 58px);
  font-weight: 600; line-height: 1.1; letter-spacing: -.02em;
  color: var(--white); margin-bottom: 20px;
}
.hero h1 em { font-style: italic; color: var(--amber-300); }
.hero p {
  font-size: clamp(16px, 2vw, 19px); color: var(--green-200);
  max-width: 560px; margin: 0 auto 36px; line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-full);
  background: var(--amber-400); color: var(--slate-900);
  font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 24px rgba(232,147,10,.35);
  transition: all var(--transition);
}
.btn-primary:hover { background: var(--amber-300); color: var(--slate-900); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(232,147,10,.4); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.1); color: var(--white);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 15px; font-weight: 600;
  transition: all var(--transition);
}
.btn-secondary:hover { background: rgba(255,255,255,.18); color: var(--white); }

.hero-stats {
  display: flex; justify-content: center; gap: 40px; margin-top: 52px;
  padding-top: 40px; border-top: 1px solid rgba(255,255,255,.12);
  flex-wrap: wrap;
}
.hero-stat-val { font-family: var(--font-display); font-size: 32px; font-weight: 600; color: var(--amber-300); line-height: 1; }
.hero-stat-label { font-size: 13px; color: var(--green-300); margin-top: 4px; }

/* ---- Section ---- */
.section { padding: 72px 0; content-visibility: auto; contain-intrinsic-size: 0 600px; }
.section--gray { background: var(--slate-50); }
.section--green { background: var(--green-50); }
.section-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--green-600);
  margin-bottom: 10px; display: block;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(26px, 4vw, 38px);
  font-weight: 600; color: var(--slate-900); line-height: 1.2;
  letter-spacing: -.02em; margin-bottom: 14px;
}
.section-sub { font-size: 17px; color: var(--slate-500); max-width: 560px; line-height: 1.6; }

/* ---- Calculator Cards ---- */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-top: 40px;
}
.calc-card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 24px;
  transition: all var(--transition); cursor: pointer;
  text-decoration: none; display: block; color: inherit;
  position: relative; overflow: hidden;
}
.calc-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green-500), var(--green-400));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.calc-card:hover { border-color: var(--green-300); box-shadow: var(--shadow-md); transform: translateY(-3px); color: inherit; }
.calc-card:hover::before { transform: scaleX(1); }
.calc-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--green-100); display: flex; align-items: center;
  justify-content: center; margin-bottom: 14px; font-size: 22px;
}
.calc-card h3 { font-size: 17px; font-weight: 600; color: var(--slate-900); margin-bottom: 6px; line-height: 1.3; }
.calc-card p { font-size: 13px; color: var(--slate-500); line-height: 1.55; margin-bottom: 14px; }
.calc-card-meta { display: flex; align-items: center; justify-content: space-between; }
.calc-card-tag {
  font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: var(--radius-full); background: var(--green-100); color: var(--green-700);
  text-transform: uppercase; letter-spacing: .05em;
}
.calc-card-arrow { color: var(--green-500); font-size: 18px; transition: transform var(--transition); }
.calc-card:hover .calc-card-arrow { transform: translateX(4px); }

/* ---- Calculator Page ---- */
.calc-page { padding: 48px 0 80px; }
.calc-header { margin-bottom: 36px; }
.calc-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--slate-500); margin-bottom: 16px;
}
.calc-breadcrumb a { color: var(--slate-500); }
.calc-breadcrumb a:hover { color: var(--green-600); }
.calc-breadcrumb span { color: var(--slate-400); }
.calc-header h1 {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 42px);
  font-weight: 600; color: var(--slate-900); line-height: 1.15;
  letter-spacing: -.02em; margin-bottom: 12px;
}
.calc-header p { font-size: 17px; color: var(--slate-500); max-width: 640px; }

.calc-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.calc-main { }
.calc-sidebar { }

/* Calculator Widget */
.calc-widget {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl); padding: 32px;
  box-shadow: var(--shadow-md);
}
.calc-widget-title {
  font-size: 14px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--green-700);
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 2px solid var(--green-100);
}

/* Form elements */
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--slate-700); margin-bottom: 7px;
}
.field-hint { font-size: 12px; color: var(--slate-400); margin-top: 4px; }
.input-wrap { position: relative; display: block; }
.input-prefix, .input-suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 500; color: var(--slate-400);
  pointer-events: none; z-index: 1; line-height: 1;
  user-select: none;
}
.input-prefix { left: 14px; }
.input-suffix { right: 14px; }
.field input[type="number"],
.field input[type="text"],
.field select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md); font-size: 15px; font-family: var(--font-body);
  color: var(--slate-900); background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none; -webkit-appearance: none;
  position: relative; z-index: 0;
}
.field input[type="number"]:focus,
.field input[type="text"]:focus,
.field select:focus {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(58,153,82,.12);
}
/* Prefix: push text right so $ doesn't overlap the number */
.has-prefix input[type="number"],
.has-prefix input[type="text"] {
  padding-left: 28px;
}
/* Suffix: push text left */
.has-suffix input[type="number"],
.has-suffix input[type="text"] {
  padding-right: 44px;
}
/* Number inputs: hide browser spin arrows that can overlap prefix */
.has-prefix input[type="number"]::-webkit-outer-spin-button,
.has-prefix input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.has-prefix input[type="number"] { -moz-appearance: textfield; }

/* Range slider */
.range-wrap { display: flex; align-items: center; gap: 12px; }
input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 5px; border-radius: 5px;
  background: linear-gradient(90deg, var(--green-500) var(--pct, 50%), var(--slate-200) var(--pct, 50%));
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px;
  border-radius: 50%; background: var(--green-600);
  border: 2px solid var(--white); box-shadow: 0 1px 6px rgba(0,0,0,.2);
  cursor: pointer; transition: transform var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range-val {
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  color: var(--green-700); min-width: 56px; text-align: right;
}

/* Results panel */
.calc-results {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 100%);
  border-radius: var(--radius-xl); padding: 28px;
  color: var(--white); margin-top: 24px;
}
.calc-results-title {
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--green-300);
  margin-bottom: 20px;
}
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.result-item { }
.result-label { font-size: 12px; color: var(--green-300); margin-bottom: 4px; }
.result-val {
  font-family: var(--font-display); font-size: 28px; font-weight: 600;
  color: var(--amber-300); line-height: 1;
}
.result-val.large { font-size: 38px; }
.result-val.small { font-size: 20px; color: var(--white); }
.result-sub { font-size: 12px; color: var(--green-400); margin-top: 3px; }

.results-divider { border: none; border-top: 1px solid rgba(255,255,255,.12); margin: 20px 0; }

/* Sidebar widgets */
.sidebar-card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 22px; margin-bottom: 16px;
}
.sidebar-card h4 { font-size: 14px; font-weight: 600; color: var(--slate-900); margin-bottom: 12px; }
.related-list { list-style: none; }
.related-list li { border-bottom: 1px solid var(--slate-100); }
.related-list li:last-child { border-bottom: none; }
.related-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; font-size: 13px; color: var(--slate-700);
  transition: color var(--transition);
}
.related-list a:hover { color: var(--green-600); }
.related-list .icon { font-size: 16px; }

/* Ad placeholder */
.ad-slot {
  background: var(--slate-50); border: 1px dashed var(--slate-300);
  border-radius: var(--radius-md); min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--slate-400); margin: 24px 0;
  text-align: center;
}

/* ---- Content blocks ---- */
.prose { color: var(--slate-700); line-height: 1.75; }
.prose h2 { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--slate-900); margin: 40px 0 14px; letter-spacing: -.01em; }
.prose h3 { font-size: 18px; font-weight: 600; color: var(--slate-900); margin: 28px 0 10px; }
.prose p { margin-bottom: 18px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 18px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--slate-900); font-weight: 600; }
.prose a { color: var(--green-600); text-decoration: underline; text-decoration-color: var(--green-200); text-underline-offset: 3px; }
.prose a:hover { color: var(--green-500); }

/* FAQ */
.faq-list { margin-top: 20px; }
.faq-item {
  border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  margin-bottom: 10px; overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; padding: 16px 20px;
  background: none; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--slate-900);
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; transition: background var(--transition);
}
.faq-q:hover { background: var(--green-50); }
.faq-q .faq-chevron { flex-shrink: 0; color: var(--green-600); transition: transform var(--transition); font-size: 18px; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 20px 18px; font-size: 14px; color: var(--slate-600); line-height: 1.7; }

/* ---- State pages grid ---- */
.states-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-top: 32px;
}
.state-card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); padding: 16px;
  text-decoration: none; display: block; transition: all var(--transition);
  text-align: center;
}
.state-card:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); color: inherit; }
.state-card-name { font-size: 14px; font-weight: 600; color: var(--slate-900); margin-bottom: 4px; }
.state-card-stat { font-size: 12px; color: var(--green-600); font-family: var(--font-mono); }

/* ---- Footer ---- */
.site-footer {
  background: var(--green-950); color: var(--green-300);
  padding: 60px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand { }
.footer-logo {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
  color: var(--white); text-decoration: none; display: inline-block; margin-bottom: 12px;
}
.footer-tagline { font-size: 14px; color: var(--green-400); line-height: 1.6; max-width: 280px; }
.footer-col h5 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--green-400); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 14px; color: var(--green-400); transition: color var(--transition); }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 13px; color: var(--green-500); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--green-500); }
.footer-links a:hover { color: var(--green-300); }

/* ---- Trust badges ---- */
.trust-bar {
  background: var(--green-50); border-top: 1px solid var(--green-100);
  border-bottom: 1px solid var(--green-100); padding: 16px 0;
}
.trust-items { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--green-800); }
.trust-icon { font-size: 18px; }

/* ---- Utilities ---- */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.tag {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
.tag--green { background: var(--green-100); color: var(--green-700); }
.tag--amber { background: var(--amber-100); color: #92600a; }
.tag--blue  { background: #dbeafe; color: #1e40af; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-sidebar { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
  .hamburger { display: block; }
}
@media (max-width: 600px) {
  .hero { padding: 56px 0 52px; }
  .results-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .header-cta { display: none; }
  .calc-widget { padding: 20px; }
}

/* ---- Animations ---- */
/* Only animate elements that are NOT the LCP element */
/* H1 .hero-inner h1 must NOT have opacity:0 at any point */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .animate-fadeup { animation: fadeUp .4s ease both; }
  .delay-1 { animation-delay: .05s; }
  .delay-2 { animation-delay: .1s; }
  .delay-3 { animation-delay: .15s; }
}
/* LCP-safe override: hero H1 is always visible immediately */
.hero h1.animate-fadeup {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* ---- Mobile nav ---- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 200;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px 32px;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--slate-100);
  /* Slide down animation */
  transform: translateY(-8px);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
/* Top-level section */
.mob-nav-section {
  display: flex; flex-direction: column; gap: 2px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 8px;
}
.mob-nav-heading {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: var(--radius-md);
  font-size: 16px; font-weight: 600; color: var(--slate-900);
  text-decoration: none; transition: background var(--transition);
}
.mob-nav-heading:hover { background: var(--green-50); color: var(--green-700); }
.mob-nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
/* Divider label */
.mob-nav-divider {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--slate-400);
  padding: 8px 14px 6px;
}
/* Calculator shortcuts grid */
.mob-nav-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; margin-bottom: 16px;
}
.mob-nav-calc {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--slate-50); border: 0.5px solid var(--slate-200);
  font-size: 13px; font-weight: 500; color: var(--slate-700);
  text-decoration: none; transition: all var(--transition);
  line-height: 1.3;
}
.mob-nav-calc:hover { background: var(--green-50); border-color: var(--green-300); color: var(--green-700); }
/* CTA button */
.mob-nav-cta {
  display: block; text-align: center;
  padding: 14px 20px; margin-top: auto;
  background: var(--green-600); color: var(--white) !important;
  border-radius: var(--radius-full); font-size: 15px; font-weight: 600;
  text-decoration: none; transition: background var(--transition);
}
.mob-nav-cta:hover { background: var(--green-500); }
/* Hamburger → X animation */
.hamburger span { transition: transform .2s ease, opacity .2s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
/* Header backdrop blur when nav open */
/* Dim overlay behind mobile nav */
.mob-overlay {
  display: none; position: fixed; inset: 64px 0 0 0;
  background: rgba(0,0,0,.35); z-index: 199;
  animation: fadeIn .2s ease;
}
.mob-overlay.open { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================
   SEO/Accessibility additions
   ============================================ */

/* Skip link */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--green-800); color: var(--white);
  padding: 8px 16px; z-index: 9999; border-radius: 0 0 var(--radius-md) 0;
  font-size: 14px; font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; }

/* Screen reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Footer h2 titles ── */
.footer-col-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--green-400); margin-bottom: 14px;
}

/* ── Calc page additions ── */
.calc-updated {
  font-size: 13px; color: var(--slate-400); margin-bottom: 20px;
}
.calc-header-desc {
  font-size: 17px; color: var(--slate-500); max-width: 640px; line-height: 1.6;
  margin-bottom: 8px;
}
.calc-howto { margin-top: 36px; }

/* Ad unit labels */
.ad-unit { margin: 20px 0; }
.ad-unit--leaderboard { min-height: 90px; }
.ad-unit--sidebar { min-height: 250px; }
.ad-unit--rectangle { min-height: 250px; }

/* ── State page ── */
.state-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px; align-items: start;
  margin-top: 0;
}
/* Critical: prevents grid cell from expanding beyond its track */
.state-main { min-width: 0; overflow: clip; }  /* clip stops overflow without hiding scroll */
.state-intro { font-size: 17px; color: var(--slate-500); margin-bottom: 28px; line-height: 1.6; }
.state-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}
.state-stat-card {
  background: var(--green-50); border: 1px solid var(--green-200);
  border-radius: var(--radius-lg); padding: 16px; text-align: center;
}
.state-stat-card--amber { background: var(--amber-100); border-color: #fbbf47; }
.state-stat-val { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--green-800); }
.state-stat-card--amber .state-stat-val { color: #92600a; }
.state-stat-label { font-size: 11px; color: var(--green-600); margin-top: 4px; }
.state-stat-card--amber .state-stat-label { color: #92600a; }

/* State cost table — responsive wrapper */
.state-cost-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}
.state-cost-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 340px;
}
.state-cost-table th {
  text-align: left;
  padding: 9px 14px;
  background: var(--green-950);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.state-cost-table th:last-child,
.state-cost-table td:last-child {
  text-align: right;
  white-space: nowrap;
}
.state-cost-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
}
.state-cost-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
}
.state-cost-table tbody tr:nth-child(even) td {
  background: var(--slate-50);
}

.state-cta-block {
  background: var(--green-900); border-radius: var(--radius-xl);
  padding: 28px; margin-top: 36px; color: var(--white);
}
.state-cta-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.state-cta-block p { font-size: 14px; color: var(--green-300); margin-bottom: 20px; }
.state-cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.state-card-save { font-size: 11px; color: var(--green-700); font-weight: 500; margin-top: 3px; }

/* Quick facts dl */
.quick-facts { font-size: 13px; }
.quick-facts dt { color: var(--slate-500); margin-top: 10px; margin-bottom: 2px; }
.quick-facts dt:first-child { margin-top: 0; }
.quick-facts dd { font-weight: 600; color: var(--slate-900); margin: 0; }

/* ── Sidebar additions ── */
.sidebar-card--state select {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  font-size: 14px; font-family: var(--font-body); background: var(--white);
  cursor: pointer;
}
.sidebar-card--state select:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(58,153,82,.12); }
.sidebar-hint { font-size: 12px; color: var(--slate-400); margin-bottom: 10px; }
.state-info { background: var(--green-50); border-radius: var(--radius-md); padding: 12px; font-size: 13px; margin-top: 10px; }
.state-info-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.state-info-row:last-of-type { margin-bottom: 8px; }
.state-info-row span { color: var(--slate-500); }
.state-info-row strong { color: var(--green-800); }
.state-info-link { font-size: 12px; color: var(--green-600); font-weight: 600; display: block; margin-top: 4px; }

.sidebar-card--highlight {
  background: var(--green-50); border-color: var(--green-200);
}
.sidebar-card--highlight h3 { color: var(--green-800); }
.sidebar-card--highlight p  { font-size: 13px; color: var(--green-700); line-height: 1.6; }

.sidebar-cta {
  display: block; text-align: center; padding: 9px 16px;
  background: var(--green-600); color: var(--white);
  border-radius: var(--radius-full); font-size: 13px; font-weight: 600;
  margin-top: 12px; transition: all var(--transition);
}
.sidebar-cta:hover { background: var(--green-500); color: var(--white); }
.sidebar-cta--outline {
  background: transparent; color: var(--green-700);
  border: 1.5px solid var(--green-400);
}
.sidebar-cta--outline:hover { background: var(--green-100); color: var(--green-800); }

/* ── Related guides ── */
.related-guides { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--slate-100); }
.related-guides h2 { font-size: 18px; font-weight: 600; color: var(--slate-900); margin-bottom: 14px; }
.related-guides-grid { display: flex; flex-direction: column; gap: 8px; }
.related-guide-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--slate-50);
  border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  text-decoration: none; transition: all var(--transition);
}
.related-guide-card:hover { border-color: var(--green-300); background: var(--green-50); }
.related-guide-title { font-size: 14px; font-weight: 500; color: var(--slate-900); }
.related-guide-arrow { color: var(--green-500); flex-shrink: 0; }

/* ── FAQ accessible ── */
.faq-section { margin-top: 40px; }
.faq-section h2 { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--slate-900); margin-bottom: 20px; }
.faq-q { width: 100%; text-align: left; padding: 16px 20px; background: none; border: none; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--slate-900); display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: background var(--transition); font-family: var(--font-body); }
.faq-q .faq-chevron { flex-shrink: 0; color: var(--green-600); transition: transform var(--transition); }
.faq-item.open .faq-q .faq-chevron { transform: rotate(180deg); }
.faq-a[hidden] { display: none; }
.faq-a { display: block; }
.faq-a-inner { padding: 0 20px 18px; font-size: 14px; color: var(--slate-600); line-height: 1.7; }

/* ── Breadcrumb ol reset ── */
.calc-breadcrumb ol { list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0; }
.calc-breadcrumb li { font-size: 13px; color: var(--slate-500); }
.calc-breadcrumb a { color: var(--slate-500); }
.calc-breadcrumb a:hover { color: var(--green-600); }

/* ── State sidebar ── */
.state-sidebar { position: sticky; top: 80px; }

/* ── Responsive additions ── */
@media (max-width: 1100px) {
  /* 4 stat cards become 2×2 when sidebar is present */
  .state-stats    { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .state-layout   { grid-template-columns: 1fr; }
  .state-sidebar  { position: static; }
}
@media (max-width: 600px) {
  .state-cta-buttons { flex-direction: column; }
  .state-cta-buttons a { text-align: center; }
}

/* ============================================
   Calculator & State Matrix Partials
   ============================================ */

/* ── Full Calculator Matrix ── */
.calc-matrix { margin: 48px 0; }
.calc-matrix h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 600;
  color: var(--slate-900); letter-spacing: -.02em; margin-bottom: 8px;
}
.calc-matrix-intro { font-size: 15px; color: var(--slate-500); margin-bottom: 28px; }
.calc-matrix-group { margin-bottom: 28px; }
.calc-matrix-cat {
  font-size: 14px; font-weight: 600; color: var(--green-700);
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--green-100);
}
.calc-matrix-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.calc-matrix-list li {
  font-size: 13px; color: var(--slate-600); line-height: 1.5;
  padding: 7px 0; border-bottom: 0.5px solid var(--slate-100);
}
.calc-matrix-list li:last-child { border-bottom: none; }
.calc-matrix-list a { color: var(--green-600); font-weight: 500; }
.calc-matrix-list a:hover { color: var(--green-500); }
.calc-matrix-active a { color: var(--green-800) !important; font-weight: 700; }
.calc-matrix-active { background: var(--green-50); padding: 7px 8px; border-radius: var(--radius-sm); margin: 0 -8px; }

/* ── Full State Matrix ── */
.state-matrix { margin: 48px 0; }
.state-matrix h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 600;
  color: var(--slate-900); letter-spacing: -.02em; margin-bottom: 8px;
}
.state-matrix-intro { font-size: 15px; color: var(--slate-500); margin-bottom: 28px; }
.state-matrix-region { margin-bottom: 24px; }
.state-matrix-regiontitle {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--slate-500); margin-bottom: 10px;
}
.state-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.state-matrix-card {
  background: var(--white); border: 0.5px solid var(--slate-200);
  border-radius: var(--radius-md); padding: 10px 12px;
  text-decoration: none; display: block; transition: all var(--transition);
}
.state-matrix-card:hover {
  border-color: var(--green-400); background: var(--green-50);
  transform: translateY(-1px);
}
.state-matrix-name {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--slate-900); margin-bottom: 3px;
}
.state-matrix-data {
  display: block; font-size: 11px; color: var(--green-600);
  font-family: var(--font-mono);
}
.state-matrix-note {
  font-size: 12px; color: var(--slate-400); margin-top: 16px;
  padding-top: 12px; border-top: 0.5px solid var(--slate-100);
}
.state-matrix-note a { color: var(--green-600); font-weight: 500; }

/* ── Inline Calculator Box (mid-article) ── */
.inline-calc-box {
  background: var(--green-50); border: 1px solid var(--green-200);
  border-radius: var(--radius-lg); padding: 20px 22px; margin: 32px 0;
}
.inline-calc-heading {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--green-700); margin-bottom: 14px;
}
.inline-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.inline-calc-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--white); border: 0.5px solid var(--green-200);
  border-radius: var(--radius-md); padding: 10px 12px;
  text-decoration: none; transition: all var(--transition);
}
.inline-calc-item:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); }
.inline-calc-icon { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.inline-calc-title { font-size: 12px; font-weight: 600; color: var(--slate-900); line-height: 1.3; }
.inline-calc-desc  { font-size: 11px; color: var(--slate-500); margin-top: 2px; }

/* ── Inline State Links Box ── */
.inline-state-box {
  background: var(--slate-50); border: 0.5px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 18px 20px; margin: 32px 0;
}
.inline-state-heading {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--slate-600); margin-bottom: 12px;
}
.inline-state-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.inline-state-item {
  display: inline-block; padding: 5px 12px;
  background: var(--white); border: 0.5px solid var(--slate-200);
  border-radius: var(--radius-full); font-size: 12px; font-weight: 500;
  color: var(--slate-700); text-decoration: none;
  transition: all var(--transition);
}
.inline-state-item:hover {
  background: var(--green-600); color: var(--white);
  border-color: var(--green-600);
}
.inline-state-note { font-size: 12px; color: var(--slate-400); margin-top: 10px; }
.inline-state-note a { color: var(--green-600); font-weight: 500; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .state-matrix-grid { grid-template-columns: repeat(2, 1fr); }
  .inline-calc-grid  { grid-template-columns: 1fr; }
  .calc-matrix h2, .state-matrix h2 { font-size: 22px; }
}

/* ============================================
   Calc Teaser & State Teaser (compact expandable)
   ============================================ */

/* ── Shared toggle mechanism (CSS-only accordion) ── */
.calc-teaser-toggle,
.state-teaser-toggle { display: none; }

.calc-teaser-more,
.state-teaser-more { display: none; }

.calc-teaser-toggle:checked ~ .calc-teaser-more,
.state-teaser-toggle:checked ~ .state-teaser-more { display: block; }

.calc-teaser-btn-hide,
.state-teaser-btn-hide { display: none; }

.calc-teaser-toggle:checked ~ .calc-teaser-btn .calc-teaser-btn-show,
.state-teaser-toggle:checked ~ .state-teaser-btn .state-teaser-btn-show { display: none; }

.calc-teaser-toggle:checked ~ .calc-teaser-btn .calc-teaser-btn-hide,
.state-teaser-toggle:checked ~ .state-teaser-btn .state-teaser-btn-hide { display: inline; }

/* ── Calc Teaser ── */
.calc-teaser {
  background: var(--green-50);
  border: 1px solid var(--green-200);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 36px 0;
}
.calc-teaser-heading {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--green-700); margin-bottom: 14px;
}
.calc-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.calc-teaser-card {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--white);
  border: 0.5px solid var(--green-200);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-decoration: none;
  transition: all var(--transition);
}
.calc-teaser-card:hover {
  border-color: var(--green-400);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.calc-teaser-icon { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.calc-teaser-title { font-size: 12px; font-weight: 600; color: var(--slate-900); line-height: 1.3; }
.calc-teaser-desc  { font-size: 11px; color: var(--slate-500); margin-top: 2px; }
.calc-teaser-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; font-size: 12px; font-weight: 600;
  color: var(--green-600); cursor: pointer;
  padding: 5px 0; border: none; background: none;
}
.calc-teaser-btn:hover { color: var(--green-500); }
.calc-teaser-viewall {
  display: inline-block; margin-top: 10px;
  font-size: 12px; font-weight: 600; color: var(--green-600);
}

/* ── State Teaser ── */
.state-teaser {
  background: var(--slate-50);
  border: 0.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 36px 0;
}
.state-teaser-heading {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--slate-500); margin-bottom: 14px;
}
.state-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.state-teaser-card {
  background: var(--white);
  border: 0.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-decoration: none;
  transition: all var(--transition);
  display: block;
}
.state-teaser-card:hover {
  border-color: var(--green-400);
  background: var(--green-50);
  transform: translateY(-1px);
}
.state-teaser-name  { font-size: 13px; font-weight: 600; color: var(--slate-900); margin-bottom: 2px; }
.state-teaser-stats { font-size: 11px; color: var(--green-600); font-family: var(--font-mono); }
.state-teaser-all {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 12px;
}
.state-teaser-pill {
  display: inline-block; padding: 4px 11px;
  background: var(--white);
  border: 0.5px solid var(--slate-200);
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500; color: var(--slate-700);
  text-decoration: none;
  transition: all var(--transition);
}
.state-teaser-pill:hover {
  background: var(--green-600); color: var(--white);
  border-color: var(--green-600);
}
.state-teaser-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; font-size: 12px; font-weight: 600;
  color: var(--slate-500); cursor: pointer;
}
.state-teaser-btn:hover { color: var(--green-600); }

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

/* ============================================
   Rating Widget
   ============================================ */
.rating-widget {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 18px 24px;
  margin: 28px 0;
  flex-wrap: wrap;
}

/* ── Left: static score display ── */
.rw-display {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.rw-stars {
  display: flex;
  gap: 2px;
  line-height: 1;
}
.rw-star {
  font-size: 22px;
  color: var(--slate-200);
  line-height: 1;
}
.rw-filled { color: #F5A623; }
.rw-half   {
  /* Half star via gradient clip */
  background: linear-gradient(90deg, #F5A623 50%, var(--slate-200) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.rw-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rw-score {
  font-size: 14px;
  color: var(--slate-700);
  line-height: 1.2;
}
.rw-score strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--slate-900);
}
.rw-count {
  font-size: 12px;
  color: var(--slate-400);
}

/* ── Divider ── */
.rw-divider {
  width: 1px;
  height: 40px;
  background: var(--slate-200);
  margin: 0 24px;
  flex-shrink: 0;
}

/* ── Right: vote area ── */
.rw-vote {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.rw-ask {
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-600);
  margin: 0;
  white-space: nowrap;
}
.rw-interactive {
  display: flex;
  gap: 4px;
}
.rw-btn {
  font-size: 26px;
  line-height: 1;
  color: var(--slate-300);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 3px;
  transition: color .12s ease, transform .12s ease;
  /* Prevent layout shift on hover */
  display: inline-block;
  width: 34px;
  text-align: center;
}
.rw-btn:hover,
.rw-btn.rw-hover { color: #F5A623; transform: scale(1.18); }
.rw-btn.rw-selected { color: #F5A623; }
/* Cascade: dim stars after selected on hover */
.rw-btn.rw-dim { color: var(--slate-200); }

/* ── Thank-you state ── */
.rw-thanks {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
/* Ensure hidden attribute always wins regardless of display value */
.rw-thanks[hidden],
.rw-vote[hidden] { display: none !important; }
.rw-thanks-icon {
  width: 28px; height: 28px;
  background: var(--green-600);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.rw-thanks-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--green-700);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .rating-widget {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
  }
  .rw-divider { width: 100%; height: 1px; margin: 0; }
  .rw-vote { flex-wrap: wrap; gap: 10px; }
  .rw-ask { font-size: 13px; }
  .rw-btn { font-size: 28px; width: 38px; }
}

/* ============================================================
   HOMEPAGE — Full redesign
   Sections: hp-hero, hp-calcs, hp-states, hp-why, hp-guides
   ============================================================ */

/* ── Hero ── */
.hp-hero {
  position: relative;
  background: var(--green-950);
  color: var(--white);
  padding: 80px 0 64px;
  overflow: hidden;
}
.hp-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.hp-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hp-hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.hp-hero-glow--1 { width: 500px; height: 500px; top: -120px; left: -100px; background: rgba(42,122,66,.28); }
.hp-hero-glow--2 { width: 400px; height: 400px; bottom: -80px; right: -80px; background: rgba(232,147,10,.12); }

.hp-hero-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hp-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,.8);
  margin-bottom: 20px;
}
.hp-badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-400);
  box-shadow: 0 0 8px var(--green-400);
  flex-shrink: 0;
}
.hp-hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}
.hp-hero-h1 em { font-style: italic; color: var(--amber-300); }
.hp-hero-sub {
  font-size: 17px; color: rgba(255,255,255,.65);
  line-height: 1.65; margin-bottom: 32px;
  max-width: 520px;
}
.hp-hero-actions {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.hp-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--amber-400); color: var(--slate-900);
  padding: 12px 24px; border-radius: 100px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
}
.hp-btn-primary:hover { background: var(--amber-300); transform: translateY(-1px); }
.hp-btn-ghost {
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,.75); text-decoration: none;
  transition: color .15s;
}
.hp-btn-ghost:hover { color: var(--white); }
.hp-hero-trust {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255,255,255,.45);
}

/* Hero card */
.hp-hero-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 24px;
  backdrop-filter: blur(12px);
  position: relative; z-index: 1;
}
.hp-card-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: rgba(255,255,255,.4); margin-bottom: 16px;
}
.hp-card-rows { display: flex; flex-direction: column; gap: 0; }
.hp-card-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 13px; color: rgba(255,255,255,.6);
}
.hp-card-row--total { border-bottom: none; padding-top: 14px; }
.hp-card-val {
  font-family: var(--font-mono); font-size: 13px;
  font-weight: 600; color: rgba(255,255,255,.9);
}
.hp-card-profit {
  font-family: var(--font-display); font-size: 22px;
  font-weight: 600; color: var(--amber-300);
}
.hp-card-cta {
  display: block; text-align: center; margin-top: 16px;
  background: var(--green-600); color: var(--white);
  padding: 11px; border-radius: 8px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background .15s;
}
.hp-card-cta:hover { background: var(--green-500); color: var(--white); }

/* Stats bar */
.hp-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-top: 56px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 36px;
  position: relative; z-index: 1;
}
.hp-stat { text-align: center; padding: 0 40px; }
.hp-stat-val {
  font-family: var(--font-display); font-size: 34px;
  font-weight: 600; color: var(--amber-300); line-height: 1;
}
.hp-stat-label { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 5px; }
.hp-stat-div { width: 1px; height: 36px; background: rgba(255,255,255,.1); flex-shrink: 0; }

/* ── Section heads (shared) ── */
.hp-section-head {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 24px;
  margin-bottom: 36px; flex-wrap: wrap;
}
.hp-section-desc {
  font-size: 16px; color: var(--slate-500);
  line-height: 1.6; max-width: 440px;
  margin: 0; flex-shrink: 0;
}

/* ── Calculator categories ── */
.hp-calcs { background: var(--white); }
.hp-cat { margin-bottom: 36px; }
.hp-cat:last-child { margin-bottom: 0; }
.hp-cat-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-100);
}
.hp-cat-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hp-cat-icon--solar    { background: #FFF6E3; color: #B8620A; }
.hp-cat-icon--battery  { background: #E6F0FF; color: #1A5CB3; }
.hp-cat-icon--ev       { background: #F0F0FF; color: #5046C0; }
.hp-cat-icon--home     { background: #EDFAF2; color: #1A7040; }
.hp-cat-icon--specialty{ background: #FFF0F5; color: #9B2257; }
.hp-cat-title {
  font-size: 15px; font-weight: 700;
  color: var(--slate-900); margin: 0;
  flex: 1;
}
.hp-cat-count {
  font-size: 13px; color: var(--slate-400);
  background: var(--slate-50);
  border: 0.5px solid var(--slate-200);
  border-radius: 100px; padding: 3px 10px;
}

/* Tool grid — dense list layout */
.hp-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px;
}
.hp-tool {
  display: flex; align-items: center; gap: 0;
  padding: 12px 14px;
  background: var(--slate-50);
  border: 0.5px solid var(--slate-200);
  border-radius: 8px;
  text-decoration: none;
  transition: all .12s ease;
  position: relative;
}
.hp-tool:hover {
  background: var(--green-50);
  border-color: var(--green-300);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(29,158,117,.1);
}
.hp-tool-name {
  font-size: 14px; font-weight: 600;
  color: var(--slate-900); margin-bottom: 2px;
  flex: 1;
}
.hp-tool-desc {
  font-size: 12px; color: var(--slate-400);
  line-height: 1.3;
}
.hp-tool-arr {
  font-size: 15px; color: var(--green-400);
  margin-left: 8px; flex-shrink: 0;
  transition: transform .12s;
}
.hp-tool:hover .hp-tool-arr { transform: translateX(3px); }
/* Stack name+desc vertically */
.hp-tool { flex-wrap: wrap; }
.hp-tool-name, .hp-tool-desc { width: calc(100% - 22px); }
.hp-tool-arr { width: 18px; margin-left: auto; margin-top: -28px; }

/* ── Trust bar ── */
.hp-trust-bar {
  background: var(--slate-900);
  padding: 16px 0;
}
.hp-trust-items {
  display: flex; align-items: center;
  justify-content: center; gap: 0;
  flex-wrap: wrap;
}
.hp-trust-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.7);
  padding: 6px 24px;
}
.hp-trust-sep {
  width: 1px; height: 18px;
  background: rgba(255,255,255,.15); flex-shrink: 0;
}

/* ── States grid ── */
.hp-states { background: var(--slate-50); }
.hp-states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.hp-state-card {
  background: var(--white);
  border: 0.5px solid var(--slate-200);
  border-radius: 10px;
  padding: 14px 12px;
  text-decoration: none;
  transition: all .12s ease;
  display: block;
}
.hp-state-card:hover {
  border-color: var(--green-400);
  box-shadow: 0 2px 10px rgba(29,158,117,.12);
  transform: translateY(-1px);
}
.hp-state-abbr {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  color: var(--green-600);
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.hp-state-name {
  font-size: 14px; font-weight: 600;
  color: var(--slate-900); margin-bottom: 6px;
  line-height: 1.2;
}
.hp-state-data {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-family: var(--font-mono);
  color: var(--slate-500); margin-bottom: 4px;
}
.hp-state-rate { color: var(--slate-700); }
.hp-state-dot  { color: var(--slate-300); }
.hp-state-sun  { color: var(--slate-500); }
.hp-state-save {
  font-size: 11px; font-weight: 600;
  color: var(--green-600);
}
.hp-states-footer {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.hp-states-legend {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 11px; color: var(--slate-400);
  margin: 0;
}
.hp-states-link {
  font-size: 13px; font-weight: 600; color: var(--green-600);
  text-decoration: none;
}
.hp-states-link:hover { color: var(--green-500); }

/* ── Why us ── */
.hp-why { background: var(--white); }
.hp-why-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px; align-items: start;
}
.hp-why-list {
  list-style: none; display: flex;
  flex-direction: column; gap: 12px;
  margin-bottom: 24px;
}
.hp-why-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; color: var(--slate-700); line-height: 1.5;
}
.hp-why-check {
  color: var(--green-500); font-size: 16px;
  flex-shrink: 0; margin-top: 1px;
}
.hp-why-link {
  font-size: 14px; font-weight: 600;
  color: var(--green-600); text-decoration: none;
}
.hp-why-link:hover { color: var(--green-500); }
.hp-why-sources {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 14px; padding: 28px;
}
.hp-why-sources-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--slate-400); margin-bottom: 16px;
}
.hp-source-list { display: flex; flex-direction: column; gap: 0; }
.hp-source {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--slate-100);
}
.hp-source:last-child { border-bottom: none; }
.hp-source-abbr {
  font-family: var(--font-mono); font-size: 12px;
  font-weight: 700; color: var(--green-600);
  width: 46px; flex-shrink: 0;
}
.hp-source-name {
  font-size: 13px; color: var(--slate-600); line-height: 1.3;
}

/* ── Guides ── */
.hp-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 0;
}
.hp-guide-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px; padding: 22px;
  text-decoration: none; display: flex;
  flex-direction: column; gap: 8px;
  transition: all .12s ease; position: relative;
}
.hp-guide-card:hover {
  border-color: var(--green-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.hp-guide-meta {
  display: flex; align-items: center;
  gap: 10px; margin-bottom: 2px;
}
.hp-guide-tag {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--green-700); background: var(--green-100);
  padding: 2px 8px; border-radius: 100px;
}
.hp-guide-read { font-size: 11px; color: var(--slate-400); }
.hp-guide-title {
  font-size: 16px; font-weight: 600;
  color: var(--slate-900); line-height: 1.35; margin: 0;
  flex: 1;
}
.hp-guide-desc { font-size: 13px; color: var(--slate-500); line-height: 1.55; }
.hp-guide-arr {
  font-size: 16px; color: var(--green-400);
  margin-top: auto; transition: transform .12s;
}
.hp-guide-card:hover .hp-guide-arr { transform: translateX(4px); }
.hp-guides-all {
  font-size: 14px; font-weight: 600;
  color: var(--green-600); text-decoration: none;
  flex-shrink: 0; align-self: flex-end; padding-bottom: 4px;
}
.hp-guides-all:hover { color: var(--green-500); }

/* ── Bottom CTA ── */
.hp-cta-section {
  background: var(--green-950);
  padding: 72px 0;
}
.hp-cta-inner { text-align: center; max-width: 600px; margin: 0 auto; }
.hp-cta-h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 600; color: var(--white);
  letter-spacing: -.02em; margin-bottom: 14px;
}
.hp-cta-sub {
  font-size: 16px; color: rgba(255,255,255,.55);
  line-height: 1.65; margin-bottom: 32px;
}
.hp-cta-actions {
  display: flex; align-items: center;
  justify-content: center; gap: 16px; flex-wrap: wrap;
}
.hp-btn-ghost-dark {
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,.7); text-decoration: none;
  transition: color .15s;
}
.hp-btn-ghost-dark:hover { color: var(--white); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hp-hero-inner { grid-template-columns: 1fr; }
  .hp-hero-card { max-width: 400px; }
  .hp-why-grid { grid-template-columns: 1fr; }
  .hp-why-sources { max-width: 480px; }
}
@media (max-width: 700px) {
  .hp-stats { gap: 0; }
  .hp-stat { padding: 0 20px; }
  .hp-stat-val { font-size: 26px; }
  .hp-hero-card { display: none; } /* hide on small mobile */
  .hp-states-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .hp-states-footer { flex-direction: column; align-items: flex-start; }
  .hp-trust-item { padding: 5px 14px; font-size: 12px; }
  .hp-trust-sep { display: none; }
  .hp-section-head { flex-direction: column; align-items: flex-start; }
  .hp-guides-all { align-self: flex-start; }
}
@media (max-width: 480px) {
  .hp-stats { flex-wrap: wrap; justify-content: center; }
  .hp-stat-div { display: none; }
  .hp-stat { padding: 10px 24px; }
  .hp-tool-grid { grid-template-columns: 1fr; }
}

/* ── Article chart / infographic ── */
.article-chart {
  margin: 36px 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--slate-200);
  background: var(--white);
}
.article-chart img {
  width: 100%;
  height: auto;
  display: block;
}
.article-chart figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--slate-500);
  line-height: 1.5;
  border-top: 1px solid var(--slate-100);
  background: var(--slate-50);
}
.article-chart figcaption strong {
  color: var(--slate-700);
  font-weight: 600;
}

/* ============================================================
   GUIDE ARTICLE — Markdown table optimisation
   Applies to all | pipe tables inside .prose (guide articles)
   ============================================================ */

/* Responsive scroll wrapper — keeps table intact on mobile */
.prose table {
  /* Use a container trick: table stays as table, overflow on wrapper */
  display: block;
  max-width: 100%;             /* MUST be max-width not width */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  font-size: 14.5px;
  margin: 28px 0;
  /* Do NOT use white-space:nowrap here — it's what caused 2411px width */
}

/* Header row */
.prose th {
  text-align: left;
  padding: 11px 16px;
  background: var(--green-950);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--green-800);
  white-space: nowrap;
}

/* Right-align all columns except the first label column */
.prose th:not(:first-child),
.prose td:not(:first-child) {
  text-align: right;
}

/* Data cells */
.prose td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  vertical-align: middle;
}

/* Zebra striping */
.prose tbody tr:nth-child(even) td {
  background: var(--slate-50);
}

/* Row hover */
.prose tbody tr:hover td {
  background: var(--green-50);
  transition: background .1s;
}

/* Last row — no border */
.prose tr:last-child td {
  border-bottom: none;
}

/* Rows where every cell is bold (markdown **text**) = total / summary row */
.prose tr:has(td > strong:only-child) td {
  background: #f0fdf4 !important;
  font-weight: 600;
  color: var(--slate-900);
  border-top: 1px solid var(--green-200);
}

/* Mobile: allow text wrap on very small screens */
@media (max-width: 480px) {
  .prose table { font-size: 13px; white-space: normal; }
  .prose th, .prose td { padding: 8px 12px; }
}


/* ============================================================
   SHOP SOLAR KITS — Affiliate sidebar card + footer
   ============================================================ */

/* Sidebar card variant */
.sidebar-card--ssk {
  border: 1px solid var(--green-200);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}
.sidebar-card--ssk::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-500), var(--green-700));
}

/* Sponsored badge */
.sidebar-ssk-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--slate-400);
  margin-bottom: 6px;
}

/* SSK CTA button */
.sidebar-cta--ssk {
  display: block;
  background: var(--green-700);
  color: var(--white) !important;
  text-align: center;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.sidebar-cta--ssk:hover {
  background: var(--green-600);
  color: var(--white) !important;
  text-decoration: none;
}

/* Footer affiliate disclosure */
.footer-affiliate {
  font-size: 11px;
  color: var(--slate-400);
  line-height: 1.6;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  max-width: 720px;
}
.footer-affiliate strong {
  color: var(--slate-300);
}

/* Article inline affiliate disclosure strip */
.affiliate-disclosure-strip {
  font-size: 12px;
  color: var(--slate-500);
  background: var(--slate-50);
  border-left: 3px solid var(--green-300);
  padding: 8px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
  line-height: 1.5;
}
.affiliate-disclosure-strip a {
  color: var(--green-600);
  text-decoration: underline;
}
