/* EnerLogic roof solar assessment + calculator. Everything is scoped to .solar-scope so styles.css is untouched.
   Colours come from the site variables in styles.css (--primary-color, --secondary-color, ...). */
.solar-scope{--s-ink:var(--text-dark,#1a1a1a);--s-ink2:var(--text-light,#666);--s-line:var(--border-color,#e0e0e0);
  --s-dark:var(--primary-dark,#1e3f4f);--s-dark2:#264d60;--s-dark3:#173441;--s-mid:var(--primary-color,#2e5a6f);--s-accent:var(--secondary-color,#f2d115);
  --s-radius:14px;font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--s-ink)}
.solar-scope *{box-sizing:border-box}
.solar-scope .hidden{display:none !important}
.solar-scope .sr-only{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.solar-scope svg{flex:none}

/* ---------- address search ---------- */
.solar-hero{position:relative;background:linear-gradient(135deg,var(--s-dark) 0%,var(--s-mid) 100%);color:#fff;padding:72px 0 44px}
.solar-hero .container{position:relative}
.solar-hero-inner{max-width:880px;margin:0 auto;text-align:center}
.solar-eyebrow{display:inline-block;font-size:.75rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--s-accent);margin-bottom:14px}
.solar-hero h2{font-size:clamp(1.9rem,4.4vw,3rem);line-height:1.15;color:#fff;margin:0 0 14px;font-weight:800}
.solar-hero h2 .hl{color:var(--s-accent)}
.solar-hero .solar-lede{font-size:1.1rem;color:#d3e2ea;max-width:62ch;margin:0 auto 8px}
.solar-hero .solar-fine{font-size:.9rem;color:#a9c4d0;margin:0 0 28px}
.solar-scope .search{position:relative;display:flex;gap:10px;background:var(--s-dark3);border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:8px;max-width:760px;margin:0 auto;text-align:left}
.solar-scope .search .field{position:relative;flex:1;display:flex;align-items:center}
.solar-scope .search .field svg{position:absolute;left:14px;width:20px;height:20px;color:#a9c4d0;pointer-events:none}
.solar-scope .search input{width:100%;height:52px;border:0;background:transparent;color:#fff;font:inherit;font-size:1rem;padding:0 14px 0 44px;border-radius:10px}
.solar-scope .search input::placeholder{color:#93b3c1}
.solar-scope .search input:focus{outline:none;background:rgba(255,255,255,.05)}
.solar-scope .search-light{background:#fff;border-color:var(--s-line);box-shadow:var(--shadow,0 4px 20px rgba(46,90,111,.1));margin:26px 0 0;max-width:none}
.solar-scope .search-light input{color:var(--s-ink)}
.solar-scope .search-light input::placeholder{color:#8a8a8a}
.solar-scope .search-light .field svg{color:var(--s-mid)}
.solar-scope .suggest{position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;color:var(--s-ink);border-radius:12px;box-shadow:0 18px 40px -12px rgba(0,0,0,.4);list-style:none;margin:0;padding:6px;z-index:900;display:none;max-height:300px;overflow:auto}
.solar-scope .suggest.show{display:block}
.solar-scope .suggest li{padding:11px 12px;border-radius:8px;cursor:pointer;font-size:.95rem;margin:0}
.solar-scope .suggest li[aria-selected="true"],.solar-scope .suggest li:hover{background:#eaf1f4}
.solar-scope .btn[disabled]{opacity:.6;cursor:progress}
.solar-scope .btn svg{width:18px;height:18px}
.solar-scope .search .btn{min-height:52px;display:inline-flex;align-items:center;gap:8px;justify-content:center;white-space:nowrap}
.solar-scope .btn-ghost{background:transparent;color:inherit;border:2px solid currentColor;border-radius:8px;padding:12px 22px;font-weight:600;font-size:1rem;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;font-family:inherit;transition:all .2s}
.solar-scope .panel .btn-ghost{color:#d3e2ea;border-color:rgba(211,226,234,.5)}
.solar-scope .panel .btn-ghost:hover{background:rgba(255,255,255,.1)}
.solar-scope .panel .btn,.solar-scope .btn-primary{text-decoration:none}

/* ---------- assessment panel ---------- */
.solar-assess{background:transparent;padding:0 0 72px}
.solar-scope .panel{background:var(--s-dark2);border:1px solid rgba(255,255,255,.12);border-radius:20px;overflow:hidden;display:grid;grid-template-columns:1.25fr 1fr;box-shadow:0 30px 60px -30px rgba(0,0,0,.5);color:#fff}
.solar-scope .map-wrap{position:relative;isolation:isolate;min-height:440px;background:#16303d}
.solar-scope .panel .map{position:absolute;inset:0}
.solar-scope .map-toolbar{position:absolute;left:12px;bottom:12px;z-index:500;display:flex;gap:8px;flex-wrap:wrap}
.solar-scope .chip{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:rgba(23,52,65,.92);color:#fff;font:600 .85rem 'Inter',sans-serif;cursor:pointer}
.solar-scope .chip:hover{background:var(--s-dark3)}
.solar-scope .chip.on{background:var(--s-accent);color:#1a1a1a;border-color:var(--s-accent)}
.solar-scope .chip svg{width:16px;height:16px}
.solar-scope .map-status{position:absolute;inset:0;z-index:600;display:none;align-items:center;justify-content:center;gap:12px;background:rgba(23,52,65,.6);color:#fff;font-weight:600}
.solar-scope .map-status.show{display:flex}
.solar-scope .spinner{width:22px;height:22px;border-radius:50%;border:3px solid rgba(255,255,255,.3);border-top-color:var(--s-accent);animation:solar-spin .8s linear infinite}
@keyframes solar-spin{to{transform:rotate(360deg)}}
.solar-scope .map-placeholder{position:absolute;inset:0;background:linear-gradient(135deg,#1e3f4f,#4a7a8f);background-size:cover;background-position:center;display:flex;align-items:flex-end}
.solar-scope .map-placeholder img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.solar-scope .map-placeholder .cap{position:relative;z-index:1;margin:14px;padding:6px 12px;border-radius:999px;background:rgba(23,52,65,.85);font-size:.8rem;font-weight:600;color:#fff}
.solar-scope .panel .results{padding:30px 30px 26px;display:flex;flex-direction:column}
.solar-scope .results .tag{font:700 .72rem 'Inter',sans-serif;letter-spacing:.16em;text-transform:uppercase;color:var(--s-accent)}
.solar-scope .results h3{font-size:1.5rem;margin:8px 0 6px;color:#fff;font-weight:700}
.solar-scope .results .addr{color:#b6ccd6;font-size:.95rem;margin-bottom:18px}
.solar-scope .stat-list{list-style:none;margin:0 0 18px;padding:0}
.solar-scope .stat-list li{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:12px 0;border-top:1px solid rgba(255,255,255,.12)}
.solar-scope .stat-list li span{color:#d3e2ea;font-size:.95rem}
.solar-scope .stat-list li b{font-weight:800;font-size:1.15rem;color:#fff;text-align:right}
.solar-scope .stat-list li.big b{font-size:1.5rem;color:var(--s-accent)}
.solar-scope .stat-list li.blue b{color:#a9d6ea}
.solar-scope .results .note{font-size:.82rem;color:#9fbac6;margin-top:auto}
.solar-scope .results .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.solar-scope .empty-state{display:flex;flex-direction:column;justify-content:center;height:100%}
.solar-scope .empty-state h3{margin-top:8px}
.solar-scope .empty-state ol{padding-left:20px;color:#d3e2ea;margin:0 0 14px}
.solar-scope .empty-state li{margin-bottom:8px}
.solar-scope .alert{background:rgba(242,209,21,.12);border:1px solid rgba(242,209,21,.4);color:#fff3b0;border-radius:12px;padding:12px 14px;font-size:.92rem;margin-bottom:14px}
.solar-scope .alert.light{background:#fff9db;border-color:#ecd96b;color:#5b4b00}
@media (max-width:960px){.solar-scope .panel{grid-template-columns:1fr}.solar-scope .map-wrap{min-height:380px}}
@media (max-width:640px){.solar-scope .search{flex-direction:column}.solar-scope .search .btn{width:100%}.solar-hero{padding:48px 0 32px}}

/* ---------- calculator page ---------- */
.solar-calc-hero{background:var(--bg-light,#f8f9fa);padding:56px 0 32px}
.solar-calc-hero h1{font-size:clamp(1.9rem,4vw,2.8rem);line-height:1.15;color:var(--s-dark);margin:6px 0 10px;font-weight:800}
.solar-calc-hero .solar-eyebrow{color:var(--s-mid)}
.solar-calc-hero .solar-lede{color:var(--s-ink2);max-width:62ch;font-size:1.08rem}
.solar-calc-body{padding:36px 0 80px}
.solar-scope .calc{display:grid;grid-template-columns:360px 1fr;gap:24px;align-items:start}
.solar-scope .calc aside{position:sticky;top:130px}
.solar-scope .calc fieldset{border:1px solid var(--s-line);border-radius:var(--s-radius);padding:18px 20px 6px;margin:0 0 16px;background:#fff}
.solar-scope .calc legend{font:800 .76rem 'Inter',sans-serif;letter-spacing:.14em;text-transform:uppercase;color:var(--s-mid);padding:0 8px}
.solar-scope .fld{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.solar-scope .fld label{font:600 .85rem 'Inter',sans-serif;color:var(--s-ink)}
.solar-scope .fld input,.solar-scope .fld select{font:inherit;font-size:1rem;min-height:44px;padding:9px 12px;border-radius:10px;border:1.5px solid var(--s-line);background:#fff;color:var(--s-ink);width:100%}
.solar-scope .fld input:focus,.solar-scope .fld select:focus{outline:none;border-color:var(--s-mid)}
.solar-scope .hint{font-size:.8rem;color:var(--s-ink2)}
.solar-scope .range-row{display:flex;align-items:center;gap:12px}
.solar-scope .range-row input[type=range]{flex:1;accent-color:var(--s-mid);min-height:auto;padding:0;border:0}
.solar-scope .range-row output{font:800 .95rem 'Inter',sans-serif;min-width:62px;text-align:right;color:var(--s-dark)}
.solar-scope .calc-map{position:relative;isolation:isolate;height:440px;border-radius:var(--s-radius);overflow:hidden;border:1px solid var(--s-line);background:#16303d}
.solar-scope .calc-map .map{position:absolute;inset:0}
.solar-scope .kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}
.solar-scope .kpi{background:#fff;border:1px solid var(--s-line);border-radius:var(--s-radius);padding:16px 18px}
.solar-scope .kpi span{display:block;font-size:.82rem;color:var(--s-ink2);font-weight:600}
.solar-scope .kpi b{display:block;font-weight:800;font-size:1.4rem;color:var(--s-dark);margin-top:4px}
.solar-scope .kpi.g{background:var(--s-dark);border-color:var(--s-dark)}
.solar-scope .kpi.g span{color:#b6ccd6}
.solar-scope .kpi.g b{color:var(--s-accent)}
.solar-scope .calc-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.solar-scope .chart-card{background:#fff;border:1px solid var(--s-line);border-radius:var(--s-radius);padding:20px 22px}
.solar-scope .chart-card h3{font-size:1rem;margin:0 0 4px;color:var(--s-dark)}
.solar-scope .chart{width:100%;height:auto}
.solar-scope .chart text{font:600 11px 'Inter',sans-serif;fill:var(--s-ink2)}
.solar-scope .table{width:100%;border-collapse:collapse;font-size:.94rem}
.solar-scope .table td{padding:9px 0;border-top:1px solid var(--s-line)}
.solar-scope .table td:last-child{text-align:right;font-weight:700}
.solar-scope .source-badge{display:inline-flex;align-items:center;font:700 .75rem 'Inter',sans-serif;padding:4px 10px;border-radius:999px;background:#e4eef2;color:var(--s-dark)}
.solar-scope .source-badge.fallback{background:#fff3d1;color:#5b4b00}
.solar-scope .calc-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
.solar-scope .calc-actions .btn-ghost{color:var(--s-dark)}
.solar-scope .calc-fine{font-size:.82rem;color:var(--s-ink2);margin-top:18px}
@media (max-width:1000px){.solar-scope .calc{grid-template-columns:1fr}.solar-scope .calc aside{position:static}}
@media (max-width:900px){.solar-scope .kpis{grid-template-columns:1fr 1fr}}
@media (max-width:820px){.solar-scope .calc-grid{grid-template-columns:1fr}}
.leaflet-container{font-family:'Inter',sans-serif}
@media print{.solar-hero form,.navbar,.energy-ticker,.footer,.solar-scope .actions,.solar-scope .calc-actions{display:none !important}}
.roof-label{background:#1e3f4f;color:#fff;border:0;border-radius:8px;font:700 12px 'Inter',sans-serif;padding:4px 8px;box-shadow:none}
.roof-label::before{display:none}
.solar-scope #assess{scroll-margin-top:150px}

/* Front page: assessment lives inside the hero, directly under the hero buttons */
.hero.hero--assess{min-height:0;flex-direction:column;align-items:stretch;padding-bottom:0}
.hero.hero--assess .hero-buttons{margin-bottom:2rem}
.hero.hero--assess #assess{padding-top:44px}
.hero.hero--assess .solar-hero{background:transparent;padding:0}
