:root {
    --bg: #ffffff;
    --soft: #f8fafc;
    --soft-2: #f1f5f9;
    --text: #374151;
    --heading: #111827;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }

.container { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 999;
    background: #fff;
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 6px;
}
.skip-link:focus { left: 16px; }

.btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: all .2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border-color: #bfdbfe; }
.btn-outline:hover { background: #eff6ff; }
.btn-consult {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #fff;
    box-shadow: 0 4px 12px rgba(234, 88, 12, .2);
}
.btn-consult:hover { background: linear-gradient(135deg, #ea580c, #c2410c); color: #fff; }

.topbar {
    background: var(--heading);
    color: #cbd5e1;
    font-size: 13px;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.main-header { border-bottom: 1px solid var(--border); background: #fff; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--heading); font-size: 18px; }
.brand:hover { color: var(--heading); }
.brand-logo { width: 36px; height: 36px; object-fit: contain; display: block; }
.brand-text em {
    font-style: normal; font-weight: 600; color: var(--primary);
    font-size: 11px; letter-spacing: .04em; margin-left: 4px;
}
.main-nav { display: flex; gap: 26px; font-size: 15px; color: var(--text); }
.main-nav a { padding: 22px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }

.hero { background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%); border-bottom: 1px solid var(--border); }
.hero-inner { padding: 76px 0 64px; max-width: 820px; }
.hero-badge {
    display: inline-block; color: var(--primary); font-size: 13px; font-weight: 700;
    letter-spacing: .12em; background: #eff6ff; border: 1px solid #dbeafe;
    padding: 4px 12px; border-radius: 999px;
}
.hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.25; color: var(--heading); margin: 20px 0 14px; letter-spacing: -.02em; }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 28px; }
.hero-search { display: flex; gap: 10px; max-width: 620px; }
.hero-search input {
    flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 15px; outline: none;
}
.hero-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.hero-search button { padding: 12px 24px; }

.section { padding: 52px 0 80px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-head h2 { font-size: 28px; color: var(--heading); margin: 0; }
.section-subtitle { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.text-link { color: var(--primary); font-size: 14px; font-weight: 600; }

.category-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 30px; }
.tab {
    padding: 7px 16px; border-radius: 999px; background: var(--soft);
    border: 1px solid var(--border); font-size: 14px; color: var(--text);
}
.tab:hover { border-color: #bfdbfe; color: var(--primary); }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.article-card {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    padding: 24px; display: flex; flex-direction: column; min-height: 240px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #bfdbfe; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge {
    display: inline-block; background: #eff6ff; color: var(--primary);
    border: 1px solid #dbeafe; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}
.badge-lg { font-size: 13px; padding: 4px 12px; }
.card-date { color: var(--muted); font-size: 12px; }
.article-card h3 { font-size: 19px; line-height: 1.5; margin: 16px 0 10px; color: var(--heading); }
.article-card h3 a:hover { color: var(--primary); }
.card-summary { color: var(--muted); font-size: 14px; line-height: 1.75; margin: 0 0 18px; flex: 1; }
.card-more { color: var(--primary); font-size: 13px; font-weight: 600; }

.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed var(--border); border-radius: 12px; }

.pager { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 36px; }
.pager a, .pager .pager-disabled {
    min-width: 36px; padding: 7px 11px; border: 1px solid var(--border);
    border-radius: 8px; background: #fff; font-size: 14px; text-align: center;
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager a.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .pager-disabled { color: #9ca3af; background: var(--soft); cursor: default; }
.pager-info { margin-left: 12px; color: var(--muted); font-size: 13px; }
.empty-icon { font-size: 36px; }
.empty-state h3 { color: var(--heading); margin: 10px 0 6px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

.breadcrumb { padding: 24px 0 8px; font-size: 13px; color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

.article-page { padding-bottom: 80px; }
.article-layout {
    display: grid; grid-template-columns: minmax(0, 800px) 280px;
    gap: 56px; align-items: start; margin-top: 20px;
}
.article-head { padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.article-head h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.32; color: var(--heading); margin: 18px 0 16px; }
.article-lead {
    font-size: 18px; line-height: 1.85; color: #4b5563;
    border-left: 4px solid var(--primary); background: var(--soft);
    padding: 12px 18px; border-radius: 0 8px 8px 0; margin: 0 0 18px;
}
.article-meta { color: var(--muted); font-size: 13px; }
.article-meta .dot { margin: 0 8px; }

.article-content { font-size: 16px; line-height: 1.9; color: var(--text); word-wrap: break-word; }
.article-content h2 {
    font-size: 26px; line-height: 1.4; color: var(--heading); font-weight: 700;
    margin: 48px 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.article-content h3 { font-size: 20px; color: var(--heading); margin: 32px 0 12px; }
.article-content p { margin: 0 0 20px; }
.article-content strong { color: var(--heading); }
.article-content a { color: var(--primary); text-decoration: underline; }
.article-content ul, .article-content ol { padding-left: 24px; margin: 0 0 22px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
    margin: 28px 0; padding: 14px 20px; background: var(--soft);
    border-left: 4px solid var(--primary); border-radius: 6px; color: #1f2937; font-weight: 500;
}
.article-content blockquote p { margin: 0; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; }
.article-content hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.article-content code { background: var(--soft-2); padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article-content pre { background: var(--heading); color: #e5e7eb; padding: 18px; border-radius: 8px; overflow-x: auto; }
.article-content pre code { background: none; padding: 0; color: inherit; }
.article-content table { width: 100%; border-collapse: collapse; margin: 24px 0 32px; font-size: 15px; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.article-content th { background: var(--soft); color: var(--heading); }
.article-content tr:nth-child(even) td { background: #fcfcfd; }

.article-cta {
    margin: 56px 0 0; padding: 28px; border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #ffffff); border: 1px solid #bfdbfe;
}
.article-cta h3 { color: var(--heading); font-size: 22px; margin: 0 0 8px; }
.article-cta p { color: var(--muted); margin: 0 0 18px; }

.sidebar { position: sticky; top: 92px; }
.sidebar-card { border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; background: #fff; }
.sidebar-card h3 { font-size: 16px; color: var(--heading); margin: 0 0 14px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 8px; font-size: 14px; }
.toc li.toc-sub { padding-left: 14px; }
.toc a { color: var(--text); }
.toc a:hover { color: var(--primary); }
.toc-empty, .muted { color: var(--muted); font-size: 14px; }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 1.5; }
.related-list li:last-child { border-bottom: 0; }
.consult-card { background: var(--soft); }
.consult-card p { font-size: 14px; color: var(--muted); margin: 0 0 14px; }

footer { background: var(--heading); color: #9ca3af; padding: 44px 0 20px; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.footer-inner p { margin: 0; }
.footer-contact { max-width: 720px; }
.footer-contact p { margin: 3px 0; line-height: 1.7; font-size: 13px; color: #cbd5e1; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a:hover { color: #fff; }
.footer-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    margin-top: 32px; padding: 20px 24px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, .14), rgba(234, 88, 12, .08));
    border: 1px solid rgba(245, 158, 11, .35);
}
.footer-cta strong { display: block; color: #fff; font-size: 17px; }
.footer-cta span { color: #cbd5e1; font-size: 14px; }

@media (max-width: 960px) {
    .article-layout { grid-template-columns: 1fr; gap: 32px; }
    .sidebar { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
    .sidebar-card { margin-bottom: 0; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 28px, 1160px); }
    .header-inner { height: auto; flex-wrap: wrap; gap: 12px; padding: 12px 0; }
    .main-nav { gap: 16px; order: 3; width: 100%; font-size: 14px; }
    .main-nav a { padding: 6px 0; }
    .header-actions { margin-left: 0; gap: 10px; }
    .btn-consult { padding: 8px 14px; }
    .hero-inner { padding: 48px 0 40px; }
    .hero-search { flex-direction: column; }
    .section { padding: 36px 0 56px; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .article-head h1 { font-size: 26px; }
    .article-lead { font-size: 16px; }
    .article-content h2 { font-size: 22px; }
    .article-cta { padding: 20px; }
}
