/* Reltic VDC report. Cover + back match the Reltic VDC report template exactly (dark).
   The interior carries the calculator's own content. Font: Helvetica.
   Colours: primary #0F3D3A, teal #1F6E69, lime #C8F8A9, text #3A4A47, RAG r#B23A3A a#C98A2E g#2E7D4F. */

#report{display:none}
#report *{box-sizing:border-box}
#report{font-family:Helvetica,"Helvetica Neue",Arial,sans-serif;color:#3A4A47;line-height:1.5}

/* on-screen preview: the report is a normal in-flow block (NOT a fixed overlay), and the
   calculator page is hidden via body.report-open. This is what makes Ctrl+P / Save as PDF
   print EVERY page instead of clipping the first viewport of a scrollable overlay. */
#report.preview{display:block !important;background:#E7ECE7;padding:26px 16px 60px}
body.report-open{background:#E7ECE7}
body.report-open > *:not(#report):not(#rep-bar){display:none !important}
#report.preview .rep-cover,#report.preview .rep-interior,#report.preview .rep-back{max-width:820px;margin:0 auto 20px;box-shadow:0 10px 30px rgba(15,33,30,.16);border-radius:4px}
#report.preview .rep-interior{background:#fff;padding:34px 40px}
#rep-bar{position:fixed;top:14px;right:16px;z-index:1001;display:flex;gap:8px}
#rep-bar button{background:#0F3D3A;color:#fff;border:none;border-radius:9px;padding:10px 16px;font-size:13px;font-weight:600;cursor:pointer;font-family:"DM Sans",system-ui,sans-serif;box-shadow:0 6px 18px rgba(0,0,0,.25)}
#rep-bar #rep-close{background:#fff;color:#0F3D3A;border:1px solid #DDE7E3}
@media print{#rep-bar{display:none !important}}

@media print{
  body > *:not(#report){display:none !important}
  #report{display:block !important}
  html,body{background:#fff !important}
  @page{size:A4;margin:12mm}
  /* cover + back print full-bleed (dark to the paper edge); interior keeps its margins */
  @page cover{margin:0}
  @page back{margin:0}
  #report,#report *{-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important;color-adjust:exact !important}
  .rep-cover{page:cover;min-height:297mm}
  .rep-back{page:back;min-height:297mm}
  .rep-cover{break-after:page}
  .rep-back{break-before:page}
  /* interior is a table so its logo bar (thead) + confidential line (tfoot) repeat on EVERY page */
  .rep-int{width:100%;border-collapse:collapse}
  .rep-int thead{display:table-header-group}
  .rep-int tfoot{display:table-footer-group}
  .rep-int thead td,.rep-int tfoot td,.rep-int tbody td{padding:0}
  .ib-head{padding-bottom:9px}
  .ib-verdict,.ib-chart,.ib-ragrow,.ib-formrow,.ib-actions li,.ib-view{break-inside:avoid}
  tr{break-inside:avoid}
  /* when printing from the on-screen preview, drop the fixed overlay so every page prints */
  #report.preview{position:static !important;inset:auto !important;overflow:visible !important;padding:0 !important;background:#fff !important;z-index:auto !important}
  #report.preview .rep-cover,#report.preview .rep-interior,#report.preview .rep-back{max-width:none !important;margin:0 !important;box-shadow:none !important;border-radius:0 !important}
}

/* ===== COVER (dark, template) ===== */
.rep-cover,.rep-back{position:relative;background:#0F3D3A;color:#fff;overflow:hidden;padding:24mm 20mm;
  -webkit-print-color-adjust:exact;print-color-adjust:exact}
@media screen{.rep-cover,.rep-back{padding:44px 44px 34px;min-height:560px}}
.rep-fill{position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;display:block}
.rep-mark{position:absolute;right:-2%;bottom:1.5%;width:44%;height:auto;color:#1B5A52;z-index:0;pointer-events:none}
.rep-cover > *:not(.rep-fill):not(.rep-mark),.rep-back > *:not(.rep-fill):not(.rep-mark){position:relative;z-index:1}
.rep-cover{display:flex;flex-direction:column;justify-content:space-between}
.limebar{position:absolute;left:0;top:0;bottom:0;width:6px;background:#C8F8A9}
.limetop{position:absolute;left:6px;right:0;top:0;height:2px;background:#C8F8A9}
.limebot{position:absolute;left:6px;right:0;bottom:0;height:2px;background:#C8F8A9}
.rc-logo{display:flex;align-items:center;gap:12px}
.rc-logo svg{width:38px;height:38px}
.rc-logo .w{font-family:Helvetica,Arial,sans-serif;font-size:21px;letter-spacing:.13em;color:#fff}
.rc-logo .w b{color:#C8F8A9;font-weight:400}
.rc-mid .rc-rule{height:.9pt;background:#C8F8A9;margin-bottom:12px}
.rc-mid .rc-label{font-size:8pt;letter-spacing:.42em;color:#C8F8A9;text-transform:uppercase;margin-bottom:18px;font-weight:400}
.rc-mid h1{font-family:Helvetica,Arial,sans-serif;font-weight:700;font-size:31px;line-height:1.12;color:#fff;margin:0;max-width:16ch;letter-spacing:-.01em}
.rc-sample{display:inline-block;margin-top:18px;background:#C8F8A9;color:#0F3D3A;font-size:8pt;font-weight:700;letter-spacing:.02em;padding:5px 11px}
.rc-meta .rc-metaline{height:.5pt;background:#2E5350;margin-bottom:10px}
.rc-meta .rc-metarow{display:flex;justify-content:space-between}
.rc-meta .k{font-size:7pt;font-weight:700;letter-spacing:.06em;color:#C8F8A9;display:block;margin-bottom:4px}
.rc-meta .v{font-size:9pt;color:#D7E4DF}
.rc-meta .r{text-align:right}

/* ===== INTERIOR (light, the calculator's content) ===== */
.rep-interior{padding-top:4px}
@media screen{.rep-interior{padding:24px 30px;max-width:760px;margin:0 auto}}
.rep-int{width:100%;border-collapse:collapse}
.rep-int > thead td,.rep-int > tfoot td,.rep-int > tbody > tr > td{padding:0}
.ib-head{border-bottom:2px solid #0F3D3A;padding-bottom:9px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:flex-end;gap:12px}
.ib-head .t{font-size:8pt;letter-spacing:.14em;text-transform:uppercase;color:#1F6E69;font-weight:700}
.ib-head .p{font-family:Helvetica,Arial;font-size:15px;color:#16211C;font-weight:700}
.ib-logo{display:flex;align-items:center;gap:7px}
.ib-logo svg{width:22px;height:22px}
.ib-logo span{font-size:11pt;letter-spacing:.1em;color:#0F3D3A}
.ib-logo span b{color:#1F6E69;font-weight:400}
.ib-foot{border-top:.6pt solid #1F6E69;margin-top:14px;padding-top:5px;font-size:7pt;color:#3A4A47}
.ib-h{font-size:8.5pt;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#1F6E69;border-top:.4pt solid #DDE7E3;padding-top:8px;margin:18px 0 8px}
.ib-p{font-size:9pt;color:#3A4A47;line-height:1.6;margin:6px 0}
.ib-note{font-size:8pt;color:#8A968E;line-height:1.5;margin-top:12px}

/* numbered advisory-guide section heading (matches the template) */
.ib-sec{display:flex;align-items:center;gap:9px;font-size:9pt;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#0F3D3A;border-top:.6pt solid #C8CFC9;padding-top:11px;margin:20px 0 9px}
.ib-sec:first-child{border-top:none;padding-top:0;margin-top:2px}
.ib-secn{display:inline-grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#0F3D3A;color:#C8F8A9;font-size:8pt;font-weight:700;letter-spacing:0}
.ib-sub{font-family:Helvetica,Arial;font-size:11pt;font-weight:700;color:#16211C;margin:12px 0 3px}

/* method / formulas */
.ib-form{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.ib-formrow{border:1px solid #DDE7E3;border-left:3px solid #1F6E69;border-radius:7px;padding:9px 12px;background:#F8FBF9}
.ib-formrow .fx{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:9pt;color:#0F3D3A;font-weight:700}
.ib-formrow .fd{font-size:8pt;color:#3A4A47;line-height:1.5;margin-top:3px}

/* recommended actions */
.ib-actions{list-style:none;margin:6px 0;padding:0}
.ib-actions li{position:relative;padding:5px 0 5px 22px;font-size:9pt;color:#3A4A47;line-height:1.5}
.ib-actions li:before{content:"";position:absolute;left:2px;top:10px;width:9px;height:9px;border-radius:2px;background:#C8F8A9;border:1px solid #8FD65E}

/* RAG stage list */
.ib-rag{display:flex;flex-direction:column;gap:0;margin:6px 0}
.ib-ragrow{display:flex;gap:11px;align-items:flex-start;padding:11px 0;border-top:.4pt solid #DDE7E3}
.ib-ragrow:first-child{border-top:none}
.ib-ragrow .rd{width:11px;height:11px;border-radius:50%;flex:none;margin-top:2px}
.ib-ragrow .rl{font-size:9pt;font-weight:700;color:#16211C}
.ib-ragrow .rl em{font-style:normal;font-size:7.5pt;font-weight:700;letter-spacing:.03em;margin-left:6px}
.ib-ragrow .rt{font-size:8.5pt;color:#3A4A47;line-height:1.5;margin-top:2px}

/* the Reltic VDC view, highlighted */
.ib-view{background:#0F3D3A;color:#EAF3EE;border-radius:10px;padding:16px 18px;margin:8px 0}
.ib-view .ib-viewlab{font-size:7.5pt;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:#C8F8A9;margin-bottom:7px}
.ib-view .ib-viewtx{font-size:9.5pt;line-height:1.6;color:#EAF3EE}
.ib-view .ib-viewtx b{color:#fff}

.ib-verdict{display:grid;grid-template-columns:120px 1fr;gap:18px;align-items:center;border:1px solid #DDE7E3;border-radius:10px;padding:14px 16px;margin-bottom:14px}
.ib-verdict.ok{border-left:5px solid #2E7D4F}.ib-verdict.warn{border-left:5px solid #C98A2E}.ib-verdict.crit{border-left:5px solid #B23A3A}
.ivbig{text-align:center}
.ivbig .n{font-family:Helvetica,Arial;font-size:40px;font-weight:400;color:#16211C;line-height:1;letter-spacing:-1px}
.ivbig span{display:block;font-size:7.5pt;letter-spacing:.06em;text-transform:uppercase;color:#6C776F;font-weight:700;margin-top:6px}
.ivpill{display:inline-block;font-size:8pt;font-weight:700;padding:4px 10px;border-radius:999px;margin-bottom:7px}
.ivpill{border:1px solid currentColor}
.ivpill.ok{color:#2E7D4F}.ivpill.warn{color:#C98A2E}.ivpill.crit{color:#B23A3A}
.ivhead{font-family:Helvetica,Arial;font-size:14px;font-weight:700;color:#16211C;margin-bottom:4px}
.ivtext{font-size:9pt;color:#3A4A47;line-height:1.5}

.ib-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:6px 0 8px}
.ib-kpi{border:1px solid #DDE7E3;border-radius:9px;padding:11px 13px}
.ib-kpi .k{font-size:8pt;letter-spacing:.05em;text-transform:uppercase;color:#6C776F;font-weight:700}
.ib-kpi .v{font-family:Helvetica,Arial;font-size:20px;color:#16211C;margin-top:4px}
.ib-kpi .s{font-size:7.5pt;color:#8A968E;margin-top:2px}

.ib-charts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:6px 0}
.ib-charts.one{grid-template-columns:1fr;max-width:74%}
.ib-chart{border:1px solid #DDE7E3;border-radius:9px;padding:10px 12px 8px;background:#fff}
.ib-chart .ct{font-size:8.5pt;font-weight:700;color:#0F3D3A;margin-bottom:6px}
.ib-chart svg{width:100%;height:auto;display:block}
.ib-chart .cap{font-style:italic;font-size:7.5pt;color:#1F6E69;margin-top:5px}

.ib-table{width:100%;border-collapse:collapse;font-size:8.5pt;margin:6px 0}
.ib-table th{color:#0F3D3A;text-align:left;font-weight:700;padding:6px 10px;border-bottom:2px solid #0F3D3A}
.ib-table td{padding:6px 10px;border-bottom:.3pt solid #DDE7E3;color:#3A4A47}
.ib-table tr:nth-child(even) td{background:#F4F7F5}
.ib-table td.rag{font-weight:700}
.ib-cap{font-style:italic;font-size:7.5pt;color:#1F6E69;margin:4px 0 2px}

/* ===== BACK (dark, template) ===== */
.rep-back{display:flex;flex-direction:column}
.rb-body{margin-top:26%}
@media screen{.rb-body{margin-top:70px}}
.rb-company{font-size:19px;font-weight:700;color:#fff;margin:0 0 5px}
.rb-tag{font-size:9.5pt;color:#C8F8A9;margin:0 0 26px}
.rb-row{margin-bottom:12px}
.rb-row .k{font-size:7pt;font-weight:700;letter-spacing:.04em;color:#7FB89F;margin-bottom:2px}
.rb-row .v{font-size:9.5pt;color:#E6EFEA}
.rb-div{height:.5pt;background:#2E5350;margin:14px 0}
.rb-disc{font-size:7.5pt;color:#9FB8B0;line-height:1.5;max-width:62ch}
.rb-foot{margin-top:auto;padding-top:22px;font-size:7pt;color:#7FB89F}
