/* A self-contained report layout shared by the modal and the printed copy. */
.report-dialog {
  width: min(840px, calc(100vw - 32px));
  max-width: 840px;
  max-height: calc(100dvh - 32px);
  border: 1px solid #d7e4e2;
  border-radius: 16px;
  box-shadow: 0 30px 95px rgba(7, 31, 49, .28);
}
.report-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 36px 22px;
  background: linear-gradient(115deg, #f7faf8, #edf5f2);
  border-bottom: 1px solid #dce9e6;
}
.report-top-copy { min-width: 0; flex: 1; }
.report-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; color: #163b53; font: 800 .64rem Montserrat, Arial, sans-serif; letter-spacing: .12em; }
.report-brand img { width: 32px; height: 32px; object-fit: contain; }
.report-top .step-chip { color: #9a6a1f; font-size: .67rem; }
.report-top h3 { margin: 8px 0 0; color: #113348; font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.12; }
.report-date, .report-next { display: none; }
.report-close { display: grid; place-items: center; width: 38px; height: 38px; margin: 0; border-color: #d3e2df; font-family: Arial, sans-serif; cursor: pointer; }
.report-content { padding: 0 36px; }
.report-footer { padding: 0 36px 28px; }
.report-intro { padding: 0; margin: 20px 0 4px; font-size: .91rem; line-height: 1.5; color: #475e6c; }
.report-basis { margin: 0; font-size: .76rem; line-height: 1.45; color: #687e88; }

.size-row { display: grid; grid-template-columns: minmax(0, .82fr) 30px minmax(0, 1.18fr); gap: 11px; align-items: stretch; padding: 22px 0 20px; }
.size-row>div:not(.size-plus) { min-width: 0; padding: 19px 21px; border-radius: 12px; }
.size-row .required { background: #f7f9f9; border: 1px solid #e1e9e8; }
.size-row .recommended { background: #10384b; border: 1px solid #10384b; box-shadow: 0 12px 25px rgba(16, 56, 75, .13); }
.size-row small { color: #607987; font-size: .68rem; letter-spacing: .11em; }
.size-row .required strong { font-size: 2.05rem; color: #23475a; }
.size-row .recommended strong { font-size: 2.8rem; color: #fff; }
.size-row .recommended small { color: #f5c670; }
.size-row .recommended>span { color: #d1e4e7; }
.size-row strong { margin: 8px 0 5px; line-height: 1; }
.size-row strong em { font-size: .42em; font-weight: 700; }
.size-row .size-plus { display: grid; place-items: center; align-self: center; width: 30px; height: 30px; color: #a6701d; font-size: 1.4rem; font-weight: 400; }

.report-timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.report-timeline>div { min-width: 0; padding: 17px 19px; border: 1px solid #dce8e6; border-radius: 11px; background: #f7faf9; }
.report-timeline span { display: block; }
.report-timeline span { color: #4e6772; font-size: .76rem; }
.report-timeline strong { display: block; margin: 7px 0 0; color: #14384c; font: 800 1.45rem Montserrat, Arial, sans-serif; letter-spacing: -.04em; }

.report-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 21px 0 0; border: 1px solid #e0e8e7; border-radius: 11px; overflow: hidden; }
.report-metrics>div, .report-metrics>div:first-child, .report-metrics>div:nth-child(3) { min-width: 0; padding: 16px 19px; border: 0; }
.report-metrics>div:nth-child(odd) { border-right: 1px solid #e0e8e7; }
.report-metrics>div:nth-child(-n+2) { border-bottom: 1px solid #e0e8e7; }
.report-metrics span { color: #647984; font-size: .74rem; }
.report-metrics strong { color: #12384d; font: 800 1.05rem Montserrat, Arial, sans-serif; letter-spacing: -.02em; margin: 5px 0 0; }
.report-metrics small { display: block; margin-top: 3px; color: #7b8d91; font-size: .66rem; line-height: 1.35; }
.report-metric { position: relative; }
.report-metric>span { padding-right: 35px; }
.report-metric-icon { position: absolute; top: 14px; right: 16px; width: 31px; height: 31px; box-sizing: border-box; padding: 6px; border-radius: 8px; background: #fbf0dc; color: #a87421; }
.report-metrics .metric-trees { background: #f0f7f2; }
.metric-trees .report-metric-icon { background: #dceee1; color: #237651; }
.report-metrics #trees { line-height: 1.2; }
.report-metrics #trees small { margin: 4px 0 2px; color: #4c7563; font-size: .68rem; font-weight: 500; letter-spacing: 0; }
.report-metrics #trees b { display: inline-block; color: #176d49; font: 800 1.55rem/1 Montserrat, Arial, sans-serif; letter-spacing: -.04em; white-space: nowrap; }
.report-metrics #trees em { color: #265441; font-size: .84rem; font-style: normal; font-weight: 700; letter-spacing: 0; }
.subsidy-box { margin: 15px 0 0; padding: 17px 21px; border: 1px solid #dbe8df; border-radius: 11px; background: #f4f9f5; }
.size-row + .subsidy-box { margin-top: 0; }
.subsidy-heading { display: flex; align-items: baseline; margin-bottom: 6px; padding: 0; border: 0; }
.subsidy-heading strong { color: #173e40; }
.subsidy-heading span { font-size: .68rem; }
.subsidy-total { margin: 0; padding: 7px 0 0; border-top: 1px solid #d8e7da; }
.subsidy-total span { color: #526d63; font-size: .76rem; }
.subsidy-total strong { color: #173e40; font-size: 1.27rem; }
.report-disclaimer { margin: 17px 0 0; padding: 0 0 0 12px; border-left: 3px solid #e4ae4e; color: #617681; font-size: .73rem; line-height: 1.5; }
.report-sources { margin: 9px 0 0; color: #7a8c90; font-size: .68rem; }
.report-sources a { color: #345a65; text-decoration: underline; text-underline-offset: 2px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 24px; margin: 19px 0 0; }
.report-actions .text-link { font-size: .8rem; font-weight: 800; }
.report-actions .text-link:disabled { opacity: .55; cursor: wait; }
.report-download-status { min-height: 1.1em; margin: 7px 0 0; color: #526f78; font-size: .72rem; }

@media (max-width: 750px) {
  .report-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .report-top { padding: 17px 20px 17px; }
  .report-brand { margin-bottom: 10px; font-size: .59rem; }
  .report-brand img { width: 28px; height: 28px; }
  .report-top h3 { font-size: 1.35rem; }
  .report-content { padding: 0 18px; }
  .report-footer { padding: 0 18px 24px; }
  .report-intro { margin-top: 16px; font-size: .83rem; }
  .report-basis { font-size: .71rem; }
  .size-row { grid-template-columns: minmax(0, .85fr) 18px minmax(0, 1.15fr); gap: 5px; padding: 17px 0; }
  .size-row>div:not(.size-plus) { padding: 14px 12px; }
  .size-row small { font-size: .57rem; line-height: 1.3; }
  .size-row .required strong { font-size: 1.45rem; }
  .size-row .recommended strong { font-size: 1.92rem; }
  .size-row>div>span { font-size: .67rem; line-height: 1.35; }
  .size-row .size-plus { width: 18px; font-size: 1.15rem; transform: none; }
  .report-timeline { gap: 8px; }
  .report-timeline>div { padding: 13px 12px; }
  .report-timeline strong { font-size: clamp(.97rem, 4vw, 1.25rem); }
  .report-metrics { display: grid; margin: 16px 0 0; }
  .report-metrics>div, .report-metrics>div:first-child, .report-metrics>div:nth-child(3) { display: block; padding: 13px 12px; border-bottom: 0; }
  .report-metrics>div:nth-child(-n+2) { border-bottom: 1px solid #e0e8e7; }
  .report-metrics strong { font-size: .88rem; text-align: left; }
  .report-metrics span { font-size: .69rem; }
  .report-metrics small { font-size: .61rem; }
  .report-metric>span { padding-right: 25px; }
  .report-metric-icon { top: 10px; right: 9px; width: 26px; height: 26px; padding: 5px; border-radius: 7px; }
  .report-metrics #trees b { font-size: 1.22rem; }
  .report-metrics #trees em { font-size: .72rem; }
  .subsidy-box { margin-top: 13px; padding: 14px 16px; }
  .subsidy-heading { display: flex; }
  .subsidy-heading span { display: inline; }
  .report-disclaimer { margin-top: 15px; }
  .report-sources { font-size: .65rem; line-height: 1.4; }
  .report-actions { gap: 18px; margin-top: 17px; }
}

@media (max-width: 380px) {
  .report-content { padding-inline: 14px; }
  .report-footer { padding-inline: 14px; }
  .size-row>div:not(.size-plus) { padding-inline: 10px; }
  .report-timeline span { font-size: .69rem; }
}

@page { size: A4; margin: 0; }
@media print {
  html, body { width: 100%; margin: 0; padding: 0; color: #142d3d; background: #fff; }
  .report-dialog::backdrop { background: transparent !important; backdrop-filter: none !important; }
  body > .header, body > .mobile-sticky, main > section:not(#calculator), .calc-heading, .calculator-card, .sources-note, .report-close, .report-actions, .report-download-status { display: none !important; }
  .calculator-section, .calculator-section .container, .calc-layout { display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .report-dialog { position: relative !important; display: flex !important; flex-direction: column; width: 100% !important; max-width: none !important; max-height: none !important; min-height: 295mm; box-sizing: border-box; margin: 0 !important; padding: 0 !important; overflow: visible !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: #fff; }
  /* The bleed follows the actual header height even if a print path insets the dialog. */
  .report-top { position: relative; z-index: 1; flex: 0 0 auto; min-height: 43mm; box-sizing: border-box; padding: 9mm 15mm 8mm; overflow: visible; background: #10384b !important; border-bottom: 1mm solid #e8bd63; }
  .report-top::before { content: ""; position: absolute; z-index: 0; top: 0; bottom: -1mm; left: 50%; width: 220mm; transform: translateX(-50%); background: linear-gradient(to bottom, #10384b calc(100% - 1mm), #e8bd63 0) !important; pointer-events: none; }
  .report-top::after { content: ""; position: absolute; top: -31mm; right: -12mm; width: 83mm; height: 83mm; border: 1px solid rgba(246, 204, 120, .38); border-radius: 50%; box-shadow: 0 0 0 12mm rgba(246, 204, 120, .045), 0 0 0 25mm rgba(246, 204, 120, .035); clip-path: inset(31mm 12mm 4mm 0); pointer-events: none; }
  .report-top-copy, .report-date { position: relative; z-index: 1; }
  .report-brand { margin-bottom: 4mm; color: #fff; font-size: 8pt; letter-spacing: .14em; }
  .report-brand img { width: 9mm; height: 9mm; padding: .6mm; box-sizing: border-box; border-radius: 50%; background: #fff; }
  .report-top .step-chip { color: #f2c66f; font-size: 8pt; }
  .report-top h3 { margin-top: 2mm; color: #fff; font-size: 22pt; }
  .report-date { display: block; margin-left: auto; padding-top: 2mm; color: #dce8e8; font: 600 8pt Montserrat, Arial, sans-serif; text-align: right; white-space: nowrap; }
  .report-content { position: relative; padding: 0 15mm; }
  .report-intro { margin: 5mm 0 1mm; color: #304e5d; font-size: 10pt; line-height: 1.4; }
  .report-basis { color: #71858c; font-size: 8.4pt; }
  .size-row { grid-template-columns: minmax(0, .8fr) 8mm minmax(0, 1.2fr); gap: 2mm; padding: 5mm 0 3mm; }
  .size-row>div:not(.size-plus) { min-height: 33mm; box-sizing: border-box; padding: 4mm 5mm; border-radius: 2.5mm; }
  .size-row .required { background: #f6f9f8; border-color: #dce7e4; }
  .size-row .required strong { font-size: 25pt; }
  .size-row .recommended { background: #f6e8c9; border-color: #edcf8e; box-shadow: none; }
  .size-row .recommended small { color: #84590d; }
  .size-row .recommended strong { color: #10384b; font-size: 30pt; }
  .size-row .recommended>span { color: #4b6670; }
  .size-row .size-plus { width: 8mm; color: #b27b20; }
  .subsidy-box { margin: 0; padding: 4mm 5mm; border: 1px solid #d2e3da; border-radius: 2.5mm; background: #f0f7f2; }
  .subsidy-heading { margin-bottom: 2mm; }
  .subsidy-heading strong { font-size: 10pt; }
  .subsidy-heading span { font-size: 7.6pt; }
  .subsidy-total { padding-top: 2mm; }
  .subsidy-total strong { font-size: 17pt; }
  .report-timeline { gap: 0; margin-top: 6mm; border-top: 1px solid #d4e1df; }
  .report-timeline>div { position: relative; padding: 4mm 0 3mm; border: 0; border-radius: 0; background: #fff; }
  .report-timeline>div+div { padding-left: 8mm; border-left: 1px solid #d4e1df; }
  .report-timeline>div::before { content: ""; position: absolute; top: -1.3mm; left: 0; width: 2.5mm; height: 2.5mm; border-radius: 50%; background: #dda340; }
  .report-timeline>div+div::before { left: 8mm; }
  .report-timeline span { color: #516c76; font-size: 8.6pt; }
  .report-timeline strong { margin-top: 1.4mm; font-size: 19pt; }
  .report-metrics { margin: 1mm 0 0; border: 0; border-top: 1px solid #d4e1df; border-bottom: 1px solid #d4e1df; border-radius: 0; }
  .report-metrics>div, .report-metrics>div:first-child, .report-metrics>div:nth-child(3) { padding: 3.5mm 4mm !important; border: 0 !important; }
  .report-metrics>div:nth-child(odd) { border-right: 1px solid #d4e1df !important; }
  .report-metrics>div:nth-child(-n+2) { border-bottom: 1px solid #d4e1df !important; }
  .report-metrics span { font-size: 8.3pt; }
  .report-metrics strong { font-size: 11pt; }
  .report-metrics small { font-size: 7.4pt; }
  .report-metric>span { padding-right: 9mm; }
  .report-metric-icon { top: 3.2mm; right: 4mm; width: 8mm; height: 8mm; padding: 1.5mm; border-radius: 2mm; }
  .report-metrics #trees small { margin: 1mm 0 .5mm; font-size: 7.5pt; }
  .report-metrics #trees b { font-size: 17pt; }
  .report-metrics #trees em { font-size: 9pt; }
  .report-next { display: grid; grid-template-columns: 55% 45%; flex: 0 0 auto; height: 48mm; margin: auto 15mm 0; overflow: hidden; border-radius: 2.5mm; background: #10384b; }
  .report-next-copy { padding: 5mm 6mm; color: #fff; }
  .report-next-eyebrow { color: #f2c66f; font: 800 7.5pt Montserrat, Arial, sans-serif; letter-spacing: .13em; }
  .report-next h4 { margin: 1.7mm 0 4.3mm; color: #fff; font: 700 16pt/1.18 Montserrat, Arial, sans-serif; letter-spacing: -.025em; }
  .report-next ol { display: grid; gap: 2mm; margin: 0; padding: 0; list-style: none; }
  .report-next li { display: flex; align-items: baseline; gap: 3mm; font-size: 9pt; }
  .report-next li span { color: #f2c66f; font: 800 7pt Montserrat, Arial, sans-serif; }
  .report-next li strong { color: #e6f1ef; font-weight: 600; }
  .report-next-photo { position: relative; min-width: 0; height: 100%; margin: 0; overflow: hidden; }
  .report-next-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
  .report-next-photo figcaption { position: absolute; right: 3mm; bottom: 3mm; padding: 1.5mm 2mm; background: rgba(8, 31, 43, .88); color: #fff; font: 700 6.6pt/1.2 Montserrat, Arial, sans-serif; letter-spacing: .08em; }
  .report-footer { margin: 4mm 15mm 0; padding: 0 0 9mm; border-top: 1px solid #d4e1df; }
  .report-disclaimer { margin: 2.5mm 0 0; padding: 0; border: 0; color: #617681; font-size: 8pt; line-height: 1.43; }
  .report-sources { margin: 2mm 0 0; color: #7a8c90; font-size: 7.4pt; }
  .report-top, .size-row, .report-timeline, .report-metrics, .subsidy-box, .report-next, .report-footer { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
