/* ===================================================
   消化篇 · style.css
   Primary: #ea580c (orange-600)
   =================================================== */

/* ===================================================
   CSS 变量
   =================================================== */
:root {
    --primary:        #ea580c;
    --primary-dark:   #7c2d12;
    --primary-light:  #ffedd5;
    --accent:         #16a34a;
    --accent-light:   #dcfce7;
    --teal:           #0f766e;
    --teal-light:     #ccfbf1;
    --cyan:           #0e7490;
    --cyan-light:     #cffafe;
    --purple:         #7c3aed;
    --purple-light:   #ede9fe;
    --warning:        #dc2626;
    --warning-light:  #fee2e2;
    --danger:         #dc2626;
    --gray-50:        #f9fafb;
    --gray-100:       #f3f4f6;
    --gray-200:       #e5e7eb;
    --gray-300:       #d1d5db;
    --gray-400:       #9ca3af;
    --gray-500:       #6b7280;
    --gray-600:       #4b5563;
    --gray-700:       #374151;
    --gray-800:       #1f2937;
    --gray-900:       #111827;
    --shadow:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:      0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg:      0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
    --radius:         12px;
}

/* ===================================================
   重置 & 基础
   =================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.7;
    font-size: 16px;
}
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.4; color: var(--gray-900); }
p { margin-bottom: 1em; color: var(--gray-700); }
ul,ol { padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }
a { color: var(--primary-dark); }
a:hover { color: var(--primary); }

/* ===================================================
   顶部导航
   =================================================== */
.top-nav {
    position: sticky; top: 0; z-index: 1000;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.top-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}
.logo:hover { opacity: 0.9; color: white; }
.top-nav .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding: 0;
}
.top-nav .nav-links > li > a, .top-nav .nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.top-nav .nav-links > li > a:hover, .top-nav .nav-dropdown-toggle:hover {
    background: rgba(255,255,255,0.18);
    color: white;
}
.nav-arrow { font-size: 0.7rem; transition: transform 0.2s; }
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
}
.nav-hamburger span {
    display: block; width: 22px; height: 2px;
    background: rgba(255,255,255,0.85); border-radius: 2px; transition: all 0.2s;
}

/* 下拉菜单 */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    border: 1px solid var(--gray-200);
    min-width: 200px;
    padding: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 999;
}
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.nav-dropdown.open .nav-arrow { transform: rotate(180deg); }
.nav-dropdown-menu.chapters-menu {
    display: flex;
    gap: 0;
    min-width: 600px;
    right: -60px;
}
.dropdown-group {
    flex: 1;
    min-width: 140px;
    padding: 4px;
    border-right: 1px solid var(--gray-100);
}
.dropdown-group:last-child { border-right: none; }
.dropdown-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 10px 4px;
}
.nav-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--primary-light); color: var(--primary-dark); }
.nav-dropdown-menu a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* 移动端侧边栏 */
.nav-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.nav-overlay.show { opacity: 1; pointer-events: auto; }
.nav-sidebar {
    position: fixed;
    top: 0; right: -320px;
    width: 290px; height: 100%;
    background: linear-gradient(160deg, #7c2d12, #431407);
    z-index: 1999;
    overflow-y: auto;
    transition: right 0.3s;
    box-shadow: -4px 0 20px rgba(0,0,0,.2);
}
.nav-sidebar.open { right: 0; }
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.sidebar-close {
    background: rgba(255,255,255,.15);
    border: none;
    color: white;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}
.sidebar-body { padding: 12px 16px 32px; }
.sidebar-section {
    color: rgba(255,255,255,.5);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 14px 8px 6px;
}
.sidebar-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    transition: all 0.15s;
    margin-bottom: 2px;
}
.sidebar-link:hover { background: rgba(255,255,255,.12); color: white; }
.sidebar-link.active { background: rgba(255,255,255,.2); color: white; font-weight: 600; }

/* 悬浮返回首页按钮 */
.fab-home {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 48px; height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(234,88,12,.4);
    z-index: 900;
    transition: all 0.2s;
}
.fab-home:hover { background: var(--primary-dark); transform: scale(1.1); }

/* ===================================================
   面包屑
   =================================================== */
.breadcrumb {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
    font-size: 0.82rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--gray-400); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--gray-600); font-weight: 500; }

/* ===================================================
   章节顶部 Hero
   =================================================== */
