/* 404: shared Hero and Lightning shell, with a compact centered message. */
body.error404 .site-body { padding-block: clamp(56px, 8vw, 96px); }
body.error404 .mast-page-hero__label { color: #fff; }
.mast-404 {
    max-width: 800px;
    margin-inline: auto;
    color: #283640;
    font-size: 1rem;
    line-height: 1.9;
    text-align: center;
    overflow-wrap: anywhere;
}
.mast-404 p { margin: 0 0 20px; }
.mast-404__button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 50px;
    margin-top: 12px;
    padding: 12px 32px;
    border: 1px solid #0b4778;
    border-radius: 3px;
    background: #0b4778;
    color: #fff;
    box-shadow: none;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}
.mast-404__button:hover {
    border-color: #243746;
    background: #243746;
    color: #fff;
    text-decoration: none;
}
.mast-404__button:focus-visible {
    outline: 2px solid #0b4778;
    outline-offset: 4px;
}
@media (max-width: 599px) {
    body.error404 .mast-page-hero__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    body.error404 .mast-page-hero__title {
        font-size: clamp(16px, 4vw, 20px);
        letter-spacing: 0;
    }
}

/* Privacy Policy: standard editor blocks in one opt-in Group. */
body:not(.home) .site-body:has(.mast-privacy-page) > .site-body-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 848px;
    padding-inline: 24px;
}
body:not(.home) .entry-body .mast-privacy-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    padding-block: 16px 48px;
    color: #283640;
    font-size: 1rem;
    line-height: 1.9;
    text-align: left;
    overflow-wrap: anywhere;
}
.mast-privacy-page > * { max-width: 100%; }
.mast-privacy-page h2.wp-block-heading {
    display: block;
    margin: clamp(36px, 5vw, 48px) 0 20px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: #243746;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
    line-height: 1.6;
    text-align: left;
}
.mast-privacy-page h2.wp-block-heading::before,
.mast-privacy-page h2.wp-block-heading::after { content: none; }
.mast-privacy-page p { margin: 0 0 16px; }
.mast-privacy-page ul.wp-block-list {
    margin-block: 16px 24px;
    padding-inline-start: 1.5em;
    line-height: 1.9;
}
.mast-privacy-page li + li { margin-top: 8px; }
.mast-privacy-page > :last-child { margin-bottom: 0; }
body:has(.mast-privacy-page) .mast-page-hero__label { color: #fff; }
/* The long bilingual title stacks inside the existing 80px Hero. */
@media (max-width: 767px) {
    body:has(.mast-privacy-page) .mast-page-hero__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    body:has(.mast-privacy-page) .mast-page-hero__title {
        font-size: clamp(16px, 4vw, 20px);
        letter-spacing: 0;
    }
}
@media (max-width: 599px) {
    body:not(.home) .site-body:has(.mast-privacy-page) > .site-body-container {
        padding-inline: 20px;
    }
    body:not(.home) .entry-body .mast-privacy-page { padding-block: 8px 32px; }
}

/* Contact: opt-in editor Group only; CF7 markup and behavior remain native. */
body:not(.home) .entry-body .mast-contact-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    padding-block: 16px 48px;
    color: #283640;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.mast-contact-page > *,
.mast-contact-page > .wp-block-group__inner-container > * {
    max-width: 100%;
}
.mast-contact-page :is(h2, h3) {
    display: block;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    /* Replace the editor's saved heading color, including has-text-color. */
    color: #243746 !important;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
}
.mast-contact-page :is(h2, h3)::before,
.mast-contact-page :is(h2, h3)::after { content: none; }
.mast-contact-page :is(h2, h3):not(:first-child) {
    margin-top: clamp(48px, 7vw, 72px);
}
/* The existing phone Group uses large/medium paragraphs; exclude CF7 text. */
.mast-contact-page p:not(.wpcf7 p) {
    margin-block: 8px;
    color: #66737e;
    font-size: .875rem;
    text-align: center;
}
.mast-contact-page p.has-large-font-size:not(.wpcf7 p),
.mast-contact-page a[href^="tel:"] {
    color: #243746 !important;
    font-size: clamp(1.375rem, 4.5vw, 1.875rem) !important;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}
.mast-contact-page p.has-medium-font-size:not(.wpcf7 p) {
    font-size: .875rem !important;
}
.mast-contact-page a[href^="tel:"]:hover { text-decoration: underline; }
.mast-contact-page .wpcf7 {
    width: 100%;
    margin-top: 32px;
    text-align: left;
}
.mast-contact-page .wpcf7 form > p { margin: 0 0 28px; }
.mast-contact-page .wpcf7 label {
    display: block;
    margin: 0;
    color: #243746;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.7;
}
.mast-contact-page .wpcf7-form-control-wrap {
    display: block;
    margin-top: 8px;
}
.mast-contact-page .wpcf7 label > br { display: none; }
.mast-contact-page .wpcf7 :is(input.wpcf7-text, textarea.wpcf7-textarea) {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #ccd5dc;
    border-radius: 3px;
    background: #fff;
    color: #283640;
    box-shadow: none;
    font: inherit;
    font-weight: 400;
    line-height: 1.5;
}
.mast-contact-page .wpcf7 input.wpcf7-text { height: 50px; }
.mast-contact-page .wpcf7 textarea.wpcf7-textarea {
    height: 180px;
    min-height: 140px;
    resize: vertical;
}
.mast-contact-page .wpcf7 :is(input.wpcf7-text, textarea.wpcf7-textarea):focus {
    border-color: #0b4778;
    outline: 2px solid #0b4778;
    outline-offset: 2px;
}
.mast-contact-page .wpcf7 .wpcf7-submit {
    box-sizing: border-box;
    width: 200px;
    max-width: 100%;
    min-height: 50px;
    padding: 12px 32px;
    border: 1px solid #0b4778;
    border-radius: 3px;
    background: #0b4778;
    color: #fff;
    box-shadow: none;
    font: inherit;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
}
.mast-contact-page .wpcf7 .wpcf7-submit:hover {
    border-color: #243746;
    background: #243746;
}
.mast-contact-page :is(.wpcf7-submit, a[href^="tel:"]):focus-visible {
    outline: 2px solid #0b4778;
    outline-offset: 4px;
}
.mast-contact-page .wpcf7 .wpcf7-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.mast-contact-page .wpcf7 p:has(.wpcf7-submit) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}
.mast-contact-page .wpcf7 .wpcf7-spinner {
    flex: 0 0 24px;
    margin: 0;
}
.mast-contact-page .wpcf7 .wpcf7-not-valid-tip {
    position: static;
    display: block;
    width: auto;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #963f3f;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.7;
}
.mast-contact-page .wpcf7 [aria-invalid="true"] { border-color: #a65a5a; }
/* Preserve CF7's visibility and accessible status text; soften its state borders. */
.mast-contact-page .wpcf7 form .wpcf7-response-output {
    box-sizing: border-box;
    max-width: 100%;
    margin: 24px 0 0;
    padding: 16px 20px;
    border: 1px solid #dce3e8;
    border-left: 3px solid #66737e;
    border-radius: 3px;
    background: #f8fafb;
    color: #283640;
    font-size: .9375rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.mast-contact-page .wpcf7 form.sent .wpcf7-response-output {
    border-left-color: #39705d;
    background: #f3f8f5;
}
.mast-contact-page .wpcf7 form:is(.failed, .aborted, .spam, .invalid, .unaccepted, .payment-required) .wpcf7-response-output {
    border-left-color: #a65a5a;
    background: #fbf7f6;
}
@media (max-width: 599px) {
    body:not(.home) .entry-body .mast-contact-page { padding-block: 8px 32px; }
    .mast-contact-page .wpcf7 form > p { margin-bottom: 24px; }
    .mast-contact-page .wpcf7 form .wpcf7-response-output { padding: 14px 16px; }
}

/* Corporate singles: same palette as the directory, with a readable prose width. */
.site-body:has(.mast-single-profile) > .site-body-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 848px;
    padding-inline: 24px;
}
.mast-single-profile {
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    padding-bottom: 32px;
    color: #283640;
    overflow-wrap: anywhere;
}
.mast-single-profile .mast-single-profile__title {
    margin: 0 0 32px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: #243746;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.6;
}
.mast-single-profile__title::before,
.mast-single-profile__title::after { content: none; }
.mast-single-profile__header:has(.mast-single-profile__date) .mast-single-profile__title {
    margin-bottom: 12px;
}
.mast-single-profile__date {
    display: block;
    margin-bottom: 32px;
    color: #66737e;
    font-size: .8125rem;
    font-weight: 400;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
}
.mast-single-profile__image { margin-bottom: 32px; }
.mast-single-profile__image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    margin-inline: auto;
}
.mast-single-profile.type-partner .mast-single-profile__image img {
    max-width: min(100%, 320px);
    max-height: 200px;
    object-fit: contain;
}
/* Products only: a supporting representative image, including tall products. */
body.single-post .mast-single-profile.type-post.category-products .mast-single-profile__image img {
    width: 100%;
    max-width: 450px;
    height: auto;
    max-height: 450px;
    margin-inline: auto;
    object-fit: contain;
}
/* Replace the combined article padding / CTA margin with one responsive gap. */
body.single-post .mast-single-profile.type-post.category-products:has(+ .mast-lower-cta) {
    padding-bottom: 0;
    margin-bottom: 0;
}
body.single-post .mast-single-profile.type-post.category-products:has(+ .mast-lower-cta) .mast-single-profile__body > :last-child {
    margin-bottom: 0;
}
body.single-post .mast-single-profile.type-post.category-products + .mast-lower-cta {
    margin-top: 150px;
}
@media (max-width: 991px) {
    body.single-post .mast-single-profile.type-post.category-products + .mast-lower-cta {
        margin-top: 100px;
    }
}
@media (max-width: 599px) {
    body.single-post .mast-single-profile.type-post.category-products + .mast-lower-cta {
        margin-top: 72px;
    }
}
.mast-single-profile__body {
    font-size: 1rem;
    line-height: 1.9;
}
.mast-single-profile__body > :is(.alignwide, .alignfull) {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
}
@media (max-width: 599px) {
    .site-body:has(.mast-single-profile) > .site-body-container { padding-inline: 20px; }
    .mast-single-profile .mast-single-profile__title { font-size: 1.375rem; }
}

