:root {
    --mmf-navy: #07142a;
    --mmf-navy-deep: #050b14;
    --mmf-blue: #1976d2;
    --mmf-blue-bright: #4aa3ff;
    --mmf-red: #d9283a;
    --mmf-text: #111827;
    --mmf-muted: #64748b;
    --mmf-border: rgba(15, 23, 42, 0.10);
    --mmf-radius-xl: 28px;
    --mmf-radius-lg: 22px;
    --mmf-radius-md: 16px;
    --mmf-shadow-soft: 0 20px 54px rgba(15, 23, 42, 0.10);
    --mmf-shadow-strong: 0 28px 90px rgba(0, 0, 0, 0.35);
}

.mmf-module,
.mmf-module * {
    box-sizing: border-box;
}

.mmf-module {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--mmf-text);
}

.mmf-module a {
    color: inherit;
}

.mmf-frontend-warning {
    margin: 16px 0;
    padding: 12px 14px;
    border-left: 4px solid #d9283a;
    background: #fff5f5;
    color: #7f1d1d;
    font: 14px/1.45 system-ui, sans-serif;
}

.mmf-screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   v1.6.0 - Standard module wrapper + responsive visibility
   ========================================================= */
.mmf-module-shell {
    display: block;
    width: 100%;
}

@media (min-width: 1025px) {
    .mmf-module-shell.mmf-hide-desktop {
        display: none !important;
    }
}

@media (min-width: 783px) and (max-width: 1024px) {
    .mmf-module-shell.mmf-hide-tablet {
        display: none !important;
    }
}

@media (max-width: 782px) {
    .mmf-module-shell.mmf-hide-mobile {
        display: none !important;
    }
}

/* =========================================================
   v1.9.5 - Congressional Newsletter exact U.S. Letter canvas
   The authoritative Congressional Newsletter website and print
   canvas is U.S. Letter portrait: 8.5in x 11in
   (21.59cm x 27.94cm / 215.9mm x 279.4mm).
   At the browser CSS reference resolution of 96px/in this is
   exactly 816px x 1056px. Legacy A4 helper class names remain
   supported so existing newsletter templates do not need markup
   changes; they now receive Letter geometry.
   ========================================================= */
@media screen {
    :where(
        .mmf-letter-page,
        .smnn-letter-page,
        .mpf-letter-page,
        .morse-letter-page,
        .smnn-congress-newsletter-letter,
        .smnn-congressional-newsletter-letter,
        .mpf-congress-newsletter-letter,
        .morse-congress-newsletter-letter,
        .congress-newsletter-letter,
        .congressional-newsletter-letter,
        .newsletter-letter,
        .letter-page,
        [data-morse-letter="true"],
        [data-newsletter-letter="true"],
        [data-congress-newsletter-letter="true"],
        /* Backward-compatible selectors used by existing templates. */
        .mmf-a4-print-safe,
        .smnn-a4-print-safe,
        .mpf-a4-print-safe,
        .morse-a4-print-safe,
        .mmf-a4-borderless,
        .smnn-a4-borderless,
        .mpf-a4-borderless,
        .morse-a4-borderless,
        .smnn-congress-newsletter-a4,
        .smnn-congressional-newsletter-a4,
        .mpf-congress-newsletter-a4,
        .morse-congress-newsletter-a4,
        .congress-newsletter-a4,
        .congressional-newsletter-a4,
        .newsletter-a4,
        .a4-newsletter,
        .a4-page,
        [data-morse-a4="true"],
        [data-newsletter-a4="true"],
        [data-congress-newsletter-a4="true"]
    ) {
        width: 8.5in !important;
        min-width: 8.5in !important;
        max-width: 8.5in !important;
        height: 11in !important;
        min-height: 11in !important;
        max-height: 11in !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        position: relative !important;
        transform: none !important;
        zoom: 1 !important;
    }

    :where(
        .mmf-letter-page,
        .smnn-letter-page,
        .mpf-letter-page,
        .morse-letter-page,
        .smnn-congress-newsletter-letter,
        .smnn-congressional-newsletter-letter,
        .mpf-congress-newsletter-letter,
        .morse-congress-newsletter-letter,
        .congress-newsletter-letter,
        .congressional-newsletter-letter,
        .newsletter-letter,
        .letter-page,
        [data-morse-letter="true"],
        [data-newsletter-letter="true"],
        [data-congress-newsletter-letter="true"],
        .mmf-a4-print-safe,
        .smnn-a4-print-safe,
        .mpf-a4-print-safe,
        .morse-a4-print-safe,
        .mmf-a4-borderless,
        .smnn-a4-borderless,
        .mpf-a4-borderless,
        .morse-a4-borderless,
        .smnn-congress-newsletter-a4,
        .smnn-congressional-newsletter-a4,
        .mpf-congress-newsletter-a4,
        .morse-congress-newsletter-a4,
        .congress-newsletter-a4,
        .congressional-newsletter-a4,
        .newsletter-a4,
        .a4-newsletter,
        .a4-page,
        [data-morse-a4="true"],
        [data-newsletter-a4="true"],
        [data-congress-newsletter-a4="true"]
    ) * {
        box-sizing: border-box !important;
    }

    /* Fallback when the article template has no explicit page helper class. */
    body.mmf-congress-newsletter-page article > .entry-content,
    body.mmf-congress-newsletter-page main > article > .entry-content,
    body.mmf-congress-newsletter-page .site-main > article > .entry-content {
        width: 8.5in !important;
        min-width: 8.5in !important;
        max-width: 8.5in !important;
        height: 11in !important;
        min-height: 11in !important;
        max-height: 11in !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        position: relative !important;
        transform: none !important;
        zoom: 1 !important;
    }

    body.mmf-congress-newsletter-page article > .entry-content *,
    body.mmf-congress-newsletter-page main > article > .entry-content *,
    body.mmf-congress-newsletter-page .site-main > article > .entry-content * {
        box-sizing: border-box !important;
    }
}