.page-hero {
    background: linear-gradient(135deg, #7c2d12, #c2410c, #ea580c);
    color: white;
    padding: 2.5rem 2rem 1.5rem;
    margin-bottom: 0;
}
.page-hero-inner { max-width: 1280px; margin: 0 auto; }
.chapter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.2);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    backdrop-filter: blur(4px);
}
.page-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.3;
}
.page-hero-sub {
    opacity: 0.9;
    font-size: 1rem;
    max-width: 720px;
    line-height: 1.6;
    margin: 0;
}

/* ===================================================
   主体布局
   =================================================== */
.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}
.main-content.full-width { grid-template-columns: 1fr; }
.content-body { min-width: 0; }
.article { min-width: 0; }
.article h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    color: var(--gray-900);
}
.article h2:first-child { margin-top: 0; }
.article h3 {
    font-size: 1.1rem;
    margin: 1.8rem 0 0.6rem;
    color: var(--primary-dark);
}
.article h4 { font-size: 1rem; margin: 1.2rem 0 0.4rem; color: var(--gray-700); }

/* ===================================================
   侧边栏
   =================================================== */
.sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.sidebar-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
    border-top: 3px solid var(--primary);
}
.sidebar-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}
.sidebar-card ul { margin: 0 0 0 1.2rem; }
.sidebar-card li { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 5px; }
.sidebar-card p  { font-size: 0.85rem; color: var(--gray-600); margin: 0; }
.sidebar-card.sc-green { border-top-color: var(--accent); }
.sidebar-card.sc-green h3 { color: var(--accent); }
.sidebar-card.sc-alert { border-top-color: var(--danger); }
.sidebar-card.sc-alert h3 { color: var(--danger); }

/* ===================================================
   章节 intro 框
   =================================================== */
.chapter-intro {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fdba74;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.chapter-intro p { color: var(--gray-700); margin: 0; font-size: 1rem; line-height: 1.75; }
.chapter-intro strong { color: var(--primary-dark); }

/* ===================================================
   通用信息框
   =================================================== */
.info-box {
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
    color: var(--gray-800);
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
}
.info-box::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-dark);
    display: block;
    margin-bottom: 6px;
}
.info-box.ib-green  { border-left-color: var(--accent);  background: var(--accent-light);  }
.info-box.ib-green::before  { color: var(--accent); }
.info-box.ib-yellow { border-left-color: #d97706; background: #fef9c3; }
.info-box.ib-yellow::before { color: #a16207; }
.info-box.ib-red    { border-left-color: var(--danger);  background: var(--warning-light); }
.info-box.ib-red::before    { color: var(--danger); }
.info-box.ib-purple { border-left-color: var(--purple);  background: var(--purple-light);  }
.info-box.ib-purple::before { color: var(--purple); }
.info-box.ib-teal   { border-left-color: var(--teal);    background: var(--teal-light);    }
.info-box.ib-teal::before   { color: var(--teal); }

/* ===================================================
   核心概念框
   =================================================== */
.key-concept {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-top: 4px solid var(--primary);
}
.key-concept h3 {
    color: var(--primary-dark);
    font-size: 1rem;
    margin: 0 0 10px;
}
.key-concept p, .key-concept ul, .key-concept li { font-size: 0.92rem; }

/* ===================================================
   生活举例框
   =================================================== */
.life-example {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    border: 1px solid #fdba74;
}
.life-example::before {
    content: "💡 生活案例";
    font-weight: 700;
    font-size: 0.85rem;
    color: #9a3412;
    display: block;
    margin-bottom: 8px;
}
.life-example p { margin: 0; color: var(--gray-700); font-size: 0.92rem; line-height: 1.75; }

/* ===================================================
   临床关联框
   =================================================== */
.clinical-link {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border: 1px solid #fecdd3;
    border-left: 4px solid var(--warning);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
    color: var(--gray-800);
}
.clinical-link::before {
    content: "🏥 临床关联";
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--warning);
    display: block;
    margin-bottom: 6px;
}

/* ===================================================
   误区提示
   =================================================== */
.misconception {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-left: 4px solid #ca8a04;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
}
.misconception .myth {
    color: var(--warning);
    font-weight: 700;
    text-decoration: line-through;
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}
.misconception .truth {
    color: var(--accent);
    font-weight: 700;
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}
.misconception p { margin: 0.3rem 0 0; color: var(--gray-700); font-size: 0.92rem; }

/* ===================================================
   对比表格
   =================================================== */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}
.compare-table th {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}
.compare-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    vertical-align: top;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: #fff7ed; }

