/* Limit the replacement to pages where this plugin has rendered its masthead. */
body:has(.cs-shared-masthead) #header {
    display: none !important;
}

.cs-shared-announcement,
.cs-shared-masthead,
.cs-shared-masthead *,
.cs-shared-skip-link {
    box-sizing: border-box;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.cs-shared-announcement {
    width: 100%;
    margin: 0;
    padding: 8px 18px;
    background: #102b46;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.15;
}

.cs-shared-masthead {
    position: sticky;
    top: 0;
    z-index: 60;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(220, 227, 232, .92);
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(14px);
    color: #102b46;
    line-height: 1.4;
}

body.admin-bar .cs-shared-masthead {
    top: var(--wp-admin--admin-bar--height, 32px);
}

.cs-shared-header-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    width: calc(100% - 32px);
    max-width: 1180px;
    min-height: 78px;
    margin: 0 auto;
    padding: 0;
}

.cs-shared-masthead a {
    text-decoration: none;
}

.cs-shared-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 44px;
}

.cs-shared-brand img {
    display: block;
    width: clamp(130px, 18vw, 190px);
    max-width: 100%;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.cs-shared-desktop-nav {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.cs-shared-desktop-nav a {
    display: inline-block;
    padding: 10px 0;
    color: #647383;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
}

.cs-shared-desktop-nav a:hover,
.cs-shared-desktop-nav a[aria-current] {
    color: #102b46;
}

.cs-shared-desktop-nav a[aria-current] {
    text-decoration: underline;
    text-decoration-color: #e47c57;
    text-underline-offset: 7px;
}

.cs-shared-masthead .cs-shared-header-cta {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 13px 19px;
    border: 1px solid #e47c57;
    border-radius: 5px;
    background: #e47c57;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.cs-shared-masthead .cs-shared-header-cta:hover {
    border-color: #c96746;
    background: #c96746;
    color: #fff;
}

.cs-shared-mobile-menu {
    display: none;
}

.cs-shared-masthead a:focus-visible,
.cs-shared-mobile-menu summary:focus-visible {
    outline: 3px solid #e47c57;
    outline-offset: 4px;
}

.cs-shared-skip-link {
    position: absolute;
    top: 8px;
    left: -10000px;
    z-index: 100000;
    padding: 12px 18px;
    background: #fff;
    color: #102b46;
}

.cs-shared-skip-link:focus {
    left: 16px;
    outline: 3px solid #e47c57;
}

@media (max-width: 1040px) {
    .cs-shared-header-inner {
        gap: 18px;
    }

    .cs-shared-desktop-nav {
        display: none;
    }

    .cs-shared-mobile-menu {
        display: block;
        flex: 0 0 36px;
        margin: 0 0 0 auto;
        color: #102b46;
    }

    .cs-shared-mobile-menu summary {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        min-height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #102b46;
        list-style: none;
        cursor: pointer;
    }

    .cs-shared-mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .cs-shared-mobile-menu summary svg {
        display: block;
        flex: 0 0 auto;
    }

    .cs-shared-mobile-menu nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 70;
        margin: 0;
        padding: 12px 18px;
        border: 1px solid #dce3e8;
        border-radius: 0 0 6px 6px;
        background: #fff;
        box-shadow: 0 12px 28px rgba(16, 43, 70, .08);
    }

    .cs-shared-mobile-menu nav a {
        display: block;
        padding: 12px 0;
        color: #102b46;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.4;
    }
}

@media (max-width: 767px) {
    .cs-shared-announcement {
        font-size: 11px;
    }

    .cs-shared-header-inner {
        gap: 8px;
        min-height: 68px;
    }

    .cs-shared-brand img {
        width: 125px;
    }

    .cs-shared-masthead .cs-shared-header-cta {
        min-height: 44px;
        padding: 10px 8px;
        font-size: 11px;
    }
}

@media (max-width: 600px) {
    /* WordPress moves its mobile admin bar out of fixed positioning here. */
    body.admin-bar .cs-shared-masthead {
        top: 0;
    }
}

@media (max-width: 359px) {
    .cs-shared-header-inner {
        gap: 6px;
    }

    .cs-shared-brand img {
        width: 100px;
    }

    .cs-shared-masthead .cs-shared-header-cta {
        padding: 10px 6px;
        font-size: 10px;
    }
}

/* One reading column for the article title, summary, metadata, and body. */
body.single-post:has(.article-content) .hero-section[data-type="type-1"],
body.single-post:has(.article-content) .entry-content > article.article-content {
    box-sizing: border-box;
    width: calc(100% - 36px) !important;
    max-width: 860px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.single-post:has(.article-content) .hero-section[data-type="type-1"] > .entry-header {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    text-align: left;
}

body.single-post:has(.article-content) .hero-section[data-type="type-1"] .entry-meta {
    justify-content: flex-start;
    text-align: left;
}
