:root {
  --bg: #f5f5f5;
  --bg2: #ffffff;
  --ink: #1a1a1a;
  --muted: #666666;
  --rule: #d0d0d0;
  --accent: #b91c1c;
  --accent2: #1e3a5f;
  --accent2-light: #2c5282;
  --warn: #c98a2e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
}
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 220px;
  background: var(--accent2);
  color: #fff;
  padding: 20px 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 12px;
}
.sidebar-brand h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.3;
}
.sidebar-brand .subtitle {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 6px;
}
.sidebar-nav {
  list-style: none;
  padding: 8px 0;
}
.sidebar-nav li {
  margin-bottom: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  user-select: none;
}
.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.nav-item.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 500;
  border-left-color: var(--accent);
}
.nav-item .nav-icon { font-size: 16px; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: auto;
  font-size: 12px;
  opacity: 0.6;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  padding: 20px 26px 40px;
  max-width: none;
  width: 100%;
  min-width: 0;
}

/* ===== Page Header ===== */
.page-header {
  margin-bottom: 20px;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 4px;
}
.page-meta {
  font-size: 13px;
  color: var(--muted);
}

/* ===== Section ===== */
.section { display: none; }
.section.active { display: block; }

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent2);
  padding: 10px 14px;
  background: var(--bg2);
  border-left: 4px solid var(--accent);
  margin-bottom: 12px;
  border-radius: 0 4px 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.section-title .count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar select,
.filter-bar input {
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  outline: none;
}
.filter-bar select:focus,
.filter-bar input:focus { border-color: var(--accent2-light); }
.filter-bar input { min-width: 200px; flex: 1; }
.filter-bar .filter-hint {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}

