/* 英文基础页和内容页共用页脚；页面只提供主题变量，结构由 templates/footer.html 生成。 */
.site-footer {
    --footer-text: var(--content-text, var(--text, #1d1d1f));
    --footer-muted: var(
        --content-text-muted,
        var(--text-soft, var(--header-text-soft, var(--sub-text, rgba(29, 29, 31, 0.62))))
    );
    --footer-soft: var(
        --content-text-soft,
        var(--text-soft, var(--header-text-soft, rgba(29, 29, 31, 0.72)))
    );
    --footer-line: var(
        --content-line,
        var(--line, var(--card-border, rgba(0, 0, 0, 0.08)))
    );
    --footer-line-strong: var(
        --content-line-strong,
        var(--line-strong, var(--card-border, rgba(0, 0, 0, 0.14)))
    );
    --footer-width: var(--content-page-width, var(--page-width, 1160px));
    margin-top: 3.5rem;
    padding: 0 var(--content-gutter, 0);
    color: var(--footer-muted);
    font-size: 0.75rem;
    line-height: 1.5;
    text-align: left;
}

.site-footer a {
    text-decoration: none;
}

.site-footer__inner {
    width: min(100%, var(--footer-width));
    margin: 0 auto;
    padding: 3rem 0 0;
    border-top: 1px solid var(--footer-line);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr);
    gap: clamp(2rem, 7vw, 6rem);
}

.site-footer__brand {
    max-width: 15rem;
}

.site-footer__brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--footer-text);
}

.site-footer__brand-mark {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border: 1px solid var(--footer-line-strong);
    border-radius: 0.5rem;
}

.site-footer__brand-wordmark {
    width: 3.3rem;
    height: auto;
    filter: none;
}

.site-footer--home .site-footer__brand-wordmark {
    filter: brightness(0) invert(1);
}

.site-footer__brand p {
    max-width: 15rem;
    margin: 0.9rem 0 1.25rem;
    color: var(--footer-muted);
}

.site-footer__social {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--footer-soft);
}

.site-footer__social-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-footer__social--icon {
    width: 1rem;
    height: 1rem;
    gap: 0;
}

.site-footer__social-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.7;
}

.site-footer__social-icon--threads,
.site-footer__social-icon--instagram {
    filter: none;
}

.site-footer--home .site-footer__social-icon--threads,
.site-footer--home .site-footer__social-icon--instagram {
    filter: invert(1);
}

.site-footer__social-icon--x {
    filter: invert(1);
}

.site-footer--home .site-footer__social-icon--x {
    filter: none;
}

.site-footer__social:hover,
.site-footer__social:focus-visible,
.site-footer__bottom a:hover,
.site-footer__bottom a:focus-visible {
    color: var(--footer-text);
}

.site-footer__links {
    min-width: 0;
}

.site-footer__links > nav {
    min-width: 0;
}

.site-footer__links .footer-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(calc(8rem + 10px), 1fr));
    align-items: start;
    gap: 2rem 2rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer__links .footer-column {
    min-width: 0;
    list-style: none;
}

.site-footer__links .footer-column h2 {
    margin: 0;
    color: #374151;
    font-family: "JetBrains Mono", "SFMono-Regular", "SF Mono", monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
}

.site-footer__links .footer-column h2 .footer-column__heading-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 1.35rem;
    color: inherit;
    text-decoration: none;
}

.site-footer__links .footer-column__heading-arrow {
    position: relative;
    top: -1px;
    color: inherit;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    letter-spacing: normal;
    line-height: 1;
    transition: transform 160ms ease;
}

.site-footer__links .footer-column h2 .footer-column__heading-link:hover .footer-column__heading-arrow,
.site-footer__links .footer-column h2 .footer-column__heading-link:focus-visible .footer-column__heading-arrow {
    transform: translateX(3px);
}

.site-footer--home .site-footer__links .footer-column h2 {
    color: #ffffff;
}

.site-footer__links .footer-column ul {
    display: grid;
    gap: 0.3rem;
    padding: 0.55rem 0 0;
    margin: 0;
    list-style: none;
}

.site-footer__links .footer-column a {
    display: inline-flex;
    min-height: 1.35rem;
    color: var(--footer-muted);
    font-size: 0.75rem;
}

.site-footer__links .footer-column a:hover,
.site-footer__links .footer-column a:focus-visible,
.site-footer__links .footer-column a.is-active {
    color: var(--footer-text);
}

.site-footer__links .footer-column a.is-active,
.site-footer__bottom a.is-active {
    font-weight: 600;
}

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding: 1.725rem 0;
    border-top: 1px solid var(--footer-line);
}

.site-footer__bottom-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.8rem 26px;
}

.site-footer__bottom a {
    color: var(--footer-muted);
}

.site-footer__badges {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.site-footer__badges a {
    display: inline-flex;
    align-items: center;
}

.site-footer__badges img {
    display: block;
    max-width: 100%;
    width: auto;
    height: 28px;
}

.site-footer:not(.site-footer--home) .site-footer__brand-mark {
    border-color: transparent;
}

/* 法律页面保留正文主题，页脚沿用公共布局并补齐页面边距。 */
.legal-page .site-footer {
    --footer-text: var(--text-color);
    --footer-muted: var(--sub-text);
    --footer-soft: var(--sub-text);
    padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.legal-page .site-footer__links .footer-column h2 {
    color: var(--footer-text);
}

@media (prefers-color-scheme: dark) {
    .legal-page .site-footer__brand-wordmark {
        filter: brightness(0) invert(1);
    }

    .legal-page .site-footer__social-icon--threads,
    .legal-page .site-footer__social-icon--instagram {
        filter: invert(1);
    }

    .legal-page .site-footer__social-icon--x {
        filter: none;
    }
}

@media (max-width: 1000px) {
    .site-footer__links .footer-columns {
        grid-template-columns: repeat(3, minmax(calc(7rem + 10px), 1fr));
    }
}

@media (max-width: 760px) {
    .site-footer {
        margin-top: 3rem;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .site-footer__links .footer-columns {
        grid-template-columns: repeat(2, minmax(calc(7rem + 10px), 1fr));
    }

    .site-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .site-footer__links .footer-columns {
        grid-template-columns: 1fr;
        gap: 1.75rem 1rem;
    }
}
