/* HES mobile layout: 2026-11-24. */
/* Self-hosted Google Fonts; SIL Open Font License files accompany the fonts. */
@font-face{font-family:'Cabin';src:url('/fonts/cabin-variable.ttf') format('truetype');font-style:normal;font-weight:400 700;font-display:swap}
@font-face{font-family:'Noto Sans';src:url('/fonts/noto-sans-variable.ttf') format('truetype');font-style:normal;font-weight:100 900;font-display:swap}
html body,html body p,html body span,html body label,html body a,html body input,html body button,html body select,html body textarea,html body div,html body td,html body th,html body li,html body strong,html body small{font-family:'Noto Sans',Arial,sans-serif!important}
html body h1,html body h2,html body h3,html body h4,html body h5,html body h6,html body h1 *,html body h2 *,html body h3 *{font-family:'Cabin',Arial,sans-serif!important}

/* Calculator: keep long upgrade names and incentive amounts in separate rows. */
#calculator .hes-rebate-option:focus-visible {
  outline: 3px solid #0f6b51;
  outline-offset: 3px;
}
#calculator .hes-rebate-cta {
  white-space: normal;
  height: auto;
  min-height: 3rem;
  padding: .875rem 1rem;
  line-height: 1.4;
  text-align: center;
}
@media (max-width: 639px) {
  #calculator { scroll-margin-top: 5rem; }
  #calculator .container { padding-inline: 1rem; }
  #calculator h2 { font-size: 1.875rem; line-height: 1.2; }
  #calculator .hes-rebate-options,
  #calculator .hes-rebate-summary { padding: 1rem; }
  #calculator .hes-rebate-option {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: start;
    gap: .75rem;
    padding: 1rem;
  }
  #calculator .hes-rebate-option > :nth-child(2) > :first-child {
    font-size: 1rem;
    line-height: 1.45;
  }
  #calculator .hes-rebate-option > :nth-child(2) > :last-child {
    font-size: .875rem;
    line-height: 1.5;
    margin-top: .25rem;
  }
  #calculator .hes-rebate-amount {
    grid-column: 1 / -1;
    padding-top: .75rem;
    border-top: 1px solid #dce5e0;
    text-align: left;
  }
  #calculator .hes-rebate-amount > :first-child { font-size: 1.25rem; line-height: 1.4; }
  #calculator .hes-rebate-totals { grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 1.25rem; }
  #calculator .hes-rebate-totals > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding-block: .75rem;
    text-align: left;
  }
  #calculator .hes-rebate-totals > div + div { border-top: 1px solid #ffffff30; }
  #calculator .hes-rebate-totals > div > :first-child {
    grid-column: 2;
    grid-row: 1;
    font-size: 1.375rem;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    color: #fff;
  }
  #calculator .hes-rebate-totals > div:nth-child(2) > :first-child { color: #baf2d2; }
  #calculator .hes-rebate-totals > div > :last-child {
    grid-column: 1;
    grid-row: 1;
    margin-top: 0;
    font-size: .875rem;
    line-height: 1.45;
    color: #e5f1eb;
  }
  #calculator .hes-rebate-summary > p {
    color: #e5f1eb;
    font-size: .875rem;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 1rem;
  }
  #calculator .hes-rebate-cta { background: #fff; color: #013c2e; border-color: #fff; }
}
@media (max-width: 767px) {
  html { scroll-padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
  body { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
  .hes-mobile-actionbar { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .hes-mobile-actionbar > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .5rem;
    padding: .625rem 4rem .625rem .75rem;
  }
  .hes-mobile-actionbar a {
    min-width: 0;
    min-height: 3rem;
    height: auto;
    margin-right: 0;
    padding: .5rem .625rem;
    font-size: .875rem;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
    gap: .375rem;
  }
  .hes-mobile-actionbar a svg { flex-shrink: 0; }
  button[aria-label="Open chat"] { bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); }
  button[aria-label="Back to top"] { display: none; }
}

/* Installation card: allow narrow grid tracks and wrap the existing assessment label. */
.hes-installation-grid { grid-template-columns:minmax(0,1fr); }
.hes-installation-grid > * { min-width:0; }
.hes-installation-cta { max-width:100%; height:auto; min-height:2.75rem; white-space:normal; line-height:1.4; text-align:center; }
.hes-installation-card :is(h2,p,span) { overflow-wrap:break-word; }
@media(min-width:768px) { .hes-installation-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:767px) { .hes-installation-cta { width:100%; padding:.875rem 1rem; } }
