@page {
    size: A4;
}
  
:root {

    font-size: 16px;
    print-color-adjust: exact; 
    -webkit-print-color-adjust: exact;
    
}

.print-only {
    display: block;
}

/* Block template shell.

   Person pages are rendered by templates/single-hd_person.html, so the document
   shell comes from core's template canvas rather than header.php. That puts the
   whole page inside a single .wp-site-blocks grid item, in a body grid whose
   second row is a 100vh 1fr - and inside a main that clips its overflow. Neither
   box fragments across pages in Chrome, which prints blank. Flatten both back to
   plain flow for printing. See 06-components/body/_core-body.scss and
   06-components/main/_core-main.scss. */

body {
    display: block;
    min-height: 0;
}

.wp-site-blocks {
    display: block;
    position: static;
}

.wp-site-blocks > main {
    overflow: visible;
    max-width: none;
}

/* On screen the header is taken out of flow so it overlays the hero, and main's
   first child carries a matching padding-top. In print it needs to sit above the
   content in normal flow instead. .is-fixed is added by the hd-sticky-nav JS. */

/* relative rather than static - .site-header is the containing block for its
   own :after underline, which otherwise positions against the page box and
   prints as a stray line at the foot of the sheet. */

.wp-site-blocks > .site-header {
    position: relative;
}

.wp-site-blocks > main > :first-child {
    padding-top: 0;
}

.site-header__main-nav.is-fixed {
    position: static;
}

/* Post content wrapper.

   core/post-content renders with an entry-content class, so the classic content
   rules land inside block templates too: a large negative margin-top that pulls
   the content up under the overlaid header, a matching padding-top on its first
   child, and overflow: hidden, which stops Chrome fragmenting it across pages.
   See 06-components/entry/_project-entry.scss and _core-entry.scss. */

.entry-content {
    margin-top: 0;
    overflow: visible;
}

.entry-content > :first-child {
    padding-top: 0;
}

/* Consultant hero.

   The hero is a brand-1 background with white and brand-2 text. Chrome does not
   print background colours unless Background graphics is ticked, so left alone
   this prints white on white - a blank first page. Drop the background and force
   the text black, which is what the .post-header rules below did for the classic
   hero. */

.single-person__hero,
.single-person__hero.has-background {
    background-color: transparent !important;
    padding-top: 0;
    padding-bottom: 0;
}

.single-person__hero,
.single-person__hero * {
    color: #000 !important;
}

.single-person__hero .wp-block-post-title {
    font-size: 28pt;
}

/* the person card is positioned absolutely from tablet up, and the print
   viewport is wider than that breakpoint. See
   07-templates/people/single-person.scss. */

.single-person__hero .consultant-header-person-wrapper {
    position: static;
}

/* a call to action button is no use on paper - the contact details are in the
   card above it. */

.single-person__hero .wp-block-buttons {
    display: none;
}

.single-hd_person {
    --global--grid--default-max-width: var(--global--grid--wide-max-width);
    font-size: var(--wp--preset--font-size--small);
}

.single-hd_person .wp-block-columns {
    display: block !important;
}

.single-hd_person .wp-block-columns::after {
    content: "";
    clear: both;
    display: table;
  }

.single-hd_person .wp-block-column {
    float: left;
}

.single-hd_person .wp-block-column + .wp-block-column {
    margin-left: 3%;
}

.single-hd_person [style="flex-basis:25%"] {
    width: 24%;
}

.single-hd_person [style="flex-basis:75%"] {
    width: 73%;
}

.single-hd_person [style="flex-basis:40%"] {
    width: 39%;
}

.single-hd_person [style="flex-basis:50%"] {
    width: 48%;
}

.single-hd_person [style="flex-basis:60%"] {
    width: 58%;
}

.single-hd_person [style="flex-basis:33.33%"] {
    width: 32% !important;
}

.single-hd_person [style="flex-basis:66.66%"] {
    width: 65% !important;
}

.single-hd_person .wp-block-group.has-background.alignwide, 
.single-hd_person .wp-block-group.has-background:not(.alignwide):not(.alignfull) {
    padding: calc(var(--global--spacing-unit)*2);
}