/* ===== Card ===== */
.news-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1.4;
  flex: 1;
  min-width: 200px;
}
.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.tag-cat-pol { background: #fde8e8; color: #991b1b; }
.tag-cat-eco { background: #e0f2fe; color: #075985; }
.tag-cat-soc { background: #fef3c7; color: #92400e; }
.tag-cat-law { background: #f3e8ff; color: #6b21a8; }
.tag-cat-tech { background: #d1fae5; color: #065f46; }
.tag-cat-env { background: #dcfce7; color: #166534; }
.tag-cat-cul { background: #fce7f3; color: #9d174d; }
.tag-cat-rural { background: #ffedd5; color: #9a3412; }
.tag-cat-intl { background: #e0e7ff; color: #3730a3; }
.tag-cat-party { background: #fee2e2; color: #991b1b; }
.tag-cat-region { background: #fed7aa; color: #9a3412; }
.tag-cat-gen { background: #f3f4f6; color: #4b5563; }
.tag-time { background: #f3f4f6; color: #4b5563; }
.tag-source { background: #eff6ff; color: #1e40af; }

/* ===== Content Blocks ===== */
.block { margin-bottom: 10px; }
.block-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.block-text { font-size: 13.5px; color: var(--ink); line-height: 1.8; }
.block-text p { margin-bottom: 6px; }
.block-text p:last-child { margin-bottom: 0; }

/* 相关报道 */
.related-list { list-style: none; padding: 0; margin: 0; }
.related-item {
  padding: 5px 0;
  font-size: 12.5px;
  line-height: 1.6;
  display: flex;
  gap: 8px;
  border-bottom: 1px dashed #f3f4f6;
}
.related-item:last-child { border-bottom: none; }
.related-date { color: #9ca3af; white-space: nowrap; flex-shrink: 0; }
.related-item a { color: #374151; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.related-item a:hover { color: var(--accent2); }

/* ===== Material Box (要点摘录) ===== */
.material-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
}
.material-label {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 4px;
}
.material-text { font-size: 13px; color: var(--ink); line-height: 1.8; }
.material-text .hl {
  background: #fef3c7;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 600;
}

/* ===== Card Footer ===== */
.card-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 6px;
}
.card-footer a {
  color: var(--accent2);
  text-decoration: none;
}
.card-footer a:hover { text-decoration: underline; }

/* ===== Focus Card (重点关注) ===== */
.focus-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}
.focus-card::before {
  content: '⭐ 重点关注';
  position: absolute;
  top: 0;
  right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 0 0 4px 4px;
  font-weight: 600;
}
.focus-card .focus-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-right: 70px;
}
.focus-level-tag {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
}
.lv-high { background: var(--accent); }
.lv-mid { background: var(--warn); }
.lv-low { background: #8a94a0; }
.focus-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1.4;
}
.focus-tip-box {
  background: #fef2f2;
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  padding: 8px 12px;
  margin-top: 10px;
}
.focus-tip-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 3px;
}
.focus-tip-text { font-size: 13px; color: #7f1d1d; line-height: 1.7; }

.focus-remember-box {
  background: #fef3c7;
  border-left: 3px solid var(--warn);
  border-radius: 0 4px 4px 0;
  padding: 8px 12px;
  margin-top: 10px;
}
.focus-remember-label {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 3px;
}
.focus-remember-text { font-size: 13px; color: #78350f; line-height: 1.7; }

/* ===== Topic Card (主题脉络) ===== */
.topic-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
}
.topic-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.topic-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent2);
}
.topic-meta {
  font-size: 12px;
  color: var(--muted);
}
.topic-level {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
}

.timeline {
  margin-top: 8px;
  padding-left: 4px;
}
.timeline-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent2);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.timeline-item {
  font-size: 12.5px;
  padding: 4px 0 4px 14px;
  border-left: 2px solid #e3eaf5;
  margin-left: 4px;
  position: relative;
  color: #444;
  line-height: 1.6;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent2-light);
}
.timeline-item .tl-date {
  color: var(--muted);
  font-size: 11.5px;
  margin-right: 6px;
}

.topic-recent {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
}
.topic-recent-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.topic-recent ul { list-style: none; padding: 0; margin: 0; }
.topic-recent li {
  font-size: 12.5px;
  padding: 3px 0;
  color: #555;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topic-recent li::before { content: '·'; color: #bbb; margin-right: 5px; }

.cooling-section .cooling-body { display: none; }
.cooling-section.open .cooling-body { display: block; }
.cooling-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cooling-toggle .caret {
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.2s;
  display: inline-block;
}
.cooling-section.open .cooling-toggle .caret { transform: rotate(90deg); }

/* ===== Quote Card (金句) ===== */
.quote-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--warn);
  border-radius: 0 6px 6px 0;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.quote-text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.9;
  margin-bottom: 8px;
}
.quote-text::before { content: '「'; color: var(--warn); }
.quote-text::after { content: '」'; color: var(--warn); }
.quote-from {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.quote-from a {
  color: var(--accent2);
  text-decoration: none;
}
.quote-from a:hover { text-decoration: underline; }

/* ===== Ask Section ===== */
.ai-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #7a4b00;
  background: linear-gradient(135deg, #ffe9a8 0%, #f7bf45 100%);
  border: 1px solid #e5ad34;
  padding: 2px 9px;
  border-radius: 10px;
  letter-spacing: 0.2px;
}
.ask-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px;
}
.ask-intro {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 14px;
}
.ask-ability {
  list-style: none;
  margin: 8px 0 11px;
  padding: 0;
}
.ask-ability li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 4px;
  line-height: 1.85;
}
.ask-ability li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent2);
}
.ask-ability b {
  color: #1a1a1a;
  font-weight: 600;
  margin-right: 2px;
}
.ask-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  padding-top: 9px;
  border-top: 1px dashed var(--rule);
}
.ask-row { display: flex; gap: 8px; margin-bottom: 10px; }
.ask-row input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid #d7dbe0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.ask-row input:focus { border-color: var(--accent2); }
.ask-btn {
  padding: 0 20px;
  background: var(--accent2);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.ask-btn:hover { background: var(--accent2-light); }
.ask-btn:disabled { background: #bbb; cursor: not-allowed; }
.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.ask-chip {
  font-size: 12.5px;
  padding: 5px 11px;
  background: #f2f4f7;
  border: 1px solid #e2e6ea;
  border-radius: 20px;
  cursor: pointer;
  color: #555;
}
.ask-chip:hover {
  background: #e8eef7;
  border-color: #c9d6e8;
  color: var(--accent2);
}
.ask-status {
  font-size: 12.5px;
  color: var(--muted);
  min-height: 18px;
  margin-bottom: 8px;
}
.ask-answer {
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  background: #fafbfc;
  border: 1px solid #eceff2;
  border-radius: 6px;
  padding: 14px 16px;
}
.ask-answer:empty { display: none; }
/* 大模型返回的是 markdown，以前直接 textContent 输出，满屏 # 和 ** 看着像乱码 */
.md-h {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent2);
  margin: 12px 0 4px;
}
.md-h:first-child { margin-top: 0; }
.md-ul { margin: 4px 0 8px; padding-left: 20px; }
.md-ul li { margin: 3px 0; }
.md-p { margin: 4px 0; }
.ask-sources { margin-top: 12px; font-size: 12.5px; }
.ask-sources a { color: var(--accent2); text-decoration: none; }
.ask-sources a:hover { text-decoration: underline; }
.ask-src-item {
  padding: 6px 0;
  border-bottom: 1px dashed #eceff2;
  line-height: 1.7;
}
.ask-src-head {
  font-weight: 600;
  margin: 10px 0 4px;
  color: var(--accent2);
}
.src-kind {
  display: inline-block;
  font-size: 11px;
  background: #eef2f9;
  color: var(--accent2);
  border-radius: 3px;
  padding: 1px 6px;
  margin-right: 4px;
  vertical-align: 1px;
}
.src-meta { color: #888; font-size: 11.5px; margin-top: 2px; }

/* ===== Empty State ===== */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 14px;
  background: var(--bg2);
  border: 1px dashed var(--rule);
  border-radius: 6px;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 14px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
  border-top: 1px solid var(--rule);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 12px 0;
  }
  .sidebar-brand {
    padding: 0 16px 12px;
    margin-bottom: 8px;
  }
  .sidebar-brand h1 { font-size: 16px; }
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 0 8px;
    gap: 4px;
  }
  .sidebar-nav li { margin-bottom: 0; flex-shrink: 0; }
  .nav-item {
    padding: 8px 14px;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 4px 4px 0 0;
    font-size: 13px;
  }
  .nav-item.active {
    border-left: none;
    border-bottom-color: var(--accent);
  }
  .sidebar-footer { display: none; }
  .main-content { padding: 16px; }
  .page-title { font-size: 18px; }
  .news-card, .focus-card, .topic-card, .quote-card { padding: 12px; }
  .filter-bar input { min-width: 100%; }
  .filter-bar .filter-hint { margin-left: 0; width: 100%; }
}

/* ===== 云南专区 ===== */
.yn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.yn-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 14px;
  border-top: 3px solid #16a34a;
}
.yn-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.yn-card p {
  font-size: 13px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 5px;
}
.yn-card p:last-child { margin-bottom: 0; }
.yn-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.yn-card li {
  font-size: 12.5px;
  color: #444;
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.6;
}
.yn-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: bold;
}
.yn-card .yn-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e5e7eb;
}

