/* === CSS 变量 === */
:root {
  /*--primary: #1a5276;*/
  --primary: #94070a;
  --primary-light: #2980b9;
  /*--primary-dark: #0e3a54;*/
  --primary-dark: #94070a;
  --accent: #e74c3c;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --border: #dce1e5;
  --bg: #f4f6f8;
  --card: #ffffff;
  --header-full-height: 192px;
  --header-collapsed-height: 70px;
}

/* === 全局重置 === */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:"Microsoft YaHei","PingFang SC",sans-serif; color:var(--text); background:var(--bg); }

/* === 全屏阅读模式 === */
body.full-read .header-group { display:none !important; }
body.full-read #sec-app,
body.full-read #sec-rpt,
body.full-read #sec-prf,
body.full-read #sec-mat { padding-top:0 !important; height:100vh !important; }
body.full-read .evidence-layout { display:flex; flex:1; min-height:0; overflow:hidden; }
body.full-read .toc-sidebar { border-radius:0; }
body.full-read .toc-header { border-radius:0; }
.full-read-exit {
  position:fixed; top:10px; right:16px; z-index:200;
  padding:6px 16px; background:var(--primary); color:#fff;
  border:none; border-radius:4px; cursor:pointer; font-size:13px;
  box-shadow:0 2px 8px rgba(0,0,0,.3); display:none;
}
body.full-read .full-read-exit { display:block; }

/* === 导航栏 === */
.nav-bar {
  background:#fff; border-bottom:1px solid var(--border);
  display:flex; justify-content:center; gap:0; flex-wrap:wrap;
  height:52px; align-items:center;
}
.nav-bar a {
  padding: 14px 28px; font-size:20px; color:var(--text);
  text-decoration:none; border-bottom:3px solid transparent;
  transition: all .2s;
}
.nav-bar a:hover { color:#fff; background:var(--primary); border-radius:8px; }
.nav-bar a.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:bold; }

/* === 头部区域 === */
.header-group {
  position: sticky; top: 0; z-index: 100;
}
.site-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color:#fff; padding:20px 20px; text-align:center;
  cursor:pointer;
  transition: padding .2s;
}
.site-header.collapsed { padding:12px 20px; }
.site-header.collapsed img,
.site-header.collapsed p { display:none; }
.site-header.collapsed h1 { font-size:24px; margin:0; line-height:1.4; }
.header-group.collapsed .site-header {
  padding: 8px 20px;
}
.header-group.collapsed .site-header img,
.header-group.collapsed .site-header p { display: none; }
.header-group.collapsed .site-header h1 {
  font-size: 20px; margin: 0; line-height: 1.4;
}
.header-group.collapsed .nav-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  height: 40px;
  align-items: center;
}
.header-group.collapsed .nav-bar a {
  padding: 8px 18px;
  font-size: 16px;
  color: var(--text);
  border-bottom: 3px solid transparent;
}
.header-group.collapsed .nav-bar a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: bold;
}
.header-group.collapsed .nav-bar a:hover {
  color: #fff;
  background: var(--primary);
  border-radius: 8px;
}
.site-header h1 { font-size:34px; margin:8px 0; }
.site-header p { font-size:20px; opacity:.85; margin-top:2px; }

/* === 通用区块与内容样式 === */
.section { display:none; padding:20px; max-width:1200px; margin:0 auto; }
.section.active { display:block; }

/* PDF sections */

