.site-footer {
    margin-top: var(--space-8);
    min-height: 294px;
    contain: layout style;
    position: relative;
    z-index: 1;
    color: var(--text-white, var(--white-0));
}

.site-footer-root {
    min-height: 294px;
    padding: var(--space-5) var(--space-4);
    background: var(--background-footer, var(--bg-2));
    border-radius: var(--footer-radius, 0);
    border-image: var(--footer-bleed, none);
    contain: layout style;
}

.site-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.site-footer-top {
    margin-bottom: 28px;
}

.site-footer-logo {
    display: inline-block;
    width: 120px;
    height: 40px;
}

.site-footer-logo img {
    display: block;
    width: 120px;
    height: 40px;
    object-fit: contain;
}

.site-footer-description {
    margin: 0;
    color: var(--text-footer-secondary, var(--neutral-300));
    font-size: var(--text-body-2);
    line-height: 1.5;
}

.site-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.site-footer-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.site-footer-link,
.site-footer-theme-button {
    color: var(--text-white, var(--white-0));
    font-family: inherit;
    font-size: var(--text-h5);
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.site-footer-theme-section {
    display: contents;
}

.site-footer-theme {
    position: relative;
}

.site-footer-theme-button {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.site-footer-theme-menu {
    position: absolute;
    bottom: calc(100% + var(--space-2));
    right: 0;
    z-index: 10;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    padding: var(--space-1);
    background: var(--background-container, var(--panel));
    color: var(--text-primary, var(--text-prim));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.site-footer-theme-menu[hidden] {
    display: none;
}

.site-footer-theme-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 0;
    border-radius: var(--radius-3);
    background: none;
    color: inherit;
    font: inherit;
    font-size: var(--text-body-1);
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.site-footer-theme-item:hover,
.site-footer-theme-item:focus-visible {
    background: var(--surface-2, var(--panel-2));
}

.site-footer-theme-item-label {
    flex: 1;
}

.site-footer-theme-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.site-footer-theme-check {
    visibility: hidden;
}

.site-footer-theme-item[aria-checked='true'] .site-footer-theme-check {
    visibility: visible;
    color: var(--text-accent, var(--accent-d));
}

.site-footer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    gap: var(--space-5);
    height: 30px;
    flex-shrink: 0;
    margin-top: var(--space-6);
}

.site-footer-social-link {
    display: block;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.site-footer-social-link img {
    display: block;
    width: 30px;
    height: 30px;
}

.site-footer-threads {
    filter: invert(1);
}

@media (min-width: 768px) {
    .site-footer,
    .site-footer-root {
        min-height: 202px;
    }

    .site-footer-links {
        display: flex;
        gap: var(--space-10);
    }

    .site-footer-theme-section {
        display: flex;
        margin-left: auto;
    }

    .site-footer-socials {
        justify-content: flex-end;
        gap: 12px;
        margin-top: 0;
    }

    .site-footer-link,
    .site-footer-theme-button {
        transition: color 0.2s ease;
    }

    .site-footer-link:hover,
    .site-footer-theme-button:hover {
        color: var(--text-footer-secondary, var(--neutral-300));
    }

    .site-footer-social-link {
        transition:
            transform 0.2s ease,
            opacity 0.2s ease;
    }

    .site-footer-social-link:hover {
        transform: scale(1.1);
        opacity: 0.9;
    }
}
