/* SilvaReport Forest Register. Component styles. Values come from tokens.css.
   Source: silvareport-forest-register-style-guide.html. */

/* Names the existing templates already read */
:root {
  --color-primary: var(--pine);
  --color-text: var(--ink);
  --color-text-secondary: var(--ink-subtle);
  --color-border: var(--border-control);
  --color-danger: var(--signal);
  --radius: var(--radius-sm);
  --font-family: var(--font-body);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 14.5px/22px var(--font-body); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--pine); margin: 0; text-wrap: balance; }
h2 { font-size: 28px; line-height: 34px; font-weight: 600; margin-bottom: var(--space-4); }
h3 { font-size: 21px; line-height: 28px; font-weight: 600; margin-bottom: var(--space-3); }
h4 { font-size: 17px; line-height: 24px; font-weight: 600; margin-bottom: var(--space-2); }
p { margin: 0 0 var(--space-3); text-wrap: pretty; }
a { color: var(--pine); text-underline-offset: 2px; }
a:hover { color: var(--pine-hover); }
pre, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
main { max-width: 1120px; margin: 0 auto; padding: var(--space-6) var(--space-7) var(--space-7); }

/* Button */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 40px; padding: 9px var(--space-4); border: 1px solid var(--pine); border-radius: var(--radius-sm); background: var(--pine); color: var(--on-pine); font: 600 14px/20px var(--font-body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--pine-hover); border-color: var(--pine-hover); color: var(--on-pine); }
.btn--success { background: var(--pine); border-color: var(--pine); color: var(--on-pine); }
.btn--outline, .btn--secondary, .btn--info { background: var(--paper); border-color: var(--border-control); color: var(--pine); }
.btn--outline:hover, .btn--secondary:hover, .btn--info:hover { background: var(--pine-tint); border-color: var(--pine); color: var(--pine); }
.btn--danger { background: var(--paper); border-color: var(--signal); color: var(--signal); }
.btn--danger:hover { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn--sm { min-height: 32px; padding: 5px var(--space-3); font-size: 13px; line-height: 18px; }
.btn--lg { min-height: 48px; padding: 13px var(--space-5); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-subtle); border-color: var(--rule-strong); color: var(--ink-subtle); cursor: not-allowed; }
@media (pointer: coarse) { .btn, .btn--sm { min-height: 44px; } }

/* Badge: neutral counts and file types. Never a status. */
.badge, .badge--info, .badge--success, .badge--danger { display: inline-block; padding: 1px 7px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink-muted); font: 600 12px/16px var(--font-body); font-variant-numeric: tabular-nums; vertical-align: middle; white-space: nowrap; }
h2 .badge, h3 .badge { margin-left: var(--space-1); position: relative; top: -3px; }

/* Status */
.status { display: inline-flex; align-items: flex-start; gap: 6px; font: 600 13px/18px var(--font-body); white-space: nowrap; }
.status__mark { flex: none; width: 14px; height: 14px; margin-top: 2px; display: block; }
.status--met { color: var(--ink); font-weight: 500; }
.status--met .status__mark, .status__mark.status--met { color: var(--pine); }
.status--not-met, .status--partial, .status--unverified { color: var(--signal); }
.status--na { color: var(--ink-subtle); font-weight: 400; }

/* Field */
.field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-4); max-width: 480px; }
.field__label, .field > label { font: 600 13px/18px var(--font-body); color: var(--ink); }
.field__optional { font-weight: 400; color: var(--ink-subtle); }
.field__error { color: var(--signal); font: 500 13px/18px var(--font-body); }
input[type="text"], input[type="email"], input[type="number"], .input { width: 100%; min-height: 40px; padding: 9px var(--space-3); border: 1px solid var(--border-control); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); font: 400 14px/20px var(--font-body); }
input::placeholder { color: var(--ink-subtle); opacity: 1; }
input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.input--code { font-size: 22px; line-height: 28px; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; }