.section-title {
  font-size:20px; font-weight:600; color:var(--primary);
  margin-top:0; margin-bottom:20px; padding-bottom:12px;
  border-bottom:2px solid var(--accent); display:block;
}
.section > .section-title, .section > .content-block,
.section > .stats-row, .section > .timeline, .section > .highlight-grid {
  max-width:1280px; margin-left:auto; margin-right:auto;
}
.content-block {
  background:var(--card); border-radius:8px; padding:24px 28px;
  margin:18px 0; box-shadow:0 2px 12px rgba(0,0,0,0.08);
}
.content-block h3 {
  font-size:16px; color:var(--primary); margin-bottom:14px;
  padding-bottom:10px; border-bottom:1px solid var(--border);
}
.content-block p { font-size:14px; margin-bottom:10px; }
.content-block ul { padding-left:20px; }
.content-block li { font-size:14px; margin-bottom:6px; }
.ov-text { text-indent:2em; font-size:20px; line-height:1.9; color:#475569; }
.ov-text h2 { color:var(--primary); margin:20px 0 10px; font-size:20px; }
.ov-text p { margin:8px 0; }
.ov-img { width:100%; max-width:700px; margin:15px auto; display:block; border-radius:8px; box-shadow:0 2px 12px rgba(0,0,0,.1); }
.font-controls { text-align:right; margin-bottom:10px; }
.font-controls button {
  padding:4px 10px; border:1px solid var(--border); border-radius:3px;
  background:#fff; cursor:pointer; font-size:14px; margin-left:4px;
}
.font-controls button:hover { background:var(--bg); }

h3.section-header { color: var(--primary); margin-bottom: 12px; text-align: left; font-size: 18px; }

/* === PDF 板块（申报书/报告/证明材料/附件） === */
#sec-app.active, #sec-rpt.active, #sec-prf.active, #sec-mat.active {
  display:flex !important; height:calc(100vh - var(--header-full-height)); padding:0; max-width:none;
}

/* === 证据布局 — 目录侧边栏 === */
.evidence-layout { display:flex; height:100%; overflow:hidden; }
.toc-sidebar {
  width:480px; min-width:360px; max-width:600px; background:#fff;
  border-right:1px solid var(--border); display:flex; flex-direction:column;
  overflow:hidden;
}
.toc-header {
  padding:14px 16px; background:var(--card); color:var(--primary);
  font-size:18px; font-weight:600; flex-shrink:0;
  border-bottom:2px solid var(--accent);
}
.toc-header button {
  background:rgba(255,255,255,.2); color:#fff; border:1px solid rgba(255,255,255,.3);
  padding:2px 8px; border-radius:3px; cursor:pointer; font-size:13px; margin-left:4px;
}
.toc-search { padding:8px; border-bottom:1px solid var(--border); flex-shrink:0; display:flex; align-items:center; gap:6px; }
.toc-search input {
  flex:1; width:auto; padding:6px 8px; border:1px solid var(--border); border-radius:4px;
  font-size:15px;
}

