/* Battery Permit Guide — styles.css */
:root {
  --green: #1a7a4a;
  --green-dark: #135c37;
  --green-light: #e8f5ee;
  --green-mid: #2a9d5c;
  --accent: #f5a623;
  --accent-dark: #d4861a;
  --text: #1a1a1a;
  --text-muted: #555;
  --text-light: #777;
  --bg: #fff;
  --bg-alt: #f8faf9;
  --bg-card: #fff;
  --border: #dde8e2;
  --border-light: #eef3f0;
  --shadow: 0 2px 8px rgba(0,0,0,.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --radius: 8px;
  --radius-lg: 14px;
  --max: 1100px;
  --font: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; line-height: 1.2; color: var(--text); }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 700; line-height: 1.3; color: var(--text); }
h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.4; color: var(--text); }
h4 { font-size: 1rem; font-weight: 600; color: var(--text); }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--green-dark); }
ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: .35rem; }
strong { font-weight: 600; }

/* ── Layout ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); }

/* ── Header ── */
.site-header {
  background: var(--green);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.site-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-nav a {
  color: rgba(255,255,255,.88);
  font-size: .875rem;
  font-weight: 500;
  padding: .35rem .65rem;
  border-radius: 5px;
  transition: background .15s;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; }
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 5px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent-dark) !important; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, var(--green-mid) 100%);
  color: #fff;
  padding: 4rem 1.25rem 4.5rem;
  text-align: center;
}
.hero h1 { color: #fff; margin-bottom: 1rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero p { color: rgba(255,255,255,.88); font-size: 1.1rem; max-width: 640px; margin: 0 auto 2rem; }
.hero-badges { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.badge {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: .3rem .8rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .75rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.55); }
.btn-outline:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); text-decoration: none; color: #fff; }

/* ── Breadcrumb ── */
.breadcrumb {
  padding: .75rem 1.25rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-light);
  font-size: .83rem;
  color: var(--text-muted);
}
.breadcrumb .container { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--green); }
.breadcrumb span { opacity: .5; }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--green);
  font-size: 1.3rem;
}
.card h3 { margin-bottom: .4rem; font-size: 1rem; }
.card p { color: var(--text-muted); font-size: .9rem; margin-bottom: .75rem; }
.card a.card-link { font-size: .875rem; font-weight: 600; color: var(--green); }

/* ── State grid ── */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.state-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
  transition: all .15s;
  font-size: .9rem;
  font-weight: 500;
}
.state-card:hover { border-color: var(--green); color: var(--green); background: var(--green-light); text-decoration: none; }
.state-flag { font-size: 1.1rem; }

/* ── Info boxes ── */
.info-box {
  border-left: 4px solid var(--green);
  background: var(--green-light);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-size: .93rem;
}
.info-box.warning { border-color: var(--accent); background: #fff8ed; }
.info-box.info { border-color: #3b82f6; background: #eff6ff; }
.info-box strong { display: block; margin-bottom: .25rem; }

/* ── Table ── */
.permit-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .92rem; }
.permit-table th {
  background: var(--green);
  color: #fff;
  text-align: left;
  padding: .75rem 1rem;
  font-weight: 600;
}
.permit-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border-light); }
.permit-table tr:nth-child(even) td { background: var(--bg-alt); }
.permit-table tr:hover td { background: var(--green-light); }
.status-required { color: #c00; font-weight: 600; }
.status-sometimes { color: #b86e00; font-weight: 600; }
.status-varies { color: var(--text-muted); }

/* ── FAQ ── */
.faq-list { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border-light); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.1rem 1.25rem;
  font-size: .97rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background .12s;
}
.faq-q:hover { background: var(--bg-alt); }
.faq-q .faq-icon { color: var(--green); font-size: 1.1rem; transition: transform .2s; flex-shrink: 0; }
.faq-q.open .faq-icon { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 1.25rem 1.1rem; color: var(--text-muted); font-size: .93rem; }
.faq-a.open { display: block; }

/* ── Tool box ── */
.tool-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}
.tool-box h3 { margin-bottom: 1rem; color: var(--green); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.form-group select, .form-group input {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .15s;
}
.form-group select:focus, .form-group input:focus {
  outline: none;
  border-color: var(--green);
}
.tool-result {
  background: #fff;
  border: 1.5px solid var(--green);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.25rem;
  display: none;
}
.tool-result.show { display: block; }
.result-header { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.05rem; color: var(--green); margin-bottom: .75rem; }

/* ── PDF download ── */
.pdf-box {
  background: linear-gradient(135deg, #1a7a4a 0%, #2a9d5c 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.pdf-icon { font-size: 2.5rem; flex-shrink: 0; }
.pdf-box h3 { color: #fff; margin-bottom: .3rem; }
.pdf-box p { color: rgba(255,255,255,.85); margin: 0; font-size: .93rem; }
.btn-pdf { background: #fff; color: var(--green); font-weight: 700; }
.btn-pdf:hover { background: var(--green-light); text-decoration: none; color: var(--green-dark); }

/* ── Article content ── */
.article-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; }
.article-content h2 { margin: 2rem 0 .75rem; padding-top: .5rem; border-top: 2px solid var(--green-light); }
.article-content h3 { margin: 1.5rem 0 .5rem; }
.article-content ul, .article-content ol { margin: .75rem 0 1rem; }
.toc-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: 80px;
}
.toc-box h4 { margin-bottom: .75rem; font-size: .95rem; color: var(--green); }
.toc-box ol { padding-left: 1.2rem; }
.toc-box li { margin-bottom: .4rem; }
.toc-box a { font-size: .875rem; color: var(--text-muted); }
.toc-box a:hover { color: var(--green); }

/* ── Footer ── */
.site-footer {
  background: #1a2e22;
  color: rgba(255,255,255,.75);
  padding: 3rem 1.25rem 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto 2rem;
}
.footer-brand { color: rgba(255,255,255,.95); }
.footer-brand .logo-text { font-weight: 700; font-size: 1.05rem; color: #fff; margin-bottom: .5rem; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.6); }
.footer-col h4 { color: rgba(255,255,255,.95); font-size: .9rem; margin-bottom: .75rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a { color: rgba(255,255,255,.6); font-size: .85rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: #fff; text-decoration: none; }

/* ── Section titles ── */
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { margin-bottom: .5rem; }
.section-title p { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin: 0 auto; }
.section-label {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .25rem .7rem;
  border-radius: 20px;
  margin-bottom: .6rem;
}

/* ── Step list ── */
.step-list { list-style: none; padding: 0; counter-reset: steps; }
.step-list li {
  counter-increment: steps;
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}
.step-list li:last-child { border-bottom: none; }
.step-list li::before {
  content: counter(steps);
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* ── Tag pills ── */
.tag { display: inline-block; background: var(--green-light); color: var(--green-dark); border-radius: 20px; padding: .2rem .7rem; font-size: .78rem; font-weight: 600; margin: .15rem; }

/* ── Disclaimer ── */
.disclaimer {
  background: #fffbe6;
  border: 1px solid #f0d080;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: .82rem;
  color: #6b5a1a;
  margin: 2rem 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .article-wrap { grid-template-columns: 1fr; }
  .toc-box { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
  .pdf-box { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 1rem 3rem; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.flex { display: flex; }
.gap-1 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.highlight { background: var(--green-light); padding: .15rem .4rem; border-radius: 4px; }