.yn-city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.yn-city {
  background: #dcfce7;
  color: #166534;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12.5px;
  text-align: center;
  font-weight: 500;
}

/* ===== 重大事件时间线 ===== */
.big-events-block {
  margin-bottom: 24px;
  padding: 16px;
  background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
  border-radius: 8px;
  border: 1px solid #fde68a;
}
.big-events-title {
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.big-event-card {
  background: #fff;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-left: 4px solid #f59e0b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.big-event-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.big-event-name {
  font-size: 15px;
  font-weight: 700;
  color: #78350f;
  line-height: 1.4;
  flex: 1;
  min-width: 180px;
}
.big-event-meta {
  font-size: 12px;
  color: #92400e;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.big-event-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #78350f;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.big-event-stats span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.big-event-timeline {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #fde68a;
}
.big-event-timeline-title {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 6px;
}
.big-event-tl-item {
  font-size: 12px;
  color: #78350f;
  padding: 3px 0;
  display: flex;
  gap: 8px;
  line-height: 1.5;
}
.big-event-tl-date {
  color: #b45309;
  font-weight: 600;
  white-space: nowrap;
  min-width: 80px;
}
.big-event-tl-item a {
  color: #78350f;
  text-decoration: none;
}
.big-event-tl-item a:hover {
  text-decoration: underline;
}

/* ===== 文件库 ===== */
.doc-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  border-left: 4px solid var(--accent2);
}
.doc-card.high-level {
  border-left-color: var(--accent);
  background: linear-gradient(to right, #fff5f5 0%, #fff 15%);
}
.doc-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.doc-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1.4;
  flex: 1;
  min-width: 200px;
}
.doc-high-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}
.doc-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.doc-body {
  font-size: 13px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 8px;
}
.doc-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
}
.doc-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.doc-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.doc-links li {
  font-size: 12.5px;
  padding: 3px 0;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-links li::before { content: '·'; color: #bbb; margin-right: 5px; }
.doc-links a { color: var(--accent2); text-decoration: none; }
.doc-links a:hover { text-decoration: underline; }
.doc-links .src-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #eff6ff;
  color: #1e40af;
  margin-right: 6px;
  font-weight: 500;
}

/* ===== 权威资源：外层是普通容器，每个分组内部才是双栏 =====
   以前外层自己也是 card-grid，分组里的 card-grid 被当成"一个格子"，
   于是每组只占 400px 一列、右边整片空白、左边要拉很久。 */
.rd-wrap { display: block; }
.rd-wrap .group-title { display: block; }
.rd-wrap .card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}
@media (max-width: 1000px) { .rd-wrap .card-grid { grid-template-columns: 1fr; } }