.single-hd_person .print-footer {
    display: block;
    margin-right: var(--global--spacing-horizontal);
    margin-bottom: var(--global--spacing-vertical);
    margin-top: calc(2 * var(--global--spacing-vertical));
    padding-top: calc(2 * var(--global--spacing-vertical));
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 700;
    text-align: right;
    color: var(--color--brand-1);
    border-top: 3px solid  var(--color--brand-1);
}

.single-hd_person .print-footer .site-tagline,
.single-hd_person .print-footer .site-domain {
    display: block;
}

.single-hd_person .site-header {
    border-bottom: none;
}

.single-hd_person .site-header:after {
    left: var(--header--padding--horizontal);
    right: var(--header--padding--horizontal);
    border-bottom: 3px solid  var(--color--brand-1);
}

/* The light header fills the logo white - see
   06-components/header/_project-header.scss - so it prints invisibly. Only the
   consultant profile template uses it, hence the body class rather than
   .single-hd_person; a person on the classic template keeps the normal header
   and prints its logo in the brand colours. The proper fix is to scope that fill
   to screen in the Sass; this is the no-rebuild version, at the cost of the logo
   printing in flat black. */

.has-light-header .site-info svg :is(path, rect) {
    fill: #000;
}

.single-hd_person .site-header .site-header__main-nav {
    justify-content: flex-end;
}

.single-hd_person .site-header__switchers,
.single-hd_person .primary-nav__wrapper,
.single-hd_person .nav-background-overlay,
.single-hd_person .site-header__utilities {
    display: none;
}

/* Classic template hero.

   The consultant profile template is opt in per person - see customTemplates in
   theme.json - so a person left on single-hd_person.php still renders the hero
   from template-parts/header-hd_person.php. These rules are the .post-header
   equivalent of the .single-person__hero block above. The two sets of markup are
   mutually exclusive, so both can sit in this one stylesheet. */

.single-hd_person .post-header.alignfull.has-background {
    background: transparent;
    padding-bottom: 0;
    margin-bottom: 0;
}

.single-hd_person .post-header__inner.alignwide {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
}

.single-hd_person .post-header__content {
    width: 66%;
}

.single-hd_person .post-header__image-wrapper {
    width: 33%;
}

.single-hd_person .post-header__sector-specialisms .post-header__sector,
.single-hd_person .post-header__sector-specialisms .post-header__specialism {
    background-color: var(--wp--preset--color--black-05);
}

.single-hd_person .post-header__contact .post-header__linkedin {
    margin-top: calc(1 * var(--global--spacing-vertical-micro));
}

/* the call to action below the classic hero is no use on paper, in the same way
   as the button in the block hero above. */

.single-hd_person .post-header + .wp-block-group:has(.wp-block-buttons) {
    display: none;
}

/* a URL is more use than the word Connect on paper, for either hero. */

.single-hd_person .post-header__linkedin a:after {
    content: " (" attr(href) ")";
}

.card__contact-link--linkedin:after {
    content: " (" attr(href) ")";
}

/* Hide the jobs, testimonials and insights sections.

   These were .wp-block-group:has(.hd-block-posts) and :has(.hd-block-jobs),
   which also matched the main element - main is a .wp-block-group and those
   blocks are inside it - so the entire page was hidden and printed as a single
   blank sheet. Target the section wrappers by name instead. */

.consultant-latest-jobs,
.consultant-testimonials,
.consultant-latest-resources {
    display: none;
}

/* any further posts listing inside the post content itself */
.entry-content .wp-block-group:has(.hd-block-posts),
.entry-content .wp-block-columns:has(.hd-block-posts) {
    display: none;
}

.single-hd_person .site-footer {
    display: none;
}

.single-hd_person .site-footer__inner > .wp-block-group.alignfull > * {
    display: none;
}

.single-hd_person .site-footer__inner > .wp-block-group.alignfull > .wp-block-group.alignwide:last-child {
    
    display: block;
    margin-top: 0;

}

.single-hd_person .hd-block-accordion-row__content {
    padding: 0;
}

.single-hd_person .hd-block-accordion-row:before {
    content: none;
}

.single-hd_person .hd-block-accordion-row__content.hidden {
    display: block;
}

.single-hd_person .hd-block-accordion-row__title {
    display: none;
}

.entry-content .wp-block-group:has(.hd-block-jobs) {
    display: none;
}

#wpseo-frontend-inspector {
    display: none;
}