/* ------------------------------------------------------------------ *
   Solar Investment Calculator — site chrome + content-page styles.
   The calculator itself carries its own inline <style>; this sheet
   styles the header, footer, and the prose pages (methodology, FAQ,
   about, landing pages). Tokens mirror the calculator so the two
   halves read as one site.

   Theme: light palette on bare :root. Dark values are redefined under
   the system-preference media query (unless the visitor forced light)
   and under an explicit data-theme, so the header toggle wins both ways.
 * ------------------------------------------------------------------ */
:root{
  color-scheme:light;
  --bg:#fbfcfd; --panel:#f4f7fa; --card:#ffffff;
  --ink:#161a20; --ink-soft:#3c4149; --muted:#616b78;
  --line:#dde3ea; --line-strong:#c4ccd6;
  --solar:#12864a; --solar-bg:#e7f6ee; --accent:#0d6b3b; --blue:#1a5fb4;
  --header-bg:rgba(255,255,255,.94);
  --hero-grad:linear-gradient(180deg,#eaf3fb 0%,#fdefcf 60%,#ffd9a6 100%);
  --hero-border:#f3e3c4; --hero-ink:#4d4632;
  --shadow:rgba(20,30,45,.08);
  --radius:12px; --maxw:1040px; --prosew:760px;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --bg:#0f1216; --panel:#161a20; --card:#1b2028;
    --ink:#e7ebef; --ink-soft:#c2c9d1; --muted:#8b95a1;
    --line:#2a2f39; --line-strong:#3a4150;
    --solar:#35c281; --solar-bg:#14301f; --accent:#54d191; --blue:#6aa8e0;
    --header-bg:rgba(16,18,22,.92);
    --hero-grad:linear-gradient(180deg,#141c28 0%,#1a2130 55%,#2a2416 100%);
    --hero-border:#3a3320; --hero-ink:#c9bb8f;
    --shadow:rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0f1216; --panel:#161a20; --card:#1b2028;
  --ink:#e7ebef; --ink-soft:#c2c9d1; --muted:#8b95a1;
  --line:#2a2f39; --line-strong:#3a4150;
  --solar:#35c281; --solar-bg:#14301f; --accent:#54d191; --blue:#6aa8e0;
  --header-bg:rgba(16,18,22,.92);
  --hero-grad:linear-gradient(180deg,#141c28 0%,#1a2130 55%,#2a2416 100%);
  --hero-border:#3a3320; --hero-ink:#c9bb8f;
  --shadow:rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--ink);font-size:16px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  line-height:1.6;-webkit-font-smoothing:antialiased;
  display:flex;flex-direction:column;min-height:100vh;
}
.site-wrap{max-width:var(--maxw);margin:0 auto;padding:0 20px;width:100%}
a{color:var(--accent)}
a:hover{color:var(--solar)}

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

/* ---------- header ---------- */
/* display/margin set explicitly: the calculator page also carries a bare `header{display:flex}`
   rule in its own inline stylesheet, and these class selectors out-specify it. */
.site-header{display:block;margin:0;width:100%;
  background:var(--header-bg);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);position:sticky;top:0;z-index:40}
.site-header-inner{display:flex;align-items:center;justify-content:space-between;gap:14px;
  min-height:58px;flex-wrap:wrap}
.site-header-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.site-brand{display:flex;align-items:center;gap:9px;font-weight:800;letter-spacing:-.01em;
  color:var(--ink);text-decoration:none;font-size:15.5px}
.site-brand-mark{font-size:18px}
.site-nav{display:flex;gap:4px;flex-wrap:wrap}
.site-nav a{display:inline-block;padding:7px 11px;border-radius:8px;font-size:14px;font-weight:650;
  color:var(--muted);text-decoration:none}
.site-nav a:hover{background:var(--panel);color:var(--ink)}
.site-nav a[aria-current="page"]{color:var(--accent);background:var(--solar-bg)}

/* theme toggle */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;
  flex:none;padding:0;border:1px solid var(--line);border-radius:9px;background:var(--card);
  color:var(--muted);cursor:pointer}
.theme-toggle:hover{color:var(--ink);border-color:var(--line-strong)}
.theme-toggle svg{display:block}
.theme-toggle .tt-moon{display:none}
.theme-toggle .tt-sun{display:block}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .theme-toggle .tt-sun{display:none}
  :root:not([data-theme="light"]) .theme-toggle .tt-moon{display:block}
}
:root[data-theme="dark"]  .theme-toggle .tt-sun{display:none}
:root[data-theme="dark"]  .theme-toggle .tt-moon{display:block}
:root[data-theme="light"] .theme-toggle .tt-sun{display:block}
:root[data-theme="light"] .theme-toggle .tt-moon{display:none}

