/* 全站页脚：与顶栏共用 layout 变量（定义于 navbar.css） */
body.has-site-footer {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 正文包一层，避免 portal-wrap / container 等直接成为 body 的 flex 子项 */
.site-page-shell {
    flex: 1 0 auto;
    width: 100%;
}

.site-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 6;
    border-top: 1px solid var(--border, #ced4da);
    background: var(--bg-card, #ffffff);
    color: var(--text-muted, #5c636a);
    font-size: 12px;
    line-height: 1.35;
}

.site-footer-inner {
    max-width: var(--layout-max-width, 1600px);
    margin-left: auto;
    margin-right: auto;
    padding: 8px var(--layout-padding-x, 32px);
    text-align: center;
}

.site-footer-affiliation {
    margin: 0;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 12px;
    line-height: 1.35;
    color: inherit;
}

.site-footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.2rem 0.45rem;
    margin: 0.25rem 0 0;
    font-size: 11px;
    line-height: 1.35;
    color: inherit;
}

.site-footer-copy {
    white-space: nowrap;
}

.site-footer-sep {
    color: var(--border, #ced4da);
    user-select: none;
}

.site-footer a {
    color: var(--accent, #0d47a1);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

body.docs-layout .site-footer {
    border-top-color: var(--docs-border, #e5e7eb);
    background: var(--docs-content-bg, #ffffff);
    color: var(--docs-text-muted, #6b7280);
}

body.docs-layout .site-footer a {
    color: var(--docs-accent, #2563eb);
}

body.docs-layout .site-footer-sep {
    color: var(--docs-border, #e5e7eb);
}

@media print {
    .site-footer {
        display: none !important;
    }
}
