/* =========================================================
   PRINT / PDF — explicit fixed-page layout
   No pagination engine involved: every page is an actual
   8.5x11in box with its own header/footer, and CSS `break-after`
   moves to the next physical sheet. Nothing here has to guess
   where content fits — each page's content is hand-assigned.
   ========================================================= */

@page{
  size: letter;
  margin: 0;
}

*{
  box-sizing: border-box;
}

html, body{
  margin: 0;
  padding: 0;
  background: #e5e3de;
  font-family: 'Poppins', sans-serif;
  color: #323232;
}

/* ---------------------------------------------------------
   ON-SCREEN PREVIEW CONTROLS
   Sits fixed above the page stack; hidden entirely when
   actually printing.
   --------------------------------------------------------- */

#printControls{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: #232323;
  color: #fff;
  font-size: 14px;
}

#printControls a,
#printControls button{
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#printControls .back-link{
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}

#printControls .print-btn{
  background: #FF6A00;
  color: #fff;
}

#printStatus{
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
}

#printPages{
  padding: 84px 0 40px;
}

/* ---------------------------------------------------------
   PAGE BOX
   Each .print-page IS one physical sheet. Padding here is the
   page margin (since @page margin is 0 above) — this avoids
   ever relying on the browser's own @page margin-box parsing,
   which is where the previous approach kept breaking.
   --------------------------------------------------------- */

.print-page{
  width: 8.5in;
  min-height: 11in;
  margin: 0 auto 28px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(0,0,0,0.16);
  padding: 0.62in 0.68in 0.5in;
  display: flex;
  flex-direction: column;
  break-after: page;
  page-break-after: always;
}

.print-page[hidden]{
  display: none !important;
}

.print-page-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid #e9e7e2;
}

.print-page-header .brand-mark{
  display: flex;
  align-items: center;
  gap: 8px;
}

.print-page-header .brand-mark img{
  height: 22px;
  display: block;
}

.print-page-eyebrow{
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #FF6A00;
}

.print-page-body{
  flex: 1 0 auto;
}

.print-page-footer{
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e9e7e2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 9.5px;
  color: #9a9a9a;
}

/* ---------------------------------------------------------
   Print media: strip the preview chrome, keep only the pages
   --------------------------------------------------------- */

@media print{
  #printControls{ display: none !important; }
  #printPages{ padding: 0; }
  html, body{ background: #fff; }
  .print-page{
    box-shadow: none;
    margin: 0;
    width: auto;
    min-height: 100vh;
  }
  .print-page:last-of-type{
    break-after: auto;
    page-break-after: auto;
  }
}

/* Never split a single row/card/item mid-way inside a page */
.summary-row,
.mini-list > div,
.milestone-item,
.tax-fact,
.savings-callout,
.savings-delta-card,
.steps-list li,
.utility-forecast-meta > div,
.utility-spend-grid > div,
.benefit-card{
  break-inside: avoid;
}

/* ---------------------------------------------------------
   COVER PAGE
   --------------------------------------------------------- */

.print-cover-photo{
  width: 100%;
  height: 2.6in;
  object-fit: cover;
  border-radius: 18px;
  display: block;
  margin-bottom: 26px;
}

.print-cover-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff1e6;
  border: 1px solid rgba(255,106,0,0.35);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #FF6A00;
  margin-bottom: 18px;
}

.print-cover-eyebrow .dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF6A00;
}

.print-cover h1{
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.print-cover-intro{
  font-size: 14px;
  line-height: 1.6;
  color: #6f6f6f;
  max-width: 5.6in;
  margin: 0 0 26px;
}

.print-cover-stats{
  display: flex;
  gap: 12px;
}

.print-cover-stats .stat{
  flex: 1;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f7f5f0;
  border: 1px solid #e9e7e2;
}

.print-cover-stats .stat.accent{
  background: #FF6A00;
  border-color: #FF6A00;
}

.print-cover-stats .stat span{
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-bottom: 6px;
}

.print-cover-stats .stat.accent span{
  color: rgba(255,255,255,0.82);
}

.print-cover-stats .stat strong{
  font-size: 21px;
  font-weight: 800;
  color: #323232;
}

.print-cover-stats .stat.accent strong{
  color: #fff;
}

/* ---------------------------------------------------------
   SHARED CARD-STYLE ELEMENTS (imported look from the web page,
   restyled for a fixed-height printed sheet)
   --------------------------------------------------------- */

.print-h2{
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 18px;
  line-height: 1.2;
}

.print-h3{
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 8px;
}

.print-p{
  font-size: 12.5px;
  line-height: 1.6;
  color: #6f6f6f;
  margin: 0 0 16px;
}

.mockup-image{
  display: block;
  width: 100%;
  max-height: 5.4in;
  object-fit: contain;
  background: #f7f3ec;
  border-radius: 14px;
  border: 1px solid #e9e7e2;
  margin-bottom: 12px;
}

.summary-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.summary-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f5f0;
  border: 1px solid #e9e7e2;
}