/* ===================================================
   统计网格
   =================================================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.stat-item {
    background: white;
    border-radius: var(--radius);
    padding: 1.2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--primary);
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}
.stat-label { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }

/* ===================================================
   流程步骤
   =================================================== */
.flow-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1.5rem 0;
}
.flow-step {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    border: 1px solid #fdba74;
}
.flow-arrow { color: var(--primary); font-size: 1.2rem; font-weight: 700; }
.flow-arrow-v { text-align: center; color: var(--primary); font-size: 1.2rem; padding: 2px 0; }

/* 竖排流程链 */
.flow-chain {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.flow-node {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-bottom: none;
    font-size: 0.9rem;
    color: var(--gray-700);
}
.flow-node:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.flow-node:last-child  { border-bottom: 1px solid var(--gray-200); border-radius: 0 0 var(--radius) var(--radius); }
.flow-node strong { color: var(--gray-900); display: block; margin-bottom: 2px; }
.flow-node span   { color: var(--gray-500); font-size: 0.85rem; }
.flow-node.fn-alert  { background: #fff7ed; border-color: #fdba74; }
.flow-node.fn-danger { background: #fff1f2; border-color: #fecdd3; }

/* ===================================================
   四要素卡片
   =================================================== */
.four-questions {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.fq-item {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
    border-top: 3px solid var(--primary);
}
.fq-item.fq-what  { border-top-color: var(--primary); }
.fq-item.fq-why   { border-top-color: var(--cyan); }
.fq-item.fq-matter{ border-top-color: var(--warning); }
.fq-item.fq-action{ border-top-color: var(--accent); }
.fq-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fq-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.fq-item.fq-why .fq-num    { background: var(--cyan); }
.fq-item.fq-matter .fq-num { background: var(--warning); }
.fq-item.fq-action .fq-num { background: var(--accent); }
.fq-label   { font-weight: 700; font-size: 0.95rem; color: var(--gray-900); }
.fq-content { font-size: 0.9rem; color: var(--gray-700); line-height: 1.7; margin: 0; }

/* ===================================================
   对比双栏
   =================================================== */
.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}
.cb-normal, .cb-path {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
}
.cb-normal { border-top: 3px solid var(--accent); }
.cb-path   { border-top: 3px solid var(--warning); }
.cb-label  { font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; color: var(--gray-800); }
.cb-content ul { margin: 0 0 0 1.2rem; }
.cb-content li { font-size: 0.88rem; color: var(--gray-700); margin-bottom: 4px; }

/* ===================================================
   行动清单
   =================================================== */
.action-list {
    background: var(--accent-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #6ee7b7;
}
.action-list h3 { color: #065f46; margin: 0 0 12px; font-size: 1rem; }
.action-list ul { margin: 0 0 0 1.2rem; }
.action-list li { color: #064e3b; font-size: 0.92rem; margin-bottom: 6px; }
.action-list li strong { color: #022c22; }

/* ===================================================
   警告清单（紧急就医）
   =================================================== */
.warning-list {
    background: var(--warning-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #fca5a5;
}
.warning-list h3 { color: #7c2d12; margin: 0 0 12px; font-size: 1rem; }
.warning-list ul { margin: 0 0 0 1.2rem; }
.warning-list li { color: #991b1b; font-size: 0.92rem; margin-bottom: 6px; }

/* ===================================================
   数值范围卡片
   =================================================== */
.range-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
    gap: 10px;
    margin: 1.5rem 0;
}
.range-card {
    background: white;
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.range-card.rc-normal { border-top: 3px solid var(--accent); }
.range-card.rc-warn   { border-top: 3px solid var(--primary); }
.range-card.rc-danger { border-top: 3px solid var(--warning); }
.range-val { font-size: 1.2rem; font-weight: 800; display: block; margin-bottom: 4px; }
.rc-normal .range-val { color: var(--accent); }
.rc-warn   .range-val { color: var(--primary-dark); }
.rc-danger .range-val { color: var(--warning); }
.range-label { font-size: 0.8rem; color: var(--gray-500); }
.range-note  { font-size: 0.78rem; color: var(--gray-400); margin-top: 4px; }

/* ===================================================
   章节底部导航
   =================================================== */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
    gap: 1rem;
}
.chapter-nav a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 600;
    padding: 12px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    max-width: 48%;
}
.chapter-nav a:last-child { align-items: flex-end; }
.chapter-nav a:hover { box-shadow: var(--shadow-md); background: var(--primary-light); }
.chapter-nav a.next  { margin-left: auto; }
.chapter-nav .nav-label { font-size: 0.75rem; color: var(--gray-500); font-weight: 400; }

/* ===================================================
   首页 Hero
   =================================================== */
.index-hero {
    background: linear-gradient(135deg, #7c2d12 0%, #c2410c 55%, #ea580c 100%);
    color: white;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    min-height: calc(100vh - 44px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.index-hero-inner { max-width: 820px; margin: 0 auto; text-align: center; width: 100%; }
.index-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.2);
    padding: 6px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}
.index-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}
.index-hero-sub {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}
.index-hero-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    background: rgba(255,255,255,.12);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 2rem auto;
    max-width: 560px;
    backdrop-filter: blur(6px);
    flex-wrap: wrap;
}
.ihs-item    { text-align: center; padding: 0.5rem 1.5rem; flex: 1; min-width: 90px; }
.ihs-num     { font-size: 2rem; font-weight: 800; display: block; }
.ihs-label   { font-size: 0.8rem; opacity: 0.8; }
.ihs-divider { width: 1px; background: rgba(255,255,255,.3); margin: 0.5rem 0; }
.index-hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-btn-primary {
    background: white;
    color: var(--primary-dark);
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.hero-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.hero-btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,.7);
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
}
.hero-btn-outline:hover { background: rgba(255,255,255,.15); border-color: white; }
.index-hero-icons { margin-top: 2rem; font-size: 2rem; display: flex; justify-content: center; gap: 1rem; opacity: 0.6; flex-wrap: wrap; }

/* ===================================================
   首页内容区
   =================================================== */
.home-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 1rem;
}
.home-section-header { margin-bottom: 1.5rem; }
.home-section-header h2 { font-size: 1.8rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.3rem; }
.section-sub { color: var(--gray-500); font-size: 0.95rem; }
.phase-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: inline-block;
}
.phase-orange { background: var(--primary-light); color: var(--primary-dark); }
.phase-green  { background: var(--accent-light);  color: #065f46; }
.phase-purple { background: var(--purple-light);  color: #4c1d95; }
.phase-teal   { background: var(--teal-light);    color: #134e4a; }

/* 章节卡片 */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
    gap: 1.5rem;
    margin: 1rem 0 2rem;
}
.chapter-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
    display: block;
}
.chapter-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.chapter-card .ch-num {
    display: inline-block;
    background: var(--primary);
    color: white;
    width: 34px; height: 34px;
    border-radius: 50%;
    text-align: center; line-height: 34px;
    font-size: 0.85rem; font-weight: 700;
    margin-bottom: 10px;
}
.chapter-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.chapter-card p  { font-size: 0.88rem; color: var(--gray-500); margin: 0; line-height: 1.5; }
.chapter-card .tag {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 8px;
}
.chapter-card.phase-2 { border-left-color: var(--teal); }
.chapter-card.phase-2 .ch-num { background: var(--teal); }
.chapter-card.phase-3 { border-left-color: var(--accent); }
.chapter-card.phase-3 .ch-num { background: var(--accent); }
.chapter-card.phase-4 { border-left-color: var(--purple); }
.chapter-card.phase-4 .ch-num { background: var(--purple); }

/* 工具页卡片 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 1.2rem;
    margin: 1rem 0 2rem;
}
.tool-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-top: 3px solid var(--primary);
}
.tool-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tool-card.tool-teal   { border-top-color: var(--teal); }
.tool-card.tool-green  { border-top-color: var(--accent); }
.tool-card.tool-purple { border-top-color: var(--purple); }
.tool-icon { font-size: 2rem; flex-shrink: 0; }
.tool-name { font-weight: 700; font-size: 1rem; color: var(--gray-900); margin-bottom: 4px; }
.tool-desc { font-size: 0.85rem; color: var(--gray-500); line-height: 1.5; }

/* Tip卡片 */
.tip-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}
.tip-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}
.tip-card.tc-orange { border-left-color: var(--primary); }
.tip-card.tc-green  { border-left-color: var(--accent); }
.tip-card.tc-teal   { border-left-color: var(--teal); }
.tip-card.tc-purple { border-left-color: var(--purple); }
.tip-card-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; color: var(--gray-900); }
.tip-card-body  { font-size: 0.88rem; color: var(--gray-600); line-height: 1.6; }

/* ===================================================
   工具页专用
   =================================================== */
.page-hero.tool-hero {
    background: linear-gradient(135deg, #7c2d12, #c2410c, #ea580c);
}
.tool-badge {
    display: inline-block;
    background: rgba(255,255,255,.22);
    border: 1px solid rgba(255,255,255,.45);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}
.filter-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.5rem; }
.filter-btn {
    padding: 6px 14px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: 25px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.filter-btn:hover  { border-color: var(--primary); color: var(--primary-dark); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: white; font-weight: 600; }

/* 小标签 */
.tag-green  { display: inline-block; background: #d1fae5; color: #065f46; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.tag-amber  { display: inline-block; background: #fef3c7; color: #92400e; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.tag-red    { display: inline-block; background: #fee2e2; color: #991b1b; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.tag-orange { display: inline-block; background: #ffedd5; color: #7c2d12; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.tag-blue   { display: inline-block; background: #dbeafe; color: #1e40af; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.val-normal { color: var(--accent);  font-weight: 600; }
.val-warn   { color: #b45309;        font-weight: 600; }
.val-danger { color: var(--warning); font-weight: 600; }

/* 决策树 */
.decision-tree {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.dt-question {
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    padding: 12px 18px;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 0.95rem;
}
.dt-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-left: 20px;
}
.dt-ans {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
}
.dt-ans strong { display: block; font-weight: 700; margin-bottom: 4px; }
.dt-ans span   { display: block; font-size: 0.82rem; color: var(--gray-600); line-height: 1.4; }
.dt-ans.dt-green  { border-left: 4px solid #059669; background: #f0fdf4; }
.dt-ans.dt-green  strong { color: #065f46; }
.dt-ans.dt-amber  { border-left: 4px solid #d97706; background: #fffbeb; }
.dt-ans.dt-amber  strong { color: #92400e; }
.dt-ans.dt-orange { border-left: 4px solid var(--primary); background: #fff7ed; }
.dt-ans.dt-orange strong { color: var(--primary-dark); }
.dt-ans.dt-red    { border-left: 4px solid #dc2626; background: #fff1f2; }
.dt-ans.dt-red    strong { color: #991b1b; }

/* 指标表格 */
.indicator-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
.indicator-table th {
    background: var(--primary);
    color: white;
    padding: 12px 14px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
}
.indicator-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.88rem;
    color: var(--gray-700);
    vertical-align: top;
}
.indicator-table tr:last-child td { border-bottom: none; }
.indicator-table tr:hover td { background: #fff7ed; }

/* ===================================================
   页脚
   =================================================== */
.site-footer {
    background: var(--gray-800);
    color: var(--gray-300);
    text-align: center;
    padding: 2rem;
    font-size: 0.85rem;
    margin-top: 2rem;
}

/* ===================================================
   响应式
   =================================================== */
@media (max-width: 900px) {
    .main-content { grid-template-columns: 1fr; padding: 1rem 1.2rem 3rem; }
    .sidebar { position: static; }
    .top-nav .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .index-hero-title { font-size: 2rem; }
    .comparison-box { grid-template-columns: 1fr; }
    .four-questions { grid-template-columns: 1fr; }
    .nav-dropdown-menu.chapters-menu { min-width: 280px; flex-direction: column; }
    .dropdown-group { min-width: unset; border-right: none; border-bottom: 1px solid var(--gray-100); }
    .dt-answers { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .page-hero { padding: 1.2rem 1rem 0.5rem; }
    .page-hero h1 { font-size: 1.6rem; }
    .breadcrumb { padding: 0.8rem 1rem 0; }
    .home-section { padding: 2rem 1rem 0.5rem; }
    .ihs-divider { display: none; }
    .ihs-item { min-width: 0; padding: 0.3rem 0.6rem; }
    .hero-btn-primary, .hero-btn-outline { padding: 10px 16px; font-size: .9rem; }
    .index-hero-cta { gap: 10px; }
}

/* ===== 紧凑布局修正 ===== */
.main-content { padding: 0 2rem 3rem; }
.home-section { margin: 0.4rem 0; }
.home-section-header { margin-bottom: 0.5rem; padding-bottom: 6px; }
.home-section-header h2 { margin: 0; }
.phase-label { padding: 3px 12px; margin: 0.6rem 0 0.4rem; }
.chapter-grid { gap: 0.6rem; margin: 0.4rem 0; }
.chapter-card { padding: 1rem 1.2rem; display: flex; align-items: center; gap: .9rem; }
.chapter-card .ch-num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: 0.82rem; }
.chapter-card .ch-body { min-width: 0; }
.chapter-card h3 { font-size: 1rem; margin: 0 0 3px; }
.chapter-card p { font-size: 0.85rem; margin: 0; line-height: 1.4; }
