/* ================================================================
   脑血管篇 · 全局样式
   主色：紫色 #7c3aed（Violet-600）
   ================================================================ */

:root {
  --primary:        #7c3aed;
  --primary-dark:   #4c1d95;
  --primary-light:  #ede9fe;
  --primary-mid:    #6d28d9;
  --text:           #1e293b;
  --text-muted:     #64748b;
  --bg:             #f8fafc;
  --bg-card:        #ffffff;
  --border:         #e2e8f0;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow:         0 2px 12px rgba(124,58,237,.10);
  --shadow-md:      0 4px 24px rgba(124,58,237,.14);
  --transition:     .2s ease;
}

/* ── 基础重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  color: var(--text); background: var(--bg);
  line-height: 1.75; min-height: 100vh;
}
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }
ul, ol { padding-left: 1.4rem; }
img { max-width: 100%; }

/* ── 导航栏（由 nav.js 注入） ── */
.top-nav {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.top-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 44px;
}
.top-nav .logo {
  font-size: 1.1rem; font-weight: 700;
  color: #fff; letter-spacing: .5px; text-decoration: none;
}
.top-nav .logo:hover { opacity: 0.9; }
.top-nav .nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
.top-nav .nav-links a {
  color: rgba(255,255,255,.88); padding: 6px 12px; border-radius: 6px;
  font-size: .88rem; font-weight: 500; transition: var(--transition); text-decoration: none;
}
.top-nav .nav-links a:hover,
.top-nav .nav-links a.active { background: rgba(255,255,255,.15); color: #fff; }
/* 下拉菜单 */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; user-select: none; }
.nav-dropdown-toggle .nav-arrow { font-size: .7rem; margin-left: 2px; transition: transform .2s; display: inline-block; }
.nav-dropdown.open .nav-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 220px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-md); border: 1px solid var(--border);
  padding: 8px; z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 7px 12px; border-radius: 8px;
  font-size: .88rem; color: #374151; transition: all .15s;
}
.nav-dropdown-menu a:hover { background: #f3f4f6; }
.nav-dropdown-menu a.active { background: #ede9fe; color: var(--primary); font-weight: 600; }
.dropdown-group { margin-bottom: 4px; }
.dropdown-label { font-size: .72rem; font-weight: 700; letter-spacing: .5px; color: #9ca3af; padding: 6px 12px 2px; text-transform: uppercase; }
.chapters-menu, .tools-menu { min-width: 260px; }
/* 汉堡按钮 */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 6px;
}
.nav-hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }
/* 侧边栏 */
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 300; }
.nav-overlay.show { display: block; }
.nav-sidebar {
  position: fixed; top: 0; right: -320px; bottom: 0;
  width: min(320px, 88vw);
  background: linear-gradient(160deg, #4c1d95, #2d1665);
  z-index: 400; overflow-y: auto; padding: 1.5rem 1rem;
  transition: right .3s ease;
}
.nav-sidebar.open { right: 0; }
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; font-weight: 700; font-size: 1rem; color: white;
}
.sidebar-close { background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }
.sidebar-body a { display: block; padding: .5rem .8rem; color: rgba(255,255,255,.88); font-size: .9rem; border-radius: 6px; transition: all .2s; text-decoration: none; }
.sidebar-body a:hover, .sidebar-body a.active { background: rgba(255,255,255,.15); color: #fff; }
.sidebar-section { font-size: .7rem; font-weight: 700; letter-spacing: 1px; color: rgba(255,255,255,.5); padding: .8rem .5rem .3rem; text-transform: uppercase; }
.sidebar-link { display: block; padding: .5rem .8rem; color: rgba(255,255,255,.88); font-size: .9rem; border-radius: 6px; transition: all .2s; text-decoration: none; }
.sidebar-link:hover, .sidebar-link.active { background: rgba(255,255,255,.15); color: #fff; }

/* ── 面包屑 ── */
.breadcrumb {
  max-width: 1200px; margin: 0 auto;
  padding: .7rem 1.5rem; font-size: .82rem; color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--primary); font-weight: 600; }

/* ── 页面 Hero ── */
.page-hero {
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 55%, #7c3aed 100%);
  color: #fff; padding: 3rem 1.5rem 2.5rem;
}
.page-hero-inner { max-width: 860px; margin: 0 auto; }
.chapter-badge {
  display: inline-block; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28); border-radius: 20px;
  padding: .25rem .9rem; font-size: .82rem; font-weight: 600;
  letter-spacing: .5px; margin-bottom: 1rem;
}
.page-hero h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; line-height: 1.3; margin-bottom: .7rem; }
.page-hero-sub { font-size: 1.05rem; opacity: .88; max-width: 660px; }

