/* Print */

* {
  --bs-body-font-size: 0.9rem;
}

.fixed-top {
  box-shadow: none;
  position: relative;
  top: 0;
  left: 0;
  height: 100px;
  padding: 0 0 1rem 0;
  margin: 0;
}

#masthead {
  padding: 0;
  display: block;
}

img.breakout {
    left: 0;
    margin-left: 0;
    margin-right: 0;
    position: static;
    right: 0%;
    width: 100%;
}

.site-footer {
  border-top: 1px solid #ccc;
  padding-top: 0.5rem;
}

#navbar-primary-mobile, #site-navigation, #loginout, #footer2, #footer3, #related-header, .block-related, p.tags {
  display: none !important;
}

/* ------------------------------------------------------------------------------------------
 * Print version of the refreshed look (see style-refresh.css, which is screen only).
 * Same type, section colours and devices, adjusted for paper: points not rem, regular weights
 * (light weights thin out in print), no gradients, flat tints, and rules and squares forced to print.
 * ------------------------------------------------------------------------------------------ */

@page {
  margin: 16mm 15mm 18mm;
}

/* tokens: the screen stylesheet defines these, but is not loaded for print */
.clp {
  --clp-ink: #111;
  --clp-navy: #2F3D85;
  --clp-sec: #2F3D85;
  --clp-sec-ink: #2F3D85;
  --clp-tint: #E7EAF6;
  --clp-sans: "Source Sans 3", Arial, sans-serif;
  --clp-serif: "Merriweather", Georgia, serif;
}