/* =========================================================
   Exact U.S. Letter print geometry. No additional template scale
   is applied: the website canvas and printed page are both
   8.5in x 11in. Select Letter / Letter Borderless and Actual Size
   (100%) in the browser/printer dialog.
   ========================================================= */
@media print {
    @page {
        size: 8.5in 11in;
        margin: 0;
    }

    html,
    body {
        width: 8.5in !important;
        min-width: 8.5in !important;
        max-width: 8.5in !important;
        height: 11in !important;
        min-height: 11in !important;
        max-height: 11in !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    :where(
        .mmf-letter-page,
        .smnn-letter-page,
        .mpf-letter-page,
        .morse-letter-page,
        .smnn-congress-newsletter-letter,
        .smnn-congressional-newsletter-letter,
        .mpf-congress-newsletter-letter,
        .morse-congress-newsletter-letter,
        .congress-newsletter-letter,
        .congressional-newsletter-letter,
        .newsletter-letter,
        .letter-page,
        [data-morse-letter="true"],
        [data-newsletter-letter="true"],
        [data-congress-newsletter-letter="true"],
        .mmf-a4-print-safe,
        .smnn-a4-print-safe,
        .mpf-a4-print-safe,
        .morse-a4-print-safe,
        .mmf-a4-borderless,
        .smnn-a4-borderless,
        .mpf-a4-borderless,
        .morse-a4-borderless,
        .smnn-congress-newsletter-a4,
        .smnn-congressional-newsletter-a4,
        .mpf-congress-newsletter-a4,
        .morse-congress-newsletter-a4,
        .congress-newsletter-a4,
        .congressional-newsletter-a4,
        .newsletter-a4,
        .a4-newsletter,
        .a4-page,
        [data-morse-a4="true"],
        [data-newsletter-a4="true"],
        [data-congress-newsletter-a4="true"]
    ) {
        width: 8.5in !important;
        min-width: 8.5in !important;
        max-width: 8.5in !important;
        height: 11in !important;
        min-height: 11in !important;
        max-height: 11in !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        transform: none !important;
        transform-origin: top left !important;
        overflow: hidden !important;
        position: relative !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.mmf-congress-newsletter-page article > .entry-content,
    body.mmf-congress-newsletter-page main > article > .entry-content,
    body.mmf-congress-newsletter-page .site-main > article > .entry-content {
        width: 8.5in !important;
        min-width: 8.5in !important;
        max-width: 8.5in !important;
        height: 11in !important;
        min-height: 11in !important;
        max-height: 11in !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        transform: none !important;
        overflow: hidden !important;
        position: relative !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    :where(
        .mmf-letter-page,
        .smnn-letter-page,
        .mpf-letter-page,
        .morse-letter-page,
        .smnn-congress-newsletter-letter,
        .smnn-congressional-newsletter-letter,
        .mpf-congress-newsletter-letter,
        .morse-congress-newsletter-letter,
        .congress-newsletter-letter,
        .congressional-newsletter-letter,
        .newsletter-letter,
        .letter-page,
        [data-morse-letter="true"],
        [data-newsletter-letter="true"],
        [data-congress-newsletter-letter="true"],
        .mmf-a4-print-safe,
        .smnn-a4-print-safe,
        .mpf-a4-print-safe,
        .morse-a4-print-safe,
        .mmf-a4-borderless,
        .smnn-a4-borderless,
        .mpf-a4-borderless,
        .morse-a4-borderless,
        .smnn-congress-newsletter-a4,
        .smnn-congressional-newsletter-a4,
        .mpf-congress-newsletter-a4,
        .morse-congress-newsletter-a4,
        .congress-newsletter-a4,
        .congressional-newsletter-a4,
        .newsletter-a4,
        .a4-newsletter,
        .a4-page,
        [data-morse-a4="true"],
        [data-newsletter-a4="true"],
        [data-congress-newsletter-a4="true"]
    ) *,
    body.mmf-congress-newsletter-page article > .entry-content *,
    body.mmf-congress-newsletter-page main > article > .entry-content *,
    body.mmf-congress-newsletter-page .site-main > article > .entry-content * {
        box-sizing: border-box !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}


/* =========================================================
   v1.9.7 - Body-level login/auth portal authority
   The active auth layer is moved directly under <body> by JS,
   eliminating independent stacking contexts from sticky/fixed UI.
   ========================================================= */
html.mmf-auth-overlay-open,
body.mmf-auth-overlay-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

/* Transparent interaction shield underneath the login layer.
   It prevents any background page control from receiving input even
   if that control uses an unusually high z-index. */
.mmf-auth-page-shield {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    z-index: 2147483646 !important;
    pointer-events: auto !important;
    touch-action: none !important;
}

/* The active login/auth root is portaled to <body> and appended last.
   Maximum z-index plus body-level placement makes it authoritative over
   the Member Directory toolbar, header, submenus and floating controls. */
.mmf-global-auth-overlay {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    z-index: 2147483647 !important;
    isolation: isolate !important;
    pointer-events: auto !important;
    transform: none !important;
    translate: none !important;
}

/* Known Morse navigation layers stay decisively below the auth portal. */
body.mmf-auth-overlay-open .mmf-command-header,
body.mmf-auth-overlay-open .mmf-command-dropdown,
body.mmf-auth-overlay-open .mmf-mobile-drawer,
body.mmf-auth-overlay-open .mmf-command-mobile-panel {
    z-index: 2147483000 !important;
}

/* =========================================================
   v1.9.8 - Command Header submenu stacking authority
   The dropdown's z-index only works inside the header's own stacking
   context. Give the entire Command Header an application navigation
   layer above page-level sticky/floating Member Portal UI, while keeping
   it below the v1.9.7 login/auth body portal.
   ========================================================= */
.mmf-command-site-header,
[data-mmf-command-header] {
    position: sticky;
    z-index: 2147482000 !important;
    overflow: visible !important;
    isolation: isolate;
}

.mmf-command-site-header .mmf-command-shell,
[data-mmf-command-header] .mmf-command-shell,
.mmf-command-site-header .mmf-command-main,
[data-mmf-command-header] .mmf-command-main,
.mmf-command-site-header .mmf-command-nav,
[data-mmf-command-header] .mmf-command-nav,
.mmf-command-site-header .mmf-command-menu,
[data-mmf-command-header] .mmf-command-menu,
.mmf-command-site-header .mmf-command-menu > li.has-dropdown,
[data-mmf-command-header] .mmf-command-menu > li.has-dropdown {
    overflow: visible !important;
}

.mmf-command-site-header .mmf-command-menu > li.has-dropdown,
[data-mmf-command-header] .mmf-command-menu > li.has-dropdown {
    z-index: 2147482100 !important;
}

.mmf-command-site-header .mmf-command-dropdown,
[data-mmf-command-header] .mmf-command-dropdown {
    z-index: 2147482200 !important;
}

/* Login/auth remains authoritative when open. This deliberately lowers
   the navigation layer below the body-level shield and auth portal. */
body.mmf-auth-overlay-open .mmf-command-site-header,
body.mmf-auth-overlay-open [data-mmf-command-header] {
    z-index: 2147483000 !important;
}



/* =========================================================
   v1.9.9 - Body-level Command Header submenu portal
   The active desktop dropdown is moved under <body> by JS. This
   eliminates page-level stacking-context conflicts with Member Portal
   cards and sticky/floating controls while preserving the login portal
   as the highest layer.
   ========================================================= */
.mmf-command-submenu-portal-host {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    top: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: none !important;
    overflow: visible !important;
    pointer-events: none !important;
    isolation: isolate !important;
    z-index: 2147483200 !important;
}

.mmf-command-submenu-portal-host .mmf-command-dropdown.mmf-command-submenu-portal {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    translate: none !important;
    z-index: 2147483201 !important;
}

.mmf-command-submenu-portal-host .mmf-command-dropdown.mmf-command-submenu-portal::before {
    left: var(--mmf-command-portal-arrow-left, 50%) !important;
}

/* Keep the original navigation trigger visually active while its actual
   dropdown has been portaled out of the menu-item DOM subtree. */
.mmf-command-site-header .mmf-command-menu > li.has-dropdown.mmf-command-submenu-portaled > a,
[data-mmf-command-header] .mmf-command-menu > li.has-dropdown.mmf-command-submenu-portaled > a {
    color: #ffffff !important;
    background: rgba(74, 163, 255, 0.10) !important;
}

.mmf-command-site-header .mmf-command-menu > li.has-dropdown.mmf-command-submenu-portaled > a::before,
[data-mmf-command-header] .mmf-command-menu > li.has-dropdown.mmf-command-submenu-portaled > a::before {
    width: calc(100% - 30px) !important;
}

.mmf-command-site-header .mmf-command-menu > li.has-dropdown.mmf-command-submenu-portaled .mmf-command-chevron,
[data-mmf-command-header] .mmf-command-menu > li.has-dropdown.mmf-command-submenu-portaled .mmf-command-chevron {
    color: #ff4053 !important;
    transform: rotate(180deg) translateY(1px) !important;
}

/* Authentication remains authoritative. The auth shield and modal use
   2147483646/2147483647, so the submenu portal can never cover login. */
body.mmf-auth-overlay-open .mmf-command-submenu-portal-host {
    z-index: 2147483000 !important;
    pointer-events: none !important;
}