.summary-row.total-row{
  background: #FF6A00;
  border-color: #FF6A00;
}

.summary-row.total-row span,
.summary-row.total-row strong{
  color: #fff;
}

.summary-row.discount-row{
  background: #fff1e6;
  border-color: rgba(255,106,0,0.35);
}

.summary-row.discount-row strong{
  color: #FF6A00;
}

.summary-row span{
  font-size: 12px;
  font-weight: 600;
  color: #5a5a5a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-row strong{
  font-size: 13px;
  font-weight: 800;
  color: #323232;
  text-align: right;
}

.row-ico{
  width: 15px;
  height: 15px;
  color: #FF6A00;
  flex-shrink: 0;
}

.tax-incentives-summary{
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  background: #f1fdf4;
  border: 1px solid #b9ecc3;
}

.tax-incentives-summary-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.tax-incentives-summary-head span{
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #1c7a3d;
}

.tax-incentives-summary-head strong{
  font-size: 15px;
  font-weight: 800;
  color: #1c7a3d;
}

.tax-incentives-net-cost{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
}

.tax-incentives-net-cost span{
  font-size: 11px;
  font-weight: 700;
  color: #1c7a3d;
}

.tax-incentives-net-cost strong{
  font-size: 18px;
  font-weight: 800;
  color: #1c7a3d;
}

