/* Solar feasibility site. System fonts, no web fonts: fast first paint. */
:root {
  --ink: #0f1d2b;
  --ink-2: #3b4a5a;
  --muted: #5f6b78;
  --line: #dfe5ec;
  --bg: #ffffff;
  --soft: #f4f7fa;
  --navy: #0f2a43;
  --sun: #f5a524;
  --sun-deep: #c97a06;
  --sky: #2563eb;
  --good: #047857;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 29, 43, 0.06), 0 6px 24px rgba(15, 29, 43, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--sky); text-underline-offset: 2px; }
a:hover { color: #1d4ed8; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; margin-top: 1.2em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-size: 1.08rem; letter-spacing: -0.015em; }
.brand__name b { font-weight: 750; }
.brand__name span { font-weight: 450; color: var(--ink-2); }
.nav { display: flex; gap: 4px; }
.nav a, .menu nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; transition: background 0.15s, color 0.15s; }
.nav a:hover, .menu nav a:hover { background: var(--soft); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 600; background: var(--soft); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.menu nav { position: absolute; right: 0; top: 52px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: grid; min-width: 220px; }
@media (max-width: 900px) { .nav { display: none; } .menu { display: block; } }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border-radius: 12px; border: 0; font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform 0.12s, box-shadow 0.15s, background 0.15s; min-height: 48px; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--sun); color: #1f1300; box-shadow: 0 2px 0 var(--sun-deep); }
.btn--primary:hover { background: #ffb53a; color: #1f1300; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: #17395a; color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
label { font-weight: 600; display: block; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], select, textarea {
  width: 100%; padding: 12px 14px; font: 1rem var(--font); border: 1.5px solid #c9d3dd; border-radius: 10px; background: #fff; color: var(--ink); min-height: 48px;
}
input:focus, select:focus, textarea:focus { border-color: var(--sky); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
.field { margin-bottom: 18px; }
.row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.error { background: #fef2f2; color: var(--bad); border: 1px solid #fecaca; padding: 12px 14px; border-radius: 10px; }
.notice { background: #fffbeb; border: 1px solid #fde68a; padding: 12px 14px; border-radius: 10px; }
.ok { background: #ecfdf5; border: 1px solid #a7f3d0; padding: 12px 14px; border-radius: 10px; }

/* Cards and sections */
.section { padding: 56px 0; }
.section--soft { background: var(--soft); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 700; color: #8a5200; margin-bottom: 8px; }
.pill { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--ink-2); }
.pill--open, .pill--in_effect { background: #ecfdf5; color: var(--good); }
.pill--closed, .pill--ended { background: #f3f4f6; color: #4b5563; }
.pill--paused, .pill--announced, .pill--unverified { background: #fffbeb; color: var(--warn); }

/* Hero */
.hero { background: linear-gradient(180deg, #0f2a43 0%, #16395b 100%); color: #fff; padding: 56px 0 64px; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.2rem; color: #d6e2ee; max-width: 36em; }
.hero .points { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 8px; color: #e7eef5; }
.hero .points li::before { content: "✓"; color: var(--sun); font-weight: 700; margin-right: 10px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__cta .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.hero__cta .btn--ghost:hover { border-color: #fff; color: #fff; }
.hero__note { font-size: 0.9rem; color: #b8c8d8; margin-top: 12px; }
@media (max-width: 860px) { .hero__inner { grid-template-columns: 1fr; } .hero__art { max-width: 420px; margin: 0 auto; } }

/* Hero illustration: sun, rays, panels. Gentle, and off for reduced motion. */
.sun-rays { transform-origin: 300px 90px; animation: spin 60s linear infinite; }
.sun-core { animation: glow 4s ease-in-out infinite; }
.panel-glint { animation: glint 5s ease-in-out infinite; }
.panel-glint:nth-of-type(2) { animation-delay: 0.6s; }
.panel-glint:nth-of-type(3) { animation-delay: 1.2s; }
.beam { stroke-dasharray: 6 10; animation: beam 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow { 50% { opacity: 0.85; } }
@keyframes glint { 0%, 70%, 100% { opacity: 0; } 80% { opacity: 0.55; } }
@keyframes beam { to { stroke-dashoffset: -32; } }

/* Steps: bill → report */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); list-style: none; padding: 0; }
.steps li { position: relative; padding: 22px 20px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; top: -14px; left: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; }
.steps h3 { margin-top: 6px; }

.transform { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 28px 0; }
.transform__doc { width: 120px; height: 150px; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 7px; align-content: start; }
.transform__doc i { display: block; height: 7px; border-radius: 4px; background: #e5eaf0; }
.transform__doc i.w60 { width: 60%; } .transform__doc i.w80 { width: 80%; } .transform__doc i.hl { background: var(--sun); width: 45%; }
.transform__doc .bars { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.transform__doc .bars b { flex: 1; background: var(--sky); border-radius: 2px; animation: grow 3s ease-in-out infinite; transform-origin: bottom; }
.transform__doc .bars b:nth-child(2) { animation-delay: 0.2s; } .transform__doc .bars b:nth-child(3) { animation-delay: 0.4s; } .transform__doc .bars b:nth-child(4) { animation-delay: 0.6s; }
.transform__arrow { font-size: 2rem; color: var(--sun-deep); animation: nudge 2s ease-in-out infinite; }
@keyframes grow { 0%, 100% { transform: scaleY(0.55); } 50% { transform: scaleY(1); } }
@keyframes nudge { 50% { transform: translateX(6px); } }

/* Pricing and trust */
.price { font-size: 2.6rem; font-weight: 800; color: var(--navy); }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.list-check { list-style: none; padding: 0; }
.list-check li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.list-check li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.list-x li::before { content: "✕"; color: var(--bad); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.highlight td { background: #fff7e6; }

/* Report */
.verdict { border-left: 6px solid var(--muted); background: var(--soft); padding: 20px 22px; border-radius: 12px; margin: 20px 0; }
.verdict h2 { margin: 0 0 8px; }
.verdict--worthwhile { border-color: var(--good); } .verdict--worthwhile h2 { color: var(--good); }
.verdict--borderline { border-color: var(--warn); } .verdict--borderline h2 { color: var(--warn); }
.verdict--unlikely, .verdict--not_worthwhile { border-color: var(--bad); } .verdict--unlikely h2, .verdict--not_worthwhile h2 { color: var(--bad); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.figure { background: var(--soft); border-radius: 12px; padding: 14px 16px; }
.figure span { display: block; font-size: 0.82rem; color: var(--muted); }
.figure strong { font-size: 1.4rem; }
.roof { position: relative; max-width: 640px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #1f2a33; }
.roof img { display: block; width: 100%; height: auto; }
.roof svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.roof--schematic { background: var(--soft); }
.roof--schematic svg { position: static; }
.roof [hidden] { display: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); margin: 8px 0; }
.chart { width: 100%; max-width: 720px; }
.toc { columns: 2; font-size: 0.95rem; } @media (max-width: 600px) { .toc { columns: 1; } }
.report-section { padding-top: 8px; }
.progress { display: flex; align-items: center; gap: 14px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--sun); border-radius: 50%; animation: spin 0.9s linear infinite; }

/* Flow */
.flow { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .flow { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs label { font-weight: 600; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; display: flex; gap: 8px; align-items: center; margin: 0; }
.tabs input { accent-color: var(--navy); }
.tabs label:has(input:checked) { border-color: var(--navy); background: var(--soft); }
.dropzone { border: 2px dashed #c9d3dd; border-radius: 12px; padding: 22px; text-align: center; background: var(--soft); }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.summary-box { position: sticky; top: 84px; }

/* Articles */
.article { max-width: 760px; }
.article h2 { font-size: 1.5rem; }
.article li { margin-bottom: 6px; }
.callout { background: var(--soft); border-left: 4px solid var(--sun); padding: 14px 18px; border-radius: 8px; margin: 20px 0; }
.byline { color: var(--muted); font-size: 0.9rem; }
.affiliate { border: 1px dashed #c9d3dd; border-radius: 12px; padding: 16px 18px; margin: 24px 0; }
.affiliate__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ad { margin: 28px 0; text-align: center; }
.ad__label { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* Footer */
.site-footer { background: var(--navy); color: #c9d6e3; padding: 48px 0 32px; margin-top: 56px; font-size: 0.95rem; }
.site-footer a { color: #e7eef5; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.site-footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .site-footer__cols { grid-template-columns: 1fr 1fr; } }
.brand--footer { color: #fff; }
.brand--footer .brand__name span { color: #b9c7d6; }
.fineprint { font-size: 0.8rem; color: #9fb2c5; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 18px; margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .no-print, .ad { display: none !important; }
  body { font-size: 12pt; }
}

/* Newsletter sign-up */
.newsletter__row { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter__row input { flex: 1 1 220px; width: auto; }
.newsletter__fine { font-size: 0.8rem; color: var(--muted); margin: 10px 0 0; }
.newsletter__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-footer__newsletter { max-width: 620px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.site-footer__newsletter p { margin: 0 0 12px; }
.newsletter--dark label { color: #fff; }
.newsletter--dark .newsletter__fine { color: #9fb2c5; }
.site-footer .newsletter__fine a { display: inline; padding: 0; text-decoration: underline; }

/* Free assessment */
.assessment { margin-top: 20px; }
.assessment .figures { margin: 16px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-chart { width: 100%; max-width: 420px; height: auto; display: block; }
.mini-chart rect { fill: var(--sun); }
.mini-chart text { font: 11px var(--font); fill: var(--muted); text-anchor: middle; }
.assessment__next { background: var(--soft); border-radius: 10px; padding: 14px 16px; margin-top: 16px; }
@media (max-width: 520px) { .assessment .figure strong { font-size: 1.1rem; } }

/* Trees and shade */
.roof--trees { margin: 12px 0 6px; }
.roof--trees .tree-panel { fill: #2563eb; fill-opacity: 0.55; stroke: #fff; stroke-width: 0.5; pointer-events: none; }
.roof--trees [data-tree] { fill: #22c55e; fill-opacity: 0.18; stroke: #facc15; stroke-width: 1.6; cursor: pointer; }
.roof--trees [data-tree]:hover { fill-opacity: 0.35; }
.roof--trees [data-tree]:focus-visible { outline: none; stroke: #fff; stroke-width: 2.5; }
.roof--trees [data-tree].picked { fill: #dc2626; fill-opacity: 0.5; stroke: #fecaca; }
.steps { padding-left: 1.2em; }
.steps li { margin: 4px 0; }
.legend .key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: middle; }
.legend .key:first-child { margin-left: 0; }
.key--tree { background: rgba(34, 197, 94, 0.3); border: 2px solid #facc15; }
.key--picked { background: rgba(220, 38, 38, 0.6); }
.key--panel { background: rgba(37, 99, 235, 0.7); }
.tree-actions .btn { margin: 0 6px 6px 0; }
