/* ============ watt if — daylight instrument panel ============ */

:root {
  --paper: #F2F3EE;
  --card: #FFFFFF;
  --ink: #1E2433;
  --ink-mute: #6B7280;
  --line: #E0E2D9;
  --sun: #F2A81D;
  --sun-deep: #B77708;
  --grid-blue: #2F55C4;
  --save-green: #2E7D5B;
  --sun-soft: #FDF3DD;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30, 36, 51, 0.05), 0 6px 24px -8px rgba(30, 36, 51, 0.10);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ============ masthead ============ */
.masthead {
  border-bottom: 1px solid var(--line);
  background: rgba(242, 243, 238, 0.92);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 500;
}
.masthead-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-sun { width: 26px; height: 26px; }
.brand-name {
  font-family: var(--display);
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em;
}
.brand-name em { font-style: italic; color: var(--sun-deep); }
.masthead-actions { display: flex; align-items: center; gap: 18px; min-width: 0; }
.masthead-tag { font-size: 0.85rem; color: var(--ink-mute); font-style: italic; }
.reset-all {
  flex: 0 0 auto;
  font-family: var(--body); font-size: 0.78rem; font-weight: 600;
  color: var(--ink-mute); background: transparent;
  border: 1px solid #C9CCC2; border-radius: 999px;
  padding: 7px 12px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.reset-all:hover { color: var(--ink); border-color: var(--ink); background: #FFF; }
.reset-all:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
@media (max-width: 700px) {
  .masthead-tag { display: none; }
  .masthead-row { gap: 12px; }
}
@media (max-width: 390px) {
  .masthead-row { padding-top: 10px; padding-bottom: 10px; }
  .brand { gap: 7px; }
  .brand-sun { width: 23px; height: 23px; }
  .brand-name { font-size: 1.15rem; }
  .reset-all { padding: 6px 10px; }
}

/* ============ hero ============ */
.hero {
  padding: 52px 0 64px;
  background:
    radial-gradient(720px 340px at 78% -60px, rgba(242, 168, 29, 0.15), transparent 70%),
    var(--paper);
}
.hero-copy { max-width: 640px; margin-bottom: 36px; }
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--sun-deep); margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 800; font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.04; letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.hero-sub { color: var(--ink-mute); max-width: 56ch; }
.example-btn {
  width: 100%;
  font-family: var(--body);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  background: var(--sun-soft);
  border: 1.5px solid var(--sun);
  border-radius: 10px;
  padding: 11px 15px;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.example-btn:hover { background: #FBE8BB; transform: translateY(-1px); }
.example-btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* ---- checkup card: map + side pane ---- */
.checkup {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  overflow: hidden; padding: 0;
  box-shadow: var(--shadow);
}
@media (max-width: 900px) { .checkup { grid-template-columns: 1fr; } }

.map-pane { position: relative; min-height: 480px; background: #C8CCC0; }
@media (max-width: 900px) { .map-pane { min-height: 380px; } }
#map { position: absolute; inset: 0; z-index: 1; cursor: crosshair; }
#map.dragging { cursor: grab; }

.map-tools {
  position: absolute; top: 12px; right: 12px; z-index: 400;
  display: flex; gap: 8px;
}
.map-btn {
  font-family: var(--body); font-weight: 600; font-size: 0.85rem;
  background: var(--ink); color: #FFF; border: 0; border-radius: 9px;
  padding: 9px 14px; cursor: pointer; box-shadow: var(--shadow);
}
.map-btn:hover { background: #2B3450; }
.map-btn.active { background: var(--sun); color: var(--ink); }
.map-btn.ghost { background: #FFF; color: var(--ink); border: 1px solid var(--line); }
.map-btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.leaflet-overlay-pane path.conceptual-panel,
.conceptual-panel {
  fill: rgba(47, 85, 196, 0.72);
  fill-opacity: 0.72;
  stroke: #FFF;
  stroke-width: 1.15;
  stroke-opacity: 0.92;
  pointer-events: none;
}

.map-chip {
  position: absolute; left: 12px; bottom: 12px; z-index: 400;
  background: var(--ink); color: #FFF; border-radius: 9px;
  font-family: var(--mono); font-size: 0.85rem; padding: 8px 13px;
  box-shadow: var(--shadow);
}
.map-chip strong { color: #FFD98A; font-weight: 600; }
.map-hint {
  position: absolute; left: 12px; top: 12px; z-index: 400;
  max-width: 250px;
  background: rgba(255, 255, 255, 0.94); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 12px; font-size: 0.8rem; color: var(--ink);
  box-shadow: var(--shadow);
}
@media (max-width: 520px) {
  .map-hint { top: 60px; }
}

/* side pane */
.side-pane {
  padding: 24px 22px;
  display: flex; flex-direction: column; gap: 20px;
  border-left: 1px solid var(--line); background: var(--card);
}
@media (max-width: 900px) { .side-pane { border-left: 0; border-top: 1px solid var(--line); } }

.example-entry {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.example-entry > span {
  display: block;
  margin-top: 6px;
  color: var(--ink-mute);
  font-size: 0.74rem;
  text-align: center;
}

.side-step { display: flex; gap: 12px; }
.side-num {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--sun-soft); border: 1.5px solid var(--sun);
  color: var(--sun-deep); font-family: var(--mono); font-size: 0.8rem;
  display: grid; place-items: center; margin-top: 1px;
}
.side-body { flex: 1; min-width: 0; }
.side-body > label, .region-label {
  display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 7px;
}
.region-label { margin-top: 12px; }
.side-readout { font-size: 0.83rem; color: var(--ink-mute); }
.side-readout strong { color: var(--ink); }
.side-readout.done { color: var(--ink); }
.side-readout.done .num { color: var(--sun-deep); font-weight: 600; }

.search-wrap { display: flex; gap: 6px; }
.search-wrap input {
  flex: 1; min-width: 0;
  border: 1.5px solid var(--line); border-radius: 9px; padding: 10px 12px;
  font-family: var(--body); font-size: 0.92rem; color: var(--ink);
}
.search-wrap button {
  border: 0; border-radius: 9px; background: var(--ink); color: #FFF;
  width: 40px; font-size: 1rem; cursor: pointer;
}
.search-wrap button:hover { background: #2B3450; }
.search-wrap input:focus-visible {
  border-color: var(--sun); box-shadow: 0 0 0 3px rgba(242, 168, 29, 0.22); outline: none;
}
.search-results {
  list-style: none; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 9px; overflow: hidden;
}
.search-results li {
  padding: 9px 12px; font-size: 0.82rem; cursor: pointer;
  border-bottom: 1px solid var(--line); background: #FFF;
}
.search-results li:last-child { border-bottom: 0; }
.search-results li:hover, .search-results li:focus { background: var(--sun-soft); outline: none; }

.bill-wrap {
  display: flex; align-items: center; overflow: hidden;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 9px;
}
.bill-cur {
  padding: 0 4px 0 12px; color: var(--ink-mute);
  font-family: var(--mono); font-size: 0.9rem; white-space: nowrap;
}
.bill-wrap input {
  flex: 1; min-width: 0; border: 0; outline: none; padding: 10px 12px 10px 6px;
  font-size: 1rem; font-family: var(--mono); color: var(--ink); background: transparent;
}
.bill-wrap input::-webkit-outer-spin-button,
.bill-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.bill-wrap input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.bill-wrap:focus-within {
  border-color: var(--sun); box-shadow: 0 0 0 3px rgba(242, 168, 29, 0.22);
}

.select-wrap select {
  width: 100%;
  appearance: none; -webkit-appearance: none;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 9px;
  padding: 10px 36px 10px 12px; font-family: var(--body); font-size: 0.9rem;
  color: var(--ink); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231E2433' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select-wrap select:focus-visible {
  border-color: var(--sun); box-shadow: 0 0 0 3px rgba(242, 168, 29, 0.22); outline: none;
}
.hint { font-size: 0.76rem; color: var(--ink-mute); display: block; margin-top: 6px; }

.cta {
  margin-top: auto;
  background: var(--ink); color: #FFF;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  border: 0; border-radius: 10px; padding: 14px 22px; cursor: pointer;
  transition: transform 0.12s, background 0.15s;
}
.cta:hover { background: #2B3450; transform: translateY(-1px); }
.cta:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.privacy-brief {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 0.72rem;
  line-height: 1.45;
}
.privacy-brief strong { color: var(--ink); font-weight: 600; }
.privacy-brief a, .foot a, .privacy-links a {
  color: var(--grid-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.privacy-brief a { white-space: nowrap; }
.privacy-brief a:hover, .foot a:hover, .privacy-links a:hover { color: var(--ink); }
.privacy-brief a:focus-visible, .foot a:focus-visible, .privacy-links a:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

/* ============ summary bar ============ */
.summary-bar {
  position: sticky; top: 55px; z-index: 400;
  background: var(--ink); color: #FFF;
}
.summary-row {
  display: flex; flex-wrap: wrap; gap: 4px 28px;
  padding-top: 10px; padding-bottom: 10px;
}
.sum-item { display: flex; align-items: baseline; gap: 8px; }
.sum-item small {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: #9AA3B8;
}
.sum-item .num { font-size: 0.95rem; font-weight: 600; }
.sum-item.accent .num { color: #FFD98A; }
.sum-item.result { margin-left: auto; min-width: 260px; justify-content: flex-end; }
.sum-item.result .num {
  color: #7ED8AE; font-family: var(--body);
  letter-spacing: 0; text-align: right;
}
.sum-item.result:not(.green) .num { color: #FFD98A; }
@media (max-width: 640px) {
  .summary-row { gap: 4px 16px; }
  .sum-item:nth-child(4) { display: none; }
  .sum-item.result {
    flex: 1 0 100%; min-width: 0; justify-content: flex-start;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 5px 0 0; padding-top: 6px;
  }
  .sum-item.result .num { text-align: left; }
}

/* ============ report / steps ============ */
.report { border-top: 1px solid var(--line); background: #FAFAF6; }
.step {
  padding: 56px 24px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 150px;
}
.step:last-of-type { border-bottom: 0; }

.step-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 30px; }
.step-num {
  font-family: var(--mono); font-size: 0.85rem; color: var(--sun-deep);
  border: 1.5px solid var(--sun); border-radius: 999px; padding: 4px 10px;
  flex-shrink: 0; background: var(--sun-soft);
}
.step-head h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.02em;
}
.step-sub { color: var(--ink-mute); font-size: 0.95rem; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}

.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(30, 36, 51, 0.04);
}
.stat-label {
  display: block; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-mute); margin-bottom: 8px;
}
.stat-value { font-size: 1.4rem; font-weight: 600; line-height: 1.1; }
.stat-value small { font-size: 0.78rem; font-weight: 500; color: var(--ink-mute); }
.stat.accent { background: var(--sun-soft); border-color: #EBD8A8; }
.stat.accent .stat-value { color: var(--sun-deep); }
.stat.recommended { background: var(--sun-soft); border-color: #E4C36F; }
.stat.recommended .stat-value { color: var(--sun-deep); }
.stat-secondary {
  display: block; margin-top: 8px;
  color: var(--ink-mute); font-size: 0.76rem; line-height: 1.35;
}

.step-note { color: var(--ink-mute); font-size: 0.92rem; max-width: 70ch; margin-top: 14px; }

/* roof / solar controls */
.solar-controls { max-width: 560px; }
.panel-layout-note {
  display: flex; align-items: center; gap: 18px;
  max-width: 760px; margin: -4px 0 20px;
  color: var(--ink-mute); font-size: 0.8rem;
}
.panel-layout-key {
  display: inline-flex; align-items: center; gap: 8px;
  flex: 0 0 auto; color: var(--ink); font-weight: 600;
}
.panel-layout-key::before {
  content: "";
  display: inline-block; width: 18px; height: 11px;
  background: rgba(47, 85, 196, 0.78); border: 1px solid #FFF;
  box-shadow: 0 0 0 1px rgba(30, 36, 51, 0.22);
}
.slider-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  font-weight: 600; font-size: 0.92rem; margin-bottom: 10px; flex-wrap: wrap;
}
.slider-value { font-size: 1rem; color: var(--sun-deep); }

input[type="range"] {
  width: 100%; accent-color: var(--sun); cursor: pointer; height: 28px;
}
input[type="range"]:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }

.size-guidance {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-top: 3px;
}
.size-guidance .hint { flex: 1 1 auto; }
.use-recommended {
  flex: 0 0 auto; border: 0; background: transparent;
  color: var(--grid-blue); font: 600 0.78rem var(--body);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.use-recommended:hover { color: var(--ink); }
.use-recommended:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.use-recommended[hidden] { display: none; }

.oversize-warning {
  margin-top: 10px; padding: 10px 12px;
  color: #674C12; background: var(--sun-soft);
  border: 1px solid #E4C36F; border-radius: 9px;
  font-size: 0.82rem; line-height: 1.45;
}
.oversize-warning[hidden] { display: none; }

.mini-facts { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.mini-facts li {
  font-size: 0.9rem; color: var(--ink-mute);
  padding-left: 18px; position: relative;
}
.mini-facts li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--sun);
}

.coverage-meter {
  height: 12px; background: #ECEDE5; border-radius: 999px;
  overflow: hidden; margin-bottom: 22px; max-width: 640px;
}
.coverage-fill {
  height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), #F5C255);
  border-radius: 999px; transition: width 0.7s cubic-bezier(0.25, 0.8, 0.3, 1);
}

.energy-flow {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 800px; margin: 0 0 24px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, 0.54); overflow: hidden;
}
.energy-flow-row {
  min-width: 0; padding: 12px 14px;
  border-right: 1px solid var(--line);
}
.energy-flow-row:last-child { border-right: 0; }
.energy-flow-row:nth-child(3n) { border-right: 0; }
.energy-flow-row:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
.energy-flow-row span {
  display: block; color: var(--ink-mute);
  font-size: 0.68rem; line-height: 1.25;
  text-transform: uppercase; letter-spacing: 0.075em;
}
.energy-flow-row strong {
  display: block; margin-top: 6px;
  font-size: 0.9rem; line-height: 1.25;
  overflow-wrap: anywhere;
}

/* comparison bars */
.compare-bars { display: grid; gap: 12px; margin-bottom: 6px; max-width: 640px; }
.cbar-row { display: grid; grid-template-columns: 110px 1fr 90px; gap: 12px; align-items: center; }
.cbar-name { font-size: 0.85rem; font-weight: 600; }
.cbar-track { background: #ECEDE5; border-radius: 999px; height: 14px; overflow: hidden; }
.cbar { height: 100%; border-radius: 999px; width: 0; transition: width 0.8s cubic-bezier(0.25, 0.8, 0.3, 1); }
.cbar.you { background: var(--sun); }
.cbar.typical { background: var(--grid-blue); }
.cbar-val { font-size: 0.85rem; color: var(--ink-mute); text-align: right; }
@media (max-width: 520px) { .cbar-row { grid-template-columns: 80px 1fr 76px; } }

/* backup */
.outage-note {
  font-size: 0.95rem; color: var(--ink);
  background: var(--sun-soft); border: 1px solid #EBD8A8; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 24px; max-width: 720px;
}
.economics-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  max-width: 800px;
  margin: 0 0 24px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.economics-copy > span {
  display: block;
  color: var(--ink-mute);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.economics-copy strong {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: 1rem;
}
.economics-copy p {
  margin-top: 5px;
  color: var(--ink-mute);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 62ch;
}
.economics-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: #ECEDE5;
  border-radius: 10px;
}
.economics-toggle button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: transparent;
  color: var(--ink-mute);
  font: 600 0.78rem var(--body);
  white-space: nowrap;
  cursor: pointer;
}
.economics-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: #FFF;
  box-shadow: 0 1px 2px rgba(30, 36, 51, 0.16);
}
.economics-toggle button:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}
.backup-grid { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .backup-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .economics-choice { grid-template-columns: 1fr; gap: 14px; }
  .economics-toggle { justify-self: start; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-family: var(--body); font-size: 0.87rem; font-weight: 500;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFF; }
.chip:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.chip small { opacity: 0.65; font-weight: 400; }
.hours-label { margin-top: 6px; }

/* chart */
.chart-card { padding: 22px 22px 14px; box-shadow: var(--shadow); }
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px;
  font-size: 0.85rem; font-weight: 600;
}
.lg { display: inline-flex; align-items: center; gap: 8px; }
.lg::before { content: ""; width: 18px; height: 4px; border-radius: 2px; }
.lg-grid::before { background: var(--grid-blue); }
.lg-solar::before { background: var(--sun); }
.lg-even { color: var(--save-green); }
.lg-even:empty { display: none; }
.lg-even::before { width: 10px; height: 10px; border-radius: 50%; background: var(--save-green); }

.chart-holder { position: relative; }
#chart { width: 100%; height: 320px; display: block; touch-action: pan-y; }
@media (max-width: 560px) { #chart { height: 250px; } }

.chart-tip {
  position: absolute; pointer-events: none;
  background: var(--ink); color: #FFF; border-radius: 8px;
  padding: 8px 12px; font-size: 0.8rem; line-height: 1.45;
  transform: translate(-50%, -100%); white-space: nowrap; z-index: 2;
}
.chart-tip .num { color: #FFD98A; }
.chart-tip .tip-grid { color: #A8BEF5; }

.verdict { margin-top: 26px; }
.verdict-line {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem); letter-spacing: -0.01em;
  max-width: 34ch; margin-bottom: 8px;
}
.verdict-line strong { color: var(--save-green); }
.verdict-line .worse { color: var(--grid-blue); }

/* refine / assumptions */
.assumptions-wrap { padding: 8px 24px 56px; }
.assumptions {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px;
}
.assumptions summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; }
.assumptions summary:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.assump-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin: 18px 0 14px;
}
.assump-grid label { font-size: 0.82rem; font-weight: 600; display: grid; gap: 6px; align-content: start; }
.assump-unit { color: var(--ink-mute); font-weight: 400; }
.assump-grid input, .assump-grid select {
  border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 10px;
  font-family: var(--mono); font-size: 0.92rem; color: var(--ink); width: 100%;
  background: #FFF;
}
.assump-grid select { font-family: var(--body); }
.assump-grid input:focus-visible, .assump-grid select:focus-visible {
  border-color: var(--sun); box-shadow: 0 0 0 3px rgba(242, 168, 29, 0.22); outline: none;
}
.assump-reset {
  align-self: end; justify-self: start;
  background: none; border: 1.5px solid var(--line); border-radius: 8px;
  padding: 9px 14px; font-size: 0.85rem; font-weight: 600; color: var(--ink); cursor: pointer;
}
.assump-reset:hover { border-color: var(--ink); }

/* FAQ */
.faq-wrap {
  padding: 78px 0 84px;
  background: #FAFAF6;
  border-top: 1px solid var(--line);
}
.faq-shell {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.45fr);
  gap: clamp(42px, 7vw, 86px);
  align-items: start;
}
.faq-head {
  position: sticky;
  top: 132px;
  max-width: 350px;
}
.faq-head .eyebrow { margin-bottom: 12px; }
.faq-head h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.55rem);
  line-height: 1.04; letter-spacing: -0.035em;
}
.faq-head > p {
  color: var(--ink-mute);
  margin-top: 16px;
  max-width: 31ch;
  font-size: 0.92rem;
}
.faq-principle {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.faq-principle strong {
  display: block;
  color: var(--sun-deep);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.faq-principle p {
  color: var(--ink-mute);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 6px;
  max-width: 32ch;
}
.faq-list {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.faq-list details {
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.faq-list details:last-child { border-bottom: 0; }
.faq-list details[open] {
  background: var(--sun-soft);
}
.faq-list summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 22px 18px 22px 20px;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::marker { content: ""; }
.faq-index {
  color: var(--sun-deep);
  font-size: 0.72rem;
  line-height: 1.45;
  padding-top: 2px;
}
.faq-question {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
}
.faq-action {
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 0.64rem;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 3px;
}
.faq-close { display: none; }
.faq-list details[open] .faq-read { display: none; }
.faq-list details[open] .faq-close { display: inline; }
.faq-list details[open] .faq-action { color: var(--sun-deep); }
.faq-list summary:hover .faq-question { color: var(--sun-deep); }
.faq-list summary:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: -3px;
}
.faq-answer {
  padding: 0 58px 24px 76px;
}
.faq-answer p {
  color: var(--ink-mute);
  font-size: 0.9rem;
  line-height: 1.62;
  max-width: 62ch;
}
.faq-answer strong { color: var(--ink); font-weight: 600; }
.privacy-answer p + p { margin-top: 12px; }
.privacy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--mono);
  font-size: 0.68rem !important;
}

@media (max-width: 820px) {
  .faq-wrap { padding: 58px 0 64px; }
  .faq-shell { grid-template-columns: 1fr; gap: 34px; }
  .faq-head { position: static; max-width: 600px; }
  .faq-head h2 br { display: none; }
  .faq-head > p { max-width: 52ch; }
  .faq-principle { max-width: 440px; margin-top: 22px; }
}

@media (max-width: 520px) {
  .faq-list summary {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 18px 12px 18px 14px;
  }
  .faq-question { font-size: 0.95rem; }
  .faq-action { font-size: 0.58rem; }
  .faq-answer { padding: 0 20px 20px 56px; }
  .faq-answer p { font-size: 0.86rem; }
}

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot p { font-size: 0.85rem; color: var(--ink-mute); max-width: 76ch; }
.foot strong em, .foot strong { font-family: var(--display); }

/* reveal */
.step, .assumptions-wrap { opacity: 0; transform: translateY(14px); }
.report.ready .step, .report.ready .assumptions-wrap {
  opacity: 1; transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
@media (prefers-reduced-motion: reduce) {
  .step, .assumptions-wrap { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .energy-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .energy-flow-row { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .energy-flow-row:nth-child(3n) { border-right: 1px solid var(--line); }
  .energy-flow-row:nth-child(2n) { border-right: 0; }
  .energy-flow-row:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 520px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 36px 0 46px; }
  .hero-copy { margin-bottom: 26px; }
  .map-pane { min-height: 350px; }
  .map-tools { gap: 5px; right: 8px; top: 8px; }
  .map-btn { padding: 8px 10px; font-size: 0.78rem; }
  .map-hint { left: 8px; right: 8px; top: 54px; max-width: none; }
  .map-chip { left: 8px; bottom: 8px; }
  .side-pane { padding: 22px 16px; }
  .step { padding: 44px 16px; }
  .step-head { align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { min-width: 0; padding: 14px 13px; }
  .stat-value { font-size: 1.18rem; overflow-wrap: anywhere; }
  .panel-layout-note { display: grid; gap: 5px; margin-top: 0; }
  .solar-controls, .chart-card, .backup-controls { padding: 18px 15px; }
  .assumptions-wrap { padding: 8px 16px 46px; }
  .assumptions { padding: 16px; }
  .faq-wrap { padding: 48px 0; }
  .chart-tip { white-space: normal; max-width: 210px; }
}

@media (max-width: 360px) {
  .stat-row, .energy-flow { grid-template-columns: 1fr; }
  .energy-flow-row { border-right: 0; border-bottom: 1px solid var(--line); }
  .energy-flow-row:last-child { border-bottom: 0; }
  .economics-toggle { display: grid; width: 100%; }
  .economics-toggle button { width: 100%; }
}

@media (max-width: 390px) {
  .summary-bar { top: 44px; }
}
