/* CHANGE3: deliberately no rules outside <=767px + homepage + active component. */
@media (max-width: 767px) {
    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] {
        --cg-hmf-rule: rgb(255 255 255 / 21%);
        background: var(--cg-footer-navy, #10263b);
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__inner {
        width: calc(100% - 40px);
        max-width: 640px;
        padding-block: 30px 22px;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__grid {
        display: none; /* empty original grid retained for exact desktop restoration */
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__shell {
        display: block;
        min-width: 0;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__brand-column {
        position: relative;
        padding: 0 0 24px;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__brand-column > h2 {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__brand {
        min-height: 44px;
        margin: 0 0 8px;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__brand img {
        width: min(164px, 100%);
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__motto {
        margin: 0 0 8px;
        font-size: 13px;
        line-height: 1.5;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__description {
        max-width: 40ch;
        margin: 0;
        color: rgb(255 255 255 / 78%);
        font-size: 14px;
        line-height: 1.65;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__shell > :is(nav, .cg-footer-final__column:not(.cg-footer-final__brand-column), .cg-hmf__business) {
        border-top: 1px solid var(--cg-hmf-rule);
        padding: 0;
        margin: 0;
        min-width: 0;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__shell > :is(nav, .cg-footer-final__column:not(.cg-footer-final__brand-column), .cg-hmf__business) > h2 {
        margin: 0;
        padding: 0;
        font: inherit;
        text-transform: none;
        letter-spacing: normal;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] button.cg-hmf__toggle {
        appearance: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        width: 100%;
        min-width: 44px;
        min-height: 56px;
        margin: 0;
        padding: 14px 0;
        border: 0;
        border-radius: 0;
        color: #fff;
        background: transparent;
        box-shadow: none;
        font: inherit;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.5;
        letter-spacing: .025em;
        text-align: start;
        text-transform: none;
        cursor: pointer;
        touch-action: manipulation;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__label {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__sign {
        flex: 0 0 24px;
        font-size: 24px;
        font-weight: 400;
        line-height: 1;
        text-align: center;
        color: rgb(255 255 255 / 85%);
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__panel {
        height: 0;
        overflow: hidden;
        transition: height 220ms ease;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__panel[hidden] {
        display: none !important;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__panel-body {
        display: flow-root;
        padding: 0 2px 18px;
        overflow-wrap: anywhere;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__panel-body .cg-footer-final__list {
        gap: 1px;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] :is(.cg-hmf__panel-body a, button.cg-footer-final__cookie) {
        min-width: 44px;
        min-height: 44px;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__company {
        margin: 0;
        color: rgb(255 255 255 / 78%);
        text-align: start;
        font-size: 13px;
        line-height: 1.75;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__bottom {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin: 0;
        padding-top: 18px;
        border-top: 1px solid var(--cg-hmf-rule);
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-footer-final__copyright {
        color: rgb(255 255 255 / 78%);
        font-size: 12px;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] a.cg-hmf__back-top {
        display: inline-flex;
        align-items: center;
        min-width: 44px;
        min-height: 44px;
        color: #fff;
        font-size: 13px;
        text-decoration: none;
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] :is(button.cg-hmf__toggle, a.cg-hmf__back-top):focus-visible {
        outline: 2px solid #fff;
        outline-offset: 3px;
        box-shadow: 0 0 0 5px var(--cg-footer-blue, #1768b1);
    }

    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] :is(button.cg-hmf__toggle, a.cg-hmf__back-top):hover {
        color: #fff;
        text-decoration: underline;
        text-underline-offset: .25em;
        background: transparent;
    }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
    body:is(.home, .front-page) .cg-footer-final[data-cg-home-mobile-footer="active"] .cg-hmf__panel {
        transition: none !important; /* override the existing accessibility micro-duration reset */
    }
}
