/**
 * Industrial editorial brand layer (multi-brand via m24b2b).
 * Scoped to body.brand-enabled. FMA-specific chrome at end of file.
 *
 * Tokens: --color-accent (optional inline from brand primary), --fma-*
 * Utilities: .fma-label, .fma-strapline, .fma-subhead, .fma-plus, .fma-margin-credit
 * Block styles: fma-label, fma-label-box, fma-strapline, fma-subhead, fma-drop-cap,
 *   fma-callout, fma-callout-tint, fma-key-advantages, fma-grid, fma-hero-center (group)
 */

/* -------------------------------------------------------------------------
   Design tokens
   ------------------------------------------------------------------------- */
body.brand-enabled {
    /* Process Teal — never admin purple. Brand meta may override via wp_head. */
    --color-accent: var(--ncmaz-accent, var(--wp--preset--color--shadcn-primary, #288aa5));
    --fma-accent: var(--color-accent);
    --fma-surface: #ffffff;
    --fma-surface-pure: #ffffff;
    --fma-ink: #0a0a0c;
    --fma-ink-muted: #3a3a42;
    --fma-accent-hover: color-mix(in srgb, var(--fma-accent) 85%, #000);
    --fma-accent-muted: color-mix(in srgb, var(--fma-accent) 14%, var(--fma-surface-pure));
    --fma-accent-tint: color-mix(in srgb, var(--fma-accent) 10%, var(--fma-surface-pure));
    --fma-rule: 1px solid var(--fma-accent);
    --fma-rule-thick: 6px solid var(--fma-accent);
    --fma-hero-accent-band: 6px;
    --fma-gutter: clamp(1.25rem, 4vw, 3.5rem);
    --fma-radius-sm: 2px;
    --fma-radius-md: 4px;
    --fma-radius-label: 5px;
    --fma-shadow-crisp: 0 1px 2px rgba(0, 0, 0, 0.06);
    /* Decorative plus (mask); geometric cross for crisp scaling */
    --fma-plus-svg-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M11 2h2v9h9v2h-9v9h-2v-9H2v-2h9V2z'/%3E%3C/svg%3E");
    background-color: var(--fma-surface);
    color: var(--fma-ink);
}

/* FMA sub-brand: site primary blue + logo gold emphasis */
body.brand-network-title.brand-enabled {
    --color-accent: var(--wp--preset--color--shadcn-primary);
    --fma-accent: var(--wp--preset--color--shadcn-primary);
    --fma-accent-hover: var(--wp--preset--color--shadcn-primary-lighter);
    --fma-accent-muted: var(--wp--preset--color--shadcn-accent-lighter, hsl(0 0% 98%));
    --fma-accent-tint: var(--wp--preset--color--shadcn-background, #fff);
    --fma-gold: #f4a000;
    --fma-gold-ink: #945a00;
    --fma-gold-muted: color-mix(in srgb, var(--fma-gold) 12%, var(--fma-surface-pure));
    --fma-surface: var(--wp--preset--color--shadcn-background, #fff);
    --fma-surface-pure: var(--wp--preset--color--shadcn-background, #fff);
    --fma-surface-hero: var(--wp--preset--color--shadcn-background, #fff);
    --fma-rule-emphasis: 2px solid var(--fma-gold);
    --fma-rule-thick: var(--fma-rule-emphasis);
    --fma-rule: 1px solid color-mix(in srgb, var(--fma-ink) 14%, transparent);
    background-color: var(--wp--preset--color--shadcn-background, #fff);
}

body.brand-enabled .wp-site-blocks,
body.brand-enabled .entry-content {
    color: var(--fma-ink);
}

/* FMA: match main site white page canvas (archives, singles, hub). */
body.brand-network-title.brand-enabled .wp-site-blocks,
body.brand-network-title.brand-enabled .wp-site-blocks > main,
body.brand-network-title.brand-enabled main,
body.brand-network-title.brand-enabled .entry-content {
    background-color: var(--wp--preset--color--shadcn-background, #fff);
}

body.brand-enabled a {
    color: var(--fma-accent);
    text-underline-offset: 0.15em;
}

body.brand-enabled a:hover {
    color: var(--fma-accent-hover);
}

/* Header user menu: row links use contrast-2 like icons, not global brand accent. */
body.brand-enabled .ncmaz-auth-dropdown-logged-out a,
body.brand-enabled .ncmaz-auth-dropdown-logged-out a:hover,
body.brand-enabled .ncmaz-auth-dropdown-logged-out a:focus,
body.brand-enabled .ncmaz-auth-dropdown-logged-in a,
body.brand-enabled .ncmaz-auth-dropdown-logged-in a:hover,
body.brand-enabled .ncmaz-auth-dropdown-logged-in a:focus {
    color: var(--wp--preset--color--contrast-2, hsl(215 13.8% 34.1%));
}

/* Facebook follow pill: global brand link color wins over .facebook-follow-pill (higher specificity on body.brand-enabled a). */
body.brand-enabled a.facebook-follow-pill,
body.brand-enabled a.facebook-follow-pill .facebook-follow-pill__text,
body.brand-enabled a.facebook-follow-pill .facebook-follow-pill__icon,
body.brand-enabled a.facebook-follow-pill .facebook-follow-pill__svg {
    color: #fff;
}

body.brand-enabled a.facebook-follow-pill:hover,
body.brand-enabled a.facebook-follow-pill:focus {
    color: #fff;
}

body.brand-enabled *:focus-visible {
    outline: 2px solid var(--fma-accent);
    outline-offset: 2px;
}

/* Comfortable reading measure for main editorial prose */
body.brand-enabled .fma-layout-main .wp-block-paragraph:not(.is-style-fma-label):not(.is-style-fma-label-box),
body.brand-enabled .entry-content .wp-block-paragraph:not(.is-style-fma-label):not(.is-style-fma-label-box) {
    line-height: 1.65;
}

/* Layout shell: horizontal gutter on hero bands only so 70/30 hub row can use full wide width. */
body.brand-enabled .fma-layout-main .fma-hero-hub,
body.brand-enabled .fma-layout-main .fma-hero:not(.fma-hero-hub),
body.brand-enabled .fma-layout-main .m24b2b-fma-hero.fma-hero:not(.fma-hero-hub) {
    padding-left: var(--fma-gutter);
    padding-right: var(--fma-gutter);
}

body.brand-network-title .fma-layout-main .fma-home-columns.alignwide {
    max-width: var(--wp--style--global--wide-size, 1280px);
    width: 100%;
    margin-inline: auto;
}

@media (min-width: 782px) {
    body.brand-network-title .fma-home-columns > .wp-block-column:last-child {
        min-width: min(30%, 12.5rem);
    }
}

body.brand-enabled .fma-layout-main > .alignfull {
    margin-left: calc(-1 * var(--fma-gutter));
    margin-right: calc(-1 * var(--fma-gutter));
    max-width: none;
    width: auto;
}

/* -------------------------------------------------------------------------
   FMA hub — latest + magazines modules
   ------------------------------------------------------------------------- */
body.brand-enabled .fma-layout-main .fma-home-section {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: var(--wp--preset--spacing--8, 2rem);
    border-top: none;
}

body.brand-enabled .fma-layout-main .fma-home-section + .fma-home-section {
    margin-top: var(--wp--preset--spacing--12, 3rem);
    padding-top: var(--wp--preset--spacing--10, 2.5rem);
    border-top: var(--fma-rule-thick);
}

/* Collapse empty FMA leaderboard only (keep skyscraper column for layout). */
body.brand-network-title .fma-home-banner-leaderboard:not(:has(.m24b2b-banner, img, iframe)),
body.brand-network-title .fma-home-banner-leaderboard.is-banner-empty {
    display: none;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0;
}

body.brand-enabled .fma-layout-main .fma-home-section__more {
    margin: 0;
    align-self: flex-end;
    font-size: 0.875rem;
    font-weight: 600;
}

body.brand-enabled .fma-layout-main .fma-home-section__more a {
    color: var(--fma-accent);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    white-space: nowrap;
}

body.brand-enabled .fma-layout-main .fma-home-section__more a:hover {
    color: var(--fma-accent-hover);
}

@media (max-width: 600px) {
    body.brand-enabled .fma-layout-main .fma-home-section__more {
        width: 100%;
        align-self: flex-start;
    }
}

/* -------------------------------------------------------------------------
   Hero — legacy card (non-FMA hub)
   ------------------------------------------------------------------------- */
body.brand-enabled .fma-hero:not(.fma-hero-hub),
body.brand-enabled .m24b2b-fma-hero.fma-hero:not(.fma-hero-hub) {
    background: linear-gradient(
            to bottom,
            var(--fma-accent) 0,
            var(--fma-accent) var(--fma-hero-accent-band),
            var(--fma-surface-pure) var(--fma-hero-accent-band)
        )
        !important;
    border: 1px solid color-mix(in srgb, var(--fma-ink) 14%, transparent);
    border-radius: var(--fma-radius-md) !important;
    box-shadow: var(--fma-shadow-crisp), 0 0 0 1px color-mix(in srgb, var(--fma-accent) 12%, transparent);
}

body.brand-network-title.brand-enabled .fma-hero:not(.fma-hero-hub),
body.brand-network-title.brand-enabled .m24b2b-fma-hero.fma-hero:not(.fma-hero-hub) {
    background: var(--wp--preset--color--shadcn-background, #fff) !important;
    border: 1px solid var(--wp--preset--color--shadcn-border, hsl(240 5.9% 90%));
    box-shadow: none;
}

body.brand-enabled .fma-hero:not(.fma-hero-hub) .wp-block-heading {
    font-family: var(--ncmaz-font-heading, "new-rubrik-edge", sans-serif);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: left;
    color: var(--fma-ink);
}

body.brand-enabled .fma-hero:not(.fma-hero-hub) h1.wp-block-heading {
    font-size: clamp(2.125rem, 5.2vw, 3.75rem) !important;
    line-height: 1.06 !important;
    max-width: 18ch;
}

/* -------------------------------------------------------------------------
   FMA hub hero — magazine-led editorial band
   Cover leads; copy follows. Map Gold personality scoped to FMA brand class.
   ------------------------------------------------------------------------- */
body.brand-food-manufacturing-africa.brand-enabled,
body.brand-network-title.brand-food-manufacturing-africa {
    --fma-gold: #f4a000;
    --fma-gold-ink: #945a00;
    --fma-gold-muted: color-mix(in srgb, var(--fma-gold) 12%, #fff);
    --fma-rule-emphasis: 2px solid var(--fma-gold);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub,
body.brand-network-title.brand-enabled .fma-hero-hub {
    background-color: #fff;
    border-bottom: 1px solid color-mix(in srgb, var(--fma-ink, #0a0a0c) 12%, transparent);
    padding: clamp(2rem, 4.5vw, 3.25rem) var(--fma-gutter) clamp(2rem, 3.5vw, 2.75rem);
    margin-bottom: 0;
}

/* FMA-only: magazine stage — gold wash behind the cover column */
body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub--mag-led {
    background-color: #fff;
    background-image: linear-gradient(
        105deg,
        color-mix(in srgb, var(--fma-gold, #f4a000) 16%, #fff) 0%,
        color-mix(in srgb, var(--fma-gold, #f4a000) 16%, #fff) 40%,
        #fff 40%,
        #fff 100%
    );
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub__grid,
body.brand-network-title.brand-enabled .fma-hero-hub__grid {
    max-width: min(72rem, 100%);
    margin: 0 auto;
    align-items: center;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub__cover {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 0;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub--mag-led .fma-hero-hub__cover::before {
    content: "";
    position: absolute;
    inset: -6% -10% -8% -6%;
    background: radial-gradient(
        ellipse 70% 65% at 42% 48%,
        color-mix(in srgb, var(--fma-gold, #f4a000) 28%, transparent) 0%,
        transparent 72%
    );
    pointer-events: none;
    z-index: 0;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub__copy {
    text-align: left;
    padding-inline-start: clamp(0rem, 2vw, 0.5rem);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-kicker,
body.brand-network-title.brand-enabled .fma-hero-kicker {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 1rem;
    padding: 0;
    font-family: var(--ncmaz-font-body, "new-rubrik-edge", sans-serif);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--fma-accent, #288aa5);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-kicker::before,
body.brand-network-title.brand-enabled .fma-hero-kicker::before {
    content: "";
    flex-shrink: 0;
    width: 1.75rem;
    height: 3px;
    background: var(--fma-gold, #f4a000);
    border-radius: 1px;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub h1.wp-block-heading,
body.brand-network-title.brand-enabled .fma-hero-hub h1.wp-block-heading {
    margin: 0 0 1rem;
    font-family: var(--ncmaz-font-heading, "magistral-condensed", sans-serif);
    font-size: clamp(1.875rem, 3.8vw, 2.85rem) !important;
    font-weight: 700;
    line-height: 1.1 !important;
    letter-spacing: -0.028em;
    color: var(--fma-ink, #0a0a0c);
    max-width: 16ch;
    text-wrap: balance;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-mark,
body.brand-network-title.brand-enabled .fma-hero-mark {
    color: var(--fma-ink, #0a0a0c);
    font-weight: 700;
    background: linear-gradient(
        transparent 56%,
        color-mix(in srgb, var(--fma-gold, #f4a000) 55%, transparent) 56%,
        color-mix(in srgb, var(--fma-gold, #f4a000) 55%, transparent) 94%,
        transparent 94%
    );
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-lead,
body.brand-network-title.brand-enabled .fma-hero-lead {
    margin: 0 0 1.15rem;
    max-width: 36ch;
    font-family: var(--ncmaz-font-intro, "ff-ginger-pro", sans-serif);
    font-size: clamp(1.05rem, 1.8vw, 1.175rem);
    font-weight: 300;
    line-height: 1.45;
    color: var(--fma-ink-muted, #3a3a42);
    text-wrap: pretty;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-issue,
body.brand-network-title.brand-enabled .fma-hero-hub--mag-led .fma-hero-issue {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem 0.75rem;
    margin: 0.25rem 0 1.5rem;
    max-width: 36rem;
    padding: 0.75rem 0;
    border-top: 1px solid color-mix(in srgb, var(--fma-gold, #f4a000) 35%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--fma-gold, #f4a000) 35%, transparent);
    font-size: 0.9375rem;
    line-height: 1.35;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-issue__label,
body.brand-network-title.brand-enabled .fma-hero-hub--mag-led .fma-hero-issue__label {
    font-family: var(--ncmaz-font-body, "new-rubrik-edge", sans-serif);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fma-gold-ink, #945a00);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-issue a,
body.brand-network-title.brand-enabled .fma-hero-hub--mag-led .fma-hero-issue a {
    font-family: var(--ncmaz-font-heading, "magistral-condensed", sans-serif);
    font-weight: 700;
    color: var(--fma-ink, #0a0a0c);
    text-decoration: none;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-issue a:hover,
body.brand-food-manufacturing-africa.brand-enabled .fma-hero-issue a:focus-visible,
body.brand-network-title.brand-enabled .fma-hero-hub--mag-led .fma-hero-issue a:hover,
body.brand-network-title.brand-enabled .fma-hero-hub--mag-led .fma-hero-issue a:focus-visible {
    color: var(--fma-accent, #288aa5);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-note,
body.brand-network-title.brand-enabled .fma-hero-note {
    margin: 0.85rem 0 0;
    max-width: 36rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: color-mix(in srgb, var(--fma-ink, #0a0a0c) 62%, transparent);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-note a,
body.brand-network-title.brand-enabled .fma-hero-note a {
    color: var(--fma-accent, #288aa5);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-note a:hover,
body.brand-network-title.brand-enabled .fma-hero-note a:hover {
    color: var(--fma-accent-hover, #237991);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions,
body.brand-network-title.brand-enabled .fma-hero-actions {
    margin: 0;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions .wp-block-buttons,
body.brand-network-title.brand-enabled .fma-hero-actions .wp-block-buttons {
    gap: 0.75rem;
    flex-wrap: wrap;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions .wp-block-button__link,
body.brand-network-title.brand-enabled .fma-hero-actions .wp-block-button__link {
    min-height: 2.75rem;
    padding: 0.55rem 1.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--fma-radius-sm, 2px);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions .wp-block-button.is-style-fill .wp-block-button__link,
body.brand-network-title.brand-enabled .fma-hero-actions .wp-block-button.is-style-fill .wp-block-button__link {
    background-color: var(--fma-accent, #288aa5) !important;
    color: #fff !important;
    border: 1px solid transparent;
    border-radius: var(--fma-radius-sm, 2px) !important;
    font-weight: 600 !important;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions .wp-block-button.is-style-fill .wp-block-button__link:hover,
body.brand-network-title.brand-enabled .fma-hero-actions .wp-block-button.is-style-fill .wp-block-button__link:hover {
    background-color: var(--fma-accent-hover, #237991) !important;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions .wp-block-button.is-style-outline .wp-block-button__link,
body.brand-network-title.brand-enabled .fma-hero-actions .wp-block-button.is-style-outline .wp-block-button__link {
    border: 1px solid color-mix(in srgb, var(--fma-accent, #288aa5) 55%, transparent);
    color: var(--fma-accent, #288aa5);
    background: #fff;
    border-radius: var(--fma-radius-sm, 2px) !important;
    font-weight: 600 !important;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions .wp-block-button.is-style-outline .wp-block-button__link:hover,
body.brand-network-title.brand-enabled .fma-hero-actions .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: color-mix(in srgb, var(--fma-accent, #288aa5) 8%, #fff);
    border-color: var(--fma-accent, #288aa5);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions .wp-block-button.is-style-fill .wp-block-button__link:focus-visible,
body.brand-network-title.brand-enabled .fma-hero-actions .wp-block-button.is-style-fill .wp-block-button__link:focus-visible,
body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions .wp-block-button.is-style-outline .wp-block-button__link:focus-visible,
body.brand-network-title.brand-enabled .fma-hero-actions .wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
    outline: 2px solid var(--fma-gold, #f4a000);
    outline-offset: 2px;
}

/* Content band follows hero */
body.brand-food-manufacturing-africa.brand-enabled .fma-layout-main .fma-home-with-sidebar,
body.brand-network-title.brand-enabled .fma-layout-main .fma-home-with-sidebar {
    padding-top: var(--wp--preset--spacing--8, 2rem);
}

body.brand-food-manufacturing-africa.brand-enabled #fma-latest.fma-home-section,
body.brand-network-title.brand-enabled #fma-latest.fma-home-section {
    padding-top: 0;
}

/* FMA section heads — match FR homepage (weight 500 / x-large); gold rule between modules */
body.brand-food-manufacturing-africa.brand-enabled .fma-home-section > .fma-home-section__head .wp-block-heading,
body.brand-food-manufacturing-africa.brand-enabled .fma-home-section h2.wp-block-heading {
    font-family: var(--ncmaz-font-body, "new-rubrik-edge", sans-serif) !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em;
    color: var(--fma-ink, #0a0a0c);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-layout-main .fma-home-section + .fma-home-section {
    border-top: var(--fma-rule-emphasis, 2px solid #f4a000);
    margin-top: var(--wp--preset--spacing--12, 3rem);
    padding-top: var(--wp--preset--spacing--10, 2.5rem);
}

/* Leaderboard directly under mag-led hero */
body.brand-food-manufacturing-africa.brand-enabled .fma-layout-main .fma-home-banner-leaderboard {
    padding-top: var(--wp--preset--spacing--8, 2rem);
    padding-bottom: var(--wp--preset--spacing--6, 1.5rem);
}

/* Featured digimag cover — larger, left-led stage piece */
body.brand-food-manufacturing-africa.brand-enabled .fma-hero-digimag,
body.brand-network-title.brand-enabled .fma-hero-digimag {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: min(22rem, 100%);
    width: 100%;
    margin-left: 0;
    margin-right: auto;
    text-decoration: none;
    color: inherit;
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub--mag-led .fma-hero-digimag--compact {
    gap: 0.55rem;
}

body.brand-food-manufacturing-africa.brand-enabled a.fma-hero-digimag:hover,
body.brand-network-title.brand-enabled a.fma-hero-digimag:hover {
    transform: translateY(-3px);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-digimag__figure,
body.brand-network-title.brand-enabled .fma-hero-digimag__figure {
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--fma-ink, #0a0a0c) 12%, transparent);
    border-radius: var(--fma-radius-md, 4px);
    overflow: hidden;
    box-shadow:
        0 18px 44px color-mix(in srgb, var(--fma-ink, #0a0a0c) 16%, transparent),
        0 3px 0 var(--fma-gold, #f4a000);
    background: #fff;
}

body.brand-food-manufacturing-africa.brand-enabled a.fma-hero-digimag:hover .fma-hero-digimag__figure,
body.brand-network-title.brand-enabled a.fma-hero-digimag:hover .fma-hero-digimag__figure {
    box-shadow:
        0 22px 48px color-mix(in srgb, var(--fma-ink, #0a0a0c) 18%, transparent),
        0 3px 0 var(--fma-gold, #f4a000);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-digimag__img,
body.brand-network-title.brand-enabled .fma-hero-digimag__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-digimag__label,
body.brand-network-title.brand-enabled .fma-hero-digimag__label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fma-gold-ink, #945a00);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-digimag__title,
body.brand-network-title.brand-enabled .fma-hero-digimag__title {
    font-family: var(--ncmaz-font-heading, "magistral-condensed", sans-serif);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--fma-ink, #0a0a0c);
}

body.brand-food-manufacturing-africa.brand-enabled .fma-hero-digimag-slot .wp-block-m24b2b-banner-space,
body.brand-network-title.brand-enabled .fma-hero-digimag-slot .wp-block-m24b2b-banner-space {
    width: 100%;
    max-width: min(22rem, 100%);
    margin-left: 0;
}

@media (max-width: 781px) {
    body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub--mag-led {
        background-color: color-mix(in srgb, var(--fma-gold, #f4a000) 12%, #fff);
        background-image: linear-gradient(
            color-mix(in srgb, var(--fma-gold, #f4a000) 12%, #fff),
            color-mix(in srgb, var(--fma-gold, #f4a000) 12%, #fff)
        );
    }

    body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub--mag-led .fma-hero-hub__cover::before {
        inset: -4% -4% -6% -4%;
        background: radial-gradient(
            ellipse 80% 70% at 50% 40%,
            color-mix(in srgb, var(--fma-gold, #f4a000) 22%, transparent) 0%,
            transparent 70%
        );
    }

    body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub__grid,
    body.brand-network-title.brand-enabled .fma-hero-hub__grid {
        flex-direction: column;
    }

    body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub h1.wp-block-heading,
    body.brand-network-title.brand-enabled .fma-hero-hub h1.wp-block-heading {
        max-width: 14ch;
    }

    body.brand-food-manufacturing-africa.brand-enabled .fma-hero-digimag,
    body.brand-food-manufacturing-africa.brand-enabled .fma-hero-digimag-slot .wp-block-m24b2b-banner-space,
    body.brand-network-title.brand-enabled .fma-hero-digimag,
    body.brand-network-title.brand-enabled .fma-hero-digimag-slot .wp-block-m24b2b-banner-space {
        max-width: 16rem;
        margin-inline: auto;
    }

    body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub__cover {
        justify-content: center;
    }

    body.brand-food-manufacturing-africa.brand-enabled .fma-hero-hub__copy {
        padding-inline-start: 0;
        text-align: left;
    }

    body.brand-food-manufacturing-africa.brand-enabled .fma-hero-actions .wp-block-button__link,
    body.brand-network-title.brand-enabled .fma-hero-actions .wp-block-button__link {
        min-height: 2.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.brand-food-manufacturing-africa.brand-enabled a.fma-hero-digimag,
    body.brand-network-title.brand-enabled a.fma-hero-digimag {
        transition: none;
    }

    body.brand-food-manufacturing-africa.brand-enabled a.fma-hero-digimag:hover,
    body.brand-network-title.brand-enabled a.fma-hero-digimag:hover {
        transform: none;
    }
}

/* -------------------------------------------------------------------------
   Labels, strapline, subheads, drop cap
   ------------------------------------------------------------------------- */
body.brand-enabled .fma-label,
body.brand-enabled .wp-block-paragraph.is-style-fma-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fma-accent);
    padding: 0.4rem 0.75rem;
    border: 2px solid color-mix(in srgb, var(--fma-accent) 55%, transparent);
    border-radius: var(--fma-radius-label);
    background: var(--fma-accent-tint);
    margin-bottom: 0.85rem;
}

body.brand-enabled .wp-block-paragraph.is-style-fma-label-box {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fma-accent);
    padding: 0.4rem 0.75rem;
    border: 2px solid color-mix(in srgb, var(--fma-accent) 55%, transparent);
    border-radius: var(--fma-radius-sm);
    background: var(--fma-accent-tint);
    margin-bottom: 0.85rem;
}

body.brand-enabled .fma-strapline,
body.brand-enabled .wp-block-paragraph.is-style-fma-strapline {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 400;
    line-height: 1.45;
    color: var(--fma-ink-muted);
    max-width: 42rem;
    text-wrap: pretty;
}

body.brand-enabled .fma-subhead,
body.brand-enabled .wp-block-paragraph.is-style-fma-subhead,
body.brand-enabled .wp-block-heading.is-style-fma-subhead {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fma-ink-muted);
    margin-block: 1.5rem 0.75rem;
}

body.brand-enabled .wp-block-paragraph.is-style-fma-drop-cap:not(:where(.fma-hero *))::first-letter {
    float: left;
    font-size: 3.25rem;
    line-height: 0.85;
    font-weight: 700;
    padding-right: 0.55rem;
    padding-top: 0.1rem;
    color: var(--fma-accent);
    font-family: var(--ncmaz-font-heading, "new-rubrik-edge", sans-serif);
}

@media (max-width: 781px) {
    body.brand-enabled .wp-block-paragraph.is-style-fma-drop-cap::first-letter {
        float: none;
        font-size: inherit;
        padding: 0;
        color: inherit;
    }
}

body.brand-enabled .wp-block-post-content > .wp-block-paragraph,
body.brand-enabled .fma-layout-main .wp-block-paragraph {
    text-wrap: pretty;
}

/* -------------------------------------------------------------------------
   Callouts & key advantages (block style: core/group)
   ------------------------------------------------------------------------- */
body.brand-enabled .wp-block-group.is-style-fma-callout {
    background: var(--fma-accent);
    color: var(--fma-surface-pure);
    border-radius: var(--fma-radius-md);
    padding: var(--wp--preset--spacing--8, 2rem);
    box-shadow: var(--fma-shadow-crisp), 0 2px 0 color-mix(in srgb, var(--fma-ink) 22%, transparent);
    position: relative;
}

body.brand-enabled .wp-block-group.is-style-fma-callout .wp-block-heading,
body.brand-enabled .wp-block-group.is-style-fma-callout .wp-block-list,
body.brand-enabled .wp-block-group.is-style-fma-callout p {
    color: inherit;
}

body.brand-enabled .wp-block-group.is-style-fma-callout a {
    color: var(--fma-surface-pure);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

body.brand-enabled .wp-block-group.is-style-fma-callout .wp-block-list {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
    line-height: 1.3;
}

body.brand-enabled .wp-block-group.is-style-fma-callout .wp-block-list li {
    margin-bottom: 0.3rem;
}

body.brand-enabled .wp-block-group.is-style-fma-callout-tint {
    background: var(--fma-accent-muted);
    color: var(--fma-ink);
    border-radius: var(--fma-radius-md);
    padding: var(--wp--preset--spacing--7, 1.75rem);
    border: var(--fma-rule);
    border-color: color-mix(in srgb, var(--fma-accent) 35%, transparent);
    position: relative;
}

body.brand-enabled .wp-block-group.is-style-fma-key-advantages {
    background: var(--fma-accent);
    color: var(--fma-surface-pure);
    border-radius: var(--fma-radius-md);
    padding: var(--wp--preset--spacing--8, 2rem);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 0 color-mix(in srgb, var(--fma-ink) 18%, transparent);
}

body.brand-enabled .wp-block-group.is-style-fma-key-advantages::before {
    content: "";
    position: absolute;
    top: 0.15rem;
    right: 0.35rem;
    width: clamp(3.5rem, 11vw, 6.5rem);
    height: clamp(3.5rem, 11vw, 6.5rem);
    opacity: 0.18;
    pointer-events: none;
    background-color: var(--fma-surface-pure);
    -webkit-mask-image: var(--fma-plus-svg-mask);
    mask-image: var(--fma-plus-svg-mask);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

body.brand-enabled .wp-block-group.is-style-fma-key-advantages .wp-block-heading {
    color: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

body.brand-enabled .wp-block-group.is-style-fma-key-advantages .wp-block-list {
    color: inherit;
    margin: 0;
    padding-left: 1.1rem;
    line-height: 1.3;
}

body.brand-enabled .wp-block-group.is-style-fma-key-advantages .wp-block-list li {
    margin-bottom: 0.3rem;
}

/* Decorative plus utility (SVG via mask) */
body.brand-enabled .fma-plus {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border: var(--fma-rule);
    border-radius: var(--fma-radius-sm);
    background-color: var(--fma-surface-pure);
    pointer-events: none;
}

body.brand-enabled .fma-plus::after {
    content: "";
    width: 55%;
    height: 55%;
    background-color: var(--fma-accent);
    -webkit-mask-image: var(--fma-plus-svg-mask);
    mask-image: var(--fma-plus-svg-mask);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

body.brand-enabled .fma-plus--lg {
    width: 3.5rem;
    height: 3.5rem;
}

body.brand-enabled .fma-plus--corner {
    position: absolute;
    top: var(--wp--preset--spacing--5, 1.25rem);
    right: var(--wp--preset--spacing--5, 1.25rem);
    z-index: 1;
}

/* Magazine grid helper */
body.brand-enabled .wp-block-group.is-style-fma-grid {
    display: grid;
    gap: var(--wp--preset--spacing--7, 1.75rem);
    grid-template-columns: 1fr;
}

@media (min-width: 782px) {
    body.brand-enabled .wp-block-group.is-style-fma-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    body.brand-enabled .wp-block-group.is-style-fma-grid.fma-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* -------------------------------------------------------------------------
   Media: accent band / documentary crop
   ------------------------------------------------------------------------- */
body.brand-enabled .fma-media-band .wp-block-image img,
body.brand-enabled .fma-media-band .wp-block-post-featured-image img {
    border-radius: var(--fma-radius-sm) !important;
}

body.brand-enabled .wp-block-image.fma-media-band,
body.brand-enabled .wp-block-post-featured-image.fma-media-band,
body.brand-enabled figure.fma-media-band {
    border-bottom: var(--fma-rule-thick);
    padding-bottom: var(--wp--preset--spacing--4, 1rem);
    margin-left: 0;
}

body.brand-enabled .wp-block-cover.fma-media-band {
    border-bottom: var(--fma-rule-thick);
    border-radius: var(--fma-radius-sm) !important;
}

body.brand-enabled .fma-layout-main .wp-block-image img {
    border-radius: var(--fma-radius-sm) !important;
}

/* Featured images: keep block/pattern inline radii (e.g. flush-top 4:3 cards). */
body.brand-enabled .fma-layout-main .wp-block-post-featured-image img {
    border-radius: unset;
}

/* -------------------------------------------------------------------------
   Post card grids (post-card-8, etc.): neutral ink — not global accent links
   ------------------------------------------------------------------------- */
body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-title a,
body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-author-name a,
body.brand-enabled .fma-layout-main .wp-block-query .wp-block-avatar a {
    color: var(--fma-ink);
}

body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-title a:hover,
body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-author-name a:hover,
body.brand-enabled .fma-layout-main .wp-block-query .wp-block-avatar a:hover {
    color: var(--fma-ink);
    text-decoration-color: var(--fma-accent);
}

body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-excerpt,
body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-excerpt a {
    color: var(--fma-ink-muted);
}

body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-excerpt a:hover {
    color: var(--fma-ink);
    text-decoration-color: var(--fma-accent);
}

body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-terms a,
body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-terms.is-style-pill a {
    color: var(--fma-ink-muted);
    text-decoration: none;
}

body.brand-enabled .fma-layout-main .wp-block-query .wp-block-post-terms a:hover {
    color: var(--fma-ink);
}

body.brand-enabled .fma-layout-main .wp-block-query .has-shadcn-muted-foreground-color,
body.brand-enabled .fma-layout-main .wp-block-query .has-shadcn-muted-foreground-color a {
    color: var(--fma-ink-muted) !important;
}

body.brand-enabled .fma-layout-main .wp-block-query .has-shadcn-muted-foreground-color a:hover {
    color: var(--fma-ink) !important;
}

/* Bookmark / save chip: neutral surface + muted icon */
body.brand-enabled .fma-layout-main .wp-block-query .wp-block-outermost-icon-block .icon-container.has-shadcn-accent-background-color {
    background-color: color-mix(in srgb, var(--fma-ink) 7%, var(--fma-surface-pure)) !important;
    color: var(--fma-ink-muted) !important;
    border: 1px solid color-mix(in srgb, var(--fma-ink) 12%, transparent);
}

body.brand-enabled .fma-layout-main .wp-block-query .wp-block-outermost-icon-block .icon-container.has-shadcn-accent-background-color:hover {
    background-color: color-mix(in srgb, var(--fma-ink) 11%, var(--fma-surface-pure)) !important;
    color: var(--fma-ink) !important;
}

body.brand-enabled .fma-layout-main .wp-block-button__link {
    border-radius: var(--fma-radius-sm) !important;
}

/* -------------------------------------------------------------------------
   Marginal credit (progressive: hidden on small screens)
   ------------------------------------------------------------------------- */
body.brand-enabled .fma-margin-credit {
    position: fixed;
    left: 0.25rem;
    top: 50%;
    z-index: 1;
    margin: 0;
    padding: 0;
    max-width: none;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--fma-ink) 38%, transparent);
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
    white-space: nowrap;
    pointer-events: none;
}

@media (max-width: 781px) {
    body.brand-enabled .fma-margin-credit {
        display: none;
    }
}

/* -------------------------------------------------------------------------
   Footer folio
   ------------------------------------------------------------------------- */
body.brand-enabled .fma-folio {
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--fma-ink) 45%, transparent);
    padding-top: var(--wp--preset--spacing--4, 1rem);
    border-top: 1px solid color-mix(in srgb, var(--fma-ink) 10%, transparent);
    margin-top: var(--wp--preset--spacing--5, 1.25rem);
}

/* -------------------------------------------------------------------------
   FMA-specific template chrome (slug + part class)
   ------------------------------------------------------------------------- */
body.brand-network-title.brand-enabled footer > .wp-block-group.has-base-background-color {
    border-top: var(--fma-rule);
    padding-top: 0;
}

body.brand-network-title.brand-enabled .global-header {
    border-bottom: 1px solid color-mix(in srgb, var(--fma-ink) 12%, transparent);
    background-color: var(--wp--preset--color--shadcn-background, #fff);
}

/*
 * FMA header row: wide wordmark + primary nav + user menu.
 * Keep nav + Boolii user cluster on one row at tablet/desktop; logo column may shrink.
 */
@media (min-width: 782px) {
    body.brand-network-title.brand-enabled .global-header > .wp-block-group.alignwide.is-layout-flex {
        flex-wrap: nowrap;
        column-gap: var(--wp--preset--spacing--3, 0.75rem);
    }

    body.brand-network-title.brand-enabled
        .global-header
        > .wp-block-group.alignwide.is-layout-flex
        > .wp-block-group.is-layout-flex:first-child {
        min-width: 0;
        flex-shrink: 1;
    }

    body.brand-network-title.brand-enabled
        .global-header
        > .wp-block-group.alignwide.is-layout-flex
        > .wp-block-group.is-layout-flex:last-child {
        flex-shrink: 0;
        min-width: min-content;
    }

    body.brand-network-title.brand-enabled
        .global-header
        > .wp-block-group.alignwide.is-layout-flex
        > .wp-block-group.is-layout-flex:last-child.is-layout-flex {
        flex-wrap: nowrap;
    }
}

/* FMA: keep Boolii user menu trigger visible (not clipped by logo + nav flex). */
body.brand-network-title.brand-enabled .global-header .wp-block-boolii-blocks-dropdown-menu {
    display: flex;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

body.brand-network-title.brand-enabled
    .global-header
    > .wp-block-group.alignwide.is-layout-flex
    > .wp-block-group.is-layout-flex:last-child
    > .wp-block-group.is-layout-flex:last-child {
    flex-shrink: 0;
    min-width: min-content;
}

@media (max-width: 781px) {
    body.brand-network-title.brand-enabled
        .global-header
        > .wp-block-group.alignwide.is-layout-flex
        > .wp-block-group.is-layout-flex:last-child
        > .wp-block-group.is-layout-flex:last-child {
        width: 100%;
        justify-content: flex-end;
        margin-top: var(--wp--preset--spacing--2, 0.5rem);
    }
}

/* Login promo row: keep lime band (see .m24b2b-header-login-promo in custom.css). */
body.brand-network-title.brand-enabled header > .wp-block-group.has-background:not(.has-shadcn-secondary-background-color):not(.global-header):not(.m24b2b-header-login-promo) {
    background-color: var(--wp--preset--color--shadcn-background, #fff) !important;
    border-bottom: 1px solid var(--wp--preset--color--shadcn-border, hsl(240 5.9% 90%));
}

body.brand-enabled .m24b2b-header-login-promo a.wp-block-button__link {
    color: inherit;
    text-decoration: none;
    border-radius: 2px !important;
    font-weight: 600 !important;
}

body.brand-enabled .m24b2b-header-login-promo .wp-block-button:first-child .wp-block-button__link {
    background-color: var(--wp--preset--color--shadcn-foreground, #09090b) !important;
    color: var(--wp--preset--color--shadcn-background, #fff) !important;
}

body.brand-enabled .m24b2b-header-login-promo .wp-block-button:last-child .wp-block-button__link {
    background-color: var(--wp--preset--color--shadcn-background, #fff) !important;
    color: var(--wp--preset--color--shadcn-foreground, #09090b) !important;
    border: 1px solid var(--wp--preset--color--shadcn-foreground, #09090b) !important;
}

body.brand-network-title.brand-enabled footer > .wp-block-group.has-base-background-color,
body.brand-network-title.brand-enabled .magazine-archive-header,
body.brand-network-title.brand-enabled .magazine-category-archive-header {
    background-color: var(--wp--preset--color--shadcn-background, #fff);
}

/* Cards and content bands on hub / archives */
body.brand-network-title.brand-enabled .fma-post-card.has-base-background-color,
body.brand-network-title.brand-enabled .magazine-post-card,
body.brand-network-title.brand-enabled .fma-layout-main .fma-home-with-sidebar,
body.brand-network-title.brand-enabled .fma-layout-main .fma-home-section {
    background-color: var(--wp--preset--color--shadcn-background, #fff);
}

/* Category listings (archive.html + hidden-archive-intro): white canvas like main site.
   Exclude FMA mag-led hero — it owns its own gold-stage wash. */
body.brand-network-title.brand-enabled main .wp-block-group.alignfull:not(.fma-hero-hub),
body.brand-network-title.brand-enabled main .wp-block-group.alignwide.has-border-color {
    background-color: var(--wp--preset--color--shadcn-background, #fff) !important;
}

/* FMA site-wide gold emphasis (labels, rules, decorative bits) */
/* Network titles: gold leading bar (same grammar as hero kicker) — no side-stripe. */
body.brand-network-title.brand-enabled .fma-label,
body.brand-network-title.brand-enabled .wp-block-paragraph.is-style-fma-label,
body.brand-network-title.brand-enabled .wp-block-paragraph.is-style-fma-label-box {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
    padding: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fma-gold-ink);
    background: transparent;
    border: none;
    border-radius: 0;
}

body.brand-network-title.brand-enabled .fma-label::before,
body.brand-network-title.brand-enabled .wp-block-paragraph.is-style-fma-label::before,
body.brand-network-title.brand-enabled .wp-block-paragraph.is-style-fma-label-box::before {
    content: "";
    flex-shrink: 0;
    width: 1.75rem;
    height: 3px;
    background: var(--fma-gold);
    border-radius: 1px;
}

body.brand-network-title.brand-enabled .fma-subhead,
body.brand-network-title.brand-enabled .wp-block-paragraph.is-style-fma-subhead,
body.brand-network-title.brand-enabled .wp-block-heading.is-style-fma-subhead {
    color: var(--fma-gold-ink);
}

body.brand-network-title.brand-enabled .fma-layout-main .fma-home-section__more a:hover {
    text-decoration-color: var(--fma-gold);
}

body.brand-network-title.brand-enabled .wp-block-paragraph.is-style-fma-drop-cap:not(:where(.fma-hero *))::first-letter {
    color: var(--fma-gold);
}

body.brand-network-title.brand-enabled .wp-block-image.fma-media-band,
body.brand-network-title.brand-enabled .wp-block-post-featured-image.fma-media-band,
body.brand-network-title.brand-enabled figure.fma-media-band {
    border-bottom: var(--fma-rule-emphasis);
    border-left: none;
    padding-left: 0;
    padding-bottom: var(--wp--preset--spacing--4, 1rem);
}

body.brand-network-title.brand-enabled .wp-block-cover.fma-media-band {
    border-bottom: var(--fma-rule-emphasis);
}

body.brand-network-title.brand-enabled .fma-plus {
    border-color: color-mix(in srgb, var(--fma-gold) 45%, transparent);
}

body.brand-network-title.brand-enabled .fma-plus::after {
    background-color: var(--fma-gold);
}

body.brand-network-title.brand-enabled .wp-block-group.is-style-fma-key-advantages::before {
    background-color: var(--fma-gold);
    opacity: 0.22;
}

/* Sub-brand logo (render_block swap in functions.php) */
body.brand-network-title .global-header .fma-subbrand-logo .custom-logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
}

body.brand-network-title .global-header .fma-subbrand-logo .custom-logo {
    display: block;
    height: auto;
    width: auto;
    max-width: min(220px, 38vw) !important;
    max-height: 46px !important;
    object-fit: contain;
}

/* -------------------------------------------------------------------------
   Dark mode (Boolii html.dark) — remap FMA tokens to shadcn presets
   ------------------------------------------------------------------------- */
:where(html.dark, html.dark *) body.brand-enabled {
    --fma-ink: var(--wp--preset--color--shadcn-foreground, #f8fafc);
    --fma-ink-muted: var(--wp--preset--color--shadcn-muted-foreground, #94a3b8);
    --fma-surface: var(--wp--preset--color--shadcn-background, #020817);
    --fma-surface-pure: var(--wp--preset--color--shadcn-background, #020817);
    --fma-surface-hero: var(--wp--preset--color--shadcn-background, #020817);
    --fma-accent-tint: var(--wp--preset--color--shadcn-accent, #1e293b);
    --fma-accent-muted: color-mix(in srgb, var(--fma-accent) 22%, var(--fma-surface-pure));
    background-color: var(--fma-surface);
    color: var(--fma-ink);
}

:where(html.dark, html.dark *) body.brand-network-title.brand-enabled {
    --fma-gold-ink: var(--fma-gold, #f4a000);
    --fma-gold-muted: color-mix(in srgb, var(--fma-gold) 18%, var(--fma-surface-pure));
}

/* Hero gold highlight — stronger band on dark backgrounds */
:where(html.dark, html.dark *) body.brand-network-title.brand-enabled .fma-hero-mark {
    background: linear-gradient(
        transparent 58%,
        color-mix(in srgb, var(--fma-gold) 55%, transparent) 58%,
        color-mix(in srgb, var(--fma-gold) 55%, transparent) 92%,
        transparent 92%
    );
}

/* Sub-brand logo: light wordmark from dark fma-logo.webp (CSS-only) */
html.dark body.brand-network-title .fma-subbrand-logo .custom-logo {
    filter: brightness(0) invert(1);
}
