.sapphire-footer__content {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(210px, 0.9fr);
    gap: 1.4rem clamp(1.5rem, 3vw, 3rem);
    min-width: 0;
}

.sapphire-footer__identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    min-width: 0;
}

.sapphire-footer__logo {
    width: var(--footer-logo-size, 72px);
    max-height: var(--footer-logo-size, 72px);
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(56, 189, 248, 0.16));
}

.sapphire-footer__company,
.sapphire-footer__group > h2 {
    margin: 0;
    color: var(--footer-heading, #eef7ff);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-transform: uppercase;
}

.sapphire-footer__summary,
.sapphire-footer__address {
    margin: 0.45rem 0 0;
    color: var(--footer-muted, #9aabc0);
    font-size: var(--footer-copy-size, 0.78rem);
    font-style: normal;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.sapphire-footer__connections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.sapphire-footer__group {
    min-width: 0;
}

.sapphire-footer__group > h2 {
    margin-bottom: 0.65rem;
    color: var(--footer-accent, #8bbed0);
}

.sapphire-footer__group:not(:has(.sapphire-footer__item)) {
    display: none;
}

.sapphire-footer__list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sapphire-footer__link {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.08rem;
    min-width: 0;
    color: var(--footer-muted, #9aabc0);
    font-size: var(--footer-copy-size, 0.78rem);
    line-height: 1.45;
    overflow-wrap: anywhere;
    text-decoration: none;
}

a.sapphire-footer__link:hover,
a.sapphire-footer__link:focus-visible {
    color: var(--footer-accent, #8bbed0);
}

.sapphire-footer__label {
    color: var(--footer-heading, #eef7ff);
    font-weight: 650;
}

.sapphire-footer__value {
    color: inherit;
}

.sapphire-footer__icon {
    display: none;
}

.sapphire-footer__group--contributions,
.sapphire-footer__meta {
    grid-column: 1 / -1;
}

.sapphire-footer__meta {
    display: grid;
    gap: 0.35rem;
    padding-block-start: 1rem;
    border-block-start: 1px solid var(--footer-line, rgba(148, 163, 184, 0.16));
    color: var(--footer-muted, #8293a9);
    font-size: 0.68rem;
    line-height: 1.6;
}

.sapphire-footer__meta p {
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.site-footer.sapphire-footer {
    --footer-logo-size: 112px;
    --footer-copy-size: 0.79rem;
    --footer-heading: #eef7ff;
    --footer-muted: #9aabc0;
    --footer-line: #1e293b;
    --footer-accent: var(--sapphire-blue, #80c7db);
}

.sapphire-footer__inner {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(190px, 0.7fr) minmax(320px, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
    max-width: 1420px;
    margin-inline: auto;
}

.sapphire-footer__inner > .sapphire-footer__module,
.sapphire-footer__inner > .sapphire-footer__module > .sapphire-footer__content {
    display: contents;
}

.sapphire-footer__inner .sapphire-footer__identity {
    grid-column: 1;
}

.sapphire-footer__inner .sapphire-footer__connections {
    grid-column: 2;
    grid-template-columns: 1fr;
}

.sapphire-footer__inner .sapphire-footer__navigation {
    grid-column: 3;
    grid-row: 1;
}

.sapphire-footer__inner :is(.sapphire-footer__group--contributions, .sapphire-footer__meta) {
    grid-column: 1 / -1;
}

.sapphire-concilium-layout .sapphire-footer {
    --footer-muted: var(--concilium-muted, #9cb2bf);
    --footer-line: var(--concilium-line, rgba(135, 184, 193, 0.16));
    --footer-accent: var(--concilium-cyan, #87c6cf);
}

.emporium-footer {
    --footer-logo-size: 70px;
    --footer-copy-size: 0.74rem;
    --footer-heading: #f5f8ff;
    --footer-muted: var(--emporium-muted, #9eaabd);
    --footer-line: var(--emporium-line, rgba(141, 161, 197, 0.16));
    --footer-accent: var(--emporium-cyan, #76d2d7);
    display: grid;
    grid-template-columns: minmax(220px, 1.05fr) minmax(180px, 0.7fr) minmax(260px, 1fr);
    align-items: start;
    gap: clamp(1.75rem, 4vw, 3.5rem);
}

.wiki-footer {
    --footer-logo-size: 64px;
    --footer-copy-size: 0.73rem;
    --footer-heading: var(--wiki-ink, #153247);
    --footer-muted: var(--wiki-muted, #5e7485);
    --footer-line: var(--wiki-line, rgba(50, 96, 123, 0.16));
    --footer-accent: var(--wiki-accent-strong, #0b668f);
    display: grid;
    grid-template-columns: minmax(220px, 1.05fr) minmax(180px, 0.7fr) minmax(260px, 1fr);
    align-items: start;
    gap: 1.5rem 2.5rem;
}

.support-layout__footer {
    --footer-logo-size: 68px;
    --footer-copy-size: 0.75rem;
    --footer-heading: #edf8ff;
    --footer-muted: #8fa7bf;
    --footer-line: rgba(147, 180, 210, 0.16);
    --footer-accent: #57cfca;
    display: grid;
    grid-template-columns: minmax(220px, 1.05fr) minmax(180px, 0.7fr) minmax(260px, 1fr);
    align-items: start;
    gap: 1.5rem 2.5rem;
    min-height: 0;
    padding-block: 28px;
}

.support-footer__module,
.support-footer__module > .sapphire-footer__content {
    width: 100%;
    min-width: 0;
}

.support-footer__module {
    align-items: stretch;
}

:is(.emporium-footer, .wiki-footer, .support-layout__footer)
> :is(.emporium-footer__module, .wiki-footer__module, .support-footer__module),
:is(.emporium-footer, .wiki-footer, .support-layout__footer)
> :is(.emporium-footer__module, .wiki-footer__module, .support-footer__module)
> .sapphire-footer__content {
    display: contents;
}

:is(.emporium-footer, .wiki-footer, .support-layout__footer) .sapphire-footer__identity {
    grid-column: 1;
}

:is(.emporium-footer, .wiki-footer, .support-layout__footer) .sapphire-footer__connections {
    grid-column: 2;
    grid-template-columns: 1fr;
}

:is(.emporium-footer__navigation, .wiki-footer__navigation, .support-footer__navigation) {
    grid-column: 3;
    grid-row: 1;
}

:is(.emporium-footer, .wiki-footer, .support-layout__footer)
:is(.sapphire-footer__group--contributions, .sapphire-footer__meta) {
    grid-column: 1 / -1;
}

:is(.site-footer.sapphire-footer, .emporium-footer, .wiki-footer, .support-layout__footer):not(:has(.sapphire-footer__content, .cascade-menu)) {
    display: none;
}

:is(.sapphire-footer__navigation, .emporium-footer__navigation, .wiki-footer__navigation, .support-footer__navigation)
.cascade-menu.cascade-menu--compact {
    width: 100%;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    z-index: auto;
}

:is(.sapphire-footer__navigation, .emporium-footer__navigation, .wiki-footer__navigation, .support-footer__navigation)
.cascade-menu--compact > .cascade-menu__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.35rem 1.5rem;
}

:is(.sapphire-footer__navigation, .emporium-footer__navigation, .wiki-footer__navigation, .support-footer__navigation)
.cascade-menu--compact :is(.cascade-menu__link, .cascade-menu__trigger) {
    width: 100%;
    min-height: 32px;
    padding: 0.3rem 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--footer-muted, #9aabc0);
    font-size: var(--footer-copy-size, 0.78rem);
    text-align: start;
    transform: none;
}

:is(.sapphire-footer__navigation, .emporium-footer__navigation, .wiki-footer__navigation, .support-footer__navigation)
.cascade-menu--compact :is(.cascade-menu__link, .cascade-menu__trigger):hover,
:is(.sapphire-footer__navigation, .emporium-footer__navigation, .wiki-footer__navigation, .support-footer__navigation)
.cascade-menu--compact :is(.cascade-menu__link, .cascade-menu__trigger):focus-visible {
    background: transparent;
    color: var(--footer-accent, #8bbed0);
    box-shadow: none;
    transform: none;
}

@media (max-width: 920px) {
    .sapphire-footer__inner,
    .emporium-footer,
    .wiki-footer,
    .support-layout__footer {
        grid-template-columns: 1fr;
    }

    .sapphire-footer__inner .sapphire-footer__identity,
    .sapphire-footer__inner .sapphire-footer__connections,
    .sapphire-footer__inner .sapphire-footer__navigation,
    .sapphire-footer__inner :is(.sapphire-footer__group--contributions, .sapphire-footer__meta) {
        grid-column: 1;
    }

    .sapphire-footer__inner .sapphire-footer__identity { grid-row: 1; }
    .sapphire-footer__inner .sapphire-footer__connections { grid-row: 2; }
    .sapphire-footer__inner .sapphire-footer__navigation { grid-row: 3; }
    .sapphire-footer__inner .sapphire-footer__group--contributions { grid-row: 4; }
    .sapphire-footer__inner .sapphire-footer__meta { grid-row: 5; }

    :is(.emporium-footer, .wiki-footer, .support-layout__footer)
    :is(.sapphire-footer__identity, .sapphire-footer__connections, .sapphire-footer__group--contributions, .sapphire-footer__meta),
    :is(.emporium-footer__navigation, .wiki-footer__navigation, .support-footer__navigation) {
        grid-column: 1;
    }

    :is(.emporium-footer, .wiki-footer, .support-layout__footer) .sapphire-footer__identity { grid-row: 1; }
    :is(.emporium-footer, .wiki-footer, .support-layout__footer) .sapphire-footer__connections { grid-row: 2; }
    :is(.emporium-footer__navigation, .wiki-footer__navigation, .support-footer__navigation) { grid-row: 3; }
    :is(.emporium-footer, .wiki-footer, .support-layout__footer) .sapphire-footer__group--contributions { grid-row: 4; }
    :is(.emporium-footer, .wiki-footer, .support-layout__footer) .sapphire-footer__meta { grid-row: 5; }
}

@media (max-width: 640px) {
    .sapphire-footer__content,
    .wiki-footer .sapphire-footer__content,
    .support-layout__footer .sapphire-footer__content,
    .sapphire-footer__connections {
        grid-template-columns: 1fr;
    }

    .sapphire-footer__identity {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .sapphire-footer__logo {
        width: 68px;
        max-height: 68px;
    }
}