/* Notice */
.flash-messages { max-width: 1120px; margin: var(--space-4) auto 0; padding: 0 var(--space-7); display: flex; flex-direction: column; gap: var(--space-2); }
.flash-error, .warning-box { padding: var(--space-3) var(--space-4); border: 1px solid var(--signal); border-radius: var(--radius-sm); background: var(--signal-tint); color: var(--ink); }
.flash-error { font-weight: 500; }
.warning-box { margin-bottom: var(--space-4); }
.warning-box h4 { color: var(--signal); font: 700 13px/18px var(--font-body); margin-bottom: var(--space-1); }
.warning-box ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 18px; }
.cost-display { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); padding: var(--space-2) 0; margin-bottom: var(--space-4); border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.cost-display small { font-size: 13px; color: var(--ink-muted); }
.cost-display br { display: none; }

/* Site chrome */
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--space-1) var(--space-4); padding: var(--space-2) var(--space-7) 0; background: var(--pine); color: var(--on-pine-muted); font: 400 13px/18px var(--font-body); }
.site-nav span { margin-right: auto; }
.site-nav a { color: var(--on-pine); font-weight: 600; text-decoration: none; padding: 3px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--on-pine); border-bottom-color: var(--on-pine); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--on-pine); }
.site-nav a:focus-visible, .site-header a:focus-visible { outline-color: var(--on-pine); }
.site-header { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-7) var(--space-4); background: var(--pine); color: var(--on-pine); }
.site-header h1 { color: var(--on-pine); font-size: 21px; line-height: 26px; font-weight: 700; margin: 0; }
.site-header p { margin: 0; color: var(--on-pine-muted); font-size: 13px; line-height: 18px; }
.site-logo { display: flex; flex: none; }
.site-logo img { display: block; height: 36px; width: auto; }
.admin-bar { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); align-items: baseline; padding: var(--space-2) 0; margin-bottom: var(--space-5); border-bottom: 2px solid var(--pine); font: 700 13px/18px var(--font-body); color: var(--pine); }
.admin-bar span { font-weight: 400; color: var(--ink-subtle); }
.actions-section { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); max-width: 794px; margin: var(--space-5) auto var(--space-7); padding: var(--space-4) var(--space-7) 0; border-top: 1px solid var(--rule-strong); }
.actions-header { flex-basis: 100%; font: 700 12px/16px var(--font-body); color: var(--ink-subtle); }

/* Card and empty state */
.card { padding: var(--space-5); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--paper); margin-bottom: var(--space-5); }
.card .card { border: 0; padding: 0; margin: 0; }
.card--narrow { max-width: 440px; margin: var(--space-6) auto; }
.card__note { margin: var(--space-4) 0 0; font-size: 13px; line-height: 19px; color: var(--ink-subtle); }
.btn--block { width: 100%; }
.field--wide { max-width: 480px; }
.screen-meta { color: var(--ink-subtle); font-size: 13px; line-height: 19px; }
.admin-section { margin-top: var(--space-7); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.empty-state { padding: var(--space-7) var(--space-5); text-align: center; }
.empty-state p { color: var(--ink-muted); }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; font: 400 13px/18px var(--font-body); font-variant-numeric: tabular-nums; }
.data-table th { padding: var(--space-2) var(--space-3); border-bottom: 1.5px solid var(--pine); background: var(--surface-subtle); color: var(--pine); font: 700 12px/16px var(--font-body); text-align: left; white-space: nowrap; }
.data-table td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--rule); vertical-align: top; }
.data-table tbody tr:not(.edit-row):hover td { background: var(--pine-tint); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num, .num { text-align: right; white-space: nowrap; }
.text-center { text-align: center !important; }
.text-bold { font-weight: 600; }
.cell-truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-actions { white-space: nowrap; }
.admin-actions .btn + form, .admin-actions form + .btn { margin-left: var(--space-1); }
.edit-row td { background: var(--surface-subtle); }
.edit-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }
.edit-form label { display: flex; flex-direction: column; gap: var(--space-1); font: 600 12px/16px var(--font-body); }
.edit-form input { width: 220px; max-width: 100%; }
.table-scroll { overflow-x: auto; }

