/* solarpaybackcheck -- one stylesheet, no framework, no web fonts.
   Mobile first: base rules are the phone layout, media queries add the rest. */

:root {
  --green: #0b6b3a;
  --green-dark: #085029;
  --green-tint: #eef6f1;
  --sun: #e8930c;
  --ink: #16191d;
  --body: #454e5a;
  --muted: #6b7684;
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-soft: #f7f9fb;
  --danger: #a8231f;
  --radius: 12px;
  --wrap: 62rem;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .18);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

h1, h2, h3 { color: var(--ink); line-height: 1.22; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 1.95rem; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
img, svg { max-width: 100%; height: auto; }
small { font-size: .84rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 40rem; }
.center { text-align: center; }
.muted { color: var(--muted); }
.stack > * + * { margin-top: 1rem; }

/* ---------- header / footer ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.6) blur(8px);
}
.site-head .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem;
  letter-spacing: -.01em;
}
.brand svg { flex: none; }
.site-head nav { margin-left: auto; display: flex; gap: 18px; font-size: .93rem; }
.site-head nav a { color: var(--body); text-decoration: none; }
.site-head nav a:hover { color: var(--green); }
@media (max-width: 33rem) { .site-head nav { display: none; } }

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 64px; padding: 32px 0 44px;
  background: var(--bg-soft);
  font-size: .9rem;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.site-foot a { text-decoration: none; }
.site-foot p { color: var(--muted); margin: 0 0 .6em; max-width: 46rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--radius); border: 1px solid transparent;
  background: var(--green); color: #fff; font: inherit; font-weight: 650;
  text-decoration: none; cursor: pointer; min-height: 50px;
  transition: background .15s ease, transform .05s ease;
}
.btn:hover { background: var(--green-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-lg { width: 100%; font-size: 1.05rem; padding: 16px 28px; }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--line); }
.btn-ghost:hover { background: var(--green-tint); color: var(--green-dark); }
@media (min-width: 34rem) { .btn-lg { width: auto; min-width: 17rem; } }

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #9ecfb4; outline-offset: 2px; border-radius: 6px;
}

/* ---------- hero ---------- */

.hero { padding: 44px 0 8px; }
.hero h1 { max-width: 18ch; }
.hero .lede { font-size: 1.1rem; max-width: 46ch; }
.hero-points { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; font-size: .97rem; }
.hero-points svg { flex: none; margin-top: 3px; }
.hero-note { font-size: .86rem; color: var(--muted); margin-top: 14px; }
@media (min-width: 48rem) {
  .hero { padding: 72px 0 24px; }
  h1 { font-size: 2.7rem; }
  .hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
}

.hero-card {
  background: var(--green-tint); border: 1px solid #d3e7dc;
  border-radius: 18px; padding: 22px; margin-top: 28px;
}
.hero-card h2 { font-size: 1.05rem; }
.hero-card .figure { font-size: 2rem; font-weight: 700; color: var(--green-dark); letter-spacing: -.02em; }
.hero-card .bar { height: 8px; border-radius: 99px; background: #d3e7dc; overflow: hidden; margin: 6px 0 4px; }
.hero-card .bar span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.hero-card .row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }
@media (min-width: 48rem) { .hero-card { margin-top: 0; } }

/* ---------- sections ---------- */

.section { padding: 48px 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section h2 { margin-bottom: .2em; }
.section-lede { max-width: 52ch; margin-bottom: 28px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; padding-left: 46px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--green);
  color: #fff; font-weight: 700; font-size: .92rem;
  display: grid; place-items: center;
}
.steps h3 { margin-bottom: .2em; }
.steps p { margin: 0; font-size: .95rem; }
@media (min-width: 46rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.trust { display: grid; gap: 18px; }
.trust > div {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.trust h3 { display: flex; gap: 8px; align-items: center; }
.trust p { margin: 0; font-size: .94rem; }
@media (min-width: 46rem) { .trust { grid-template-columns: repeat(3, 1fr); } }

.cta-band { text-align: center; padding: 52px 0; }
.cta-band h2 { margin-bottom: .3em; }
.cta-band p { margin-bottom: 22px; }

/* ---------- long-form pages ---------- */

.prose { padding: 40px 0 8px; }
.prose h1 { font-size: 1.8rem; }
.prose h2 { font-size: 1.2rem; margin-top: 1.8em; }
.prose h3 { font-size: 1rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .93rem; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); }
.updated { color: var(--muted); font-size: .88rem; margin-top: -.4em; }

/* ---------- funnel ---------- */

.funnel { padding: 24px 0 0; }

.progress { margin-bottom: 26px; }
.progress-track { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0; background: var(--green); border-radius: 99px;
  transition: width .3s ease;
}
.progress-label {
  display: flex; justify-content: space-between; font-size: .82rem;
  color: var(--muted); margin-top: 8px;
}

.step[hidden] { display: none; }
.step h1 { font-size: 1.55rem; }
.step > p { max-width: 48ch; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: .85rem; color: var(--muted); margin: 4px 0 0; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"] {
  width: 100%; padding: 13px 14px; font: inherit; color: var(--ink);
  border: 1px solid #c7d0da; border-radius: var(--radius); background: #fff;
  min-height: 50px;
}
.field input:focus { border-color: var(--green); }
.field input[aria-invalid="true"] { border-color: var(--danger); background: #fdf6f6; }

.bill-value { font-size: 2rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.bill-value span { font-size: 1rem; font-weight: 400; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--green); height: 34px; }
.range-ends { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); }

.choices { display: grid; gap: 10px; margin: 0 0 20px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 16px 18px; border: 1px solid #c7d0da; border-radius: var(--radius);
  background: #fff; font: inherit; color: var(--ink); text-align: left;
  cursor: pointer; min-height: 58px;
  transition: border-color .12s ease, background .12s ease;
}
.choice:hover { border-color: var(--green); background: var(--green-tint); }
.choice[aria-pressed="true"] { border-color: var(--green); background: var(--green-tint); }
.choice .tick { margin-left: auto; opacity: 0; flex: none; }
.choice[aria-pressed="true"] .tick { opacity: 1; }

.error {
  color: var(--danger); font-size: .92rem; margin: 10px 0 0;
  display: flex; gap: 7px; align-items: flex-start;
}
.error[hidden] { display: none; }

.back {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: .92rem;
  padding: 10px 0; cursor: pointer; text-decoration: underline;
}

/* ---------- result / report ---------- */

.result-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  box-shadow: var(--shadow); margin-bottom: 22px; background: #fff;
}
.result-headline { font-size: .9rem; color: var(--muted); margin: 0 0 2px; }
.result-figure {
  font-size: 2.3rem; font-weight: 700; color: var(--green-dark);
  letter-spacing: -.025em; line-height: 1.1; margin: 0;
}
.result-figure small { font-size: .95rem; font-weight: 400; color: var(--body); display: block; margin-top: 4px; letter-spacing: 0; }

.result-grid { display: grid; gap: 14px; margin: 20px 0 0; }
.result-grid > div { background: var(--bg-soft); border-radius: var(--radius); padding: 14px 16px; }
.result-grid dt { font-size: .84rem; color: var(--muted); margin-bottom: 2px; }
.result-grid dd { margin: 0; font-size: 1.15rem; font-weight: 650; color: var(--ink); }
@media (min-width: 34rem) { .result-grid { grid-template-columns: repeat(3, 1fr); } }

details.assumptions {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 22px; background: var(--bg-soft);
}
details.assumptions summary {
  cursor: pointer; font-weight: 600; color: var(--ink); font-size: .95rem;
  list-style: none; display: flex; align-items: center; gap: 8px;
}
details.assumptions summary::-webkit-details-marker { display: none; }
details.assumptions summary::before {
  content: ""; width: 7px; height: 7px; flex: none;
  border-right: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg); transition: transform .2s ease; margin-left: 2px;
}
details.assumptions[open] summary::before { transform: rotate(45deg); }
details.assumptions ul { margin: 12px 0 0; padding-left: 1.2em; font-size: .9rem; }
details.assumptions li { margin-bottom: .5em; }

