@import url("./report-tables.css");

*, *::before, *::after { box-sizing: border-box; }
html { overflow-wrap: anywhere; }
main { width: 100%; max-width: 860px; padding-inline: clamp(14px, 3vw, 24px); }
.report-scroll, .wr-page, .wr-stat { min-width: 0; }
.wr-head { flex-wrap: wrap; align-items: baseline; }
.wr-head strong { min-width: 0; }
.wr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
  gap: 10px;
  margin-block: 18px 24px;
}
.wr-stat {
  padding: 9px 12px;
  border: 1px solid #c3d7d4;
  border-radius: 7px;
  background: #f2f8f7;
  break-inside: avoid;
}
.wr-stat strong { display: block; font-size: 1.2em; line-height: 1.25; }
.wr-stat small { display: block; margin-top: 4px; line-height: 1.35; }
.wr-stat .wr-hint { margin-top: 3px; font-size: .78em; }
.working-brief table { table-layout: fixed; }
.er-mast, .report-paper .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  color: #395456;
}
.er-mast strong { min-width: 0; }
.er-mast svg { flex-shrink: 0; }
:is(.exec-report, .wr-engagement) :is(td, th) small { display: block; margin-top: 3px; line-height: 1.4; font-weight: 400; }
table[data-xs-responsive] th[scope="row"] { font-weight: 600; }
.er-status { font-weight: 650; }
.er-next { display: block; margin-top: 3px; }
.report-section-link { margin: 8px 0 16px; }
.report-section-link a { color: #245c55; text-underline-offset: .18em; }
.report-paper + .report-paper { border-top: 2px solid #246b67; margin-top: 32px; padding-top: 16px; }
.report-paper h2 .no { margin-inline-end: .55em; color: #395456; font-size: .8em; }
.report-paper .kpi-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 119px), 1fr));
  gap: 8px;
  margin-block: 16px 22px;
}
.report-paper .kpi {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #c3d7d4;
  border-radius: 7px;
  background: #f2f8f7;
}
.report-paper .kpi .l { font-size: .86em; line-height: 1.3; color: #395456; }
.report-paper .kpi .v { font-size: 1.25em; font-weight: 700; line-height: 1.2; }
.report-paper .fr-report-fields th { width: 36%; }
.report-paper .rf, .exec-report .er-foot {
  margin-top: 16px;
  border-top: 1px solid #bacac9;
  padding-top: 8px;
  color: #395456;
  font-size: .9em;
}
@media screen and (min-width: 610px) and (max-width: 790px) {
  .wr-stats:has(.wr-stat:nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media print {
  @page {
    @bottom-right { content: counter(page) " / " counter(pages); color: #395456; font: 9pt system-ui; }
  }
  main { width: 100%; max-width: none; margin: 0; padding: 0; }
  main > header { padding-bottom: 6px; }
  main > header p { margin: 6px 0 0; }
  .working-brief { font-size: 10.5pt; line-height: 1.42; }
  .working-brief :is(p, ol, ul) { margin-block: 6px; }
  .working-brief :is(h2, h3) { margin-block: 12px 5px; break-after: avoid; }
  .working-brief :is(li, footer) { break-inside: avoid; }
  .working-brief .wr-engagement :is(th, td) { padding: 3px 6px; }
  .working-brief:has(.wr-engagement) { line-height: 1.35; }
  .working-brief:has(.wr-engagement) h1 { margin-block: 9px; }
  .working-brief:has(.wr-engagement) header { padding-bottom: 5px; }
  .working-brief:has(.wr-engagement) .wr-note { padding: 5px 8px; }
  .working-brief:has(.wr-engagement) :is(h2, h3) { margin-block: 8px 4px; }
  .working-brief:has(.wr-engagement) .wr-stats { margin-block: 7px 8px; }
  .working-brief footer { margin-top: 9px; color: #395456; }
  .wr-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-block: 9px 12px; break-inside: avoid; }
  .wr-stats:has(.wr-stat:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wr-stat { padding: 7px 9px; print-color-adjust: exact; }
  :is(.exec-report, .report-paper) { font-size: 10.5pt; line-height: 1.42; }
  :is(.exec-report, .report-paper) h2 { margin-block: 13px 5px; }
  :is(.exec-report, .report-paper) h3 { margin-block: 10px 4px; }
  :is(.exec-report, .report-paper) :is(td, th) { padding: 4px 6px; }
  .exec-report h2:has(+ .er-uses) { break-before: page; margin-top: 0; }
  .exec-report .er-decisions { --col-1: 24%; --col-2: 53%; --col-3: 23%; }
  .exec-report .er-uses { --col-1: 48%; --col-2: 24%; --col-3: 28%; }
  .report-paper .kpi-band { grid-template-columns: repeat(6, minmax(0, 1fr)); break-inside: avoid; }
  .report-paper .kpi { print-color-adjust: exact; }
  .report-paper + .report-paper { break-before: page; border: 0; margin: 0; padding: 0; }
  .report-paper .fr-report-table { --col-1: 28%; --col-2: 17%; --col-3: 19%; --col-4: 17%; --col-5: 19%; }
  .report-paper .fr-report-table:has(tbody tr > :first-child[data-xs-label="Action"]) {
    --col-1: 40%; --col-2: 12%; --col-3: 17%; --col-4: 14%; --col-5: 17%;
  }
  .report-paper .fr-report-table:has(thead th:nth-child(6)) {
    --col-1: 29%; --col-2: 10%; --col-3: 14%; --col-4: 16%; --col-5: 14%; --col-6: 17%;
  }
  .report-paper .fr-report-table:has(tbody tr > :first-child[data-xs-label="Evidence"]) {
    --col-1: 29%; --col-2: 12%; --col-3: 24%; --col-4: 18%; --col-5: 17%;
  }
  :is(.exec-report, .report-paper) table[data-xs-responsive] { table-layout: fixed; overflow-wrap: break-word; }
  :is(.exec-report, .report-paper) table[data-xs-responsive] thead th:nth-child(1) { width: var(--col-1); }
  :is(.exec-report, .report-paper) table[data-xs-responsive] thead th:nth-child(2) { width: var(--col-2); }
  :is(.exec-report, .report-paper) table[data-xs-responsive] thead th:nth-child(3) { width: var(--col-3); }
  .report-paper .fr-report-table thead th:nth-child(4) { width: var(--col-4); }
  .report-paper .fr-report-table thead th:nth-child(5) { width: var(--col-5); }
  .report-paper .fr-report-table thead th:nth-child(6) { width: var(--col-6); }
  .report-paper .fr-report-fields { break-inside: avoid; }
  .report-paper .rf, .exec-report .er-foot { break-inside: avoid; }
  .report-section-link { display: none; }
}
