/* SolarInstallers.io — shared styles */

/* Self-hosted Inter (latin subset, variable). Replaces the render-blocking
   Google Fonts request. font-display:swap keeps text visible during load. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --sun: #f5a623;
  --sun-dark: #b45309;   /* text-on-white safe: 4.9:1 contrast */
  --navy: #0b2545;
  --navy-soft: #13315c;
  --sky: #eef4fb;
  --ink: #1a2433;
  --muted: #5b6b7f;
  --line: #e2e8f0;
  --ok: #1a9e5f;
  --warn: #d9822b;
  --bad: #d64545;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 37, 69, 0.10);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
}
h1, h2, h3 { line-height: 1.2; color: var(--navy); font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
a { color: var(--sun-dark); }
p { color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.alt { background: var(--sky); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--sun-dark); margin: 0 0 8px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); text-decoration: none; font-size: 1.15rem; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--sun), var(--sun-dark));
  display: grid; place-items: center; color: #fff; font-size: 1rem;
}
.nav { display: flex; gap: 16px; align-items: center; }
.nav a { color: var(--navy-soft); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.nav a:hover { color: var(--sun-dark); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--navy); }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 999px;
  font-weight: 700; text-decoration: none; cursor: pointer; border: 0;
  font-size: 1rem; transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--sun), var(--sun-dark)); color: #fff; box-shadow: 0 8px 20px rgba(245,166,35,.35); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--sun); }
.btn-block { display: block; width: 100%; text-align: center; }