/* ===== 全宽多列（占满屏幕） ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 14px;
  align-items: start;
}
.card-grid > * { margin-bottom: 0; }
.span-all { grid-column: 1 / -1; }
@media (min-width: 1700px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); }
}
@media (max-width: 1000px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ===== 静态文件库 / 议题 / 金句 / 解读 通用卡片 ===== */
.lib-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lib-card.level1 { border-left: 4px solid var(--accent); }
.lib-card.level2 { border-left: 4px solid var(--accent2-light); }
.lib-card.level3 { border-left: 4px solid #9ca3af; }
.lib-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.lib-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1.45;
  flex: 1;
  min-width: 180px;
}
.lib-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #4b5563;
  white-space: nowrap;
}
.lib-badge.new { background: #dcfce7; color: #166534; }
.lib-badge.top { background: var(--accent); color: #fff; }
.lib-sub {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.lib-body { font-size: 13px; color: #444; line-height: 1.75; }
.lib-points { list-style: none; padding: 0; margin: 0; }
.lib-points li {
  font-size: 12.5px;
  color: #444;
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.7;
}
.lib-points li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-weight: 700;
}
.lib-foot {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
  font-size: 12.5px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.lib-foot a { color: var(--accent2); text-decoration: none; }
.lib-foot a:hover { text-decoration: underline; }

/* ===== 议题时间轴 ===== */
.ag-timeline { margin-top: 2px; }
.ag-tl-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 6px;
}
.ag-tl-item {
  font-size: 12.5px;
  padding: 4px 0 4px 14px;
  border-left: 2px solid #e3eaf5;
  margin-left: 4px;
  position: relative;
  color: #444;
  line-height: 1.65;
}
.ag-tl-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent2-light);
}
.ag-tl-date { color: var(--muted); font-size: 11.5px; margin-right: 6px; font-weight: 600; }
.ag-why {
  background: #fffbeb;
  border-left: 3px solid var(--warn);
  border-radius: 0 4px 4px 0;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.7;
}
.ag-kw {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.ag-kw span {
  display: inline-block;
  background: #f3f4f6;
  color: #4b5563;
  padding: 1px 7px;
  border-radius: 10px;
  margin-right: 5px;
}

/* ===== 金句 ===== */
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start; }
.q-group-title { grid-column: 1 / -1; }
@media (max-width: 1000px) { .q-grid { grid-template-columns: 1fr; } }
/* 重点金句：不打文字角标（避免被读成"要背下来"），改用金星标识，只表示"重点" */
.q-must::after {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 6px;
  vertical-align: -1px;
  background: radial-gradient(circle at 35% 28%, #ffeaa0 0%, #f7bf45 55%, #e08e0b 100%);
  clip-path: polygon(50% 0%, 61% 34%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 34%);
}

/* ===== 解读资料 ===== */
.rd-link {
  display: inline-block;
  margin-top: 2px;
  font-size: 12.5px;
  color: #fff;
  background: var(--accent2);
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
}
.rd-link:hover { background: var(--accent2-light); }
.rd-note { font-size: 12.5px; color: #555; line-height: 1.75; }

/* ===== 主题分组标题 ===== */
.group-title {
  grid-column: 1 / -1;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent2);
  padding: 8px 14px;
  background: var(--bg2);
  border-left: 4px solid var(--accent);
  border-radius: 0 4px 4px 0;
  margin-top: 4px;
}
.group-title .count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}

/* ===== 运行状况条（每个页签都能看到） ===== */
.health-bar:empty { display: none; }
.health-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #444;
  margin-bottom: 12px;
}
.hb-dot { width: 9px; height: 9px; border-radius: 50%; background: #bbb; flex: 0 0 auto; }
.hb-dot.ok { background: #2f9e44; }
.hb-dot.warn { background: var(--warn); }
.hb-status { font-weight: 700; color: var(--accent2); }
.hb-item { color: #555; }
.hb-item.warn-text { color: #b91c1c; }
.hb-push {
  background: var(--accent2); color: #fff; padding: 2px 10px;
  border-radius: 10px; font-weight: 600; font-size: 12px;
}
.hb-push.alert { background: var(--accent); }
.hb-reason { color: #666; flex: 1 1 240px; min-width: 180px; }
.hb-advice { flex: 1 1 100%; margin-top: 2px; }
.hb-advice summary { cursor: pointer; color: var(--warn); font-weight: 600; font-size: 12.5px; }
.hb-advice-item { font-size: 12.5px; color: #555; padding: 3px 0 3px 14px; }

/* ===== 事件链 ===== */
.chain-block {
  margin: 14px 0 18px;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 12px 14px;
}
.chain-title {
  font-size: 14px; font-weight: 700; color: var(--accent2); margin-bottom: 8px;
}
.chain-title .count {
  font-size: 12px; font-weight: 500; color: var(--muted);
  background: var(--bg); padding: 2px 8px; border-radius: 10px; margin-left: 6px;
}
.chain-hint { font-size: 12px; font-weight: 400; color: #888; margin-left: 8px; }
.chain-card { padding: 8px 0; border-top: 1px dashed var(--rule); }
.chain-card:first-of-type { border-top: none; }
.chain-name { font-weight: 600; color: #333; font-size: 13.5px; margin-bottom: 4px; }
.chain-steps { font-size: 12.5px; color: #444; line-height: 1.9; }
.chain-step {
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: 4px; padding: 2px 8px;
}
.chain-arrow { color: var(--accent); margin: 0 6px; font-weight: 700; }
.chain-note { font-size: 12px; color: #777; margin-top: 4px; }