/* ---------- main / prose ---------- */
.site-main{flex:1;padding:38px 20px 64px}
.prose{max-width:var(--prosew);margin:0 auto}
.prose > *:first-child{margin-top:0}
.prose h1{font-size:32px;line-height:1.2;font-weight:800;letter-spacing:-.02em;margin:0 0 10px}
.prose .byline{font-size:14px;color:var(--muted);font-weight:600;margin:0 0 18px}
.prose .lede{font-size:18px;color:var(--ink-soft);margin:0 0 28px;line-height:1.55}
.prose h2{font-size:21px;font-weight:800;letter-spacing:-.01em;margin:36px 0 10px;
  padding-top:18px;border-top:1px solid var(--line)}
.prose h3{font-size:16.5px;font-weight:750;margin:22px 0 6px}
/* keep deep-linked headings/rows clear of the sticky header */
.prose h2,.prose h3,.refrow[id]{scroll-margin-top:74px}
.prose p{margin:0 0 14px}
.prose ul,.prose ol{margin:0 0 14px;padding-left:22px}
.prose li{margin:4px 0}
.prose strong{font-weight:750}
.prose a{font-weight:600}
.prose .muted{color:var(--muted);font-size:14px}
.prose hr{border:none;border-top:1px solid var(--line);margin:32px 0}

/* callout / CTA into the tool */
.cta{display:block;background:var(--hero-grad);
  border:1px solid var(--hero-border);border-radius:16px;padding:22px 24px;margin:26px 0;text-decoration:none;color:var(--ink)}
.cta:hover{color:var(--ink);box-shadow:0 2px 14px var(--shadow)}
.cta b{display:block;font-size:18px;font-weight:800;letter-spacing:-.01em;margin-bottom:3px}
.cta span{color:var(--hero-ink);font-size:14.5px}
.btn{display:inline-block;background:var(--solar);color:#fff;font-weight:700;font-size:15px;
  text-decoration:none;padding:12px 20px;border-radius:10px;margin:6px 0}
.btn:hover{background:var(--accent);color:#fff}

/* small source-note block reused on methodology */
.srcnote{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px 18px;
  font-size:13.5px;color:var(--muted);line-height:1.55;margin:18px 0}
.srcnote b{color:var(--ink)}

/* reference rows on the methodology page */
.refrow{display:grid;grid-template-columns:200px 1fr;gap:14px;padding:9px 0;border-top:1px solid var(--line);
  font-size:14px;line-height:1.5}
.refrow b{color:var(--ink);font-variant-numeric:tabular-nums;font-weight:700}
.refrow span{color:var(--ink-soft)}
@media(max-width:560px){.refrow{grid-template-columns:1fr;gap:2px}}

/* FAQ */
.faq-item{border-top:1px solid var(--line);padding:18px 0}
.faq-item:last-child{border-bottom:1px solid var(--line)}
.faq-item h2{border:none;padding:0;margin:0 0 8px;font-size:18px}
.faq-item p{margin:0 0 10px}
.faq-item > *:last-child{margin-bottom:0}

/* hub / landing index cards */
.hub-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin:24px 0}
.hub-card{display:block;background:var(--card);border:1px solid var(--line);border-radius:14px;
  padding:18px 20px;text-decoration:none;color:var(--ink)}
.hub-card:hover{color:var(--ink);box-shadow:0 2px 12px var(--shadow);border-color:var(--line-strong)}
.hub-card b{display:block;font-size:16px;font-weight:800;margin-bottom:4px}
.hub-card span{color:var(--muted);font-size:14px;line-height:1.5}

/* ---------- footer ---------- */
.site-footer{display:block;width:100%;background:var(--panel);border-top:1px solid var(--line);margin-top:auto}
/* clear the calculator's fixed bottom dock so the footer isn't hidden under it
   (the dock wraps taller on narrow screens, hence the generous value) */
.site-footer--calc .site-footer-inner{padding-bottom:150px}
@media(max-width:640px){.site-footer--calc .site-footer-inner{padding-bottom:190px}}
.site-footer-inner{padding:30px 20px 34px}
.site-footer-cols{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;
  padding-bottom:18px;border-bottom:1px solid var(--line);margin-bottom:16px}
.site-footer-h{font-weight:800;letter-spacing:-.01em;margin-bottom:5px}
.site-footer-p{color:var(--muted);font-size:14px;margin:0;max-width:340px}
.site-footer-nav{display:flex;flex-direction:column;gap:6px}
.site-footer-nav a{font-size:14px;color:var(--muted);text-decoration:none;font-weight:600}
.site-footer-nav a:hover{color:var(--ink)}
.site-footer-meta p{font-size:12.5px;color:var(--muted);line-height:1.6;margin:0 0 8px;max-width:var(--prosew)}
.site-footer-fine{opacity:.8}

@media print{
  .site-header,.site-footer,.skip{display:none!important}
  body{background:#fff}
}
