:root {
  --bg: #080e18;
  --bg-2: #0c1523;
  --panel: rgba(15, 24, 40, 0.88);
  --panel-solid: #0f1828;
  --line: #1e2d47;
  --line-soft: #17243a;
  --text: #e9eff9;
  --muted: #8fa1ba;
  --muted-2: #6d8099;
  --amber: #f5a524;
  --amber-2: #ffc85c;
  --amber-soft: rgba(245, 165, 36, 0.14);
  --green: #3ddc97;
  --red: #ff7b72;
  --slate: #4a5e7d;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 12% -12%, #16243b 0%, rgba(22, 36, 59, 0) 62%),
    radial-gradient(900px 500px at 100% 0%, #1a2333 0%, rgba(26, 35, 51, 0) 55%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(8, 14, 24, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(30, 45, 71, 0.6);
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark { display: grid; place-items: center; filter: drop-shadow(0 0 12px rgba(245, 165, 36, 0.35)); }

.brand-name {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 18px;
}
.brand-name span { color: var(--amber); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.pill {
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(245, 165, 36, 0.25);
  background: var(--amber-soft);
  color: var(--amber-2);
  white-space: nowrap;
}
.pill-quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.btn-ghost {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.15s ease;
}
.btn-ghost:hover { color: var(--text); border-color: #2d4264; background: rgba(255, 255, 255, 0.05); }

/* ---------- layout ---------- */
.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 28px 48px;
  display: grid;
  grid-template-columns: 396px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.controls {
  position: sticky;
  top: 84px;
  padding: 20px 20px 16px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a3c5b transparent;
}
.controls::-webkit-scrollbar { width: 8px; }
.controls::-webkit-scrollbar-thumb { background: #24344e; border-radius: 8px; }

.panel-head h1 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.panel-head p { margin: 0 0 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.group {
  padding-top: 16px;
  margin-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.group-head h2 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  font-weight: 600;
}
.hint { font-size: 11.5px; color: var(--muted-2); }

/* ---------- fields ---------- */
.field { display: block; margin-bottom: 12px; }
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #b9c7da;
  margin-bottom: 6px;
}
.field-label em { font-style: normal; color: var(--muted-2); font-size: 11.5px; }
.out { color: var(--amber-2); font-weight: 650; }

.input-wrap {
  display: flex;
  align-items: center;
  background: #0a1322;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-wrap:focus-within {
  border-color: rgba(245, 165, 36, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.1);
}
.input-wrap .prefix, .input-wrap .suffix { color: var(--muted-2); font-size: 13px; flex: none; }
.input-wrap .prefix { margin-right: 2px; }
.input-wrap .suffix { margin-left: 2px; }

input[type="number"], select {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 550;
  padding: 10px 6px;
  min-width: 0;
}
select {
  background: #0a1322;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 14px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8fa1ba 50%), linear-gradient(135deg, #8fa1ba 50%, transparent 50%);
  background-position: calc(100% - 17px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
select:focus { border-color: rgba(245, 165, 36, 0.55); outline: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

/* range */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber) var(--fill, 62.5%), #1b2940 var(--fill, 62.5%));
  outline: 0;
  cursor: pointer;
  margin: 7px 0 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff4dd;
  border: 2px solid var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.16), 0 2px 6px rgba(0,0,0,.4);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff4dd;
  border: 2px solid var(--amber);
}
.range-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted-2); margin-top: 5px; }

/* segmented */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: #0a1322;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 13px;
}
.seg {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.16s ease;
}
.seg:hover { color: var(--text); }
.seg.is-active {
  background: linear-gradient(180deg, #22314a, #1a263b);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 2px 8px rgba(0,0,0,0.3);
}

.mini-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.mini-stats span {
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-soft);
  padding: 4px 8px;
  border-radius: 7px;
}
.mini-stats b { color: #cfdcee; font-weight: 600; }

.micro { font-size: 11.5px; line-height: 1.55; color: var(--muted-2); margin: 5px 0 0; }
.roof-note { color: var(--amber-2); background: rgba(245, 165, 36, 0.08); border: 1px solid rgba(245, 165, 36, 0.2); border-radius: 8px; padding: 7px 9px; }

.loan-fields { animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.advanced {
  margin-top: 18px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}
.advanced summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  user-select: none;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 17px; height: 17px;
  border-radius: 5px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.advanced[open] summary::before { content: "−"; }
.advanced summary:hover { color: var(--text); }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.adv-grid .field { margin-bottom: 0; }
.btn-reset { width: 100%; margin-top: 10px; }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffc85c, #f5a524);
  color: #1a1206;
  font-weight: 650;
  font-size: 13.5px;
  text-decoration: none;
  border: 0;
}
.mobile-jump { display: none; margin-top: 14px; }

.is-hidden { display: none !important; }

/* ---------- results ---------- */
.results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head h3 { margin: 0; font-size: 15px; letter-spacing: -0.01em; font-weight: 600; }

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 220px at 88% -30%, rgba(245, 165, 36, 0.18), transparent 70%),
    linear-gradient(160deg, #142034 0%, #0f1828 62%);
  border-color: rgba(245, 165, 36, 0.22);
  padding: 24px 26px 22px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  pointer-events: none;
}
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; position: relative; z-index: 1; }
.eyebrow { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tag {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(61, 220, 151, 0.1);
  border: 1px solid rgba(61, 220, 151, 0.28);
  color: var(--green);
  white-space: nowrap;
}
.tag.warn { background: rgba(255, 123, 114, 0.1); border-color: rgba(255, 123, 114, 0.3); color: var(--red); }
.hero-number {
  position: relative;
  z-index: 1;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 12px 0 4px;
  background: linear-gradient(92deg, #fff6e3 10%, #ffc85c 55%, #f5a524 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { position: relative; z-index: 1; color: var(--muted); font-size: 13px; }
.hero-number.negative {
  background: none;
  -webkit-text-fill-color: var(--red);
  color: var(--red);
}
.hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 34px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.hero-meta div { display: flex; flex-direction: column; gap: 3px; }
.hero-meta span { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.06em; }
.hero-meta strong { font-size: 16px; font-weight: 650; }

/* kpis */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 16px 17px; display: flex; flex-direction: column; gap: 5px; }
.kpi-label { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi strong { font-size: 22px; letter-spacing: -0.025em; font-weight: 650; }
.kpi-sub { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* breakdown */
.cost-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #0a1322;
  border: 1px solid var(--line-soft);
  margin-bottom: 16px;
}
.cost-seg { height: 100%; transition: width 0.35s ease; }
.seg-gross { background: linear-gradient(90deg, #33445f, #3f5577); }
.seg-itc { background: linear-gradient(90deg, #2f7d64, #3ddc97); }
.seg-state { background: linear-gradient(90deg, #5a6cf0, #7d8cff); }
.cost-rows { display: flex; flex-direction: column; gap: 9px; }
.cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: #c3d1e4;
}
.cost-row span { display: flex; align-items: center; gap: 8px; }
.cost-row strong { font-weight: 600; }
.cost-row.total {
  margin-top: 4px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  color: var(--text);
}
.cost-row.total strong { font-size: 19px; color: var(--amber-2); }
.neg { color: var(--green); }
.dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.dot-gross { background: #4a5e7d; }
.dot-itc { background: var(--green); }
.dot-state { background: #7d8cff; }
.dot-use { background: #55698a; }
.dot-solar { background: var(--amber); }

/* charts */
.chart-wrap { width: 100%; position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-wrap text { font-family: var(--font); }
.legend { display: flex; gap: 18px; margin: -4px 0 10px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }

/* impact */
.impact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.impact-item {
  background: #0e1727;
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.impact-ico { display: flex; align-items: center; height: 22px; margin-bottom: 3px; }
.impact-ico svg { width: 22px; height: 22px; }
.ico-globe { color: var(--amber-2); }
.ico-tree { color: var(--green); }
.ico-car { color: #8b9bff; }
.impact-item strong { font-size: 19px; letter-spacing: -0.02em; }
.impact-item span:last-child { font-size: 11.5px; color: var(--muted-2); }

/* fineprint */
.fineprint { padding: 18px 22px; }
.fineprint h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.fineprint ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.fineprint li { font-size: 11.5px; line-height: 1.55; color: var(--muted-2); }

/* ---------- header nav ---------- */
.topnav { display: flex; gap: 18px; margin-right: 4px; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 12.5px; transition: color 0.15s; }
.topnav a:hover { color: var(--text); }

#calculator, #financing, #faq { scroll-margin-top: 92px; }

/* ---------- battery switch ---------- */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 12px;
  cursor: pointer;
}
.switch-copy { display: flex; flex-direction: column; gap: 2px; }
.switch-copy strong { font-size: 12.5px; color: #c8d5e6; font-weight: 550; }
.switch-copy em { font-style: normal; font-size: 11px; color: var(--muted-2); }
.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: #1b2940;
  border: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background 0.18s, border-color 0.18s;
  margin: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #8fa1ba;
  transition: transform 0.18s, background 0.18s;
}
.switch:checked { background: var(--amber); border-color: var(--amber); }
.switch:checked::after { transform: translateX(17px); background: #1a1206; }

/* ---------- cost extras ---------- */
.seg-rebate { background: linear-gradient(90deg, #2b8fa8, #4cc9f0); }
.dot-rebate { background: #4cc9f0; }
.dot-battery { background: #a78bfa; }
.cost-detail { padding-left: 16px; font-size: 12px; color: var(--muted) !important; }
.cost-detail strong { font-weight: 500; color: var(--muted); }

/* ---------- hero chips ---------- */
.hero-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.chip-sm {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--muted);
  white-space: nowrap;
}
.chip-sm b { color: #dbe6f5; font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.compare-table, .mini-table, .year-table { width: 100%; border-collapse: collapse; }
.compare-table { font-size: 13.5px; }
.compare-table th, .mini-table th, .year-table th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.compare-table td, .mini-table td, .year-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  color: #c3d1e4;
  font-weight: 550;
  white-space: nowrap;
}
.compare-table th:not(:first-child), .compare-table td:not(:first-child),
.mini-table th:not(:first-child), .mini-table td:not(:first-child),
.year-table th:not(:first-child), .year-table td:not(:first-child) { text-align: right; }
.compare-table td:first-child { color: var(--muted); font-weight: 450; }
.compare-table tbody tr:last-child td, .mini-table tbody tr:last-child td, .year-table tbody tr:last-child td { border-bottom: 0; }
.mini-table { font-size: 13px; }
.year-table { font-size: 12px; }
.year-table td, .year-table th { padding: 7px 9px; }
.year-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.year-table tr.payback td { background: rgba(61, 220, 151, 0.07); }
.pos { color: var(--green) !important; }
.neg-val { color: var(--red) !important; }
.table-actions { padding-top: 14px; display: flex; justify-content: flex-end; }

.table-card { padding: 0; overflow: hidden; }
.table-card summary { list-style: none; cursor: pointer; padding: 20px 22px; margin: 0; }
.table-card summary::-webkit-details-marker { display: none; }
.table-card summary::after {
  content: "+";
  color: var(--muted-2);
  font-size: 16px;
  margin-left: 4px;
}
.table-card[open] summary::after { content: "−"; }
.table-card .table-wrap { padding: 0 22px; }
.table-card .table-actions { padding: 0 22px 18px; }
.table-scroll { max-height: 430px; overflow-y: auto; }
.table-scroll thead th { position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }

/* ---------- seo / faq ---------- */
.seo-head { display: flex; flex-direction: column; gap: 7px; }
.seo-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.025em; }
.seo-lede { margin: 13px 0 0; color: #b9c7da; font-size: 14px; line-height: 1.7; max-width: 78ch; }
.seo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.seo-stat { background: #0b1422; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.seo-stat span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); margin-bottom: 4px; }
.seo-stat strong { font-size: 18px; letter-spacing: -0.02em; }
.faq-list { margin-top: 20px; border-top: 1px solid var(--line-soft); }
.faq-list details { border-bottom: 1px solid var(--line-soft); }
.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  font-size: 13.5px;
  font-weight: 550;
  color: #cfdcee;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--muted-2); font-size: 15px; flex: none; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: 0 0 15px; font-size: 12.5px; line-height: 1.7; color: var(--muted); max-width: 80ch; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  background: #16233a;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.foot {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px 30px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #56677f;
}

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .shell { grid-template-columns: 350px minmax(0, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 861px) and (max-height: 1240px) {
  .controls { position: static; max-height: none; overflow: visible; }
}

@media (min-width: 861px) and (max-width: 1050px) {
  .seo-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding: 18px 16px 40px; }
  .mobile-jump { display: flex; }
  .controls { position: static; max-height: none; }
  .topbar { padding: 12px 16px; }
  .pill-quiet, .topnav { display: none; }
  .hero-number { font-size: 42px; }
  .impact { grid-template-columns: 1fr; }
  .foot { padding: 0 16px 24px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 17px; }
  .topbar-right { gap: 6px; }
  .topbar .btn-ghost { padding: 7px 9px; font-size: 12px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px; }
  .kpi strong { font-size: 18px; }
  .hero-meta { gap: 18px; flex-wrap: wrap; }
  .card { padding: 16px; }
  .two-col, .adv-grid { grid-template-columns: 1fr; }
  .seo-head h2 { font-size: 22px; }
  .seo-stats { grid-template-columns: 1fr 1fr; }
  .compare-table { font-size: 12px; }
  .compare-table td, .compare-table th { padding: 8px 7px; }
  .table-card summary { padding: 16px; }
  .table-card .table-wrap { padding: 0 16px; }
  .table-card .table-actions { padding: 0 16px 16px; }
}

@media (max-width: 600px) {
  .compare-table { table-layout: fixed; font-size: 11px; }
  .compare-table th, .compare-table td { white-space: normal; padding: 7px 4px; }
  .compare-table th:first-child, .compare-table td:first-child { width: 30%; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; color: #111; }
  .topbar, .controls, .foot, .btn-ghost { display: none !important; }
  .shell { display: block; padding: 0; max-width: none; }
  .results { gap: 10px; }
  .card, .hero, .impact { background: #fff !important; border: 1px solid #d7dde6 !important; box-shadow: none !important; break-inside: avoid; }
  .hero { border-color: #e6c78f !important; }
  .hero::after { display: none; }
  .hero-number {
    color: #b45309 !important;
    -webkit-text-fill-color: #b45309 !important;
    background: none !important;
  }
  .hero-sub, .eyebrow, .kpi-label, .kpi-sub, .hero-meta span, .hint, .micro,
  .fineprint li, .legend, .impact-item span:last-child { color: #555 !important; }
  .card-head h3, .kpi strong, .hero-meta strong, .impact-item strong,
  .cost-row.total span, .cost-row span { color: #111 !important; }
  .cost-row { color: #333 !important; }
  .cost-row.total strong { color: #b45309 !important; }
  .neg { color: #0b7a53 !important; }
  .tag { color: #0b7a53 !important; border-color: #a7dcc4 !important; background: #effaf4 !important; }
  .impact { background: #fff !important; }
  .impact-item { background: #fff !important; }
  .topnav, .btn-share, .toast, .table-actions { display: none !important; }
  .table-card, .seo { break-inside: auto; }
  .table-card { padding: 0 !important; }
  .table-card summary { padding: 14px 0 !important; }
  .table-card summary::after { display: none !important; }
  .table-scroll { max-height: none !important; overflow: visible !important; }
  .compare-table th, .compare-table td, .mini-table th, .mini-table td,
  .year-table th, .year-table td { color: #222 !important; border-color: #ddd !important; }
  .compare-table td:first-child { color: #444 !important; }
  .seo-lede, .faq-list p, .seo-stat span { color: #444 !important; }
  .seo-stat { background: #fff !important; border-color: #ddd !important; }
  .chip-sm { border-color: #ddd !important; color: #444 !important; }
  .chip-sm b { color: #111 !important; }
}

/* ================= HelioCalc v2 · multi-page additions ================= */
.prose { max-width: 820px; margin: 0 0 28px; }
.prose h2 { font-size: 21px; letter-spacing: -0.01em; margin: 30px 0 12px; color: #f3f7ff; }
.prose h3 { font-size: 17px; margin: 22px 0 10px; }
.prose p, .prose li { color: #c6d3e6; line-height: 1.75; font-size: 15px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 7px 0; }
.prose a, .foot a, .related a, .breadcrumbs a { color: #ffc85c; text-decoration: none; }
.prose a:hover, .foot a:hover, .related a:hover, .breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs { max-width: 1240px; margin: 20px auto 0; padding: 0 24px; color: #8fa1ba; font-size: 13px; }
.shell { max-width: 1240px; margin: 0 auto; padding: 28px 24px 70px; }
.shell > h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.12; letter-spacing: -0.025em; margin: 12px 0 16px; max-width: 900px; }
.seo-lede { font-size: 18px; line-height: 1.65; color: #c6d3e6; max-width: 860px; margin: 0 0 30px; }
.byline { font-size: 13px; color: #8fa1ba; margin: -8px 0 24px; letter-spacing: .2px; }
.byline a { color: #f5a524; text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.eyebrow { color: #f5a524; font-size: 12px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.topnav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.topnav a { color: #b7c6dc; font-size: 14px; text-decoration: none; }
.topnav a:hover, .topnav a.hot { color: #ffc85c; }
.topbar-right .btn-primary { padding: 9px 16px; font-size: 13px; }
.calculator { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 22px; align-items: start; margin: 26px 0 34px; }
.calculator h2 { font-size: 19px; margin: 0 0 14px; }
.controls, .results { min-width: 0; }
.controls { background: rgba(15,24,40,.88); border: 1px solid #1e2d47; border-radius: 18px; padding: 20px; }
.controls .group { margin: 16px 0; }
.controls h3 { font-size: 13px; color: #8fa1ba; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 12px; color: #b7c6dc; font-weight: 600; }
.input-wrap { display: flex; align-items: center; gap: 6px; }
.input-wrap input, .input-wrap select { width: 100%; min-width: 0; background: #0b1421; color: #e9eff9; border: 1px solid #263a58; border-radius: 9px; padding: 9px 10px; font-size: 15px; font-family: inherit; }
.input-wrap input:focus, .input-wrap select:focus { outline: 2px solid #f5a524; outline-offset: 1px; }
.unit { font-size: 12px; color: #8fa1ba; white-space: nowrap; }
.hint { font-size: 11px; color: #6d8099; line-height: 1.4; }
.advanced { border-top: 1px solid #1e2d47; padding: 12px 0; }
.advanced summary { cursor: pointer; color: #ffc85c; font-size: 13px; font-weight: 600; padding: 4px 0; }
.advanced .adv-grid { margin-top: 12px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.table-actions button { font-size: 12px; padding: 9px 12px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi { background: rgba(15,24,40,.88); border: 1px solid #1e2d47; border-radius: 14px; padding: 14px; }
.kpi-label { font-size: 11px; color: #8fa1ba; text-transform: uppercase; letter-spacing: .06em; }
.kpi .hero-number { font-size: 22px; font-weight: 700; color: #f3f7ff; margin-top: 6px; letter-spacing: -0.02em; }
.kpi-sub { font-size: 11px; color: #6d8099; margin-top: 4px; }
.panel { background: rgba(15,24,40,.88); border: 1px solid #1e2d47; border-radius: 16px; padding: 18px; margin: 14px 0; }
.panel h3 { font-size: 15px; margin: 0 0 12px; }
.tool-focus { font-size: 16px; line-height: 1.6; color: #c6d3e6; border-left: 3px solid #f5a524; }
.federal-note { border-left: 3px solid #ff7b72; }
.federal-note p { color: #c6d3e6; font-size: 14px; line-height: 1.65; margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.mini-table, table.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table td, .mini-table th, .compare-table td, .compare-table th { padding: 9px 10px; border-bottom: 1px solid #1e2d47; text-align: left; color: #c6d3e6; }
.compare-table thead th { color: #8fa1ba; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: #0c1523; }
.compare-table tbody tr:hover { background: rgba(245,165,36,.05); }
.year-table { max-height: 400px; overflow-y: auto; }
.faq-block { max-width: 860px; margin: 32px 0; }
.faq-block details { background: rgba(15,24,40,.7); border: 1px solid #1e2d47; border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.faq-block summary { cursor: pointer; font-weight: 600; color: #f3f7ff; font-size: 15px; }
.faq-block p { color: #c6d3e6; line-height: 1.7; font-size: 14px; margin: 12px 0 0; }
.sources { max-width: 860px; margin: 26px 0; }
.sources li { color: #8fa1ba; font-size: 13px; line-height: 1.6; margin: 6px 0; }
.disclaimer { max-width: 860px; font-size: 12px; color: #8fa1ba; border-left: 2px solid #4a5e7d; padding-left: 14px; line-height: 1.7; }
.related { margin-top: 44px; border-top: 1px solid #1e2d47; padding-top: 22px; }
.related h2 { font-size: 18px; margin: 0 0 14px; }
.related-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.related-grid a { font-size: 13px; background: #101c2e; border: 1px solid #1e2d47; border-radius: 999px; padding: 7px 13px; }
.related-grid a:hover { border-color: #f5a524; }
.hub-list { padding-left: 20px; }
.hub-list li { margin: 12px 0; color: #c6d3e6; line-height: 1.6; }
.foot { border-top: 1px solid #1e2d47; background: #080e18; margin-top: 40px; }
.foot-inner { max-width: 1240px; margin: 0 auto; padding: 38px 24px; display: grid; grid-template-columns: 1fr 1.2fr 1.4fr; gap: 26px; }
.foot-brand strong { font-size: 17px; }
.foot p, .foot .micro { color: #8fa1ba; font-size: 12px; line-height: 1.65; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 16px; align-content: flex-start; }
.foot-links a { font-size: 12px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: #10233a; border: 1px solid #f5a524; color: #f3f7ff; padding: 12px 20px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 980px) {
  .calculator { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; }
  .topnav { display: none; }
}
@media (max-width: 560px) {
  .adv-grid { grid-template-columns: 1fr; }
  .shell { padding: 20px 16px 50px; }
  .breadcrumbs { padding: 0 16px; }
}
@media print {
  .topbar, .controls, .table-actions, .related, .foot, .toast, .breadcrumbs, #cash-chart { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .kpi { background: #fff; border: 1px solid #ccc; }
  .kpi .hero-number, .prose h2, .prose p, .prose li, .seo-lede { color: #000; }
  .calculator { grid-template-columns: 1fr; }
  .year-table { max-height: none; overflow: visible; }
}