/* Editor Group with direct Image children, only within a standard post's body. */
body.single-post .site-body .entry-body .wp-block-group.mast-post-gallery {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
}
@media (min-width: 992px) {
    body.single-post .site-body .entry-body .wp-block-group.mast-post-gallery:has(> .wp-block-image:nth-child(3):last-child) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
body.single-post .site-body .entry-body .mast-post-gallery > .wp-block-image {
    box-sizing: border-box;
    align-self: start;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    /* Reset core Group's child spacing and Image alignment, including inline margins. */
    margin: 0 !important;
    float: none;
}
body.single-post .site-body .entry-body .mast-post-gallery > .wp-block-image > a {
    display: block;
}
body.single-post .site-body .entry-body .mast-post-gallery > .wp-block-image img {
    display: block;
    /* Override editor sizing/crop styles for display only; saved images stay intact. */
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    aspect-ratio: 4 / 3 !important;
    object-fit: contain !important;
    background: #f8fafb;
    border: 0;
    box-shadow: none;
}
@media (max-width: 991px) {
    body.single-post .site-body .entry-body .wp-block-group.mast-post-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}
@media (max-width: 599px) {
    body.single-post .site-body .entry-body .wp-block-group.mast-post-gallery {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

/* Lower CTA: preserve the editor-owned Cover, separate from TOP Contact. */
.site-body .mast-lower-cta {
    width: 100%;
    max-width: 100%;
    margin-top: 32px;
    color: #fff;
    text-align: center;
    overflow-wrap: anywhere;
}
.mast-lower-cta > .wp-block-cover {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 32px 24px;
    border: 0;
    box-shadow: none;
}
.mast-lower-cta .wp-block-cover__background {
    background-color: #000;
}
.mast-lower-cta .wp-block-cover__inner-container {
    min-width: 0;
    color: #fff;
}
.mast-lower-cta p {
    font-weight: 400;
    line-height: 1.6;
}
.mast-lower-cta .wp-block-buttons { justify-content: center; }
.mast-lower-cta .wp-block-button__link {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    background: #fff;
    color: #20252a;
    box-shadow: none;
}
.mast-lower-cta .wp-block-button__link:hover { background: #edf2f5; }
.mast-lower-cta .wp-block-button__link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}
@media (max-width: 991px) {
    .mast-lower-cta .has-parallax { background-attachment: scroll; }
}
@media (max-width: 599px) {
    .mast-lower-cta > .wp-block-cover {
        min-height: 0 !important;
        padding: 28px 20px;
    }
    /* Responsive display override for the editor's current 24/28px paragraphs. */
    .mast-lower-cta p { font-size: 1.125rem !important; }
    .mast-lower-cta .wp-block-button__link { padding: 12px 20px; }
}

/* Partners: permanent company information, opt-in through [mast_partners]. */
body:not(.home) .site-body:has(.mast-partners-list) > .site-body-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 1158px;
    padding-inline: 24px;
}
.mast-partners-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
    width: 100%;
    max-width: 1110px;
    margin: 0 auto 32px;
}
.mast-partners-list .mast-partner {
    min-width: 0;
    padding-block: 0 32px;
    border-bottom: 1px solid #e1e7eb;
    background: #fff;
    overflow-wrap: anywhere;
}
.mast-partner .mast-partner__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    margin-bottom: 24px;
}
.mast-partner__logo img.mast-partner__image {
    width: 100%;
    height: 100%;
    max-width: 280px;
    object-fit: contain;
}
.mast-partner h2.mast-partner__title {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.6;
}
.mast-partner h2.mast-partner__title::before,
.mast-partner h2.mast-partner__title::after { content: none; }
.mast-partner__title a { color: #243746; text-decoration: none; }
.mast-partner .mast-partner__summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    margin: 0 0 16px;
    color: #56616a;
    font-size: .9375rem;
    line-height: 1.9;
}
.mast-partner__more { display: inline-block; padding-block: 10px; color: #0b4778; }
.mast-partner a:hover { text-decoration: underline; }
.mast-partner a:focus-visible { outline: 2px solid #0b4778; outline-offset: 4px; }
@media (max-width: 991px) {
    .mast-partners-list { gap: 32px; }
}
@media (max-width: 599px) {
    body:not(.home) .site-body:has(.mast-partners-list) > .site-body-container { padding-inline: 20px; }
    .mast-partners-list { grid-template-columns: minmax(0, 1fr); }
    .mast-partner h2.mast-partner__title { font-size: 1.125rem; }
}

/* Company: style the editor's named Groups and standard Table block. */
.mast-company-page .site-body > .site-body-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 848px;
    padding-inline: 24px;
}
.mast-company-page .entry-body {
    max-width: 800px;
    margin-inline: auto;
    padding-bottom: 32px;
    background: #fff;
    color: #283640;
    font-size: 1rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.mast-company-page :is(.mast-company-about, .mast-company-info) {
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    text-align: left;
}
.mast-company-page .mast-company-info {
    margin-block-start: 48px;
}
/* Override the Group's constrained child width, keeping the section at 800px. */
.mast-company-page :is(.mast-company-about, .mast-company-info) > * {
    max-width: 100%;
}
.mast-company-page :is(.mast-company-about, .mast-company-info) > h2.wp-block-heading {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: #243746;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.5;
}
.mast-company-page :is(.mast-company-about, .mast-company-info) > h2.wp-block-heading::before,
.mast-company-page :is(.mast-company-about, .mast-company-info) > h2.wp-block-heading::after {
    content: none;
}
.mast-company-page .mast-company-about > p {
    margin: 0;
    line-height: 1.9;
}
.mast-company-page .mast-company-about > p + p {
    margin-top: 16px;
}
.mast-company-page .mast-company-info > .mast-company-table {
    width: 100%;
    margin: 0;
    overflow: visible;
}
.mast-company-page .mast-company-table table {
    width: 100%;
    margin: 0;
    table-layout: fixed;
    border-collapse: collapse;
    border: 0;
    background: #fff;
}
.mast-company-page .mast-company-table :is(td, th) {
    box-sizing: border-box;
    padding: 20px 16px;
    border: 0;
    border-bottom: 1px solid #e1e7eb;
    background: #fff;
    color: #283640;
    font-weight: 400;
    line-height: 1.8;
    text-align: left;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
}
/* The first cell is the label column, independent of row order or wording. */
.mast-company-page .mast-company-table tr > :first-child {
    width: 28%;
    color: #243746;
    font-weight: 600;
}
@media (max-width: 599px) {
    .mast-company-page .site-body > .site-body-container {
        padding-inline: 20px;
    }
    .mast-company-page .mast-company-info {
        margin-block-start: 36px;
    }
    .mast-company-page :is(.mast-company-about, .mast-company-info) > h2.wp-block-heading {
        font-size: 1.25rem;
    }
    .mast-company-page .mast-company-table :is(td, th) {
        padding: 16px 8px;
        font-size: .9375rem;
    }
    .mast-company-page .mast-company-table tr > :first-child {
        width: 30%;
    }
}

/* Greeting: editor-owned prose and signature, without additional decoration. */
body:not(.home) .site-body:has(.mast-greeting) > .site-body-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 828px;
    padding-inline: 24px;
}
body:not(.home) :is(.mast-greeting, .mast-greeting-signature) {
    box-sizing: border-box;
    width: 100%;
    max-width: 780px;
    margin-inline: auto;
    color: #283640;
    font-size: 1rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
/* Let the named Groups use their full reading width inside core's constraints. */
body:not(.home) :is(.mast-greeting, .mast-greeting-signature) > * {
    max-width: 100%;
}
body:not(.home) .mast-greeting {
    text-align: left;
}
body:not(.home) .mast-greeting > p {
    margin: 0;
}
body:not(.home) .mast-greeting > p + p {
    margin-top: 24px;
}
/* Supports the signature Group either after or inside the prose Group. */
body:not(.home) .mast-greeting-signature {
    margin-block: 48px 32px;
    text-align: right;
}
body:not(.home) .mast-greeting-signature > p {
    margin: 0;
    font-weight: 400;
}
body:not(.home) .mast-greeting-signature > p + p {
    margin-top: 8px;
}
body:not(.home) .mast-greeting-signature strong {
    font-weight: 600;
}
@media (max-width: 599px) {
    body:not(.home) .site-body:has(.mast-greeting) > .site-body-container {
        padding-inline: 20px;
    }
    body:not(.home) .mast-greeting-signature {
        margin-top: 36px;
    }
}

/* News pages: preserve core Latest Posts output and editor settings.
   Exclude TOP even when it shares news block classes. */
body:not(.home) .site-body:has(.mast-news-page) > .site-body-container {
    width: min(1158px, 100%);
    max-width: 1158px;
    padding-inline: 24px;
}
body:not(.home) .mast-news-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 1110px;
    margin-inline: auto;
    padding-block: 0 32px;
    color: #283640;
}
/* Keep the editor heading saved; the rendered Hero supplies the visible h1. */
body:has(.mast-page-hero) .mast-news-page > .wp-block-heading:first-child {
    display: none;
}
body:not(.home) .mast-news-page .wp-block-latest-posts {
    box-sizing: border-box;
    width: 100%;
    padding: 0;
    margin: 0 auto;
    list-style: none;
}
body:not(.home) .mast-news-page .wp-block-latest-posts > li {
    box-sizing: border-box;
    min-width: 0;
    margin: 0;
    background: #fff;
    box-shadow: none;
    overflow-wrap: anywhere;
}
body:not(.home) .mast-news-page .wp-block-latest-posts__featured-image {
    float: none;
    margin: 0;
    background: #f8fafb;
}
body:not(.home) .mast-news-page .wp-block-latest-posts__featured-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
body:not(.home) .mast-news-page .wp-block-latest-posts__featured-image img {
    display: block;
    width: 100%;
    height: 100%;
    /* Override only the core block's inline thumbnail limits. */
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0;
    object-fit: contain;
}
body:not(.home) .mast-news-page .wp-block-latest-posts__post-title {
    display: block;
    color: #243746;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.7;
    text-decoration: none;
    text-underline-offset: .2em;
}
body:not(.home) .mast-news-page :is(.mast-news-list, .mast-news-grid) .mast-news-category {
    display: table;
    justify-self: start;
    align-self: start;
    max-width: 100%;
    margin: 0 0 8px;
    padding: 4px 10px;
    border: 0;
    border-radius: 3px;
    background: var(--mast-news-category-color, #0b4778);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
body:not(.home) .mast-news-page :is(.mast-news-list, .mast-news-grid) .mast-news-category--news {
    --mast-news-category-color: #0b4778;
}
body:not(.home) .mast-news-page :is(.mast-news-list, .mast-news-grid) .mast-news-category--products {
    --mast-news-category-color: #007c6c;
}
body:not(.home) .mast-news-page :is(.mast-news-list, .mast-news-grid) .mast-news-category--blog {
    --mast-news-category-color: #71517e;
}
body:not(.home) .mast-news-page :is(.mast-news-list, .mast-news-grid) .mast-news-category--partners {
    --mast-news-category-color: #4f6b45;
}
body:not(.home) .mast-news-page .wp-block-latest-posts__post-title:hover {
    color: #0b4778;
    text-decoration: underline;
}
body:not(.home) .mast-news-page a:focus-visible {
    outline: 2px solid #0b4778;
    outline-offset: 4px;
}
body:not(.home) .mast-news-page .wp-block-latest-posts__post-date {
    margin-top: 8px;
    color: #66737e;
    font-size: .8125rem;
    font-weight: 400;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
}
body:not(.home) .mast-news-page .wp-block-latest-posts__post-excerpt {
    margin: 12px 0 0;
    color: #56616a;
    font-size: .9375rem;
    line-height: 1.9;
}
/* Clamp the display only; the saved excerpt and post content stay intact. */
body:not(.home) .mast-news-page :is(.mast-news-list, .mast-news-grid) .wp-block-latest-posts__post-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    align-self: start;
}
body:not(.home) .mast-news-page :is(.mast-news-list, .mast-news-grid) .wp-block-latest-posts__post-excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
body:not(.home) .mast-news-page .mast-news-list {
    display: block;
    max-width: 900px;
}
body:not(.home) .mast-news-page .mast-news-list > li {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    column-gap: 32px;
    grid-template-rows: auto auto 1fr;
    padding: 32px 0;
    border: 0;
    border-bottom: 1px solid #e1e7eb;
}
body:not(.home) .mast-news-page .mast-news-list > li:first-child { border-top: 1px solid #e1e7eb; }
body:not(.home) .mast-news-page .mast-news-list > li:has(> .mast-news-category) {
    grid-template-rows: auto auto auto 1fr;
}
body:not(.home) .mast-news-page .mast-news-list > li:has(> .mast-news-category) > .wp-block-latest-posts__featured-image {
    grid-row: 1 / 5;
}
body:not(.home) .mast-news-page .mast-news-list > li > :not(.wp-block-latest-posts__featured-image) {
    grid-column: 2;
}
body:not(.home) .mast-news-page .mast-news-list .wp-block-latest-posts__featured-image {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 200px;
    height: 160px;
}
body:not(.home) .mast-news-page .mast-news-list > li:not(:has(.wp-block-latest-posts__featured-image)) {
    grid-template-columns: minmax(0, 1fr);
}
body:not(.home) .mast-news-page .mast-news-list > li:not(:has(.wp-block-latest-posts__featured-image)) > * {
    grid-column: 1;
}
body:not(.home) .mast-news-page .mast-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    max-width: 1110px;
}
body:not(.home) .mast-news-page .mast-news-grid > li {
    width: auto;
    padding: 24px;
    border: 1px solid #e1e7eb;
    border-radius: 0;
}
body:not(.home) .mast-news-page .mast-news-grid .wp-block-latest-posts__featured-image {
    width: 100%;
    height: 200px;
    margin-bottom: 24px;
}
/* Equal image space without a fake image or changes to post content. */
body:not(.home) .mast-news-page .mast-news-grid > li:not(:has(.wp-block-latest-posts__featured-image))::before {
    content: "";
    display: block;
    height: 200px;
    margin-bottom: 24px;
    background: #f8fafb;
}
/* WordPress paginate_links markup; no changes to the post list/card layout. */
body:not(.home) .mast-news-page .mast-news-pagination {
    width: 100%;
    max-width: 1110px;
    margin: 32px auto 0;
}
body:not(.home) .mast-news-page .mast-news-list + .mast-news-pagination {
    max-width: 900px;
}
body:not(.home) .mast-news-page .mast-news-pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
body:not(.home) .mast-news-page .mast-news-pagination li {
    margin: 0;
    padding: 0;
}
body:not(.home) .mast-news-page .mast-news-pagination :is(a, span).page-numbers {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #e1e7eb;
    border-radius: 3px;
    background: #fff;
    color: #0b4778;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
}
body:not(.home) .mast-news-page .mast-news-pagination .page-numbers.current {
    border-color: #0b4778;
    background: #0b4778;
    color: #fff;
}
body:not(.home) .mast-news-page .mast-news-pagination a.page-numbers:hover {
    background: #f1f7fb;
}
body:not(.home) .mast-news-page .mast-news-pagination .page-numbers.dots {
    min-width: 24px;
    padding-inline: 0;
    border-color: transparent;
    color: #66737e;
}
@media (max-width: 991px) {
    body:not(.home) .mast-news-page .mast-news-grid { gap: 24px; }
    body:not(.home) .mast-news-page .mast-news-grid > li { padding: 20px; }
}
@media (max-width: 599px) {
    body:not(.home) .mast-news-page .mast-news-grid .wp-block-latest-posts__post-excerpt {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    body:not(.home) .site-body:has(.mast-news-page) > .site-body-container {
        padding-inline: 20px;
    }
    body:not(.home) .mast-news-page .mast-news-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    body:not(.home) .mast-news-page .mast-news-list > li {
        grid-template-columns: 112px minmax(0, 1fr);
        column-gap: 16px;
        padding-block: 24px;
    }
    body:not(.home) .mast-news-page .mast-news-list .wp-block-latest-posts__featured-image {
        width: 112px;
        height: 112px;
        grid-row: 1 / 3;
    }
    body:not(.home) .mast-news-page .mast-news-list > li:has(> .mast-news-category) > .wp-block-latest-posts__featured-image {
        grid-row: 1 / 4;
    }
    body:not(.home) .mast-news-page .mast-news-list > li > .wp-block-latest-posts__post-excerpt {
        grid-column: 1 / -1;
        margin-top: 16px;
    }
    body:not(.home) .mast-news-page .wp-block-latest-posts__post-title { font-size: 1rem; }
}
/* Business detail: editor-owned Groups, images, lists and buttons. */
.mast-business-page .site-body > .site-body-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 908px;
    padding-inline: 24px;
}
.mast-business-page .mast-business-detail {
    width: 100%;
    max-width: 860px;
    margin-inline: auto;
    color: #283640;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.mast-business-page .mast-business-detail * { box-sizing: border-box; }
.mast-business-detail > *, .mast-business-section > * { max-width: 100%; }
.mast-business-detail > .mast-business-section { margin-block: clamp(36px, 5vw, 56px) 0; }
.mast-business-detail p { margin: 0 0 16px; }
.mast-business-detail :is(h2, h3).wp-block-heading {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: #243746;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
    line-height: 1.6;
}
.mast-business-detail :is(h2, h3)::before,
.mast-business-detail :is(h2, h3)::after { content: none; }
.mast-business-detail .mast-business-image {
    width: 88%;
    max-width: 756.8px;
    margin: 32px auto 0;
}
.mast-business-detail > .mast-business-image + .mast-business-section {
    margin-top: 72px;
}
.mast-business-detail .mast-business-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}
.mast-business-detail :is(.mast-business-cards, .mast-business-steps) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}
.mast-business-detail .mast-business-cards > .mast-business-card {
    align-self: stretch;
    height: auto;
}
.mast-business-detail :is(.mast-business-card, .mast-business-step) {
    min-width: 0;
    margin: 0;
    padding: 24px 20px;
    border: 1px solid #e1e7eb;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}
.mast-business-detail .mast-business-card h3 { font-size: 1.0625rem; }
.mast-business-detail :is(.mast-business-card, .mast-business-step) p { font-size: .9375rem; }
.mast-business-detail .mast-business-step { border: 0; border-top: 2px solid #0b4778; background: #f8fafb; }
.mast-business-detail .mast-business-step strong { display: inline-block; margin-bottom: 12px; color: #0b4778; }
.mast-business-detail .mast-business-concerns {
    margin-inline: 0;
    padding-block: clamp(20px, 3vw, 32px);
    padding-inline: 0;
    background: #f8fafb;
}
.mast-business-detail .mast-business-concerns ul { margin: 0; padding-left: 1.4em; }
.mast-business-detail .mast-business-concerns li + li { margin-top: 12px; }
.mast-business-detail .mast-business-bridge { padding-block: 32px; border-block: 1px solid #e1e7eb; }
.mast-business-detail > .mast-business-closing {
    margin-top: 80px;
    padding-bottom: 0;
}
/* A single gap from the final paragraph to the shared CTA; no stacked padding. */
.mast-business-page .entry:has(.mast-business-detail):has(+ .mast-lower-cta),
.mast-business-page .entry:has(+ .mast-lower-cta) .entry-body,
.mast-business-page .entry:has(+ .mast-lower-cta) .mast-business-detail {
    margin-bottom: 0;
    padding-bottom: 0;
}
.mast-business-page .entry:has(.mast-business-detail) + .mast-lower-cta {
    margin-top: 150px;
}
.mast-business-detail .mast-business-external-note { color: #66737e; font-size: .875rem; }
.mast-business-detail .wp-block-button__link {
    max-width: 100%;
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid #0b4778;
    border-radius: 3px;
    background: #0b4778;
    color: #fff;
    box-shadow: none;
    line-height: 1.6;
}
.mast-business-detail .wp-block-button__link:hover { background: #243746; border-color: #243746; }
.mast-business-detail a:focus-visible { outline: 2px solid #0b4778; outline-offset: 4px; }
.mast-business-detail :is(.mast-business-card, .mast-business-step, .mast-business-closing) > :last-child { margin-bottom: 0; }
@media (max-width: 991px) {
    .mast-business-detail :is(.mast-business-cards, .mast-business-steps) { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .mast-business-detail > .mast-business-image + .mast-business-section { margin-top: 56px; }
    .mast-business-detail > .mast-business-closing { margin-top: 64px; }
    .mast-business-page .entry:has(.mast-business-detail) + .mast-lower-cta { margin-top: 100px; }
    .mast-business-page .mast-page-hero__content { flex-direction: column; align-items: flex-start; gap: 2px; }
    .mast-business-page .mast-page-hero__title { font-size: clamp(16px, 2.8vw, 24px); }
}
@media (max-width: 599px) {
    .mast-business-page .site-body > .site-body-container { padding-inline: 20px; }
    .mast-business-page .mast-page-hero__icon { flex-basis: 56px; width: 56px; height: 56px; }
    .mast-business-page .mast-page-hero__title { font-size: clamp(14px, 3.8vw, 20px); letter-spacing: 0; }
    .mast-business-detail .mast-business-image { width: 100%; margin-top: 24px; }
    .mast-business-detail > .mast-business-image + .mast-business-section { margin-top: 48px; }
    .mast-business-detail > .mast-business-closing { margin-top: 56px; }
    .mast-business-page .entry:has(.mast-business-detail) + .mast-lower-cta { margin-top: 72px; }
    .mast-business-detail :is(.wp-block-buttons, .wp-block-button) { width: 100%; }
    .mast-business-detail .wp-block-button__link { width: 100%; padding-inline: 16px; }
}
/* Development announcement: editor-owned text link below the unchanged logo. */
body.single-post .entry-body .mast-post-link {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 22px 0 0;
    padding: 0 24px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: right;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
body.single-post .entry-body .mast-post-link a {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #0b4778;
    font-weight: 600;
    text-decoration: none;
    text-underline-offset: .2em;
    white-space: normal;
}
body.single-post .entry-body .mast-post-link a:hover {
    color: #243746;
    text-decoration: underline;
}
body.single-post .entry-body .mast-post-link a:focus {
    background: transparent;
    box-shadow: none;
}
body.single-post .entry-body .mast-post-link a:focus-visible {
    outline: 2px solid #0b4778;
    outline-offset: 4px;
}
@media (max-width: 599px) {
    body.single-post .entry-body .mast-post-link { padding-right: 20px; }
}
