@page {
  size: auto;
  margin: 16mm 14mm 18mm;
}

/* Paged media engines (ignored by browsers that do not support margin boxes). */
@page {
  @bottom-right {
    content: "Page " counter(page) " / " counter(pages);
    font-size: 10pt;
  }
}

html,
body {
  background: transparent !important;
  color: #000 !important;
}

/* Print brand mark at top of document. */
#main::before {
  content: "";
  display: block;
  width: 320px;
  max-width: 100%;
  height: 64px;
  margin: 0 0 10mm 0;
  background: url("/themes/custom/cp/logo-cp-dark.svg") no-repeat left center / contain !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

*,
*::before,
*::after {
  color: #000 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Remove non-content chrome. */
#cp-header,
footer,
#contact,
.skip,
.top-bar,
.admin-toolbar,
#admin-toolbar,
#toolbar-administration,
.toolbar,
.toolbar-bar,
.toolbar-tray,
.c-hdr__panel,
.c-hdr__actions,
.header-region,
.foot,
.footLinks,
.form-actions,
button,
input[type="submit"],
input[type="button"] {
  display: none !important;
}

main,
#main,
.section,
.content-section,
.container,
article {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: auto !important;
}

/* Keep readable print flow and avoid bad page breaks. */
article,
p,
li,
blockquote {
  text-align: left !important;
  orphans: 3;
  widows: 3;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  page-break-after: avoid;
  break-after: avoid-page;
}

img,
table,
pre,
blockquote {
  page-break-inside: avoid;
  break-inside: avoid;
  max-width: 100% !important;
}

/* Print full URLs for regular links. */
a[href^="http"]::after,
a[href^="//"]::after {
  content: " (" attr(href) ")";
  font-size: 0.9em;
  word-break: break-all;
}

a[href^="#"]::after,
a[href^="javascript:"]::after,
a[href^="mailto:"]::after,
a[href^="tel:"]::after {
  content: "";
}