/* Hero */
.hero { background: radial-gradient(1000px 500px at 80% -10%, rgba(245,166,35,.18), transparent), var(--navy); color: #fff; padding: 90px 0 80px; }
.hero h1 { color: #fff; }
.hero .lead { color: #c7d5e6; }
.hero .quote { font-style: italic; color: var(--sun); font-weight: 600; margin: 14px 0 24px; font-size: 1.1rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.pillar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); text-decoration: none; color: inherit;
  display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease;
}
.pillar:hover { transform: translateY(-4px); border-color: var(--sun); }
.pillar .num { font-size: .8rem; font-weight: 800; color: var(--sun-dark); letter-spacing: .1em; }
.pillar h3 { margin: 6px 0 8px; }
.pillar p { color: var(--muted); margin: 0 0 16px; flex: 1; }
.pillar .go { font-weight: 700; color: var(--sun-dark); }

/* Funnel */
.funnel { max-width: 520px; margin: 40px auto 0; }
.funnel-step { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; text-align: center; font-weight: 600; box-shadow: var(--shadow); }
.funnel-step.q { background: var(--sky); font-style: italic; color: var(--navy-soft); font-weight: 600; border-style: dashed; }
.funnel-step.lead { background: linear-gradient(135deg, var(--sun), var(--sun-dark)); color: #fff; font-size: 1.1rem; }
.funnel-arrow { text-align: center; color: var(--sun-dark); font-size: 1.4rem; line-height: 1; margin: 8px 0; }

/* Category grid */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.cat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.cat .ico { font-size: 1.6rem; }
.cat h3 { font-size: 1.1rem; margin: 10px 0 4px; }
.cat p { color: var(--muted); font-size: .92rem; margin: 0; }

/* Forms / calculator */
.tool-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy); font-size: .95rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--sun); border-color: var(--sun); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.toggle-row { display: flex; align-items: center; gap: 10px; }
.toggle-row input { width: auto; }

.results { position: sticky; top: 90px; }
.result-hero { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 26px; text-align: center; margin-bottom: 18px; }
.result-hero .big { font-size: 2.4rem; font-weight: 800; color: var(--sun); }
.result-hero .sub { color: #c7d5e6; font-size: .9rem; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }
.result-list li span:last-child { font-weight: 700; color: var(--navy); }
.result-list li.total { font-size: 1.05rem; }
.result-list li.total span:last-child { color: var(--sun-dark); }

/* Verdict / flags */
.verdict { border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; font-weight: 600; }
.verdict.ok { background: #e6f6ee; color: var(--ok); border: 1px solid #b6e3ca; }
.verdict.warn { background: #fdf1e3; color: var(--warn); border: 1px solid #f3d5ae; }
.verdict.bad { background: #fbe9e9; color: var(--bad); border: 1px solid #f0c2c2; }
.flags { list-style: none; padding: 0; margin: 0; }
.flags li { padding: 10px 0 10px 26px; position: relative; border-bottom: 1px solid var(--line); font-size: .93rem; }
.flags li::before { position: absolute; left: 0; top: 9px; }
.flags li.f-ok::before { content: "✔"; color: var(--ok); }
.flags li.f-warn::before { content: "▲"; color: var(--warn); }
.flags li.f-bad::before { content: "✖"; color: var(--bad); }

/* Installers */
.installer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; }
.installer { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.installer .top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.installer h3 { margin: 0; font-size: 1.15rem; }
.installer .stars { color: var(--sun); font-weight: 700; white-space: nowrap; }
.installer .meta { color: var(--muted); font-size: .88rem; margin: 4px 0 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.badge { background: var(--sky); color: var(--navy-soft); font-size: .76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; font-size: .9rem; background: #fff; }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Footer */
.site-footer { background: var(--navy); color: #c7d5e6; padding: 48px 0 28px; margin-top: 40px; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h4, .site-footer h2 { color: #fff; margin: 0 0 12px; font-size: .95rem; font-weight: 700; }
.site-footer p { color: #c7d5e6; }
.site-footer a { color: #c7d5e6; text-decoration: none; display: block; padding: 4px 0; font-size: .9rem; }
.site-footer a:hover { color: var(--sun); }
.site-footer .legal { border-top: 1px solid var(--navy-soft); margin-top: 30px; padding-top: 20px; font-size: .82rem; }

#other-states a, #near-states a { display: block; padding: 5px 0; font-weight: 600; }

/* Adjacent affiliate offers */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 8px; }
.offer {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  text-decoration: none; background: #fff; transition: border-color .15s ease, transform .12s ease;
}
.offer:hover { border-color: var(--sun); transform: translateY(-2px); }
.offer-name { font-weight: 700; color: var(--navy); }
.offer-name::after { content: " ↗"; color: var(--muted); font-weight: 400; }
.offer-blurb { font-size: .85rem; color: var(--muted); }
.disclosure { font-size: .78rem; color: var(--muted); line-height: 1.5; margin: 6px 0 0; }

/* Lead-form consent */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.consent input { width: auto; margin-top: 3px; flex-shrink: 0; }
.consent a { color: var(--sun-dark); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.step p { color: var(--muted); font-size: .93rem; margin: 0; }
.step .n { width: 30px; height: 30px; border-radius: 999px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* Calculator sub-nav */
.tools-strip { border-bottom: 1px solid var(--line); background: #fff; }
.tools-strip .wrap { display: flex; gap: 8px; padding-top: 12px; padding-bottom: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tools-strip a {
  padding: 8px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  font-weight: 600; font-size: .9rem; color: var(--navy-soft); border: 1px solid var(--line);
}
.tools-strip a:hover { border-color: var(--sun); }
.tools-strip a[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Calculators index grid */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 32px; }
.calc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease; }
.calc-card:hover { transform: translateY(-3px); border-color: var(--sun); }
.calc-card .ico { font-size: 1.6rem; }
.calc-card h3 { margin: 10px 0 6px; font-size: 1.1rem; }
.calc-card p { color: var(--muted); font-size: .9rem; margin: 0 0 14px; flex: 1; }
.calc-card .go { font-weight: 700; color: var(--sun-dark); font-size: .9rem; }

/* Appliance picker */
.appliances { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 4px 0 8px; }
.appliances label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: .92rem; margin: 0; }
.appliances input { width: auto; }
.appliances .kwh { margin-left: auto; color: var(--muted); font-size: .82rem; }
@media (max-width: 640px) { .appliances { grid-template-columns: 1fr; } }

.disclaimer { font-size: .82rem; color: var(--muted); margin-top: 16px; }
.note { background: var(--sky); border-left: 3px solid var(--sun); padding: 14px 18px; border-radius: 8px; font-size: .9rem; color: var(--navy-soft); }

@media (max-width: 900px) {
  .pillars, .cats { grid-template-columns: 1fr; }
  .tool-layout { grid-template-columns: 1fr; }
  .results { position: static; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 6px; }
  .nav.open { display: flex; }
  .nav a { padding: 8px 0; }
  .nav-toggle { display: block; }
  .field-row { grid-template-columns: 1fr; }
}

/* ============================================================= *
 *  buildprompt rebuild — ZIP hero, wizard, directory, chrome    *
 * ============================================================= */

/* ZIP-code hero entry */
.zip-hero { display: flex; gap: 10px; max-width: 460px; margin: 26px 0 10px; flex-wrap: wrap; }
.zip-hero input {
  flex: 1 1 190px; padding: 15px 18px; border-radius: 999px; border: 0;
  font-size: 1.05rem; font-family: inherit; color: var(--ink); min-width: 0;
}
.zip-hero input:focus { outline: 3px solid var(--sun); }
.zip-hero .btn { flex: 0 0 auto; }
.zip-hero-err { color: #ffd9b0; font-size: .9rem; margin: 2px 0 0; font-weight: 600; }
.hero .micro { color: #9fb3c8; font-size: .85rem; margin-top: 10px; }

/* Breadcrumbs (injected by SI.mountChrome) */
.breadcrumbs { background: #fff; border-bottom: 1px solid var(--line); font-size: .84rem; }
.breadcrumbs .wrap { padding-top: 10px; padding-bottom: 10px; overflow-x: auto; white-space: nowrap; }
.breadcrumbs a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumbs a:hover { color: var(--sun-dark); }
.breadcrumbs .sep { color: var(--line); margin: 0 8px; }
.breadcrumbs [aria-current="page"] { color: var(--navy); font-weight: 600; }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); display: none;
}
.sticky-cta .btn { padding: 13px; }
.sticky-cta:has(.btn + .btn) { display: flex; gap: 8px; }
.sticky-cta:has(.btn + .btn) .btn { flex: 1; }
.sticky-cta:has(.btn + .btn) .btn-ghost { flex: 0 0 32%; }
@media (max-width: 760px) {
  .sticky-cta { display: block; }
  /* only reserve space when the bar is actually present (not on data-no-sticky pages) */
  body:has(.sticky-cta) { padding-bottom: 76px; }
}
.nav-phone { font-weight: 800 !important; color: var(--sun-dark) !important; white-space: nowrap; }

/* Lead wizard */
.wizard { max-width: 620px; margin: 0 auto; }
.wizard-progress { display: flex; gap: 6px; margin-bottom: 24px; }
.wizard-progress span { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.wizard-progress span.done { background: var(--sun); }
.wizard-progress span.current { background: var(--navy); }
.wizard-step { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wizard-step h2 { margin-top: 0; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.wizard-nav .btn { flex: 1; }
.wizard-nav .btn-ghost { flex: 0 0 auto; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.pick-grid label {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer;
  font-weight: 600; font-size: .95rem; display: flex; gap: 10px; align-items: center;
}
.pick-grid input { width: auto; }
.pick-grid label:has(input:checked) { border-color: var(--sun); background: #fff7ec; }
@media (max-width: 520px) { .pick-grid { grid-template-columns: 1fr; } }

/* Directory */
.dir-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px; }
.dir-toolbar input, .dir-toolbar select {
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .95rem; font-family: inherit; background: #fff;
}
.dir-toolbar input { flex: 1 1 240px; min-width: 0; }
.state-columns { columns: 220px 4; column-gap: 28px; margin-top: 20px; }
.state-columns a { display: block; padding: 6px 0; text-decoration: none; color: var(--navy-soft); font-weight: 600; font-size: .92rem; break-inside: avoid; }
.state-columns a:hover { color: var(--sun-dark); }

/* Installer cards + profile */
.unverified {
  display: inline-block; background: #eef1f5; color: var(--muted);
  font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  letter-spacing: .02em; vertical-align: middle;
}
.inst-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.inst-card h3 { margin: 0 0 2px; font-size: 1.15rem; }
.inst-card .inst-meta { color: var(--muted); font-size: .88rem; margin: 0 0 12px; }
.inst-card .badges { margin-top: 10px; }
.profile-hero { background: var(--navy); color: #fff; }
.profile-hero h1 { color: #fff; }
.profile-hero .lead { color: #c7d5e6; }
.profile-fact { display: grid; grid-template-columns: 180px 1fr; gap: 4px 18px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.profile-fact dt { font-weight: 700; color: var(--navy); }
.profile-fact dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) { .profile-fact { grid-template-columns: 1fr; } }

/* FAQ */
.faq { margin-top: 20px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; background: #fff; }
.faq summary { font-weight: 700; color: var(--navy); cursor: pointer; padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--sun-dark); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { color: var(--muted); font-size: .95rem; }

/* Trust badges strip */
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: center; margin-top: 26px; }
.trust-badges span { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--navy-soft); }
.trust-badges span::before { content: "✔"; color: var(--ok); }

/* Compact homepage calculator */
.mini-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.mini-calc .field { margin: 0; }
.mini-calc .field.full { grid-column: 1 / -1; }
@media (max-width: 620px) { .mini-calc { grid-template-columns: 1fr; } }

/* Prose pages (trust / SEO clusters) */
.prose { max-width: 760px; }
.prose h2 { margin-top: 36px; }
.prose h3 { margin-top: 24px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose .note { margin: 20px 0; }
.draft-banner { background: #fdf1e3; border-bottom: 1px solid #f3d5ae; color: #8a5a1f; font-size: .86rem; }
.draft-banner .wrap { padding: 10px 20px; }

/* ============================================================= *
 *  Solar Decision Engine — snapshot, rating, scenarios, charts  *
 * ============================================================= */

/* "Your Solar Snapshot" */
.snapshot { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 28px; }
.snapshot h2 { color: #fff; margin: 0 0 4px; }
.snapshot .grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 18px; }
.snapshot .metric .v { font-size: 1.6rem; font-weight: 800; color: var(--sun); line-height: 1.1; }
.snapshot .metric .k { font-size: .8rem; color: #c7d5e6; margin-top: 4px; }
@media (max-width: 760px) { .snapshot .grid { grid-template-columns: 1fr 1fr; } }

/* "Is solar worth it?" rating badge */
.rating { display: flex; gap: 16px; align-items: flex-start; margin-top: 18px; }
.rating-badge {
  flex: 0 0 auto; padding: 12px 20px; border-radius: 12px; font-weight: 800;
  font-size: 1.05rem; text-align: center; border: 2px solid;
}
.rating-badge.r-excellent { background: #e6f6ee; color: #0b6b3f; border-color: #b6e3ca; }
.rating-badge.r-good { background: #eef6ff; color: #0f4c8a; border-color: #bcd9f5; }
.rating-badge.r-marginal { background: #fdf1e3; color: #8a4b12; border-color: #f3d5ae; }
.rating-badge.r-poor { background: #fbe9e9; color: #a12626; border-color: #f0c2c2; }
.rating p { margin: 0; color: var(--ink); }

/* Three scenarios */
.scenario-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.scenario {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.scenario.best { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(245,166,35,.18), var(--shadow); }
.scenario h3 { margin: 0 0 2px; font-size: 1.15rem; }
.scenario .tag { font-size: .72rem; font-weight: 800; color: var(--sun-dark); letter-spacing: .05em; text-transform: uppercase; min-height: 1em; }
.scenario .headline { font-size: 1.9rem; font-weight: 800; color: var(--navy); margin: 8px 0 2px; }
.scenario .headline small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.scenario ul { list-style: none; padding: 0; margin: 12px 0 0; }
.scenario li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.scenario li span:last-child { font-weight: 700; color: var(--navy); }
@media (max-width: 800px) { .scenario-grid { grid-template-columns: 1fr; } }

/* Chart + sliders */
.chart-wrap { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; box-shadow: var(--shadow); }
.slider-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 22px; margin-top: 18px; }
.slider-row label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.slider-row .val { color: var(--sun-dark); font-weight: 700; }
.slider-row input[type=range] { width: 100%; accent-color: var(--sun); }
@media (max-width: 700px) { .slider-grid { grid-template-columns: 1fr; } }

/* Sensitivity table */
.sensitivity table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .92rem; }
.sensitivity th, .sensitivity td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sensitivity th { color: var(--navy); font-weight: 700; }
.sensitivity td:not(:first-child), .sensitivity th:not(:first-child) { text-align: right; }
.sensitivity tr-highlight { background: var(--sky); }

/* Match-score bars (installer matching) */
.match-list { display: grid; gap: 14px; margin-top: 16px; }
.match-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; box-shadow: var(--shadow); }
.match-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.match-card h3 { margin: 0; font-size: 1.1rem; }
.match-score { font-weight: 800; color: var(--sun-dark); font-size: 1.1rem; white-space: nowrap; }
.match-bar { height: 8px; border-radius: 999px; background: var(--line); margin: 10px 0 6px; overflow: hidden; }
.match-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--sun-dark)); }
.match-breakdown { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* Comparison table (compare-quotes) */
.cmp-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: .93rem; }
.cmp-table th, .cmp-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: right; }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: left; color: var(--navy); font-weight: 600; }
.cmp-table thead th { background: var(--navy); color: #fff; font-weight: 700; }
.cmp-table td.win { background: #e6f6ee; font-weight: 800; color: var(--ok); }
.cmp-verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-top: 18px; }
.cmp-verdicts .v { border-left: 3px solid var(--sun); padding: 4px 0 4px 14px; font-size: .92rem; }
@media (max-width: 640px) { .cmp-verdicts { grid-template-columns: 1fr; } .cmp-table { font-size: .82rem; } .cmp-table th, .cmp-table td { padding: 8px; } }

/* Solar Advisor chat */
.advisor { max-width: 760px; margin: 0 auto; }
.advisor-log { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.advisor-msg { padding: 14px 18px; border-radius: 14px; max-width: 90%; line-height: 1.55; }
.advisor-msg.you { align-self: flex-end; background: var(--navy); color: #fff; }
.advisor-msg.bot { align-self: flex-start; background: var(--sky); color: var(--ink); }
.advisor-msg .assump { margin-top: 10px; font-size: .82rem; color: var(--muted); }
.advisor-msg .assump summary { cursor: pointer; font-weight: 600; }
.advisor-msg .lnk { margin-top: 8px; font-size: .85rem; }
.advisor-msg .lnk a { margin-right: 12px; }
.advisor-qs { display: flex; flex-wrap: wrap; gap: 8px; }
.advisor-qs button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px;
  font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--navy-soft); font-family: inherit;
}
.advisor-qs button:hover { border-color: var(--sun); color: var(--sun-dark); }

/* Data index table */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 18px; }
.data-table th, .data-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; position: sticky; left: 0; background: #fff; }
.data-table thead th { background: var(--navy); color: #fff; position: sticky; top: 0; }
.data-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }

.assumptions-box { background: var(--sky); border-radius: 12px; padding: 16px 20px; font-size: .86rem; color: var(--navy-soft); margin-top: 16px; }
.assumptions-box ul { margin: 6px 0 0; padding-left: 18px; }
.assumptions-box li { margin: 3px 0; }