.toc-search button {
  background:var(--primary); color:#fff; border:none;
  padding:6px 12px; border-radius:4px; cursor:pointer; font-size:13px;
  white-space:nowrap; flex-shrink:0;
}
.toc-search button:hover { opacity:0.85; }
.toc-body { flex:1; overflow-y:auto; padding:4px 0; }
.toc-item {
  padding:6px 12px; cursor:pointer; font-size:15px; color:var(--text);
  border-left:3px solid transparent; transition:all .15s;
  display:flex; justify-content:space-between;
  overflow-wrap:break-word; word-break:break-word; min-width:0;
}
.toc-item:hover { background:var(--bg); border-left-color:var(--primary-light); }
.toc-item.active { background:#e8f0fe; border-left-color:var(--primary); font-weight:bold; }
.toc-item.lv1 { font-weight:bold; font-size:14px; padding-left:10px; }
.toc-item.lv2 { padding-left:20px; }
.toc-item.lv3 { padding-left:30px; font-size:12px; color:var(--text-light); }
.page-num { color:var(--text-light); font-size:13px; flex-shrink:0; margin-left:auto; }
.toc-resize-handle {
  width:6px; cursor:col-resize; background:transparent; position:relative;
  flex-shrink:0; z-index:5;
}
.toc-resize-handle:hover, .toc-resize-handle.dragging { background:var(--primary); opacity:.7; }
.toc-resize-handle::after {
  content:"⋮"; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  color:#bbb; font-size:14px;
}

/* === 证据布局 — PDF 查看器 === */
.evidence-main { flex:1; display:flex; flex-direction:column; overflow:hidden; background:#e9ecef; }
.pdf-viewer-container { display:flex; flex-direction:column; height:100%; }
.pdf-toolbar {
  padding:6px 12px; background:#fff; border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:15px;
  flex-shrink:0;
}
.pdf-toolbar button {
  padding:3px 10px; border:1px solid var(--border); border-radius:3px;
  background:#fff; cursor:pointer; font-size:14px;
}
.pdf-toolbar button:hover { background:var(--bg); }
.pdf-toolbar input[type="number"] { padding:2px 4px; border:1px solid var(--border); border-radius:3px; }
.page-info { font-weight:bold; }
.pdf-page-wrapper {
  flex:1; overflow:auto; display:flex; justify-content:center;
  align-items:flex-start; padding:10px; background:#e9ecef;
}
.pdf-page-wrapper img { max-width:100%; box-shadow:0 2px 12px rgba(0,0,0,.15); }
.page-loading {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  font-size:16px; color:var(--primary);
}

/* === 缩放浮层 === */
.zoom-overlay {
  display:none; position:fixed; top:0; left:0; right:0; bottom:0;
  background:rgba(0,0,0,.85); z-index:1000; cursor:zoom-out;
  overflow:auto;
}
.zoom-overlay.active { display:flex; justify-content:center; align-items:flex-start; }
.zoom-overlay img {
  max-width:none; margin:20px auto; display:block;
}

/* === 全屏浮层 === */
#fullscreenOverlay {
  display:none; position:fixed; top:0; left:0; width:100vw; height:100vh;
  z-index:180; background:#000; overflow:auto;
  flex-direction:column; align-items:center;
}
#fullscreenOverlay img { max-width:95vw; margin:10px auto; }
#fullscreenOverlay .fs-controls {
  position:fixed; bottom:20px; left:50%; transform:translateX(-50%);
  background:rgba(0,0,0,.7); padding:8px 16px; border-radius:6px;
  color:#fff; font-size:14px; z-index:181; display:flex; gap:10px; align-items:center;
}
#fullscreenOverlay .fs-controls button {
  background:rgba(255,255,255,.2); color:#fff; border:none; padding:4px 12px;
  border-radius:3px; cursor:pointer;
}

/* === 首页样式 === */
.home-hero { text-align:center; }

.home-hero h2 { font-size:22px; color:var(--primary); margin-bottom:18px; }
.hero-title { font-size:22px; color:var(--primary); margin-bottom:18px; text-align:center; }
.home-hero .meta { display:flex; justify-content:center; align-items:center; gap:20px; flex-wrap:wrap; font-size:16px; color:var(--primary); text-align:center; width:100%; margin-bottom:18px; }

.stat-cards { display:flex; justify-content:center; gap:16px; flex-wrap:wrap; }
.stat-card { color:#fff; padding:14px 22px; border-radius:8px; min-width:140px; }
.stat-card .num { font-size:24px; font-weight:700; }
.stat-card .label { font-size:12px; opacity:0.9; margin-top:4px; }

.module-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.module-grid .span-full { grid-column:1 / -1; }
.module-card { border-radius:8px; padding:16px; cursor:pointer; transition:box-shadow 0.2s; }
.module-card:hover { box-shadow:0 4px 12px rgba(0,0,0,.1); }
.module-card .card-icon { font-weight:600; font-size:17px; margin-bottom:8px; }
.module-card .card-desc { font-size:16px; color:#555; line-height:1.6; margin-bottom:8px; }
.module-card .card-list { font-size:15px; color:#444; line-height:2; }

.card-overview { background:#f0f7ff; border-left:4px solid #1a5276; }
.card-app     { background:#f0f7ff; border-left:4px solid #2980b9; }
.card-rpt     { background:#fff8f0; border-left:4px solid #d35400; }
.card-prf     { background:#f0fff0; border-left:4px solid #27ae60; }
.card-mat     { background:#fef9ff; border-left:4px solid #8e44ad; }
