/* === toukenai.cn 首页样式 (extracted from index_cn.html) === */
/* Generated: 2026-06-12 */

    /* === 2026-06-07 模板视觉: 青蓝主题 === */
    :root {
        --primary: #1A9B8A;
        --primary-dark: #0D3B5C;
        --primary-light: #2ABBA8;
        --primary-gradient: linear-gradient(135deg, #1A9B8A 0%, #0D3B5C 100%);
        --primary-gradient-soft: linear-gradient(135deg, rgba(26,155,138,0.1) 0%, rgba(13,59,92,0.1) 100%);
        --bg-light: #f0f4f8;
        --bg-white: #ffffff;
        --text-dark: #1a202c;
        --text-gray: #4a5568;
        --text-light: #718096;
        --border: #e2e8f0;
        --shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
        --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
        --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.12), 0 10px 10px -5px rgba(0,0,0,0.05);
        --radius: 12px;
        --bg-card: #ffffff;
        --bg-primary: #f0f4f8;
        --text-primary: #1a202c;
    }
    /* === 暗模式 (青蓝适配) === */
    @media (prefers-color-scheme: dark) {
        :root {
            --bg-light: #0f172a;
            --bg-white: #1e293b;
            --text-dark: #f1f5f9;
            --text-gray: #cbd5e1;
            --text-light: #94a3b8;
            --border: #334155;
            --shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.2);
            --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
            --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.5);
        }
        .hero { background: linear-gradient(135deg, #0a3a47 0%, #0a1e2e 100%); }
        .cta-section { background: linear-gradient(135deg, #0a3a47 0%, #0a1e2e 100%); }
    }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body {
        font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
        line-height: 1.6;
        color: var(--text-dark);
        background: var(--bg-light);
    }
    /* a11y: skip-link */
    .skip-link {
        position: absolute;
        top: -40px;
        left: 0;
        background: var(--primary);
        color: white;
        padding: 0.75rem 1.5rem;
        z-index: 9999;
        text-decoration: none;
        font-weight: 600;
        border-radius: 0 0 8px 0;
        transition: top 0.2s;
    }
    .skip-link:focus { top: 0; }
    /* === Header === */
    header {
        background: var(--bg-white);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: var(--shadow);
    }
    .header-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 2rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 64px;
    }
    .logo {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-decoration: none;
        color: var(--text-dark);
    }
    .logo-icon {
        width: 40px;
        height: 40px;
        background: var(--primary-gradient);
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 700;
        font-size: 1rem;
        box-shadow: 0 2px 8px rgba(26,155,138,0.3);
    }
    .logo-text {
        font-size: 1.25rem;
        font-weight: 700;
        line-height: 1.2;
    }
    .logo-text small {
        display: block;
        font-size: 0.7rem;
        color: var(--primary);
        font-weight: 500;
    }
    .nav-links {
        display: flex;
        gap: 1.75rem;
        list-style: none;
        align-items: center;
    }
    .nav-links a {
        text-decoration: none;
        color: var(--text-gray);
        font-weight: 500;
        font-size: 0.95rem;
        transition: color 0.2s;
        padding: 0.5rem 0;
        border-bottom: 2px solid transparent;
    }
    .nav-links a:hover, .nav-links a.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
    }
    .nav-links .nav-external {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        background: var(--primary-gradient-soft);
        border-radius: 6px;
        color: var(--primary);
        border: 1px solid rgba(26,155,138,0.3);
    }
    .nav-links .nav-external:hover {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    .search-box {
        position: relative;
    }
    .search-box input {
        width: 240px;
        padding: 0.5rem 1rem 0.5rem 2.5rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-size: 0.9rem;
        background: var(--bg-light);
        color: var(--text-dark);
        transition: all 0.2s;
    }
    .search-box input:focus {
        outline: none;
        border-color: var(--primary);
        background: var(--bg-white);
        width: 300px;
        box-shadow: 0 0 0 3px rgba(26,155,138,0.1);
    }
    .search-box::before {
        content: "🔍";
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.9rem;
        pointer-events: none;
    }
    .btn {
        padding: 0.5rem 1rem;
        border-radius: 6px;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s;
        font-size: 0.9rem;
        border: none;
        cursor: pointer;
    }
    .btn-primary {
        background: var(--primary-gradient);
        color: white;
    }
    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(26,155,138,0.4);
    }
    /* === Hero === */
    .hero {
        background: var(--primary-gradient);
        color: white;
        padding: 4rem 2rem;
        position: relative;
        overflow: hidden;
    }
    .hero::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        opacity: 0.5;
    }
    .hero-container {
        max-width: 1400px;
        margin: 0 auto;
        position: relative;
        z-index: 1;
    }
    .hero-content {
        text-align: center;
        max-width: 800px;
        margin: 0 auto;
    }
    .hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(10px);
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    .hero h1 {
        font-size: 3rem;
        font-weight: 800;
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    .hero p {
        font-size: 1.2rem;
        opacity: 0.9;
        margin-bottom: 2rem;
    }
    .hero-stats {
        display: flex;
        justify-content: center;
        gap: 3rem;
        margin-top: 2rem;
    }
    .hero-stat-number {
        font-size: 2.5rem;
        font-weight: 700;
        line-height: 1;
    }
    .hero-stat-label {
        font-size: 0.9rem;
        opacity: 0.8;
        margin-top: 0.25rem;
    }
    /* === Main === */
    .main-content {
        max-width: 1400px;
        margin: 0 auto;
        padding: 3rem 2rem;
    }
    .section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.5rem;
    }
    .section-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-dark);
    }
    .section-link {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.9rem;
    }
    .section-link:hover { text-decoration: underline; }
    /* === Categories === */
    .categories-section { margin-bottom: 4rem; }
    .categories-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }
    .category-card {
        background: var(--bg-white);
        border-radius: 14px;
        padding: 1.5rem;
        box-shadow: var(--shadow);
        transition: all 0.3s;
        cursor: pointer;
        border: 2px solid transparent;
        text-decoration: none;
        color: var(--text-dark);
        display: block;
    }
    .category-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
        border-color: var(--primary);
    }
    .category-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    .category-card:nth-child(1) .category-icon { background: #e6f7ff; }
    .category-card:nth-child(2) .category-icon { background: #f6ffed; }
    .category-card:nth-child(3) .category-icon { background: #fff7e6; }
    .category-card:nth-child(4) .category-icon { background: #f9f0ff; }
    .category-card:nth-child(5) .category-icon { background: #fff1f0; }
    .category-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    .category-card p {
        font-size: 0.85rem;
        color: var(--text-light);
        margin-bottom: 0.75rem;
    }
    .category-count {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        background: var(--bg-light);
        padding: 0.25rem 0.75rem;
        border-radius: 14px;
        font-size: 0.8rem;
        color: var(--primary);
        font-weight: 600;
    }
    /* === Featured Articles === */
    .featured-section { margin-bottom: 4rem; }
    .articles-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    .article-card {
        background: var(--bg-white);
        border-radius: 14px;
        overflow: hidden;
        box-shadow: var(--shadow);
        transition: all 0.3s;
        border: 1px solid var(--border);
        text-decoration: none;
        color: var(--text-dark);
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    /* 嵌套的 <a> 撑满 <article> (grid item) */
    .article-card > .article-card {
        flex: 1;
    }
    .article-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
    }
    .article-card:focus {
        outline: none;
    }
    .article-card:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }
    .article-header {
        padding: 1.25rem;
    }
    .article-tag {
        display: inline-block;
        background: var(--primary-gradient);
        color: white;
        padding: 0.25rem 0.75rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }
    .article-card h3 {
        font-size: 1.05rem;
        line-height: 1.4;
    }
    .article-body {
        padding: 1.25rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .article-desc {
        font-size: 0.88rem;
        color: var(--text-gray);
        line-height: 1.6;
        margin-bottom: 1rem;
        flex: 1;
    }
    .article-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 0.8rem;
        color: var(--text-light);
        margin-top: auto;
        padding-top: 0.75rem;
    }
    .article-author {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .author-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: var(--primary-gradient);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 0.7rem;
        font-weight: 600;
    }
    /* === Latest + Sidebar === */
    .latest-section {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }
    .articles-list {
        background: var(--bg-white);
        border-radius: 14px;
        box-shadow: var(--shadow);
        overflow: hidden;
    }
    .list-header {
        padding: 1.25rem;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .list-header h3 {
        font-size: 1.1rem;
        color: var(--text-dark);
    }
    .article-item {
        padding: 1.25rem;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        transition: background 0.2s;
        cursor: pointer;
        text-decoration: none;
        color: var(--text-dark);
    }
    .article-item:hover {
        background: var(--bg-light);
    }
    .article-item:last-child {
        border-bottom: none;
    }
    .article-number {
        width: 32px;
        height: 32px;
        background: var(--bg-light);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        color: var(--primary);
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    .article-item:nth-child(2) .article-number { background: #fff7e6; color: #fa8c16; }
    .article-item:nth-child(3) .article-number { background: #f6ffed; color: #52c41a; }
    .article-item:nth-child(4) .article-number { background: #e6f7ff; color: #1890ff; }
    .article-item:nth-child(5) .article-number { background: #f9f0ff; color: #722ed1; }
    .article-content h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    .article-content p {
        font-size: 0.85rem;
        color: var(--text-light);
    }
    /* === Sidebar === */
    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    .sidebar-card {
        background: var(--bg-white);
        border-radius: 14px;
        padding: 1.5rem;
        box-shadow: var(--shadow);
    }
    .sidebar-card h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
        color: var(--text-dark);
    }
    .hot-tag {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: var(--bg-light);
        padding: 0.5rem 0.75rem;
        border-radius: 6px;
        font-size: 0.85rem;
        color: var(--text-gray);
        margin: 0.25rem;
        transition: all 0.2s;
        cursor: pointer;
        text-decoration: none;
    }
    .hot-tag:hover {
        background: var(--primary);
        color: white;
    }
    .hot-tag .count {
        background: var(--primary);
        color: white;
        padding: 0.1rem 0.4rem;
        border-radius: 14px;
        font-size: 0.7rem;
    }
    .hot-tag:hover .count {
        background: white;
        color: var(--primary);
    }
    .quick-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
        text-decoration: none;
        color: var(--text-gray);
        font-size: 0.9rem;
        transition: color 0.2s;
    }
    .quick-link:last-child { border-bottom: none; }
    .quick-link:hover { color: var(--primary); }
    .quick-link-icon {
        width: 32px;
        height: 32px;
        background: var(--bg-light);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }
    /* === CTA === */
    .cta-section {
        background: var(--primary-gradient);
        border-radius: 16px;
        padding: 3rem;
        text-align: center;
        color: white;
        margin-top: 3rem;
        position: relative;
        overflow: hidden;
    }
    .cta-section h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    .cta-section p {
        opacity: 0.9;
        margin-bottom: 1.5rem;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        white-space: nowrap;
        font-size: 0.95rem;
    }
    @media (max-width: 768px) {
        .cta-section p { white-space: normal; font-size: 0.95rem; }
    }
    .cta-buttons {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    .btn-white {
        background: white;
        color: var(--primary-dark);
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.2s;
    }
    .btn-white:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    .btn-outline {
        background: transparent;
        color: white;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: 600;
        text-decoration: none;
        border: 2px solid rgba(255,255,255,0.5);
        transition: all 0.2s;
    }
    .btn-outline:hover {
        background: rgba(255,255,255,0.1);
        border-color: white;
    }
    /* === Footer === */
    footer {
        background: var(--text-dark);
        color: white;
        padding: 3rem 2rem 2rem;
        margin-top: 4rem;
    }
    .footer-container {
        max-width: 1400px;
        margin: 0 auto;
    }
    .footer-content {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 3rem;
        margin-bottom: 2rem;
    }
    .footer-brand .logo-text { color: white; }
    .footer-brand p {
        color: rgba(255,255,255,0.7);
        margin-top: 1rem;
        font-size: 0.9rem;
        line-height: 1.7;
    }
    .footer-links h4 {
        color: white;
        margin-bottom: 1rem;
        font-size: 1rem;
    }
    .footer-links ul { list-style: none; }
    .footer-links li { margin-bottom: 0.5rem; }
    .footer-links a {
        color: rgba(255,255,255,0.7);
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.2s;
    }
    .footer-links a:hover { color: var(--primary-light); }
    .footer-bottom {
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 2rem;
        text-align: center;
        color: rgba(255,255,255,0.5);
        font-size: 0.85rem;
    }
    /* === Responsive === */
    @media (max-width: 1200px) {
        .categories-grid { grid-template-columns: repeat(3, 1fr); }
        .articles-grid { grid-template-columns: repeat(2, 1fr); }
        .latest-section { grid-template-columns: 1fr; }
    }
    @media (max-width: 768px) {
        .header-container { padding: 0 1rem; }
        .nav-links { display: none; }
        .search-box input { width: 150px; }
        .search-box input:focus { width: 180px; }
        .hero h1 { font-size: 2rem; }
        .hero p { font-size: 1rem; }
        .hero-stats { flex-direction: column; gap: 1rem; }
        .categories-grid { grid-template-columns: repeat(2, 1fr); }
        .articles-grid { grid-template-columns: 1fr; }
        .footer-content { grid-template-columns: 1fr 1fr; }
        .cta-buttons { flex-direction: column; }
        .main-content { padding: 2rem 1rem; }
    }
/* ===== 暗模式手动切换 (data-theme="dark") ===== */
:root[data-theme="dark"] {
    --primary: #2ABBA8;
    --primary-dark: #1A9B8A;
    --primary-light: #5DD5C5;
    --bg-light: #0a1428;
    --bg-white: #1a2942;
    --bg-card: #1e2f4f;
    --text-dark: #f1f5f9;
    --text-gray: #cbd5e1;
    --text-light: #94a3b8;
    --border: #2d3f5f;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 20px -3px rgba(0,0,0,0.5);
}
/* 暗模式主题切换按钮 */
.theme-toggle {
    background: rgba(26, 155, 138, 0.1);
    border: 1px solid rgba(26, 155, 138, 0.3);
    color: var(--primary);
    width: 40px; height: 40px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem;
    transition: all 0.2s;
    margin-left: 0.5rem;
}
.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
/* 暗模式下特殊适配 */
:root[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0a1428 0%, #1a2942 50%, #2ABBA8 100%);
}
:root[data-theme="dark"] .article-card,
:root[data-theme="dark"] .article-item,
:root[data-theme="dark"] .category-card,
:root[data-theme="dark"] .content-card,
:root[data-theme="dark"] .header-container,
:root[data-theme="dark"] .search-box input,
:root[data-theme="dark"] .quick-link {
    background-color: var(--bg-card);
    border-color: var(--border);
}
:root[data-theme="dark"] .hero-badge {
    background: rgba(42, 187, 168, 0.2);
    border-color: rgba(42, 187, 168, 0.4);
}
:root[data-theme="dark"] .hot-tag {
    background: rgba(42, 187, 168, 0.15);
    border-color: rgba(42, 187, 168, 0.3);
}
:root[data-theme="dark"] .stat-number,
:root[data-theme="dark"] .hero-stat-number {
    color: var(--primary);
}
/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px; height: 48px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(26, 155, 138, 0.4);
    display: none;
    align-items: center; justify-content: center;
    z-index: 999;
    transition: all 0.2s;
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 155, 138, 0.6);
}
.back-to-top.visible {
    display: flex;
}
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem; right: 1rem;
        width: 40px; height: 40px;
        font-size: 1.2rem;
    }
}

/* ===== 暗模式切换 toast ===== */
.theme-toast {
    position: fixed;
    top: 80px; right: 2rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    color: var(--text-dark);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.25s;
    pointer-events: none;
}
.theme-toast.show {
    opacity: 1;
    transform: translateX(0);
}
.theme-toast kbd {
    display: inline-block;
    background: rgba(26, 155, 138, 0.1);
    color: var(--primary);
    border: 1px solid rgba(26, 155, 138, 0.2);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    font-family: monospace;
    margin: 0 0.2rem;
}

/* ===== cat tabs 过滤 ===== */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.cat-tab {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
}
.cat-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(26, 155, 138, 0.05);
}
.cat-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}
.cat-tab .tab-count {
    background: rgba(255,255,255,0.25);
    border-radius: 14px;
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.cat-tab:not(.active) .tab-count {
    background: var(--bg-light);
    color: var(--text-light);
}
.all-articles-section {
    margin-bottom: 4rem;
}


    /* === Mobile hamburger menu (auto-generated) === */
    .menu-toggle{display:none;flex-direction:column;justify-content:center;align-items:center;width:40px;height:40px;background:none;border:none;cursor:pointer;padding:6px;z-index:200}
    .menu-toggle span{display:block;width:22px;height:2px;background:var(--text,#333);margin:3px 0;border-radius:2px;transition:all .3s ease}
    .menu-toggle.active span:nth-child(1){transform:rotate(45deg) translate(5px,5px)}
    .menu-toggle.active span:nth-child(2){opacity:0}
    .menu-toggle.active span:nth-child(3){transform:rotate(-45deg) translate(5px,-5px)}
    .mobile-overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:150}
    .mobile-overlay.active{display:block}
    .mobile-nav{display:none;position:fixed;top:0;right:-280px;width:280px;height:100%;background:var(--bg-white,#fff);z-index:160;transition:right .3s ease;overflow-y:auto;box-shadow:-2px 0 12px rgba(0,0,0,.15)}
    .mobile-nav.active{right:0}
    .mobile-nav-hd{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.25rem;border-bottom:1px solid var(--border,#e5e7eb)}
    .mobile-nav-hd span{font-weight:600;color:var(--primary,#1A9B8A);font-size:1rem}
    .mobile-nav-close{background:none;border:none;font-size:1.5rem;cursor:pointer;color:var(--text,#333);padding:4px;line-height:1}
    .mobile-nav-links{list-style:none;padding:.5rem 0;margin:0}
    .mobile-nav-links a{display:block;padding:.75rem 1.25rem;color:var(--text,#333);text-decoration:none;font-size:.95rem;border-bottom:1px solid var(--border,#f0f0f0);transition:background .2s}
    .mobile-nav-links a:hover{background:var(--bg-light,#f5f5f5)}
    .mobile-nav-links .mnav-ext{color:var(--primary,#1A9B8A)}
    @media(max-width:768px){.menu-toggle{display:flex}.header-actions{gap:.5rem}}


    /* === Cat-section article card styles === */
    .cat-section { display: none; padding: 1.5rem 0; }
    .cat-section.active { display: block; }
    .cat-articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
    .cat-articles-grid .article-card { display: block; text-decoration: none; color: inherit; padding: 1.25rem; border-radius: 14px; background: var(--bg-white, #fff); border: 1px solid var(--border, #e5e7eb); transition: transform .2s, box-shadow .2s; }
    .cat-articles-grid .article-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
    .art-header { margin-bottom: 0.5rem; }
    .art-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; background: var(--primary-gradient-soft); color: var(--primary); }
    .art-title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.5rem; color: var(--text, #1a1a2e); }
    .art-desc { font-size: 0.85rem; color: var(--text-muted, #6b7280); line-height: 1.5; margin-bottom: 0.5rem; }
    .art-meta { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--text-muted, #9ca3af); }


    /* === 移动端优化: 触摸/安全区/惯性滚动/精细断点 (2026-06-10) === */
    html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; touch-action: manipulation; }
    a, button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
    a, a.btn, .btn, button, input[type=" button\], input[type=\submit\] { min-height: 44px; min-width: 44px; }
 a { display: inline-flex; align-items: center; }
 input, textarea, select { font-size: 16px; -webkit-appearance: none; appearance: none; }
 img { max-width: 100%; height: auto; display: block; }
 .header { padding-top: env(safe-area-inset-top); }
 @media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
 }
 @media (max-width: 640px) {
 .hero h1 { font-size: 1.6rem; }
 .hero p { font-size: 0.95rem; }
 .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
 .articles-grid { grid-template-columns: 1fr; gap: 1rem; }
 .container { padding: 0 1rem; }
 .header-container { padding: 0 0.75rem; }
 }
 @media (max-width: 480px) {
 .hero h1 { font-size: 1.4rem; }
 .hero { padding: 1.5rem 0; }
 .search-box input { width: 130px; }
 .search-box input:focus { width: 150px; }
 }
\n
/* Fuse.js search dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-white, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 400px;
    overflow-y: auto;
    margin-top: 4px;
}
.search-results-dropdown .search-result-item {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    text-decoration: none;
    color: var(--text-dark, #1a202c);
    line-height: 1.4;
    transition: background 0.15s;
}
.search-results-dropdown .search-result-item:last-child {
    border-bottom: none;
}
.search-results-dropdown .search-result-item:hover {
    background: var(--bg-light, #f7fafc);
}
.search-results-dropdown .search-result-item strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.search-results-dropdown .search-cat, .search-results-dropdown .search-date {
    font-size: 0.8rem;
    color: var(--text-light, #718096);
    margin-right: 8px;
}
.search-results-dropdown .search-result-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-light, #718096);
}
[data-theme="dark"] .search-results-dropdown {
    background: var(--bg-dark, #1a202c);
    border-color: var(--border-dark, #2d3748);
}
[data-theme="dark"] .search-results-dropdown .search-result-item {
    color: var(--text-light, #e2e8f0);
    border-color: var(--border-dark, #2d3748);
}
[data-theme="dark"] .search-results-dropdown .search-result-item:hover {
    background: var(--bg-dark-hover, #2d3748);
}
