:host {
    all: initial;
    font-family: Lato,system-ui,sans-serif;
    font-size: 14px;
    color: #0c2d48;
    line-height: 1.65;
    --mmc-brand: #0c2d48;
}

* {
    box-sizing: border-box;
}

button,input,a,summary {
    -webkit-tap-highlight-color: transparent;
}

button,input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible {
    outline: 3px solid #0c2d48;
    outline-offset: 4px;
}

button {
    border: 1px solid var(--mmc-brand);
    background: #fff;
    color: #0c2d48;
    padding: 12px 17px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    min-height: 46px;
    transition: background .15s;
}

button:hover {
    background: #f4f0e8;
}

h2,h3,p {
    margin: 0;
}

h2 {
    font-size: 25px;
    line-height: 1.3;
    color: #0c2d48;
    font-weight: 700;
    letter-spacing: -.5px;
}

h3 {
    font-size: 15px;
    color: #0c2d48;
}

p {
    font-size: 15px;
    line-height: 1.6;
    margin: 10px 0;
}

.banner {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 24px;
    right: 24px;
    max-width: 1140px;
    margin: auto;
    padding: 24px 30px 18px;
    background: #f4f0e8;
    border: 1px solid #dedbd4;
    border-top: 4px solid #e8b7a4;
    border-radius: 18px;
    box-shadow: 0 12px 65px #123d6530;
    z-index: 1;
}

.banner[hidden],[hidden] {
    display: none !important;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2;
    font-size: 9px;
    letter-spacing: 2px;
    font-weight: 700;
    color: #4d5e69;
    margin-bottom: 20px;
}

.brand-name {
    font-size: 19px;
    letter-spacing: -.3px;
    color: var(--mmc-brand);
}

.brand-logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.tag {
    margin-left: auto;
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 600;
    color: #4d5e69;
}

.banner-grid {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 40px;
    align-items: center;
}

.banner-grid p {
    max-width: 650px;
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.actions .settings {
    grid-column: 1/-1;
    color: #0c2d48;
    border: 0;
    background: #e8b7a4;
    font-weight: 600;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.links a {
    font-size: 12px;
    font-weight: 600;
    color: #0c2d48;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footnote {
    border-top: 1px solid #dedbd4;
    margin: 18px 0 0;
    padding-top: 12px;
    font-size: 11px;
    color: #4d5e69;
}

.reopen {
    position: fixed;
    bottom: env(safe-area-inset-bottom);
    left: 24px;
    z-index: 0;
    border-radius: 8px 8px 0 0;
    border: 1px solid #dedbd4;
    min-height: 44px;
    font-size: 11px;
    padding: 8px 14px;
    box-shadow: 0 0 20px #123d6515;
}

.banner:not([hidden])~.reopen {
    visibility: hidden;
}

dialog {
    font: inherit;
    color: #0c2d48;
    width: min(720px,calc(100vw - 32px));
    max-height: calc(100dvh - 40px);
    padding: 0;
    border: 0;
    border-top: 4px solid #e8b7a4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 100px #123d6540;
    overflow: hidden;
}

dialog[open] {
    display: flex;
    flex-direction: column;
}

dialog::backdrop {
    background: #0a294c80;
    backdrop-filter: blur(3px);
}

dialog header {
    padding: 26px 30px 16px;
    position: relative;
    flex-shrink: 0;
}

.eyebrow {
    font-size: 9px;
    letter-spacing: 1.6px;
    color: #436c87;
    font-weight: 700;
    margin: 0 40px 12px 0;
}

.close {
    position: absolute;
    right: 18px;
    top: 12px;
    border: 0;
    font-size: 26px;
    font-weight: 400;
    min-width: 44px;
    padding: 0;
}

.scroll {
    overflow: auto;
    padding: 0 30px 22px;
    overscroll-behavior: contain;
}

.category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 18px 0;
    border-top: 1px solid #dedbd4;
}

.category p {
    font-size: 13px;
    margin: 5px 0 0;
    max-width: 490px;
}

.always {
    font-size: 10px;
    color: #006b50;
    white-space: nowrap;
    background: #edf8f4;
    padding: 6px 9px;
    border-radius: 20px;
    font-weight: 700;
}

.switch {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    border: 2px solid #738c9d;
    background: #e4ecf2;
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    margin: 0;
}

.switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #526c7d;
    left: 2px;
    top: 2px;
}

.switch:checked {
    background: var(--mmc-brand);
    border-color: var(--mmc-brand);
}

.switch:checked::after {
    left: 22px;
    background: #fff;
}

.switch:focus-visible {
    outline-offset: 4px;
}

details {
    border: 1px solid #dedbd4;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 8px 0 18px;
    background: #f4f0e8;
}

summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: #0c2d48;
}

.small {
    font-size: 11px;
    color: #4d5e69;
}

.cookie-entry {
    border-top: 1px solid #dedbd4;
    padding-top: 12px;
    margin-top: 12px;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.cookie-entry p {
    font-size: 11px;
    margin-top: 4px;
}

.download {
    font-size: 11px;
    min-height: 32px;
    padding: 6px 10px;
}

dialog footer {
    border-top: 1px solid #dedbd4;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 18px 24px;
    background: #f4f0e8;
    flex-shrink: 0;
}

dialog footer button {
    padding: 11px 7px;
    font-size: 11px;
}

.save {
    border-color: #0c2d48;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width:700px) {
    .banner {
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 12px;
        right: 12px;
        padding: 18px 20px 14px;
        max-height: calc(100dvh - 24px);
        overflow: auto;
    }
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .brand {
        margin-bottom: 14px;
    }
    .brand-logo {
        width: 40px;
        height: 40px;
    }
    .tag {
        font-size: 8px;
        letter-spacing: .5px;
    }
    h2 {
        font-size: 20px;
    }
    .banner-grid p {
        font-size: 14px;
    }
    .actions {
        gap: 8px;
    }
    .actions button {
        font-size: 13px;
        padding-inline: 8px;
    }
    .footnote {
        margin-top: 14px;
        padding-top: 8px;
        font-size: 10px;
    }
    .reopen {
        left: 12px;
    }
    dialog {
        max-height: calc(100dvh - 24px);
    }
    dialog header {
        padding: 22px 20px 10px;
    }
    .scroll {
        padding: 0 20px 16px;
    }
    dialog footer {
        grid-template-columns: 1fr 1fr;
        padding: 12px 16px;
        gap: 8px;
    }
    dialog footer .save {
        grid-column: 1/-1;
    }
    .category {
        gap: 12px;
    }
    .category p {
        font-size: 12px;
    }
    .always {
        font-size: 8px;
        padding: 5px 7px;
    }
}

@media (prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
    }
    dialog::backdrop {
        backdrop-filter: none;
    }
}

@media (forced-colors:active) {
    .switch {
        appearance: auto;
        width: 26px;
    }
    .switch::after {
        display: none;
    }
}