/* Upload */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-7) var(--space-5); border: 1.5px dashed var(--border-control); border-radius: var(--radius-sm); background: var(--paper); text-align: center; }
.dropzone.is-over, .dropzone.dragover, .dropzone:hover { background: var(--pine-tint); border-color: var(--pine); }
.dropzone__icon { display: flex; color: var(--pine); }
.dropzone__icon svg { width: 32px; height: 32px; display: block; }
.dropzone__title { font: 600 17px/24px var(--font-display); color: var(--pine); }
.dropzone__separator { font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.dropzone__hint { font-size: 12px; line-height: 16px; color: var(--ink-subtle); }
.upload-status { font-size: 13px; line-height: 18px; color: var(--ink-muted); margin-top: var(--space-2); }
.upload-status:empty { display: none; }
.file-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--rule); }
.file-card__body { min-width: 0; flex: 1 1 280px; }
.file-card__name { display: flex; align-items: center; gap: var(--space-2); min-width: 0; font-size: 14px; line-height: 20px; }
.file-card__name strong { font-weight: 600; overflow-wrap: anywhere; }
.file-card__meta { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); margin-top: 2px; color: var(--ink-subtle); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.process-section { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1.5px solid var(--pine); }
.markdown-box { max-height: 600px; overflow: auto; padding: var(--space-3) var(--space-4); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--surface-subtle); }
.markdown-box pre { margin: 0; font-size: 13px; line-height: 19px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }

/* Report: sheet */
.rpt { max-width: 794px; margin: 0 auto; background: var(--paper); color: var(--ink); font: 400 14.5px/22px var(--font-body); }
.rpt__body { padding: var(--space-5) var(--space-7) var(--space-6); display: flex; flex-direction: column; gap: var(--space-5); }
.rpt h2 { font-size: 21px; line-height: 28px; font-weight: 600; margin: 0 0 var(--space-3); }
.rpt h3 { font: 700 13px/18px var(--font-body); color: var(--pine); margin: 0 0 var(--space-1); }
.rpt-section { min-width: 0; }
.rpt-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-6); }
.rpt-cols--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rpt-note { margin: var(--space-2) 0 0; font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.rpt-gap { color: var(--signal); font-weight: 600; }
.rpt-sci { font-style: italic; }

/* Report: header band */
.rpt-band { background: var(--pine); color: var(--on-pine); padding: 36px var(--space-7) 34px; display: flex; flex-direction: column; gap: 26px; }
.rpt-band__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-1) var(--space-4); font-size: 13px; line-height: 18px; color: var(--on-pine); }
.rpt-band__brand { font: 700 17px/22px var(--font-display); }
.rpt-band__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.rpt-band__sub { font-size: 14px; line-height: 20px; color: var(--on-pine-muted); margin: 0; }
.rpt-band h1 { margin: 0; color: var(--on-pine); font: 600 40px/46px var(--font-display); }
.rpt-strip { background: var(--pine); color: var(--on-pine); padding: 14px var(--space-7); display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; line-height: 18px; }
.rpt-strip .rpt-band__brand { font-size: 15px; }

/* Report: particulars */
.rpt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); border-left: 1px solid var(--rule-strong); margin: 0; }
.rpt-grid > div { padding: var(--space-2) var(--space-3); border-right: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); min-width: 0; }
.rpt-grid dt { font-size: 12px; line-height: 16px; color: var(--ink-subtle); }
.rpt-grid dd { margin: 2px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }

/* Report: rows */
.rpt-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.rpt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; line-height: 19px; }
.rpt-level { font-weight: 700; color: var(--signal); }
.rpt-level--low { color: var(--pine); }
.rpt-level--high { color: var(--signal-strong); }

/* Report: actions */
.rpt-actions { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.rpt-action { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: var(--space-2); padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; line-height: 20px; break-inside: avoid; }
.rpt-action__num { font: 700 18px/20px var(--font-display); color: var(--pine); font-variant-numeric: lining-nums; }

/* Report: custody route */
.rpt-route { display: grid; grid-template-columns: 82px minmax(0, 1fr); column-gap: var(--space-3); }
.rpt-route__head { display: flex; justify-content: flex-end; font-size: 12px; line-height: 16px; color: var(--ink-subtle); grid-column: 1 / -1; margin-bottom: var(--space-1); }
.rpt-route__leg { font: 700 13px/18px var(--font-body); color: var(--pine); padding-top: var(--space-2); border-top: 1px solid var(--rule); }
.rpt-route__steps { margin: 0; padding: var(--space-2) 0 0; list-style: none; border-top: 1px solid var(--rule); }
.rpt-route__leg:first-of-type, .rpt-route__leg:first-of-type + .rpt-route__steps { border-top: 0; }
.rpt-step { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) 76px; gap: var(--space-2); padding-bottom: var(--space-3); break-inside: avoid; }
.rpt-step::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: -4px; width: 2px; background: var(--rule-strong); }
.rpt-step:last-child { padding-bottom: var(--space-2); }
.rpt-step:last-child::before { bottom: var(--space-3); }
.rpt-step .status__mark { position: relative; width: 16px; height: 16px; margin-top: 2px; background: var(--paper); border-radius: var(--radius-full); }
.rpt-step__name { font-size: 14px; line-height: 20px; font-weight: 600; }
.rpt-step__detail { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.rpt-step__vol { font-size: 13.5px; line-height: 20px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rpt-step__vol--none { font-weight: 400; color: var(--ink-subtle); font-size: 12px; }

/* Report: tables */
.rpt-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.rpt-table th { padding: 0 var(--space-3) 5px 0; border-bottom: 1.5px solid var(--pine); color: var(--pine); font: 700 12px/16px var(--font-body); text-align: left; vertical-align: bottom; }
.rpt-table td { padding: 6px var(--space-3) 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: anywhere; }
.rpt-table th:last-child, .rpt-table td:last-child { padding-right: 0; }
.rpt-table .num { text-align: right; white-space: nowrap; }
.rpt-table caption { text-align: left; font: 700 13px/18px var(--font-body); color: var(--pine); padding-bottom: var(--space-1); }
.rpt-table tr { break-inside: avoid; }
.rpt-table thead { display: table-header-group; }
.rpt-sub { display: block; color: var(--ink-subtle); font-size: 12px; line-height: 16px; }

/* Report: timeline */
.rpt-timeline { margin: 0; padding: 0; list-style: none; }
.rpt-tl { position: relative; display: grid; grid-template-columns: 92px 16px minmax(0, 1fr); gap: var(--space-2); padding-bottom: var(--space-2); font-size: 13px; line-height: 18px; break-inside: avoid; }
.rpt-tl::before { content: ""; position: absolute; left: 107px; top: 4px; bottom: -4px; width: 2px; background: var(--rule-strong); }
.rpt-tl:last-child::before { display: none; }
.rpt-tl__date { color: var(--ink-subtle); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rpt-tl__dot { position: relative; width: 8px; height: 8px; margin: 5px 4px 0; border-radius: var(--radius-full); background: var(--pine); }
.rpt-tl .status__mark { position: relative; width: 16px; height: 16px; margin: 1px 0 0; background: var(--paper); border-radius: var(--radius-full); color: var(--signal); }
.rpt-tl__event b { font-weight: 600; }
.rpt-tl--check .rpt-tl__date { color: var(--signal); font-weight: 600; }

/* Report: footer */
.rpt-foot { display: flex; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--rule); font-size: 12px; line-height: 16px; color: var(--ink-subtle); }

/* Small screens */
@media (max-width: 640px) {
  main { padding: var(--space-5) var(--space-4) var(--space-6); }
  .site-nav, .site-header, .flash-messages { padding-left: var(--space-4); padding-right: var(--space-4); }
  .site-nav span { flex-basis: 100%; }
  .site-nav { justify-content: flex-start; }
  h2 { font-size: 24px; line-height: 30px; }
  .card { padding: var(--space-4); }
  .rpt-band { padding: var(--space-5) var(--space-4); gap: var(--space-5); }
  .rpt-band h1 { font-size: 28px; line-height: 34px; }
  .rpt-band__main { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .rpt-strip { padding: var(--space-3) var(--space-4); }
  .rpt__body { padding: var(--space-5) var(--space-4); }
  .rpt-cols, .rpt-cols--even { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .rpt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpt-grid > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .rpt-route { grid-template-columns: minmax(0, 1fr); }
  .rpt-route__leg { padding-bottom: var(--space-1); }
  .rpt-route__steps { border-top: 0; padding-top: var(--space-1); }
  .rpt-step { grid-template-columns: 16px minmax(0, 1fr) 62px; }
  .rpt-tl { grid-template-columns: 78px 16px minmax(0, 1fr); }
  .rpt-tl::before { left: 93px; }
  .actions-section { padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* ── Findings (replaces the risk list: no ratings) ── */
.rpt-findings { margin: 0 0 var(--space-4); padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.rpt-finding { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: var(--space-3); padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; line-height: 19px; break-inside: avoid; }
.rpt-finding__area { font-size: 12px; line-height: 19px; color: var(--ink-subtle); text-align: right; }
.rpt-basis--knowledge { font-style: italic; }
.rpt-count { font-weight: 700; color: var(--pine); font-variant-numeric: tabular-nums; }
.rpt-count--open { color: var(--signal); }
.rpt-foot__disclaimer { max-width: 60%; text-align: right; }

/* ── App: processing overlay, inline notices ── */
.overlay { position: fixed; inset: 0; background: rgba(23, 35, 29, 0.6); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.overlay__dialog { background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); padding: var(--space-6); max-width: 480px; width: 100%; text-align: center; }
.overlay__dialog p { color: var(--ink-muted); }
.progress-bar { height: 8px; background: var(--surface-subtle); border: 1px solid var(--rule-strong); margin: var(--space-4) 0 var(--space-2); }
.progress-bar__fill { height: 100%; width: 0; background: var(--pine); }
.overlay__percent { font-weight: 600; color: var(--pine); font-variant-numeric: tabular-nums; }
.overlay__warning { color: var(--signal); font-size: 13px; }
.notification { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); margin: 0 0 var(--space-4); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); color: var(--ink); }
.notification--error { background: var(--signal-tint); border-color: var(--signal); }
.notification__close { background: none; border: 0; padding: 0 var(--space-1); font: 600 14px/20px var(--font-body); color: var(--ink); cursor: pointer; text-decoration: underline; }
.file-card__actions { flex: none; }

/* ── Print: A4, pine band bleeds to the edge, running page numbers ── */
@page {
  size: A4;
  margin: 14mm 0;
  @bottom-center { content: "Page " counter(page) " of " counter(pages); font: 400 8pt Archivo, Arial, sans-serif; color: #4c5a52; }
}
@page :first { margin-top: 0; }
@media print {
  .site-nav, .site-header, .flash-messages, .actions-section, .rpt-strip { display: none !important; }
  .rpt { max-width: none; }
  a, a:link, a:visited { color: inherit; text-decoration: none; }
  p { orphans: 3; widows: 3; }
  h2, h3 { break-after: avoid-page; }
  .rpt-band { break-inside: avoid; }
}

