:root {
  --ink: #1b2420;
  --muted: #3e4a44;
  --green: #0f5c3d;
  --green-2: #0c4a32;
  --green-soft: #e7f3ec;
  --sun: #f0b429;
  --sun-deep: #6a4300;
  --paper: #f7f4ee;
  --card: #fffdf9;
  --line: #e3ddd0;
  --danger: #8d2b2b;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --shadow: 0 12px 30px rgba(27, 36, 32, 0.06);
  /* Space for the fixed Call/Messenger bar on small screens (two-line buttons + a little gap). */
  --sticky-cta-space: calc(8rem + env(safe-area-inset-bottom, 0px));
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-bottom: var(--sticky-cta-space);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  padding-bottom: var(--sticky-cta-space);
}

main {
  padding-bottom: 0.5rem;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--green-2);
  margin: 0 0 0.6rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); }

p { margin: 0 0 0.8rem; }

a { color: var(--green); }
a:hover { color: var(--green-2); }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: #fff;
  color: var(--green-2);
  padding: 0.55rem 0.8rem;
  z-index: 40;
  border-radius: 8px;
}

.skip:focus { top: 0.5rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sun-deep);
  font-weight: 700;
  margin: 0 0 0.45rem;
}

.hint, .disclaimer, figcaption, .price-note, .range {
  color: var(--muted);
  font-size: 0.92rem;
}

.disclaimer {
  background: var(--green-soft);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}

.site-header {
  background: var(--green-2);
  color: #fff;
}

.site-header a { color: #fff; text-decoration: none; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4rem;
  padding: 0.45rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.brand svg { width: 42px; height: 42px; flex: 0 0 auto; }
.brand strong { display: block; letter-spacing: 0.08em; font-size: 0.98rem; }
.brand small { display: block; color: #d7efe3; font-size: 0.75rem; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-call {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.call-full { display: none; }

.desk-nav { display: none; gap: 0.9rem; }
.desk-nav a { font-weight: 600; font-size: 0.95rem; }
.desk-nav a:hover { text-decoration: underline; }

.mob-nav { position: relative; }

.mob-nav summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.mob-nav summary::-webkit-details-marker { display: none; }

.mob-nav nav {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 20;
  background: var(--green-2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.4rem;
  display: grid;
  min-width: 12rem;
  box-shadow: var(--shadow);
}

.mob-nav a {
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
}

.mob-nav a:hover { background: rgba(255, 255, 255, 0.08); }

.hero { padding: 1.4rem 0 0.4rem; }

.hero-copy { max-width: 40rem; }

h1::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 0.32rem;
  margin-top: 0.8rem;
  background: var(--sun);
  border-radius: 999px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  padding: 0;
  margin: 0.9rem 0 0;
  list-style: none;
}

.trust li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.9rem 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: #fff;
  color: var(--green-2);
}

.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-2); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--green); }
.btn-secondary:hover { background: var(--green-soft); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
  min-height: 44px;
  font-weight: 600;
}
.btn-ghost:hover { border-color: var(--green); color: var(--green-2); }
.btn:disabled { opacity: 0.65; cursor: wait; }
.btn-row .btn { flex: 1 1 12rem; }

section { padding: 1.6rem 0; scroll-margin-top: 0.75rem; }

.calc-layout { display: grid; gap: 1rem; align-items: start; }
.calc-layout > * { min-width: 0; }

.panel, .result-card, .form-card, .tier, .service, .contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.panel, .form-card { padding: 1rem; }

.result-card {
  padding: 1rem 1rem 0.4rem;
  border-top: 4px solid var(--sun);
}

.sample-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.7rem 0; }
.sample-row .btn { flex: 1 1 calc(50% - 0.5rem); min-width: 0; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  background: #efeae0;
  padding: 0.3rem;
  border-radius: 14px;
  margin-bottom: 0.9rem;
}

.tabs button {
  min-height: 48px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--green-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.peso-input {
  display: flex;
  align-items: stretch;
  border: 1px solid #cfc8b8;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.peso-input:focus-within {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
.peso-input span {
  display: flex;
  align-items: center;
  padding: 0 0.8rem;
  background: #f3f0e8;
  border-right: 1px solid #cfc8b8;
  font-weight: 700;
  color: var(--green-2);
}

label.field, .stack-label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfc8b8;
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  width: 100%;
  min-height: 48px;
}

textarea { min-height: 6.5rem; resize: vertical; }

input[type="checkbox"],
input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--green);
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0.8rem 0 0;
  padding: 0.75rem 0.85rem 0.9rem;
}

legend { font-weight: 700; padding: 0 0.3rem; }

.prefs { display: grid; gap: 0.15rem; }
.prefs label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  font-weight: 600;
}

.appliance { border-top: 1px solid var(--line); padding: 0.85rem 0; }
.appliance:first-child { border-top: 0; padding-top: 0.2rem; }

.appliance-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}

.appliance-name { font-weight: 700; margin: 0; }
.appliance .hint { margin: 0.15rem 0 0; }

.backup-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  min-height: 44px;
  white-space: nowrap;
}

.appliance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.field-watts { grid-column: 1 / -1; }