.flag {
  background: #fff8e8; border: 1px solid #f0d9a8; border-radius: var(--radius);
  padding: 12px 14px; font-size: .9rem; margin-bottom: 18px;
}

/* ---------- consent ---------- */

.consent {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; background: var(--bg-soft); margin: 18px 0;
}
.consent input[type="checkbox"] {
  flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green);
}
.consent label { font-size: .84rem; line-height: 1.5; color: var(--body); }

.spinner {
  width: 17px; height: 17px; border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--green); color: #fff;
  padding: 10px 16px; z-index: 30; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- small utilities ----------
   These exist as classes rather than style="" attributes on purpose: the
   Content-Security-Policy in site/_headers uses style-src 'self' with no
   'unsafe-inline', so a style attribute is silently dropped by the browser.
   Anything dynamic is set through the CSSOM in JS, which CSP does allow. */

.u-flush      { margin: 0; }
.u-note       { font-size: .85rem; margin: 2px 0 16px; }
.u-note-tight { font-size: .85rem; margin-bottom: 6px; }
.u-caption    { font-size: .85rem; margin-bottom: 14px; }
.u-subtle     { margin: 14px 0 0; font-size: .94rem; }
.u-gap-sm     { margin-top: 10px; }
.u-page-pad   { padding: 40px 20px 60px; }

/* Decorative fill on the sample-estimate card. */
.hero-card .bar span { width: 62%; }

/* Inline email suggestion ("did you mean gmail.com?"). */
.suggest { font-size: .88rem; margin: 6px 0 0; color: var(--body); }
.suggest[hidden] { display: none; }
.suggest.bad { color: var(--danger); }
.suggest-fix {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 650;
  color: var(--green); text-decoration: underline; cursor: pointer;
}
.suggest-fix:hover { color: var(--green-dark); }

/* Post-submit confirmation screen. */
.sent-mark { margin-bottom: 14px; }
