/* ————
Custom Report
——— */

.custom-report {
    position: relative;
    --site-header-height: 82px;
}

@media screen and (min-width: 1080px) {
    .custom-report {
        --site-header-height: 162px;
    }
}

.custom-report .section-hero.is-top-section .section-hero-content {
    color: var(--variable-color);
}

#site-header.site-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* Logo and icons */

#site-header.site-header-overlay #menu-contents {
    border-bottom: 0;
    padding-bottom: 0 !important;
}

#site-header.site-header-overlay #search-modal {
    background-color: transparent;
}

/* Open mobile menu */
#site-header.site-header-overlay.mobile-menu {
    background-color: var(--variable-background-color) !important;
}

/* Anchor links */
:root {
    --scroll-padding-top: 0px;
}

.custom-report *,
.custom-report a.footnote,
.custom-report [id^='footnote-list-'] {
    scroll-margin-top: 0;
}

.custom-report .entry-content > *:first-child {
    margin-top: 0;
}

/* The overlaid nav sits on top of the content, so push the password form below it */
.custom-report .post-password-form {
    padding-top: calc(var(--site-header-height) + 60px);
}

/* Quotes and pullquotes coming into focus */
@media (prefers-reduced-motion: no-preference) {
    .custom-report .is-coming-into-focus {
        filter: blur(calc((1 - var(--quote-focus)) * 8px));
        opacity: calc(0.4 + 0.6 * var(--quote-focus));
    }
}

/* Pullquotes */
.custom-report .wp-block-pullquote {
    margin-top: var(--four-spacer);
    margin-bottom: var(--four-spacer);
    padding: var(--three-spacer) 0;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-color: color-mix(in srgb, currentColor 30%, transparent);
    text-align: left;
    font-size: 1.5rem;
    line-height: 1.35;
}

.custom-report .wp-block-pullquote blockquote,
.custom-report .wp-block-pullquote p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

.custom-report .wp-block-pullquote cite {
    display: block;
    margin-top: var(--one-spacer);
    font-size: var(--wp--preset--font-size--medium);
    font-style: normal;
}

/* Quotes */
.custom-report .wp-block-quote {
    --quote-outdent: 0px;
    margin-top: var(--four-spacer);
    margin-bottom: var(--four-spacer);
    padding: 0;
    border: 0;
    font-size: clamp(1.5rem, 1rem + 1vw, 1.75rem);
    line-height: 1.3;
}

.custom-report .wp-block-quote > * {
    margin-left: calc(-1 * var(--quote-outdent));
    font-size: inherit;
    line-height: inherit;
}

.custom-report .wp-block-quote cite {
    font-size: var(--wp--preset--font-size--medium);
    font-style: normal;
}

@media screen and (min-width: 1080px) and (max-width: 1279px) {
    .custom-report .wp-block-quote {
        --quote-outdent: 120px;
    }
}

/* Details */
.custom-report .wp-block-details {
    margin-top: var(--three-spacer);
    margin-bottom: var(--three-spacer);
}

.custom-report .entry-content .wp-block-details.has-background {
    padding: 24px 30px !important;
}

.custom-report .wp-block-details > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
}

.custom-report .wp-block-details > summary::-webkit-details-marker {
    display: none;
}

.custom-report .wp-block-details > summary::before {
    content: '';
    position: static;
    flex-shrink: 0;
    background-image: none;
    width: 0.6em;
    height: 0.8em;
    background-color: currentColor;
    -webkit-mask: url('../icons/arrow-solid.svg') center / contain no-repeat;
    mask: url('../icons/arrow-solid.svg') center / contain no-repeat;
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

.custom-report .wp-block-details[open] > summary::before {
    transform: none;
}

.custom-report .wp-block-details > :not(summary) {
    margin-top: var(--one-spacer);
    margin-bottom: 0;
    font-size: var(--wp--preset--font-size--medium);
}

/* Footnotes list, the background bleeds to the edges of the window while the text keeps the content width */
.custom-report #footnote-list {
    margin-bottom: 0 !important;
    padding-bottom: var(--five-spacer);
    color: var(--footnotes-text-color);
    background-color: var(--footnotes-background-color);
    box-shadow: 0 0 0 100vmax var(--footnotes-background-color);
    clip-path: inset(0 -100vmax);
}

/* Sit flush against a full-width section */
.custom-report .entry-content > .alignfull + #footnote-list {
    margin-top: 0 !important;
}

/* Wide screens */
@media screen and (min-width: 1280px) {
    .custom-report .entry-content .wp-block-group .wp-block-group.has-background,
    .custom-report .entry-content .wp-block-image,
    .custom-report .entry-content .wp-block-group.has-faded-edges {
        position: relative;
        z-index: 51;
    }
}