/* 工具页 Hero 变体 */
.tool-hero { background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 40%, #7c3aed 100%); }

/* ── 主体布局 ── */
.main-content {
  max-width: 1200px; margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem; align-items: start;
}
.main-content.full-width {
  grid-template-columns: 1fr;
  max-width: none;
  padding: 0;
}
.article { min-width: 0; }
.article h2 {
  font-size: 1.3rem; font-weight: 700; margin: 2rem 0 .8rem;
  color: var(--primary-dark); padding-bottom: .4rem;
  border-bottom: 2px solid var(--primary-light);
}
.article h3 { font-size: 1.05rem; font-weight: 700; margin: 1.4rem 0 .5rem; color: var(--text); }
.article p { margin-bottom: .9rem; }
.article ul li, .article ol li { margin-bottom: .4rem; }

/* 章节导入语 */
.chapter-intro {
  background: var(--primary-light); border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem; margin-bottom: 1.8rem; font-size: 1.02rem;
}

/* ── 侧边栏卡片 ── */
.sidebar { display: flex; flex-direction: column; gap: 1.2rem; }
.sidebar-card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow);
}
.sidebar-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .8rem; color: var(--primary-dark); }
.sidebar-card ul { list-style: none; padding: 0; }
.sidebar-card ul li { padding: .3rem 0; font-size: .88rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.sidebar-card ul li:last-child { border-bottom: none; }
.sidebar-card ul li a { color: var(--primary); }
.sc-alert { border-left: 4px solid #ef4444; }
.sc-alert h3 { color: #b91c1c; }
.sc-urgent { border-left: 4px solid #dc2626; background: #fff5f5; }
.sc-urgent h3 { color: #991b1b; }

/* ── 信息盒子 ── */
.info-box {
  border-radius: var(--radius); padding: 1.1rem 1.3rem;
  margin: 1.2rem 0; position: relative;
}
.info-box::before {
  content: attr(data-label); display: block;
  font-size: .75rem; font-weight: 700; letter-spacing: .5px;
  margin-bottom: .5rem; opacity: .85;
}
.ib-purple { background: var(--primary-light); border-left: 4px solid var(--primary); }
.ib-red    { background: #fff5f5; border-left: 4px solid #ef4444; }
.ib-yellow { background: #fffbeb; border-left: 4px solid #f59e0b; }
.ib-green  { background: #f0fdf4; border-left: 4px solid #22c55e; }
.ib-blue   { background: #eff6ff; border-left: 4px solid #3b82f6; }
.ib-gray   { background: #f8fafc; border-left: 4px solid #94a3b8; }

/* ── 关键概念 ── */
.key-concept {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border: 1px solid #c4b5fd; border-radius: var(--radius);
  padding: 1.2rem 1.4rem; margin: 1.2rem 0;
}
.key-concept h3 { color: var(--primary-dark); font-size: 1rem; margin-bottom: .5rem; }

/* ── 生活例子 ── */
.life-example {
  background: #fefce8; border: 1px dashed #fbbf24;
  border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.2rem 0;
  font-size: .95rem;
}
.life-example::before {
  content: '💡 生活场景'; display: block;
  font-size: .75rem; font-weight: 700; color: #92400e; margin-bottom: .4rem;
}

/* ── 误区纠正 ── */
.misconception {
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.2rem 0;
}
.misconception .myth { display: block; color: #dc2626; font-size: .9rem; margin-bottom: .4rem; }
.misconception .truth { display: block; color: #16a34a; font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }

/* ── 四格问题框 ── */
.four-questions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin: 1.2rem 0;
}
.fq-item {
  border-radius: var(--radius); padding: 1rem 1.1rem;
  border: 1px solid var(--border);
}
.fq-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.fq-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.fq-label { font-weight: 700; font-size: .95rem; }
.fq-content { font-size: .88rem; color: var(--text-muted); line-height: 1.6; }
.fq-what  { background: #f5f3ff; } .fq-what .fq-num  { background: var(--primary); color: #fff; }
.fq-why   { background: #eff6ff; } .fq-why .fq-num   { background: #3b82f6; color: #fff; }
.fq-matter{ background: #f0fdf4; } .fq-matter .fq-num{ background: #22c55e; color: #fff; }
.fq-action{ background: #fff7ed; } .fq-action .fq-num{ background: #f59e0b; color: #fff; }

/* ── 流程链 ── */
.flow-chain {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .4rem; margin: 1.2rem 0; padding: 1rem 1.2rem;
  background: var(--primary-light); border-radius: var(--radius);
}
.flow-node {
  background: #fff; border: 2px solid var(--primary);
  border-radius: var(--radius-sm); padding: .4rem .8rem;
  font-size: .88rem; font-weight: 600; color: var(--primary-dark);
  white-space: nowrap;
}
.flow-arrow { color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.flow-node.fn-danger { border-color: #ef4444; color: #991b1b; background: #fff5f5; }
.flow-node.fn-ok { border-color: #22c55e; color: #166534; background: #f0fdf4; }

/* ── 流程步骤（竖向） ── */
.flow-steps { margin: 1.2rem 0; }
.flow-step {
  display: flex; gap: 1rem; margin-bottom: 1.2rem;
}
.fs-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
}
.fs-body { flex: 1; }
.fs-title { font-weight: 700; margin-bottom: .3rem; color: var(--primary-dark); }
.fs-desc { font-size: .92rem; color: var(--text-muted); line-height: 1.65; }

/* ── 统计网格 ── */
.stat-grid {
  display: grid; gap: 1rem; margin: 1.2rem 0;
}
.sg-2 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.sg-3 { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.sg-4 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.sg-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem 1rem; text-align: center;
  box-shadow: var(--shadow);
}
.sg-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.sg-label { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }

/* ── 对比盒子 ── */
.comparison-box {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin: 1.2rem 0;
}
.cb-normal, .cb-path {
  border-radius: var(--radius); padding: 1.1rem; border: 2px solid;
}
.cb-normal { border-color: #22c55e; background: #f0fdf4; }
.cb-path   { border-color: #ef4444; background: #fff5f5; }
.cb-label { font-weight: 700; margin-bottom: .6rem; font-size: .9rem; }
.cb-normal .cb-label { color: #166534; }
.cb-path   .cb-label { color: #991b1b; }
.cb-content ul { font-size: .9rem; color: var(--text-muted); }
.cb-content ul li { margin-bottom: .3rem; }

/* ── 行动清单 ── */
.action-list {
  background: #f0fdf4; border: 1px solid #86efac;
  border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.5rem 0;
}
.action-list h3 { color: #166534; margin-bottom: .7rem; font-size: 1rem; }
.action-list ul { list-style: none; padding: 0; }
.action-list ul li {
  padding: .4rem 0 .4rem 1.6rem; position: relative;
  font-size: .93rem; border-bottom: 1px dashed #bbf7d0; color: var(--text);
}
.action-list ul li:last-child { border-bottom: none; }
.action-list ul li::before { content: '✅'; position: absolute; left: 0; }

/* ── 警告清单 ── */
.warning-list {
  background: #fff5f5; border: 1px solid #fca5a5;
  border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.5rem 0;
}
.warning-list h3 { color: #991b1b; margin-bottom: .7rem; font-size: 1rem; }
.warning-list ul { list-style: none; padding: 0; }
.warning-list ul li {
  padding: .4rem 0 .4rem 1.6rem; position: relative;
  font-size: .93rem; border-bottom: 1px dashed #fecaca; color: var(--text);
}
.warning-list ul li:last-child { border-bottom: none; }
.warning-list ul li::before { content: '⚠️'; position: absolute; left: 0; }

/* ── 决策树 ── */
.decision-tree { margin: 1.2rem 0; }
.dt-node { border-radius: var(--radius); padding: .9rem 1.2rem; margin-bottom: .8rem; }
.dt-question { background: var(--primary); color: #fff; font-weight: 700; }
.dt-content { font-size: .97rem; }
.dt-branches { display: flex; flex-direction: column; gap: .7rem; margin-left: 1rem; }
.dt-branch {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.dt-condition {
  background: var(--primary-light); color: var(--primary-dark);
  padding: .55rem 1rem; font-size: .88rem; font-weight: 600;
}
.dt-result {
  padding: .6rem 1rem; font-size: .9rem; line-height: 1.6; color: var(--text);
}
.dt-tag {
  display: inline-block; border-radius: 4px;
  font-size: .72rem; font-weight: 700; padding: .1rem .45rem; margin-right: .4rem;
}
.dt-tag-common    { background: #dbeafe; color: #1d4ed8; }
.dt-tag-urgent    { background: #fef3c7; color: #92400e; }
.dt-tag-emergency { background: #fee2e2; color: #991b1b; }

/* ── 筛选按钮 ── */
.filter-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.fb-btn {
  padding: .4rem .9rem; border-radius: 20px;
  font-size: .85rem; font-weight: 600; cursor: pointer;
  border: 2px solid var(--primary-light); color: var(--primary-dark);
  background: var(--bg-card); transition: var(--transition);
}
.fb-btn:hover, .fb-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── 指标表格 ── */
.indicator-table { overflow-x: auto; margin: 1.2rem 0; }
.indicator-table table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem;
}
.indicator-table th {
  background: var(--primary-dark); color: #fff;
  padding: .6rem .8rem; text-align: left; font-weight: 600;
}
.indicator-table td {
  padding: .55rem .8rem; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.indicator-table tr:nth-child(even) td { background: #f8fafc; }
.indicator-table tr:hover td { background: var(--primary-light); }

/* ── FAST 专用大卡片 ── */
.fast-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; margin: 1.2rem 0;
}
.fast-card {
  border-radius: var(--radius); padding: 1.4rem 1.2rem; text-align: center;
  color: #fff; box-shadow: var(--shadow-md);
}
.fast-card .fast-letter { font-size: 3rem; font-weight: 900; line-height: 1; margin-bottom: .4rem; }
.fast-card .fast-word { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; opacity: .9; }
.fast-card .fast-desc { font-size: .85rem; opacity: .85; line-height: 1.5; }
.fast-f { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.fast-a { background: linear-gradient(135deg, #d97706, #b45309); }
.fast-s { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.fast-t { background: linear-gradient(135deg, #7c3aed, #5b21b6); }

/* ── 时间轴 ── */
.timeline { margin: 1.2rem 0; padding-left: 1.5rem; border-left: 3px solid var(--primary-light); }
.tl-item { position: relative; padding: .8rem 0 .8rem 1.5rem; }
.tl-dot {
  position: absolute; left: -1.75rem; top: 1.1rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.tl-time { font-size: .78rem; font-weight: 700; color: var(--primary); letter-spacing: .5px; }
.tl-title { font-weight: 700; margin: .2rem 0; }
.tl-desc { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }
.tl-item.tl-urgent .tl-dot { background: #dc2626; box-shadow: 0 0 0 2px #dc2626; }
.tl-item.tl-urgent .tl-time { color: #dc2626; }

/* ── 章节导航 ── */
.chapter-nav {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 2px solid var(--border);
}
.chapter-nav a {
  display: flex; flex-direction: column; padding: .9rem 1.2rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); color: var(--text);
  transition: var(--transition); max-width: 48%;
  box-shadow: var(--shadow);
}
.chapter-nav a:hover { border-color: var(--primary); box-shadow: var(--shadow-md); color: var(--text); }
.chapter-nav a.next { text-align: right; margin-left: auto; }
.nav-label { font-size: .75rem; color: var(--text-muted); margin-bottom: .2rem; }

/* ── 首页 Hero ── */
.index-hero {
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 55%, #7c3aed 100%);
  color: #fff; padding: 4rem 1.5rem 3.5rem; text-align: center;
  min-height: calc(100vh - 44px); display: flex; flex-direction: column; justify-content: center;
}
.index-hero-inner { max-width: 900px; margin: 0 auto; text-align: center; width: 100%; }
.index-hero-badge {
  display: inline-block; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35); border-radius: 20px;
  padding: .28rem 1rem; font-size: .82rem; font-weight: 600;
  letter-spacing: .5px; margin-bottom: 1rem;
}
.index-hero-title { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 900; margin: 0 0 .8rem; line-height: 1.2; }
.index-hero-sub { font-size: 1.1rem; opacity: .88; max-width: 560px; margin: 0 auto 1.8rem; line-height: 1.7; }
.index-hero-stats {
  display: flex; justify-content: center; align-items: center;
  background: rgba(255,255,255,.1); border-radius: 14px;
  padding: 1rem 1.5rem; margin: 0 auto 1.8rem; max-width: 560px;
}
.ihs-item { text-align: center; padding: 0.5rem 1.5rem; flex: 1; min-width: 80px; }
.ihs-num { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.ihs-label { display: block; font-size: .72rem; opacity: .8; margin-top: .2rem; }
.ihs-divider { width: 1px; height: 36px; background: rgba(255,255,255,.25); flex-shrink: 0; }
.index-hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.8rem; }
.hero-btn-primary {
  background: #fff; color: var(--primary-dark);
  padding: .75rem 2rem; border-radius: 30px;
  font-weight: 700; font-size: 1rem; transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.hero-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); color: var(--primary-dark); }
.hero-btn-outline {
  background: rgba(255,255,255,.18); color: #fff;
  padding: .75rem 2rem; border-radius: 30px;
  font-weight: 600; font-size: 1rem; border: 2px solid rgba(255,255,255,.4);
  transition: var(--transition);
}
.hero-btn-outline:hover { background: rgba(255,255,255,.28); color: #fff; }
.index-hero-icons { margin-top: 1.5rem; font-size: 2rem; display: flex; justify-content: center; gap: 1rem; opacity: .6; flex-wrap: wrap; }

/* ── 首页分区 ── */
.home-section { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.home-section h2 {
  font-size: 1.3rem; font-weight: 800; color: var(--primary-dark);
  margin-bottom: 1.2rem; padding-bottom: .5rem;
  border-bottom: 3px solid var(--primary-light);
}
.chapter-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.chapter-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.3rem 1.4rem;
  transition: var(--transition); box-shadow: var(--shadow);
  display: block; color: var(--text);
}
.chapter-card:hover {
  border-color: var(--primary); transform: translateY(-2px);
  box-shadow: var(--shadow-md); color: var(--text);
}
.chapter-card .ch-num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: white; width: 32px; height: 32px; border-radius: 50%; font-size: 0.82rem; font-weight: 700; }
.chapter-card .ch-title { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.chapter-card .ch-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }

/* 工具卡片 */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.tool-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius); padding: 1.4rem;
  color: #fff; display: block; transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(124,58,237,.3); color: #fff; }
.tool-card .tc-icon { font-size: 2rem; margin-bottom: .6rem; }
.tool-card .tc-title { font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.tool-card .tc-desc { font-size: .85rem; opacity: .85; }

/* 提示卡片 */
.tip-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.tip-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.tip-card .tip-icon { font-size: 1.5rem; margin-bottom: .5rem; }
.tip-card .tip-title { font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.tip-card .tip-desc { font-size: .83rem; color: var(--text-muted); line-height: 1.55; }

/* ── 页脚 ── */
.site-footer {
  background: var(--primary-dark); color: rgba(255,255,255,.7);
  text-align: center; padding: 2rem 1.5rem; font-size: .88rem; margin-top: 3rem;
}
.site-footer a { color: rgba(255,255,255,.85); }

/* ── 响应式 ── */
@media (max-width: 900px) {
  .main-content { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .top-nav .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 640px) {
  .comparison-box { grid-template-columns: 1fr; }
  .fast-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 1rem 1.5rem; }
  .chapter-nav { flex-direction: column; }
  .chapter-nav a { max-width: 100%; }
  .hero-btn-primary, .hero-btn-outline { padding: .6rem 1rem; font-size: .9rem; }
  .index-hero-cta { gap: 10px; }
  .ihs-item { min-width: 0; }
}

/* ===== 紧凑布局修正 ===== */
.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; }