.clp-sec-update   { --clp-sec: #F8C800; --clp-sec-ink: #7A5A00; --clp-tint: #FFF5CC; }
.clp-sec-regulars { --clp-sec: #0CB8D8; --clp-sec-ink: #006A88; --clp-tint: #E1F6FA; }
.clp-sec-features { --clp-sec: #2F3D85; --clp-sec-ink: #2F3D85; --clp-tint: #E7EAF6; }
.clp-sec-talking  { --clp-sec: #A00078; --clp-sec-ink: #A00078; --clp-tint: #F8E5F1; }
.clp-sec-arts     { --clp-sec: #F40004; --clp-sec-ink: #C4001A; --clp-tint: #FDE7E7; }

/* more things that make no sense on paper */
.clp .get-involved,
.clp .gform_wrapper,
.clp .btn,
.clp .nav-search-a11y,
.clp .nav-search-mobile {
  display: none !important;
}

/* five-colour strip across the top of the first page */
.clp::before {
  content: "";
  display: block;
  height: 5px;
  margin-bottom: 4mm;
  background: linear-gradient(90deg, #F8C800 0 20%, #0CB8D8 20% 40%, #2F3D85 40% 60%, #A00078 60% 80%, #F40004 80% 100%);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* body copy: Merriweather regular, black on white */
body.clp {
  padding-top: 0 !important;
  background: #fff !important;
  color: #000;
  font-family: var(--clp-serif);
  font-weight: 400;
}

.clp .entry-content {
  font-size: 10.5pt;
  line-height: 1.6;
  font-weight: 400;
}

.clp .entry-content > p,
.clp .entry-content > ul,
.clp .entry-content > ol,
.clp .entry-content > dl {
  max-width: 68ch;
}

.clp .entry-content p {
  orphans: 3;
  widows: 3;
  text-wrap: pretty;
}

.clp .entry-content a {
  color: inherit;
  text-decoration: underline;
}

/* headings, standfirst, meta: Source Sans */
.clp h1,
.clp h2,
.clp h3,
.clp h4,
.clp .entry-title,
.clp .entry-lede,
.clp .entry-meta {
  font-family: var(--clp-sans);
  text-wrap: balance;
}

.clp h1,
.clp h2,
.clp h3,
.clp h4,
.clp .entry-title {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.005em;
  break-after: avoid;
}

.clp .entry-title,
.clp .page-title {
  color: var(--clp-navy);
}

.clp h1.entry-title {
  font-size: 26pt;
  line-height: 1.08;
}

.clp .entry-content h2,
.clp .entry-content h3 {
  margin-top: 1.5em;
  color: var(--clp-sec-ink);
}

.clp .entry-content h2 { font-size: 15pt; }
.clp .entry-content h3 { font-size: 12.5pt; }

.clp .entry-lede {
  font-size: 13.5pt;
  font-weight: 400;
  line-height: 1.4;
  color: #222;
}

.clp .entry-meta {
  font-weight: 400;
  color: #333;
}

.clp .entry-meta a {
  font-weight: 600;
  text-decoration: none;
}

/* kicker: square in the print colour plus the category name */
.clp.single-post[class*="clp-sec-"] .entry-header::before {
  content: var(--clp-label, "");
  display: block;
  margin-bottom: 2mm;
  padding-left: 4.5mm;
  font-family: var(--clp-sans);
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--clp-sec-ink);
  background: linear-gradient(var(--clp-sec), var(--clp-sec)) no-repeat left center / 3mm 3mm;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* issue label and category pills: small tinted caps */
.clp .entry-date .posted-on a,
.clp .categories a {
  display: inline-block;
  padding: .1em .5em;
  background: var(--clp-tint);
  color: var(--clp-sec-ink);
  font-family: var(--clp-sans);
  font-size: 8.5pt;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* drop cap: bold sans, three lines deep */
.clp .has-dropcap > p:first-child:first-letter {
  float: left;
  opacity: 1;
  font-family: var(--clp-sans);
  font-weight: 700;
  font-size: 4.6em;
  line-height: .8;
  padding: .06em .1em 0 0;
  color: var(--clp-sec-ink);
}

/* pullquote: rules in the section colour above and below */
.clp .entry-content blockquote {
  clear: both;
  margin: 1.5em 0;
  padding: .9em 0;
  border-top: 2.5pt solid var(--clp-sec);
  border-bottom: 2.5pt solid var(--clp-sec);
  font-family: var(--clp-sans);
  font-weight: 400;
  font-size: 15pt;
  line-height: 1.25;
  color: #111;
  text-wrap: balance;
  break-inside: avoid;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.clp .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

/* end mark */
.clp .entry-content .clp-end::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: .55em;
  margin-left: .45em;
  background: var(--clp-sec);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* metaboxes: flat light tint, bold top edge, no gradient, kept in one piece */
.clp .meta-box,
.clp .sidebar-box {
  --box-a: #F1F3FD;
  --box-edge: #6A78DB;
  margin: 1em 0;
  padding: 4mm 5mm 3.5mm;
  border: 0;
  border-top: 3pt solid var(--box-edge);
  border-radius: 0;
  background: var(--box-a);
  color: #111;
  font-family: var(--clp-sans);
  font-size: 10pt;
  line-height: 1.5;
  break-inside: avoid;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.clp .sidebar-box {
  --box-a: #FFF6CF;
  --box-edge: #D9A800;
}

.clp .entry-content .meta-box h2,
.clp .entry-content .meta-box h3,
.clp .entry-content .sidebar-box h2,
.clp .entry-content .sidebar-box h3 {
  margin: 0 0 .4em;
  font-size: 12pt;
  color: var(--clp-navy);
}

.clp .meta-box p:last-child,
.clp .sidebar-box p:last-child {
  margin-bottom: 0;
}

.clp .meta-box em,
.clp .meta-box i,
.clp .sidebar-box em,
.clp .sidebar-box i {
  font-family: var(--clp-serif);
}

.clp .meta-box-float-right,
.clp .sidebar-box-float-right {
  float: right;
  width: 55mm;
  margin: .25em 0 1em 6mm;
}

/* images and captions */
.clp figure,
.clp .wp-caption {
  break-inside: avoid;
}

.clp .entry-content figure figcaption,
.clp .featured-image-caption,
.clp .wp-caption-text,
.clp .gallery figcaption {
  font-family: var(--clp-sans);
  font-style: normal;
  font-weight: 400;
  font-size: 9pt;
  line-height: 1.4;
  color: #222;
  text-wrap: balance;
}

/* footer: plain, small, no tint */
.clp .site-footer {
  background: none;
  font-family: var(--clp-sans);
  font-size: 9pt;
  font-weight: 400;
  color: #222;
}

/* add URLs to printed links */

.clp .entry-content a[href^="http"]:not([href*="communitylivingmagazine.com"])::after {
  content: " (" attr(href) ")";
  font-size: 8.5pt;
  word-break: break-all;
}