.stepper { display: flex; align-items: stretch; min-width: 0; }
.stepper button {
  width: 40px;
  flex: 0 0 40px;
  min-height: 48px;
  border: 1px solid #cfc8b8;
  background: #fff;
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--green-2);
}
.stepper button:first-child { border-radius: 10px 0 0 10px; }
.stepper button:last-child { border-radius: 0 10px 10px 0; }
.stepper input {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  text-align: center;
  min-width: 0;
  width: 100%;
}
.peso-input input:not([type="checkbox"]):not([type="radio"]) {
  border: 0;
  border-radius: 0;
  min-width: 0;
}
.peso-input input:focus-visible { outline: none; }
label.field { min-width: 0; }

.row-kwh {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green);
}

.figures { display: grid; gap: 0.75rem; margin: 0 0 0.8rem; }
.figures div { display: grid; gap: 0.1rem; }
.figures dt { font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.figures dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1.1;
  color: var(--green-2);
}
.figures dd span {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.result-empty { margin-bottom: 0.4rem; }
.result-contact { font-size: 0.92rem; }

.assumptions { margin: 0.4rem 0 0.8rem; }
.assumptions summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--green);
  min-height: 48px;
  display: flex;
  align-items: center;
}
.assumption-grid { display: grid; gap: 0.7rem; }

.tip {
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 0.8rem;
}
.tip h3 { font-size: 1.05rem; }
.tip-amounts { display: flex; gap: 0.45rem; margin: 0.55rem 0 0.35rem; }
.tip-amounts button {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  border: 2px solid var(--green);
  background: #fff;
  font: inherit;
  font-weight: 700;
  color: var(--green-2);
  cursor: pointer;
}
.tip-amounts button[aria-pressed="true"] { background: var(--green); color: #fff; }
.tip img {
  display: block;
  width: min(280px, 100%);
  min-width: min(240px, 100%);
  height: auto;
  margin: 0.6rem 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.form-card { margin-top: 1rem; }
.form-card .btn-primary { width: 100%; }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-error { color: var(--danger); font-size: 0.9rem; font-weight: 600; margin: 0.3rem 0 0.6rem; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
fieldset[aria-invalid="true"] { border-color: var(--danger); }

.notice {
  background: #fff6df;
  border: 1px solid #e4d0a0;
  color: #3f2e00;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}
.notice.ok { background: var(--green-soft); border-color: #b7d7c6; color: var(--green-2); }

.worksheet {
  white-space: pre-wrap;
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.45;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin: 0 0 0.8rem;
  overflow-wrap: anywhere;
}

#detailed-report { margin-top: 1rem; scroll-margin-top: 0.75rem; }
.report-figures { margin-top: 0.8rem; }

.cards, .tiers, .nameplates {
  display: grid;
  gap: 0.8rem;
}

.service, .tier, .contact-card { padding: 1rem; }
.service h3, .tier h3 { margin-bottom: 0.35rem; }

.price {
  font-family: var(--serif);
  font-size: 2rem;
  margin: 0;
  color: var(--green-2);
}

.tier.recommended { border: 2px solid var(--green); }
.badge {
  align-self: flex-start;
  background: var(--sun);
  color: #2b2200;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}

.tier ul, .notes ul, .proof-copy ul, .contact-list { padding-left: 1.15rem; }
.tier li, .notes li { margin: 0.25rem 0; }

.notes {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
}

.proof-copy { max-width: 42rem; }
.gallery { display: grid; gap: 1rem; margin-top: 1rem; }
.gallery img {
  width: 100%;
  border-radius: 12px;
  background: #e7e2d6;
  display: block;
}
figcaption { margin-top: 0.4rem; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin: 0.35rem 0; }
.contact-list a { font-weight: 700; }

.site-footer {
  background: var(--green-2);
  color: #e7f3ec;
  padding: 1.5rem 0 2rem;
  margin-top: 0.5rem;
}
.site-footer a { color: #fff; }
.site-footer p { margin-bottom: 0.45rem; font-size: 0.92rem; }

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(255, 253, 249, 0.96);
  border-top: 1px solid var(--line);
}
.sticky-cta .btn { width: 100%; }

[hidden] { display: none !important; }

@media (min-width: 720px) {
  .appliance-grid { grid-template-columns: 1.15fr 1.35fr 0.9fr; }
  .field-watts { grid-column: auto; }
  .cards { grid-template-columns: 1fr 1fr; }
  .nameplates { grid-template-columns: 1fr 1fr; }
  .form-card .btn-primary { width: auto; min-width: 16rem; }
  .report-figures { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  html { scroll-padding-bottom: 0; }
  body { padding-bottom: 0; }
  main { padding-bottom: 0; }
  .call-short { display: none; }
  .call-full { display: inline; }
  .desk-nav { display: flex; }
  .mob-nav { display: none; }
  .sticky-cta { display: none; }
  .calc-layout { grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); gap: 1.25rem; }
  .result-column { position: sticky; top: 0.8rem; }
  .tiers { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .hero { padding-top: 2.2rem; }
}

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

@media print {
  .no-print, .sticky-cta { display: none !important; }
  body { background: #fff; padding: 0; }
  body.print-report .site-header,
  body.print-report .hero-copy,
  body.print-report .calc-layout,
  body.print-report #calc-heading,
  body.print-report #report-form,
  body.print-report #report-stale,
  body.print-report #services,
  body.print-report #checkup,
  body.print-report #our-system,
  body.print-report #contact,
  body.print-report .site-footer { display: none !important; }
  body.print-report #detailed-report { display: block !important; }
  .worksheet { border: 0; padding: 0; }
}
