/* Home Battery ROI Calculator — styles
   Goal: trustworthy, clean, fast-loading. No frameworks. */

:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --text: #1a2233;
  --text-soft: #4a5568;
  --text-mute: #6b7280;
  --border: #e5e7eb;
  --accent: #2c7a55;
  --accent-dark: #1e5a3e;
  --warn: #b45309;
  --shadow: 0 2px 6px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  --radius: 10px;
  --max-w: 720px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* HEADER */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 24px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
}
.state-nav a {
  color: var(--text-soft);
  text-decoration: none;
  margin-left: 14px;
  font-size: 14px;
  font-weight: 500;
}
.state-nav a:hover { color: var(--accent); }
.state-nav a.active { color: var(--accent); font-weight: 700; }

/* SEO ARTICLE TYPOGRAPHY */
.seo-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.seo-content h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 18px;
}
.seo-content h2 {
  font-size: 22px;
  margin: 32px 0 12px;
  color: var(--text);
}
.seo-content h3 {
  font-size: 18px;
  margin: 22px 0 10px;
  color: var(--text);
}
.seo-content p {
  margin: 12px 0;
  color: var(--text-soft);
}
.seo-content strong { color: var(--text); }
.seo-content a { color: var(--accent); }
.seo-content ul, .seo-content ol {
  margin: 12px 0;
  padding-left: 22px;
  color: var(--text-soft);
}
.seo-content li { margin: 4px 0; }
.seo-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}
.seo-content th, .seo-content td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.seo-content th { background: #f6f7f9; }
.seo-content blockquote {
  border-left: 4px solid var(--accent);
  margin: 16px 0;
  padding: 10px 16px;
  background: #f6fbf8;
  color: var(--text-soft);
  font-size: 15px;
}
.seo-content hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

.calc-cta { text-align: center; margin: 24px 0 12px; }
.calc-cta h2 { font-size: 24px; margin: 0 0 6px; }
.calc-cta .lede { font-size: 16px; color: var(--text-soft); margin: 0 0 16px; }

/* OTHER STATES (internal links between state pages) */
.other-states {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.other-states h3 { margin: 0 0 12px; font-size: 18px; }
.state-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.state-link-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.state-link-list li:last-child { border-bottom: 0; }
.state-link-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.state-link-list .teaser {
  color: var(--text-mute);
  font-weight: 400;
}

/* HERO */
.hero h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 12px 0 12px;
}
.hero .lede {
  font-size: 18px;
  color: var(--text-soft);
  margin: 0 0 32px;
}

/* CALCULATOR */
.calculator {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.calc-form .field {
  margin-bottom: 22px;
  border: 0;
  padding: 0;
}
.calc-form label,
.calc-form legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.calc-form .hint {
  font-size: 14px;
  color: var(--text-mute);
  margin: 6px 0 0;
}
.calc-form input[type="text"],
.calc-form input[type="number"],
.calc-form input[type="email"],
.calc-form select {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.calc-form input:focus,
.calc-form select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.radio {
  display: block;
  font-weight: 400;
  margin: 6px 0;
  cursor: pointer;
}
.radio input { margin-right: 8px; }

.advanced {
  margin: 12px 0 22px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 12px 16px;
}
.advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-soft);
}
.advanced[open] summary { margin-bottom: 12px; }

.submit-btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}
.submit-btn:hover { background: var(--accent-dark); }
.submit-btn:disabled { background: #9ca3af; cursor: not-allowed; }

/* RESULT */
.result {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  position: relative;
}
.result.hidden { display: none; }
.result h2 {
  font-size: 22px;
  margin: 0 0 20px;
}
.result h3 {
  font-size: 16px;
  margin: 24px 0 8px;
  color: var(--text-soft);
}
.result-content { transition: filter 0.3s; }
.result-content.blurred {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
}
.big-number {
  background: linear-gradient(135deg, #e8f5ef, #f0faf4);
  border-radius: 8px;
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 24px;
}
.big-number .number {
  font-size: 44px;
  font-weight: 800;
  color: var(--accent-dark);
  line-height: 1;
}
.big-number .label {
  font-size: 15px;
  color: var(--text-soft);
  margin-top: 8px;
}

.savings-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}
.savings-table th,
.savings-table td {
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}
.savings-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.savings-table .total th,
.savings-table .total td {
  border-bottom: 0;
  border-top: 2px solid var(--text);
  padding-top: 12px;
  font-weight: 700;
}

#incentives-list {
  margin: 0;
  padding-left: 20px;
}
#incentives-list li { margin: 4px 0; }

.contextual {
  background: #fffbeb;
  border-left: 4px solid var(--warn);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 15px;
}

/* EMAIL GATE */
.email-gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(2px);
  padding: 40px;
  text-align: center;
  border-radius: var(--radius);
}
.email-gate.hidden { display: none; }
.email-gate h3 { margin: 0 0 8px; font-size: 22px; color: var(--text); }
.email-gate p { margin: 0 0 16px; color: var(--text-soft); max-width: 420px; }
.email-form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.email-form input[type="email"] {
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.consent {
  font-size: 13px;
  color: var(--text-mute);
  text-align: left;
  line-height: 1.4;
}
.consent input { margin-right: 6px; vertical-align: top; }
.consent a { color: var(--accent); }

.micro {
  font-size: 12px;
  color: var(--text-mute);
  margin: 4px 0 0;
}

.disclaimer {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* FOOTER */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 40px;
}
.site-footer p { margin: 4px 0; color: var(--text-soft); font-size: 14px; }
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer .micro { color: var(--text-mute); font-size: 12px; }

@media (max-width: 600px) {
  .hero h1 { font-size: 26px; }
  .calculator, .result { padding: 20px; }
  .big-number .number { font-size: 36px; }
  .state-nav a { margin-left: 8px; font-size: 13px; }
}
