:root {
    --bg: #f6f6f6;
    --card: #ffffff;
    --ink: #16202a;
    --ink-2: #33424f;
    --muted: #6d7c88;
    --line: #e3eaee;
    --brand: #111827;
    --brand-dark: #000000;
    --brand-soft: #f0f2f4;
    --accent: #f2a33c;
    --shadow: 0 1px 2px rgba(11,18,32, .04), 0 8px 24px rgba(11,18,32, .06);
    --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3 { margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: -.2px; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(150%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; gap: 18px;
    height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: 0 0 auto; }
.brand:hover { color: var(--ink); }
.brand-mark {
    width: 36px; height: 36px; border-radius: 11px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #fff; font-weight: 700; font-size: 18px;
    box-shadow: 0 4px 12px rgba(31,41,55, .28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15.5px; }
.brand-text small { color: var(--muted); font-size: 11.5px; letter-spacing: .4px; }

.quick-search { position: relative; flex: 1 1 auto; max-width: 460px; display: flex; gap: 8px; }
.qs-field, .sb-field, .hs-field {
    position: relative; display: flex; align-items: center; gap: 8px;
    background: #f3f3f3; border: 1px solid var(--line); border-radius: 999px;
    padding: 0 14px; flex: 1 1 auto; transition: border-color .18s, background .18s;
}
.qs-field:focus-within, .sb-field:focus-within, .hs-field:focus-within {
    background: #fff; border-color: #cbd5e1; box-shadow: 0 0 0 4px rgba(31,41,55, .09);
}
.qs-field svg, .sb-field svg, .hs-field svg { width: 16px; height: 16px; fill: var(--muted); flex: 0 0 auto; }
.quick-search input, .search-bar input, .hero-search input {
    width: 100%; height: 38px; border: 0; background: transparent; outline: none;
    font-size: 14px; color: var(--ink); font-family: inherit;
}
.quick-search button, .search-bar button, .hero-search button {
    flex: 0 0 auto; height: 38px; padding: 0 20px; border: 0; border-radius: 999px;
    background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: background .18s, transform .12s;
}
.quick-search button:hover, .search-bar button:hover, .hero-search button:hover { background: var(--brand-dark); }
.quick-search button:active, .search-bar button:active, .hero-search button:active { transform: scale(.98); }

.top-nav { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.top-nav a {
    padding: 7px 12px; border-radius: 9px; color: var(--ink-2); font-size: 14px;
}
.top-nav a:hover { background: #f1f1f1; color: var(--brand-dark); }
.top-nav a.is-active { color: var(--brand-dark); font-weight: 600; }
.top-nav a.ghost { border: 1px solid var(--line); color: var(--muted); }
.top-nav a.ghost:hover { border-color: #cbd5e1; color: var(--brand-dark); background: #fff; }

.cat-strip {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; padding-top: 2px;
    scrollbar-width: none;
}
.cat-strip::-webkit-scrollbar { display: none; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
    background: #fff; color: var(--ink-2); font-size: 13px; transition: all .16s;
}
.chip:hover { border-color: #cbd5e1; color: var(--brand-dark); }
.chip.is-active { background: var(--brand-soft); border-color: #94a3b8; color: var(--brand-dark); font-weight: 600; }
.chip-count { font-size: 11px; color: var(--muted); background: #f0f0f0; border-radius: 8px; padding: 0 5px; }
.chip.is-active .chip-count { background: #fff; color: var(--brand-dark); }

/* ---------- flash ---------- */
.flash {
    margin-top: 14px; padding: 10px 16px; border-radius: 10px; font-size: 14px;
    border: 1px solid #cbd5e1; background: var(--brand-soft); color: var(--brand-dark);
}
.flash-error { border-color: #f3d2ce; background: #fdf0ef; color: #b3392b; }
.flash-warn { border-color: #f3e2c4; background: #fdf7ea; color: #8a5a12; }

/* ---------- hero ---------- */
.hero {
    margin: 26px 0 10px; padding: 38px 34px 26px;
    border-radius: 20px; color: #fff;
    background:
        radial-gradient(900px 260px at 12% -10%, rgba(255, 255, 255, .22), transparent 60%),
        linear-gradient(135deg, #1f2937 0%, #111827 48%, #111827 100%);
    box-shadow: 0 18px 40px rgba(17,24,39, .18);
}
.hero h1 { font-size: 29px; letter-spacing: -.4px; }
.hero-sub { margin-top: 10px; color: rgba(255, 255, 255, .86); font-size: 14.5px; max-width: 720px; }
.hero-search { margin-top: 20px; display: flex; gap: 10px; max-width: 720px; position: relative; }
.hero-search .hs-field { background: #fff; border-color: transparent; height: 50px; border-radius: 999px; }
.hero-search .hs-field svg { width: 18px; height: 18px; }
.hero-search input { height: 48px; font-size: 15px; }
.hero-search button { height: 50px; padding: 0 28px; background: #111827; }
.hero-search button:hover { background: #0b1220; }

.hero-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; }
.hero-tags span { color: rgba(255, 255, 255, .7); }
.hero-tags a {
    padding: 4px 11px; border-radius: 999px; color: #fff;
    background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .25);
}
.hero-tags a:hover { background: rgba(255, 255, 255, .28); color: #fff; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.hero-stats .stat {
    background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column;
}
.hero-stats b { font-size: 22px; line-height: 1.2; }
.hero-stats span { font-size: 12.5px; color: rgba(255, 255, 255, .78); }

/* ---------- sections ---------- */
.section { margin: 26px 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 18px; }
.section-head p { color: var(--muted); font-size: 13px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cat-card {
    display: flex; align-items: center; gap: 10px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow);
    transition: transform .16s, border-color .16s;
}
.cat-card:hover { transform: translateY(-2px); border-color: #cbd5e1; color: var(--ink); }
.cat-name { font-weight: 600; }
.cat-count { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.cat-arrow { color: var(--brand); font-weight: 700; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.qa-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.qa-list li { padding: 13px 18px; border-bottom: 1px solid #f2f2f2; }
.qa-list li:last-child { border-bottom: 0; }
.qa-list a { color: var(--ink); font-size: 14.5px; font-weight: 500; }
.qa-list a:hover { color: var(--brand-dark); }
.qa-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.qa-excerpt { color: var(--muted); font-size: 13px; margin-top: 3px; }
.empty-tip { color: var(--muted); font-size: 13.5px; }

.tag {
    display: inline-block; padding: 1px 8px; border-radius: 7px; font-size: 11.5px;
    background: var(--brand-soft); color: var(--brand-dark); font-weight: 600;
}
.tag-soft { background: #eef2f5; color: var(--ink-2); font-weight: 500; }
.muted { color: var(--muted); }

.index-note p { color: var(--muted); font-size: 12.5px; text-align: center; }

/* ---------- search ---------- */
.search-head { margin: 24px 0 12px; }
.search-bar { display: flex; gap: 10px; position: relative; }
.sb-field { height: 46px; }
.search-bar input { height: 44px; font-size: 15px; }
.search-bar button { height: 46px; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.filter-label { font-size: 13px; color: var(--muted); }

.result-meta { margin: 6px 0 14px; color: var(--ink-2); font-size: 14px; }
.result-meta .muted { margin-left: 10px; font-size: 12.5px; }
.result-list { display: flex; flex-direction: column; gap: 12px; }
.result-item {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 20px; box-shadow: var(--shadow);
}
.result-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.result-title:hover { color: var(--brand-dark); }
.result-snippet { margin-top: 6px; color: var(--ink-2); font-size: 13.8px; }
.result-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; }

mark { background: #fff1c9; color: #8a5a12; padding: 0 2px; border-radius: 3px; font-weight: 700; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 24px 0 8px; font-size: 13.5px; color: var(--muted); }
.pager a { padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); }
.pager a:hover { border-color: #cbd5e1; color: var(--brand-dark); }

.empty-block {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 40px 30px; text-align: center; box-shadow: var(--shadow);
}
.empty-block h1, .empty-block h2 { font-size: 19px; }
.empty-block p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.empty-block .hero-tags { justify-content: center; margin-top: 18px; }
.empty-block .hero-tags span { color: var(--muted); }
.empty-block .hero-tags a { background: #fff; color: var(--brand-dark); border-color: var(--line); }
.empty-block .hero-tags a:hover { background: var(--brand-soft); }

/* ---------- detail ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; margin: 20px 0 12px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb .current { color: var(--ink-2); }

.detail { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px 34px; box-shadow: var(--shadow); }
.detail-head h1 { font-size: 24px; letter-spacing: -.3px; }
.detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.detail-body { margin-top: 22px; font-size: 15.5px; line-height: 1.95; color: var(--ink-2); }
.detail-note {
    margin-top: 20px; padding: 14px 18px; border-radius: 12px;
    background: #fdf8ec; border: 1px solid #f3e2c4; color: #7a5410; font-size: 13.5px;
}
.detail-note strong { display: block; margin-bottom: 4px; font-size: 13px; }
.detail-syn, .detail-attach { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 18px; }
.detail-syn h3, .detail-attach h3 { font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.syn-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.syn-tags a {
    padding: 5px 12px; border-radius: 999px; background: #f5f5f5; color: var(--ink-2);
    font-size: 13px; border: 1px solid var(--line);
}
.syn-tags a:hover { background: var(--brand-soft); color: var(--brand-dark); border-color: #cbd5e1; }
.detail-attach li { font-size: 13.5px; color: var(--ink-2); }
.detail-actions { display: flex; gap: 10px; margin-top: 28px; }
.btn-ghost {
    padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line);
    background: #fff; color: var(--ink-2); font-size: 13.5px;
}
.btn-ghost:hover { border-color: #cbd5e1; color: var(--brand-dark); background: #fafafa; }

/* ---------- category page ---------- */
.cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 16px; }
.cat-head h1 { font-size: 24px; }
.cat-head p { margin-top: 6px; font-size: 13.5px; }

.anchor-nav {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 16px; box-shadow: var(--shadow);
}
.anchor-label { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.anchor-nav a {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2);
    padding: 4px 10px; border-radius: 8px; background: #f6f6f6;
}
.anchor-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.anchor-nav a span { font-size: 11px; color: var(--muted); }
.group-block { scroll-margin-top: 130px; }

/* ---------- suggest ---------- */
.suggest-panel {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 12px 28px rgba(11,18,32, .12); overflow: hidden; max-height: 340px; overflow-y: auto;
}
.suggest-panel li a { display: block; padding: 10px 16px; color: var(--ink); font-size: 13.8px; border-bottom: 1px solid #f4f4f4; }
.suggest-panel li:last-child a { border-bottom: 0; }
.suggest-panel li a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.suggest-panel .sg-cat { font-size: 11.5px; color: var(--muted); margin-left: 8px; }
.suggest-panel .sg-empty { padding: 12px 16px; color: var(--muted); font-size: 13px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 20px; font-size: 12.8px; color: var(--muted); }
.footer-inner strong { color: var(--ink-2); margin-right: 8px; }
.footer-meta { display: flex; gap: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; }
    .quick-search { order: 3; flex-basis: 100%; max-width: none; margin-bottom: 8px; }
    .top-nav { margin-left: auto; }
    .two-col { grid-template-columns: 1fr; }
    .hero { padding: 28px 20px 20px; }
    .hero h1 { font-size: 23px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .detail { padding: 22px 18px; }
    .detail-head h1 { font-size: 20px; }
}


/* ==========================================================================
   阶段二 · AI 问答（chat 页 / 首页入口）
   ========================================================================== */

.hero-ai { margin: 18px 0 4px; }
.hero-ai-btn {
    display: flex; align-items: center; gap: 14px; max-width: 620px;
    padding: 14px 18px; border-radius: var(--radius); text-decoration: none;
    background: linear-gradient(135deg, #111827 0%, #1f2937 55%, #1f2937 100%);
    color: #fff; box-shadow: 0 10px 24px rgba(31,41,55, .22);
    transition: transform .16s ease, box-shadow .16s ease;
}
.hero-ai-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(31,41,55, .3); }
.hero-ai-mark {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .18); font-weight: 800; font-size: 13px; letter-spacing: .5px;
}
.hero-ai-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-ai-text b { font-size: 15.5px; font-weight: 700; }
.hero-ai-text small { font-size: 12.5px; opacity: .88; }
.hero-ai-arrow { margin-left: auto; font-size: 18px; opacity: .9; }

/* ============ AI 智能问答页 ============ */
.chat-shell { display: flex; flex-direction: column; gap: 18px; padding: 28px 0 48px; }

/* 顶部英雄区 */
.chat-hero {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.chat-hero::before {
    content: ''; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(242,163,60,.12) 0%, rgba(242,163,60,0) 70%); pointer-events: none;
}
.chat-hero-icon {
    flex: 0 0 52px; width: 52px; height: 52px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    background: #111827; box-shadow: 0 6px 16px rgba(17,24,39,.18);
}
.chat-hero-icon svg { width: 28px; height: 28px; fill: #fff; }
.chat-hero-main { flex: 1 1 320px; min-width: 0; }
.chat-hero-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 5px; }
.chat-hero-top h1 { margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -.3px; color: var(--ink); }
.chat-hero-main p { margin: 0; max-width: 720px; font-size: 13.5px; line-height: 1.75; color: var(--muted); }
.chat-engine-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
    border-radius: 999px; font-size: 12px; font-weight: 600;
    background: #e9f7ef; border: 1px solid #c9e9d7; color: #157a45;
}
.chat-engine-badge.is-llm { background: #fff3e4; border-color: #f6dcb6; color: #9a6206; }
.engine-dot { width: 7px; height: 7px; border-radius: 50%; background: #22a85c; }
.chat-engine-badge.is-llm .engine-dot { background: #e2932c; }
.chat-settings-btn {
    display: inline-flex; align-items: center; gap: 7px; margin-left: auto;
    padding: 9px 14px; border-radius: 10px; cursor: pointer;
    background: #fff; border: 1px solid var(--line); color: var(--ink-2);
    font: inherit; font-size: 13px; font-weight: 600; transition: all .15s ease;
}
.chat-settings-btn:hover { border-color: #111827; color: #111827; box-shadow: 0 2px 8px rgba(17,24,39,.08); }
.chat-settings-btn svg { width: 17px; height: 17px; fill: currentColor; }

/* 设置面板 */
.chat-settings {
    padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px;
    background: #fff; box-shadow: var(--shadow);
}
.chat-settings[hidden] { display: none; }
.chat-settings-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.chat-settings-head strong { display: block; font-size: 15px; color: var(--ink); margin-bottom: 3px; }
.chat-settings-head span { font-size: 12.5px; color: var(--muted); }
.chat-settings-close {
    margin-left: auto; flex: 0 0 28px; height: 28px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--line); background: #fafbfc; color: var(--muted); font-size: 18px; line-height: 1;
}
.chat-settings-close:hover { background: #f0f2f4; color: var(--ink); }
.chat-settings-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; }
.chat-field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 9px; }
.chat-field-tag { font-size: 11px; font-weight: 500; color: var(--muted); background: #f0f2f4; padding: 2px 7px; border-radius: 999px; }
.chat-field-hint { margin: -4px 0 9px; font-size: 12px; color: var(--muted); }
.engine-switch { display: flex; gap: 10px; }
.engine-opt {
    flex: 1; display: flex; flex-direction: column; gap: 3px; text-align: left;
    padding: 12px 14px; border-radius: 11px; cursor: pointer; background: #fff;
    border: 1.5px solid var(--line); transition: all .15s ease;
}
.engine-opt:hover { border-color: #b8c0cb; }
.engine-opt.is-active { border-color: #111827; background: #f7f8fa; box-shadow: 0 0 0 3px rgba(17,24,39,.05); }
.engine-opt b { font-size: 13.5px; color: var(--ink); }
.engine-opt small { font-size: 11.5px; color: var(--muted); }
.chat-api-grid { display: flex; flex-direction: column; gap: 8px; }
.chat-api-grid input {
    width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line);
    background: #fbfcfd; color: var(--ink); font: inherit; font-size: 13px; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.chat-api-grid input:focus { border-color: #111827; box-shadow: 0 0 0 3px rgba(17,24,39,.06); background: #fff; }
.chat-api-actions { display: flex; align-items: center; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.chat-api-status { font-size: 12px; color: #157a45; }

/* 主对话区 */
.chat-main { display: flex; flex-direction: column; gap: 16px; }
.chat-log {
    display: flex; flex-direction: column; gap: 18px;
    min-height: 340px; max-height: 60vh; overflow-y: auto;
    padding: 22px; background: #fff;
    border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
    scroll-behavior: smooth;
}
.msg { display: flex; align-items: flex-start; gap: 11px; }
.msg-user { justify-content: flex-end; }
.msg-avatar {
    flex: 0 0 36px; width: 36px; height: 36px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; letter-spacing: .3px;
    background: linear-gradient(135deg, #1f2937, #111827); color: #fff;
}
.msg-user .msg-avatar { background: #eef1f5; color: #334155; }
.msg-main { display: flex; flex-direction: column; gap: 8px; max-width: min(760px, 84%); }
.msg-user .msg-main { align-items: flex-end; }
.msg-bubble {
    padding: 13px 16px; border-radius: 4px 15px 15px 15px; background: #f5f7f9;
    border: 1px solid var(--line); color: var(--ink);
    font-size: 14.5px; line-height: 1.8; word-break: break-word;
}
.msg-user .msg-bubble { border-radius: 15px 4px 15px 15px; background: #16202a; border-color: #16202a; color: #fff; }
.msg-error .msg-bubble { background: #fdf0f0; border-color: #f5d5d5; color: #a33; }
.msg-bubble p { margin: 0 0 8px; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-meta { font-size: 11.5px; color: var(--muted); padding: 0 2px; }
.msg-list { margin: 6px 0 8px; padding-left: 20px; }
.msg-list li { margin: 4px 0; }
.msg-retry { margin-top: 2px; }

.cite-ref {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 17px; height: 17px; padding: 0 4px; margin: 0 2px;
    border-radius: 5px; background: #eef1f5; color: #1f2937;
    font-size: 11px; font-weight: 700; text-decoration: none; vertical-align: 2px;
}
.cite-ref:hover { background: #d9dfe7; }
.cite-box { margin-top: 4px; padding: 12px; border: 1px solid #e7ebf0; border-radius: 13px; background: #fbfcfd; }
.cite-box-title { margin-bottom: 9px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cite-card {
    display: flex; gap: 10px; padding: 9px 10px; border-radius: 10px;
    border: 1px solid transparent; color: inherit; text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.cite-card:hover { background: #f0f2f4; border-color: #dfe4ea; }
.cite-card.is-flash { background: #fff6e6; border-color: var(--accent); }
.cite-rank {
    flex: 0 0 21px; width: 21px; height: 21px; margin-top: 1px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    background: #16202a; color: #fff; font-size: 11px; font-weight: 700;
}
.cite-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cite-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cite-cat { font-size: 11.5px; color: var(--muted); }
.cite-excerpt {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 12.5px; font-style: normal; line-height: 1.6; color: var(--muted);
}

.chat-samples { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 2px; }
.chat-samples-label { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.chip-btn {
    padding: 7px 13px; border-radius: 999px; cursor: pointer;
    background: #fff; border: 1px solid var(--line); color: var(--ink-2);
    font-size: 12.5px; font-family: inherit; transition: all .15s ease;
}
.chip-btn:hover { background: #16202a; border-color: #16202a; color: #fff; transform: translateY(-1px); }

.chat-composer {
    padding: 16px 18px; background: #fff;
    border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.chat-composer:focus-within { border-color: #111827; box-shadow: 0 0 0 3px rgba(17,24,39,.05), var(--shadow); }
.chat-input-wrap textarea {
    width: 100%; min-height: 52px; padding: 0; border: none; outline: none; resize: vertical;
    background: transparent; color: var(--ink); font: inherit; font-size: 14.5px; line-height: 1.7;
}
.chat-input-wrap textarea:disabled { color: var(--muted); cursor: not-allowed; }
.chat-input-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 8px; padding-top: 11px; border-top: 1px solid var(--line);
}
.chat-counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chat-counter.is-over { color: #c0392b; font-weight: 700; }
.chat-actions { display: flex; gap: 8px; }
.chat-tip { margin: 0; padding: 0 2px; font-size: 11.5px; color: var(--muted); }

.msg-typing .dot {
    display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%;
    background: #16202a; animation: kb-blink 1.2s infinite;
}
.msg-typing .dot:nth-child(2) { animation-delay: .2s; }
.msg-typing .dot:nth-child(3) { animation-delay: .4s; }
.msg-typing em { margin-left: 6px; font-style: normal; font-size: 12.5px; color: var(--muted); }
@keyframes kb-blink {
    0%, 80%, 100% { opacity: .25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 860px) {
    .chat-settings-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 720px) {
    .chat-shell { padding: 18px 0 36px; }
    .chat-hero { padding: 18px; }
    .chat-hero-top h1 { font-size: 21px; }
    .chat-settings-btn { margin-left: 0; }
    .msg-main { max-width: 88%; }
    .chat-log { padding: 15px; max-height: none; }
    .engine-switch { flex-direction: column; }
}


/* ==========================================================================
   首页改版 · 参考 UGREEN 品牌知识库设计稿（统一 hp- 前缀，仅首页 HTML 使用）
   说明：不改动既有 .hero / .search / .detail / .chat 等样式，其他页面不受影响
   ========================================================================== */

.wrap--home { max-width: 1500px; }

/* ---------- Hero ---------- */
.hp-hero {
    position: relative; overflow: hidden;
    margin: 24px 0 0; padding: 30px 34px 78px;
    border-radius: 20px; color: #fff;
    background: linear-gradient(120deg, #111827 0%, #1f2937 48%, #1f2937 100%);
    box-shadow: 0 18px 42px rgba(17,24,39, .20);
}
.hp-hero::after {
    content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
    left: -70px; bottom: -150px; background: rgba(255, 255, 255, .06);
}
.hp-hero-glow {
    position: absolute; width: 420px; height: 420px; border-radius: 50%;
    right: -90px; top: -210px; background: rgba(255, 255, 255, .09);
}
.hp-hero-head { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.hp-hero-copy { min-width: 0; flex: 1 1 auto; }
.hp-hero-title { font-size: 30px; font-weight: 800; letter-spacing: -.4px; line-height: 1.3; }
.hp-hero-desc { margin-top: 8px; max-width: 760px; font-size: 14.5px; line-height: 1.75; color: rgba(255, 255, 255, .9); }
.hp-hero-live {
    display: flex; align-items: center; gap: 9px; flex: 0 0 auto;
    padding: 7px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24);
    font-size: 12.8px; color: rgba(255, 255, 255, .95); white-space: nowrap;
}
.hp-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 4px rgba(203,213,225, .22); }

.hp-hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.hp-hero-stat {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 15px; border-radius: 13px;
    background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2);
}
.hp-hero-stat b { font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; }
.hp-hero-stat span { font-size: 12px; color: rgba(255, 255, 255, .8); }

.hp-hero-tags { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; }
.hp-tags-label { color: rgba(255, 255, 255, .68); }
.hp-hero-tags > a {
    padding: 4px 12px; border-radius: 999px; color: #fff; font-size: 13px;
    background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .26);
    transition: background .16s, border-color .16s;
}
.hp-hero-tags > a:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.hp-hero-ai {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
    padding: 6px 14px 6px 6px !important; background: rgba(255, 255, 255, .95) !important;
    border-color: rgba(255, 255, 255, .95) !important; color: var(--brand-dark) !important;
    font-weight: 650;
}
.hp-hero-ai:hover { background: #fff !important; color: var(--brand-dark) !important; }
.hp-hero-ai-mark {
    display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
    background: linear-gradient(135deg, #1f2937, #111827); color: #fff; font-size: 10.5px; font-weight: 800;
}
.hp-hero-ai-arrow { font-weight: 700; }

/* ---------- 3 栏布局 ---------- */
.hp-layout {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 238px minmax(0, 1fr) 300px; gap: 22px;
    align-items: start; margin-top: -56px; padding-bottom: 8px;
}
.hp-panel {
    background: var(--card); border: 1px solid var(--line);
    border-radius: 16px; box-shadow: var(--shadow);
}

/* ---------- 左侧分类 ---------- */
.hp-side { padding: 20px 14px; position: sticky; top: 104px; }
.hp-side-label {
    padding: 0 12px; margin-bottom: 12px; font-size: 11px; font-weight: 700;
    letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted);
}
.hp-nav { display: flex; flex-direction: column; gap: 3px; }
.hp-nav-item {
    display: flex; align-items: center; gap: 11px; width: 100%;
    padding: 11px 12px; border-radius: 11px; color: var(--ink-2);
    font-size: 14px; font-weight: 550; transition: background .16s, color .16s;
}
.hp-nav-item:hover { background: #fafafa; color: var(--ink); }
.hp-nav-item.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.hp-nav-ico {
    flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px;
    display: grid; place-items: center; background: #fafafa; color: var(--muted);
}
.hp-nav-ico svg { width: 15px; height: 15px; }
.hp-nav-item.is-active .hp-nav-ico { background: #fff; color: var(--brand); }
.hp-nav-name { flex: 1; white-space: nowrap; }
.hp-nav-count {
    min-width: 26px; padding: 2px 8px; border-radius: 20px; text-align: center;
    background: #fafafa; color: var(--muted); font-size: 11px; font-weight: 700;
}
.hp-nav-item.is-active .hp-nav-count { background: #fff; color: var(--brand); }
.hp-side-note {
    margin: 18px 8px 0; padding: 14px; border-radius: 12px;
    background: linear-gradient(150deg, #f5f6f8, #fafafa); border: 1px solid var(--line);
}
.hp-side-note h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--brand-dark); }
.hp-side-note p { font-size: 11.5px; line-height: 1.65; color: var(--muted); }

/* ---------- 主区工具栏 ---------- */
.hp-main { min-width: 0; }
.hp-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 17px 22px; margin-bottom: 14px; }
.hp-toolbar-gap { margin-top: 22px; }
.hp-toolbar h2 { font-size: 18.5px; font-weight: 730; letter-spacing: -.2px; }
.hp-result-count { font-size: 12.8px; color: var(--muted); }
.hp-result-count b { color: var(--brand-dark); font-weight: 750; }
.hp-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hp-toolbar-chip {
    padding: 6px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 550;
    background: #fafafa; border: 1px solid var(--line); color: var(--muted);
}

/* ---------- FAQ 卡片 ---------- */
.hp-faq-list { display: flex; flex-direction: column; gap: 12px; }
.hp-faq-card {
    position: relative; overflow: hidden; padding: 19px 22px;
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s, transform .2s;
}
.hp-faq-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--brand); opacity: 0; transition: opacity .2s;
}
.hp-faq-card:hover { box-shadow: 0 4px 10px rgba(11,18,32, .07), 0 18px 44px rgba(11,18,32, .10); border-color: #cbd5e1; transform: translateY(-1px); }
.hp-faq-card:hover::before { opacity: 1; }
.hp-faq-top { display: flex; align-items: flex-start; gap: 11px; }
.hp-q-badge {
    flex: 0 0 26px; width: 26px; height: 26px; margin-top: 1px; border-radius: 8px;
    display: grid; place-items: center; background: var(--brand); color: #fff;
    font-size: 12px; font-weight: 800;
}
.hp-q-badge--soft { background: var(--brand-soft); color: var(--brand-dark); }
.hp-faq-q { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.55; color: var(--ink); letter-spacing: -.1px; }
.hp-faq-q:hover { color: var(--brand-dark); }
.hp-cat-pill {
    flex: 0 0 auto; margin-top: 2px; padding: 4px 10px; border-radius: 20px;
    background: var(--brand-soft); color: var(--brand-dark);
    font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.hp-faq-answer { display: flex; gap: 11px; margin-top: 13px; padding-left: 37px; }
.hp-a-badge {
    flex: 0 0 22px; width: 22px; height: 22px; margin-top: 3px; border-radius: 7px;
    display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark);
    font-size: 11px; font-weight: 800;
}
.hp-answer-body { flex: 1; min-width: 0; }
.hp-answer-body p { font-size: 14.2px; line-height: 1.85; color: var(--ink-2); }
.hp-answer-empty {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px;
    border: 1px dashed #dedede; background: #fafafa; color: #a1a1a1; font-size: 13px;
}
.hp-answer-empty::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #cacaca; }
.hp-more {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 7px;
    font-size: 12.8px; font-weight: 700; color: var(--brand-dark);
}
.hp-more:hover { color: #111827; text-decoration: underline; }
.hp-faq-meta { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 11.8px; color: var(--muted); }
.hp-dot-sep { opacity: .6; }
.hp-faq-card--compact .hp-faq-answer { margin-top: 10px; }
.hp-faq-card--compact .hp-answer-body p { font-size: 13.6px; }

.hp-empty {
    padding: 56px 24px; text-align: center; border-radius: 16px;
    background: var(--card); border: 1px dashed var(--line); color: var(--muted);
}
.hp-empty h3 { font-size: 16px; color: var(--ink-2); margin-bottom: 6px; }
.hp-empty p { font-size: 13px; }

.hp-index-note { margin: 20px 0 4px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- 右侧栏 ---------- */
.hp-rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 104px; }
.hp-rail-card { padding: 18px 17px; }
.hp-rail-title {
    display: flex; align-items: center; gap: 8px; margin-bottom: 15px;
    font-size: 13.8px; font-weight: 730; color: var(--ink);
}
.hp-rail-title svg { width: 17px; height: 17px; color: var(--brand); flex: 0 0 auto; }
.hp-rail-title small { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--muted); }

.hp-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.hp-stat-box {
    padding: 11px 12px; border-radius: 11px;
    background: linear-gradient(150deg, #f5f6f8, #fafafa); border: 1px solid var(--line);
}
.hp-stat-num { font-size: 19px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; color: var(--brand-dark); }
.hp-stat-name { margin-top: 3px; font-size: 11px; color: var(--muted); }

.hp-progress-wrap { display: flex; align-items: center; gap: 16px; }
.hp-ring {
    position: relative; flex: 0 0 76px; width: 76px; height: 76px; border-radius: 50%;
    display: grid; place-items: center;
    background: conic-gradient(var(--brand) 0 var(--pct), #ececec var(--pct) 100%);
}
.hp-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.hp-ring-label { position: relative; z-index: 1; text-align: center; }
.hp-ring-label b { display: block; font-size: 17px; line-height: 1.15; color: var(--brand-dark); }
.hp-ring-label small { font-size: 9.5px; color: var(--muted); }
.hp-progress-text { font-size: 12px; line-height: 1.85; color: var(--muted); }
.hp-progress-text b { color: var(--ink); font-weight: 700; }

.hp-cover-list { display: flex; flex-direction: column; gap: 8px; }
.hp-cover-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 11px; border-radius: 10px; background: #fafafa;
    font-size: 12.5px; color: var(--muted);
}
.hp-cover-list b { color: var(--ink-2); font-weight: 700; }

.hp-tip {
    padding: 15px 17px; border-radius: 13px;
    background: linear-gradient(140deg, #fff9ec, #fffdf7); border: 1px solid #f8e9c9;
}
.hp-tip h4 { margin: 0 0 7px; font-size: 12.8px; color: #9a6308; }
.hp-tip p { font-size: 11.8px; line-height: 1.7; color: #8a7451; }

.hp-foot-note { margin: 6px 0 30px; text-align: center; font-size: 11.5px; color: #a1a1a1; }

/* ---------- 响应式 ---------- */
@media (max-width: 1360px) {
    .hp-layout { grid-template-columns: 220px minmax(0, 1fr); }
    .hp-rail { display: none; }
}
@media (max-width: 900px) {
    .hp-hero { padding: 24px 20px 64px; border-radius: 18px; }
    .hp-hero-title { font-size: 24px; }
    .hp-hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hp-hero-live { margin-top: 4px; }
    .hp-hero-ai { margin-left: 0; }
    .hp-layout { display: flex; flex-direction: column; gap: 14px; margin-top: -46px; }
    .hp-side, .hp-rail { position: static; width: 100%; }
    .hp-side { padding: 12px; }
    .hp-side-label, .hp-side-note { display: none; }
    .hp-nav { flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .hp-nav::-webkit-scrollbar { display: none; }
    .hp-nav-item { width: auto; white-space: nowrap; padding: 8px 12px; margin: 0; }
    .hp-nav-ico { flex: 0 0 19px; width: 19px; height: 19px; border-radius: 6px; }
    .hp-nav-ico svg { width: 12px; height: 12px; }
    .hp-faq-card { padding: 16px 15px; }
    .hp-faq-answer { padding-left: 0; }
    .hp-faq-q { font-size: 15px; }
    .hp-toolbar { padding: 14px 16px; }
    .hp-toolbar h2 { font-size: 16.5px; }
    .hp-toolbar-right { display: none; }
}

/* ================= 首页筛选栏 / 答案折叠 ================= */
.hp-main--full { max-width: 1180px; margin: 0 auto; width: 100%; }
.hp-filter { padding: 15px 20px 12px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 9px; }
.hp-filter-row { display: flex; align-items: flex-start; gap: 12px; }
.hp-filter-label {
    flex: 0 0 48px; padding-top: 7px; font-size: 11.5px; font-weight: 750;
    letter-spacing: 1px; color: var(--muted); text-transform: uppercase;
}
.hp-filter-chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.hp-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    border-radius: 20px; border: 1px solid var(--line); background: #fff;
    font-size: 12.8px; font-weight: 600; color: var(--ink-2);
    transition: background .16s, border-color .16s, color .16s;
    white-space: nowrap;
}
.hp-chip:hover { border-color: #cbd5e1; background: #f5f6f8; color: var(--brand-dark); }
.hp-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.hp-chip.is-active:hover { background: var(--brand-dark); color: #fff; }
.hp-chip-num {
    padding: 1px 6px; border-radius: 10px; background: #f4f4f4;
    color: var(--muted); font-size: 10.8px; font-weight: 750;
}
.hp-chip.is-active .hp-chip-num { background: rgba(255, 255, 255, .24); color: #fff; }
.hp-filter-foot {
    display: flex; align-items: center; gap: 10px; padding-top: 9px;
    border-top: 1px dashed var(--line); font-size: 12.2px; color: var(--muted);
}
.hp-filter-foot b { color: var(--brand-dark); font-weight: 750; }
.hp-filter-reset { margin-left: auto; font-size: 12.2px; font-weight: 700; color: var(--brand-dark); }
.hp-filter-reset:hover { text-decoration: underline; }

.hp-answer-text { position: relative; }
.hp-answer-text p + p { margin-top: 8px; }
.hp-answer-text.is-clamped { max-height: 168px; overflow: hidden; }
.hp-answer-text.is-clamped::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 58px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--card) 82%);
    pointer-events: none;
}
.hp-expand {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
    padding: 6px 13px; border-radius: 9px; border: 1px solid var(--line);
    background: #fafafa; color: var(--brand-dark); font-size: 12.5px;
    font-weight: 700; cursor: pointer; transition: background .16s, border-color .16s;
}
.hp-expand:hover { background: var(--brand-soft); border-color: #cbd5e1; }
.hp-expand-num { font-weight: 500; font-size: 11.4px; color: var(--muted); }
.hp-cat-pill--year { background: #f1f5f6; color: #656565; }
.hp-empty--panel {
    padding: 60px 24px; border-radius: 16px; background: var(--card);
    border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hp-empty--filter { margin-top: 14px; }
.hp-hero-tags--plain { justify-content: center; }

/* ================= 二级页（搜索 / 企业概况）共用 hero ================= */
.hp-hero--sub { padding-bottom: 26px; }
.hp-sub-head {
    position: relative; z-index: 2; display: flex; align-items: flex-start;
    justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.hp-sub-badge {
    display: inline-flex; align-items: center; padding: 4px 11px; margin-bottom: 10px;
    border-radius: 20px; background: rgba(255, 255, 255, .2); color: #fff;
    font-size: 11.4px; font-weight: 750; letter-spacing: .8px;
}
.hp-sub-title {
    font-size: 24px; font-weight: 800; letter-spacing: -.4px; color: #fff;
    line-height: 1.35; margin-bottom: 8px;
}
.hp-sub-desc { max-width: 720px; font-size: 13.6px; line-height: 1.7; color: rgba(255, 255, 255, .9); }
.hp-sub-desc b { color: #fff; font-weight: 750; }
.hp-sub-back {
    flex: 0 0 auto; padding: 7px 13px; border-radius: 9px; background: rgba(255, 255, 255, .15);
    color: #eef1f4; font-size: 12.6px; font-weight: 650; white-space: nowrap;
}
.hp-sub-back:hover { background: rgba(255, 255, 255, .25); color: #fff; }
.hp-searchbar { position: relative; z-index: 2; display: flex; gap: 10px; margin-top: 16px; }
.hp-searchbar .sb-field {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px;
    height: 46px; padding: 0 15px; border-radius: 11px; background: #fff;
    box-shadow: 0 6px 18px rgba(11,18,32, .10);
}
.hp-searchbar .sb-field svg { width: 17px; height: 17px; margin: 0; fill: #a1a1a1; flex: 0 0 auto; }
.hp-searchbar input {
    width: 100%; height: 44px; border: 0; outline: none; background: transparent;
    font-size: 14.5px; color: var(--ink);
}
.hp-searchbar button {
    flex: 0 0 auto; height: 46px; padding: 0 24px; border: 0; border-radius: 11px;
    background: #fff; color: var(--brand-dark); font-size: 14px; font-weight: 750;
    cursor: pointer; box-shadow: 0 6px 18px rgba(11,18,32, .10);
}
.hp-searchbar button:hover { background: var(--brand-soft); }
.hp-searchbar .suggest-panel { left: 0; right: 88px; top: 52px; }
.hp-sub-chips { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.hp-chip--ghost {
    border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .14); color: #f5f6f8;
}
.hp-chip--ghost:hover { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .4); color: #fff; }
.hp-chip--ghost.is-active { background: #fff; border-color: #fff; color: var(--brand-dark); }
.hp-chip--ghost .hp-chip-num { background: rgba(255, 255, 255, .24); color: #fff; }
.hp-chip--ghost.is-active .hp-chip-num { background: var(--brand-soft); color: var(--brand-dark); }

/* ================= 企业概况页 ================= */
.hp-sum-body {
    position: relative; z-index: 2; display: flex; flex-direction: column;
    gap: 20px; margin-top: 20px; padding-bottom: 8px;
}
.hp-sum-section { display: flex; flex-direction: column; gap: 12px; }
.hp-sum-section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hp-sum-section-head h2 { font-size: 18.5px; font-weight: 760; letter-spacing: -.2px; }
.hp-sum-section-head span { font-size: 12.3px; color: var(--muted); }
.hp-sum-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 12px; }
.hp-sum-metric {
    padding: 16px 18px; border-radius: 15px; background: var(--card);
    border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hp-sum-metric-value {
    font-size: 24px; font-weight: 800; letter-spacing: -.7px; line-height: 1.2; color: var(--brand-dark);
}
.hp-sum-metric-value small { margin-left: 4px; font-size: 12.4px; font-weight: 650; color: var(--muted); }
.hp-sum-metric-label { margin-top: 4px; font-size: 12.8px; font-weight: 720; color: var(--ink-2); }
.hp-sum-metric-note { margin-top: 7px; font-size: 11.4px; line-height: 1.6; color: var(--muted); }
.hp-sum-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.hp-sum-card, .hp-sum-chart, .hp-sum-timeline-card { padding: 19px 21px; }
.hp-sum-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 0; }
.hp-sum-profile dt { margin-bottom: 3px; font-size: 11.5px; color: var(--muted); }
.hp-sum-profile dd { margin: 0; font-size: 14px; font-weight: 720; color: var(--ink); line-height: 1.5; }
.hp-sum-quotes { display: flex; flex-direction: column; gap: 13px; margin: 0; padding: 0; list-style: none; }
.hp-sum-quote-label {
    display: inline-block; margin-bottom: 5px; padding: 2px 9px; border-radius: 20px;
    background: var(--brand-soft); color: var(--brand-dark); font-size: 11.3px; font-weight: 760;
}
.hp-sum-quotes p { font-size: 13.8px; line-height: 1.8; color: var(--ink-2); }
.hp-sum-empty { font-size: 12.8px; color: var(--muted); }
.hp-sum-bars { display: flex; align-items: flex-end; gap: 14px; height: 172px; padding-top: 6px; }
.hp-sum-bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.hp-sum-bar-num { font-size: 11.8px; font-weight: 760; color: var(--brand-dark); }
.hp-sum-bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.hp-sum-bar-fill {
    width: 56%; min-height: 4px; border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #374151, #111827);
}
.hp-sum-bar-label { font-size: 11.5px; color: var(--muted); }
.hp-sum-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.hp-sum-timeline::before {
    content: ""; position: absolute; left: 45px; top: 8px; bottom: 10px; width: 2px;
    background: linear-gradient(#e2e8f0, #f1f1f1);
}
.hp-sum-timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 14px; }
.hp-sum-timeline li:last-child { padding-bottom: 0; }
.hp-sum-year {
    flex: 0 0 38px; padding-top: 1px; text-align: right;
    font-size: 12.8px; font-weight: 800; color: var(--brand-dark);
}
.hp-sum-timeline li p { position: relative; padding-left: 13px; font-size: 13.4px; line-height: 1.75; color: var(--ink-2); }
.hp-sum-timeline li p::before {
    content: ""; position: absolute; left: -1px; top: 8px; width: 7px; height: 7px;
    border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #eef1f4;
}
.hp-faq-card--sum .hp-answer-body p { font-size: 13.7px; }
.hp-sum-link { display: block; color: inherit; transition: box-shadow .16s, border-color .16s, transform .16s; }
.hp-sum-link:hover { border-color: #cbd5e1; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(11,18,32, .07), 0 18px 44px rgba(11,18,32, .10); }
.hp-sum-link-desc { margin-top: 8px; font-size: 12.2px; line-height: 1.7; color: var(--muted); }
.hp-sum-link-meta { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.6px; color: var(--muted); }
.hp-sum-link-arrow { margin-left: auto; font-weight: 750; color: var(--brand); }

@media (max-width: 1080px) {
    .hp-sum-two-col { grid-template-columns: 1fr; }
    .hp-sum-metrics { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 900px) {
    .hp-hero--sub { padding-bottom: 20px; }
    .hp-sub-title { font-size: 20px; }
    .hp-searchbar { flex-wrap: wrap; }
    .hp-searchbar .suggest-panel { right: 0; }
    .hp-filter { padding: 12px 14px 10px; }
    .hp-filter-row { flex-direction: column; gap: 5px; }
    .hp-filter-label { flex-basis: auto; padding-top: 0; }
    .hp-sum-body { margin-top: 16px; gap: 16px; }
    .hp-sum-profile { grid-template-columns: 1fr; }
    .hp-sum-card, .hp-sum-chart, .hp-sum-timeline-card { padding: 16px; }
}

/* 通用隐藏（首页筛选结果收敛） */
.is-hidden { display: none !important; }

/* 语义成功色保留：主色转黑后仍保持可辨识 */
.chat-badge-ok { background: #e7f6ee; border-color: #bfe7d2; color: #0a7a45; }
