/* 手机端主导航条：纯 CSS，不依赖 Tailwind/JS（资讯首页由 news_list_template 生成时请保留对应 HTML） */
@media (min-width: 768px) {
    #site-mobile-nav-html { display: none !important; }

    /* 桌面端顶部菜单：不依赖 Tailwind CDN（Chrome 下 cdn.tailwindcss.com 偶发不生成 md:flex） */
    nav[data-nav="main"] {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        flex-shrink: 0;
        font-size: 15px;
        font-weight: 500;
        color: #4b5563;
    }
    nav[data-nav="main"] a {
        position: relative;
        white-space: nowrap;
        text-decoration: none;
        color: inherit;
        transition: color 0.15s;
    }
    nav[data-nav="main"] a:hover {
        color: #2563eb;
    }
    nav[data-nav="main"] a.is-active {
        color: #2563eb;
        font-weight: 600;
    }
    nav[data-nav="main"] a.is-active span,
    nav[data-nav="main"] a:hover span {
        transform: scaleX(1);
    }
    nav[data-nav="main"] a span {
        position: absolute;
        bottom: -22px;
        left: 0;
        width: 100%;
        height: 2px;
        background: #2563eb;
        transform: scaleX(0);
        transition: transform 0.15s;
    }
    nav[data-nav="main"] a.is-active span {
        transform: scaleX(1);
    }

    #auth-status {
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
        margin-left: 0;
    }
    #site-header-mobile-slot {
        display: none !important;
    }
}
@media (max-width: 767.98px) {
    nav[data-nav="main"] {
        display: none !important;
    }
    #auth-status {
        display: none !important;
    }
}
#site-mobile-nav-html {
    border-top: 1px solid #f3f4f6;
    background: #fff;
}
#site-mobile-nav-html .site-mnav-row {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
#site-mobile-nav-html a {
    flex-shrink: 0;
    white-space: nowrap;
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    color: #4b5563;
}
#site-mobile-nav-html a.site-mnav-active {
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

#tb-header-utils {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 12px;
}

#tb-site-stats {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

#tb-site-stats .tb-stats-num {
    font-weight: 600;
    color: #374151;
    font-variant-numeric: tabular-nums;
}

#tb-site-stats .tb-stats-sep {
    width: 1px;
    height: 12px;
    background: #e5e7eb;
    flex-shrink: 0;
}

#tb-lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: 0;
    font-size: 13px;
}

.tb-lang-btn {
    border: none;
    background: none;
    padding: 4px 6px;
    cursor: pointer;
    color: #6b7280;
    font-weight: 500;
    border-radius: 4px;
}

.tb-lang-btn:hover {
    color: #2563eb;
}

.tb-lang-btn.is-active {
    color: #2563eb;
    font-weight: 600;
}

.tb-lang-sep {
    color: #d1d5db;
    font-size: 12px;
    user-select: none;
}

@media (max-width: 767.98px) {
    #tb-header-utils {
        margin-right: 4px;
    }
}

/* ICP filing footer (injected by common_ui.js) */
.site-icp-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 8px 12px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #9ca3af;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
}

.site-icp-footer a {
    color: #6b7280;
    text-decoration: none;
}

.site-icp-footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}