.tax-incentives-summary-lines{
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.tax-incentives-summary-lines div{
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.tax-incentives-summary-lines span{
  color: #1c7a3d;
  font-weight: 600;
}

.tax-incentives-summary-lines strong{
  color: #1c7a3d;
  font-weight: 800;
}

.tax-incentives-summary p{
  font-size: 9.5px;
  line-height: 1.5;
  color: #2f7a49;
  margin: 0;
}

.mini-list{
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mini-list > div{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #f7f5f0;
  border: 1px solid #e9e7e2;
}

.mini-list span{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.mini-list strong{
  font-size: 12.5px;
  font-weight: 700;
  color: #323232;
}

.contact-blurb{
  font-size: 11.5px;
  color: #6f6f6f;
  margin: 14px 0 6px;
}

.contact-email{
  font-size: 12.5px;
  font-weight: 700;
  color: #FF6A00;
}

.milestone-grid{
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.milestone-item{
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f5f0;
  border: 1px solid #e9e7e2;
}

.milestone-num{
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #FF6A00;
  margin-bottom: 4px;
}

.milestone-item h4{
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 2px;
}

.milestone-meta{
  font-size: 9.5px;
  color: #8a8a8a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 6px;
}

.milestone-amount{
  font-size: 15px;
  font-weight: 800;
}

.milestone-note{
  font-size: 10.5px;
  line-height: 1.5;
  color: #6f6f6f;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1e6;
  border: 1px solid rgba(255,106,0,0.3);
  margin: 0;
}

.savings-chart-wrap{
  margin-bottom: 12px;
}

.savings-chart, .utility-cost-chart{
  width: 100%;
  height: auto;
  display: block;
}

.savings-callouts{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.savings-callouts-row{
  display: flex;
  gap: 10px;
}

.savings-callout{
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f5f0;
  border: 1px solid #e9e7e2;
  text-align: center;
}

.savings-callouts-primary .savings-callout{
  background: #f1fff1;
  border-color: rgba(144,238,144,0.9);
}

.savings-callouts-secondary .savings-callout{
  background: #eef6ff;
  border-color: rgba(150,190,240,0.9);
}

.savings-callout-year{
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-bottom: 4px;
}

.savings-callout-amount{
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.savings-delta-card{
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef6ff;
  border: 1px solid rgba(150,190,240,0.9);
  margin-bottom: 8px;
}

.savings-delta-card div{
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.savings-delta-card p{
  font-size: 10px;
  color: #5a7fa8;
  margin: 0;
}

.savings-disclaimer,
.utility-forecast-disclaimer,
.state-incentive-disclaimer{
  font-size: 9.5px;
  line-height: 1.55;
  color: #7a7a7a;
  margin: 4px 0 0;
}

.utility-forecast-intro{
  font-size: 11.5px;
  line-height: 1.55;
  color: #6f6f6f;
  margin: 0 0 14px;
}

.utility-forecast-layout{
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
}

.utility-forecast-primary{
  flex: 1.2;
  padding: 14px;
  border-radius: 12px;
  background: #fff5f5;
  border: 1px solid #ffd7d7;
}

.utility-forecast-primary > span{
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #c02b2b;
  margin-bottom: 4px;
}

.utility-forecast-primary > strong{
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #c02b2b;
  margin-bottom: 4px;
}

#utilityForecastBasisDisplay{
  font-size: 10px;
  color: #8a5252;
  margin: 0 0 10px;
}

.utility-forecast-savings-callout{
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
}

.utility-forecast-savings-callout span{
  display: block;
  font-size: 9px;
  color: #6f6f6f;
}

.utility-forecast-savings-callout strong{
  font-size: 13px;
  color: #1c7a3d;
}

.utility-forecast-meta{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.utility-forecast-meta > div{
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f5f0;
  border: 1px solid #e9e7e2;
}

.utility-forecast-meta span{
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-bottom: 2px;
}

.utility-forecast-meta strong{
  font-size: 12px;
  font-weight: 800;
}

.utility-spend-grid{
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.utility-spend-grid > div{
  flex: 1;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff5f5;
  border: 1px solid #ffd7d7;
}

.utility-spend-grid span{
  display: block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #c02b2b;
  margin-bottom: 2px;
}

.utility-spend-grid strong{
  font-size: 12px;
  font-weight: 800;
  color: #c02b2b;
}

.utility-usage-note{
  font-size: 10.5px;
  color: #6f6f6f;
  margin: 0 0 10px;
}

.tax-abatement-intro,
.state-incentive-intro{
  font-size: 11.5px;
  line-height: 1.6;
  color: #6f6f6f;
  margin: 0 0 14px;
}

.tax-estimate-box,
.state-credit-estimate{
  padding: 14px;
  border-radius: 12px;
  background: #f1fdf4;
  border: 1px solid #b9ecc3;
  margin-bottom: 14px;
}

.tax-estimate-box span,
.state-credit-estimate span{
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #1c7a3d;
  margin-bottom: 4px;
}

.tax-estimate-box strong,
.state-credit-estimate strong{
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #1c7a3d;
  margin-bottom: 4px;
}

.tax-estimate-box p,
.state-credit-estimate p{
  font-size: 9.5px;
  color: #2f7a49;
  margin: 0;
}

.tax-notice-box{
  padding: 14px;
  border-radius: 12px;
  background: #fff1e6;
  border: 1px solid rgba(255,106,0,0.3);
  margin-bottom: 14px;
}

.tax-notice-box h3{
  font-size: 12.5px;
  font-weight: 800;
  margin: 0 0 6px;
}

.tax-notice-box p{
  font-size: 10px;
  line-height: 1.55;
  color: #7a5a3f;
  margin: 0;
}

.tax-fact-grid,
.state-incentive-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tax-fact{
  flex: 1 1 46%;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f7f5f0;
  border: 1px solid #e9e7e2;
}

.tax-fact span{
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  margin-bottom: 4px;
}

.tax-fact p{
  font-size: 10px;
  line-height: 1.5;
  color: #6f6f6f;
  margin: 0;
}

.financing-block,
.addendum-block,
.notes-block{
  margin-bottom: 20px;
}

.financing-block:last-child,
.addendum-block:last-child,
.notes-block:last-child{
  margin-bottom: 0;
}

.addendum-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.addendum-list li{
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f5f0;
  border: 1px solid #e9e7e2;
  font-size: 11px;
  line-height: 1.5;
}

.notes-body{
  font-size: 12px;
  line-height: 1.6;
  color: #5a5a5a;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff5eb;
  border: 1px solid rgba(255,106,0,0.25);
  margin: 0;
}

.print-benefit-grid{
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.benefit-card{
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e9e7e2;
}

.benefit-ico{
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fff1e6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.benefit-ico svg{
  width: 16px;
  height: 16px;
  color: #FF6A00;
}

.benefit-card h3{
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 4px;
}

.benefit-card p{
  font-size: 10px;
  line-height: 1.5;
  color: #6f6f6f;
  margin: 0;
}

.steps-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.steps-list li{
  flex: 1 1 46%;
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f7f5f0;
  border: 1px solid #e9e7e2;
}

.step-num{
  font-size: 16px;
  font-weight: 800;
  color: #FF6A00;
  flex-shrink: 0;
}

.steps-list h4{
  font-size: 11.5px;
  font-weight: 800;
  margin: 0 0 3px;
}

.steps-list p{
  font-size: 9.5px;
  line-height: 1.45;
  color: #6f6f6f;
  margin: 0;
}

.print-closing-cta{
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff1e6, #ffe0c2);
  border: 1px solid rgba(255,106,0,0.3);
}

.print-closing-cta h2{
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 6px;
}

.print-closing-cta p{
  font-size: 11px;
  color: #6f6f6f;
  margin: 0;
}
