/* ═══ 大健康手记 — 共享样式 ═══ */
:root {
  --primary: #0f6e4a;
  --primary-light: #e8f5ee;
  --primary-dark: #0a5a3c;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --danger: #dc2626;
  --info: #2563eb;
  --gray-50: #f8faf9;
  --gray-100: #f0f2f1;
  --gray-200: #dde1df;
  --gray-400: #9ca3a0;
  --gray-600: #636b66;
  --gray-800: #2d3330;
  --gray-900: #1a1d1b;
  --bg: #fafbfa;
  --card: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══ Header (report pages) ═══ */
.report-header {
  background: linear-gradient(135deg, var(--primary) 0%, #0a5a3c 50%, #083d29 100%);
  color: #fff;
  padding: 48px 24px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.report-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%);
}
.report-header > * { position: relative; z-index: 1; }
.report-header .badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 16px;
}
.report-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.report-header .subtitle {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 20px;
}
.report-header .meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  opacity: 0.7;
}
.report-header .meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ═══ Site Nav (site-wide top bar) ═══ */
.site-nav {
  background: var(--primary);
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav .nav-brand {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav .nav-brand:hover { text-decoration: none; opacity: 0.9; }
.site-nav .nav-links { display: flex; gap: 20px; }
.site-nav .nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav .nav-links a:hover { color: #fff; }

/* ═══ Section ═══ */
section { padding: 32px 0; }
section + section { border-top: 1px solid var(--gray-200); }

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.section-number.accent { background: var(--accent); }
.section-number.danger { background: var(--danger); }
.section-number.info { background: var(--info); }
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}

/* ═══ Cards ═══ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 16px;
  border-left: 3px solid var(--primary);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card.accent { border-left-color: var(--accent); }
.card.info { border-left-color: var(--info); }
.card.danger { border-left-color: var(--danger); }
.card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.4;
}
.card .tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--gray-600);
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.card .tag.primary { background: var(--primary-light); color: var(--primary); }
.card .tag.accent { background: var(--accent-light); color: var(--accent); }
.card p { font-size: 14px; color: var(--gray-600); margin-bottom: 6px; line-height: 1.7; }
.card p:last-child { margin-bottom: 0; }
.card .label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  min-width: 48px;
  margin-right: 4px;
}
.card .source {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
  word-break: break-all;
}
.card .source a { color: var(--primary); }

/* ═══ 本周看点 (highlights grid) ═══ */
.highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.highlight-item {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  border: 1px solid rgba(15,110,74,0.1);
}
.highlight-item strong { color: var(--primary); }

/* ═══ Risk List ═══ */
.risk-list { list-style: none; }
.risk-list li {
  position: relative;
  padding: 12px 16px 12px 40px;
  margin-bottom: 10px;
  background: #fef2f2;
  border-radius: 10px;
  border: 1px solid #fee2e2;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
}
.risk-list li::before {
  content: '⚠';
  position: absolute;
  left: 14px;
  top: 12px;
  font-size: 14px;
}
.risk-list li strong { color: var(--danger); }

/* ═══ 研判 ═══ */
.insight-list { list-style: none; }
.insight-list li {
  position: relative;
  padding: 14px 16px 14px 36px;
  margin-bottom: 12px;
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--info);
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-800);
}
.insight-list li::before {
  content: '→';
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 14px;
  color: var(--info);
  font-weight: 600;
}
.insight-list li strong { color: var(--gray-900); }
.insight-notice {
  background: var(--accent-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  color: #92400e;
  margin-top: -8px;
  margin-bottom: 16px;
}

/* ═══ Source Grid ═══ */
.source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.source-group h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
}
.source-group ul { list-style: none; }
.source-group li {
  font-size: 12px;
  color: var(--gray-400);
  padding: 3px 0;
  word-break: break-all;
}
.source-group li a { color: var(--primary); }

/* ═══ Footer ═══ */
.report-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 24px 20px;
  font-size: 12px;
  line-height: 1.8;
}
.report-footer strong { color: rgba(255,255,255,0.8); }

/* ═══ Archive List (index page) ═══ */
.archive-list { list-style: none; }
.archive-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
  border-left: 3px solid var(--primary);
}
.archive-item:hover { box-shadow: var(--shadow-md); }
.archive-item .week-badge {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}
.archive-item .week-badge small { font-size: 10px; font-weight: 400; opacity: 0.8; }
.archive-item .week-info { flex: 1; }
.archive-item .week-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.archive-item .week-info p { font-size: 13px; color: var(--gray-600); }
.archive-item .week-arrow {
  color: var(--gray-400);
  font-size: 18px;
  flex-shrink: 0;
}

/* ═══ Hero on index ═══ */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #0a5a3c 50%, #083d29 100%);
  color: #fff;
  text-align: center;
  padding: 64px 24px 48px;
  position: relative;
}
.hero-section h1 { font-size: 30px; font-weight: 700; margin-bottom: 8px; }
.hero-section p { font-size: 15px; opacity: 0.8; margin-bottom: 16px; }
.hero-section .badge-large {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 20px;
}

/* 搜索框（cat-nav 右侧内联） */
.cat-search-wrap {
  background: var(--card);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: relative;
}
.cat-search-wrap .cat-nav {
  flex: 1;
  min-width: 0;
  border-bottom: none;
  padding: 0;
  background: transparent;
}
.search-inline {
  position: relative;
  flex-shrink: 0;
}
.search-inline .search-box {
  max-width: 360px;
}
.search-inline .search-hint {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--gray-600);
  white-space: nowrap;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.search-inline .search-hint.show { display: block; }
@media (max-width: 720px) {
  .cat-search-wrap {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px;
  }
  .cat-search-wrap .cat-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .search-inline { width: 100%; }
  .search-inline .search-box { max-width: 100%; }
}

/* ═══ Back link ═══ */
.back-link {
  display: inline-block;
  margin: 16px 0;
  font-size: 13px;
  color: var(--gray-400);
}
.back-link:hover { color: var(--primary); }

/* ═══ Timeline (AI HOT style) ═══ */
.timeline-date {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 28px 0 0 0;
  padding: 12px 16px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}
.timeline-date .timeline-weekday {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-400);
}
.timeline { margin: 0 0 0 0; }

.tl-item {
  position: relative;
  padding: 14px 0 14px 20px;
  margin-left: 16px;
  border-left: 1px solid var(--gray-200);
  transition: background 0.15s;
}
.tl-item:last-child { border-left: 1px solid transparent; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 20px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
}
.tl-item:hover { background: var(--gray-50); border-radius: 0 8px 8px 0; }

.tl-time {
  display: inline-block;
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
  min-width: 48px;
  vertical-align: middle;
}
.tl-source {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--gray-600);
  margin: 0 4px;
  vertical-align: middle;
  white-space: nowrap;
}
.tl-tier {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 0 5px;
  border-radius: 3px;
  margin: 0 3px 0 0;
  vertical-align: middle;
  line-height: 18px;
  letter-spacing: 0.5px;
}
.tl-tier.t1 { background: #dcfce7; color: #166534; }
.tl-tier.t2 { background: #dbeafe; color: #1e40af; }
.tl-tier.t3 { background: #fef3c7; color: #92400e; }
.tl-tier.t4 { background: #f3e8ff; color: #6b21a8; }
.tl-score {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  min-width: 24px;
  text-align: right;
  vertical-align: middle;
  margin-right: 4px;
}
.tl-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  vertical-align: middle;
}
.tl-desc {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: 4px;
  line-height: 1.6;
  padding-left: 48px;
}
.tl-readmore {
  display: inline-block;
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.tl-readmore:hover { background: var(--primary-dark); text-decoration: none; }

/* ═══ 分类导航条 ═══ */
.cat-nav {
  background: var(--card);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 100;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-btn {
  flex-shrink: 0;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.cat-btn:hover { color: var(--primary); }
.cat-btn.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* ═══ 搜索框 ═══ */
.search-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 16px;
  position: relative;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 4px 4px 4px 14px;
  max-width: 480px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.search-input {
  flex: 1;
  padding: 8px 4px;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--gray-800);
  min-width: 0;
}
.search-input::placeholder { color: var(--gray-400); }
.search-clear {
  cursor: pointer;
  color: var(--gray-400);
  font-size: 14px;
  padding: 4px 8px;
  user-select: none;
}
.search-clear:hover { color: var(--gray-600); }
.search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  margin-left: 4px;
  white-space: nowrap;
}
.search-btn:hover { background: var(--primary-dark); }
.search-btn:active { transform: translateY(1px); }
.search-hint {
  font-size: 12px;
  color: var(--gray-400);
  display: block;
  margin-top: 6px;
  padding-left: 4px;
}

/* ═══ 今日热点卡 ═══ */
.top-story {
  background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}
.top-story-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.top-story-body .tl-tier,
.top-story-body .tl-source,
.top-story-body .tl-score { font-size: 11px; }
.top-story-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 6px;
  line-height: 1.5;
}
.top-story-desc {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: 6px;
  line-height: 1.6;
}

/* ═══ 日期条数 ═══ */
.day-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  color: var(--gray-400);
}

/* ═══ 详情页 ═══ */
.item-page { max-width: 760px; }
.item-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  border-top: 3px solid var(--primary);
}
.item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.item-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  padding: 1px 8px;
  background: var(--primary-light);
  border-radius: 4px;
}
.item-cat {
  font-size: 12px;
  color: var(--gray-600);
  padding: 1px 8px;
  background: var(--gray-100);
  border-radius: 4px;
}
.item-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.4;
  margin-bottom: 10px;
}
.item-time {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}
.item-body {
  font-size: 15px;
  color: var(--gray-800);
  line-height: 1.8;
  margin-bottom: 24px;
}
.item-source-wrap { margin-bottom: 20px; }
.item-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
}
.item-source-btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.item-source-plain {
  font-size: 13px;
  color: var(--gray-600);
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--gray-200);
}
.item-tier-note {
  font-size: 12px;
  color: var(--gray-400);
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
  line-height: 2;
}
.item-related {
  margin-top: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
}
.item-related h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 12px;
}
.item-related ul { list-style: none; }
.item-related li { margin-bottom: 8px; }
.item-related li:last-child { margin-bottom: 0; }
.item-related a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-800);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}
.item-related a:hover { background: var(--gray-50); color: var(--primary); }
.rel-score {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

/* 首页时间线标题改链接后的样式 */
a.tl-title { color: var(--gray-900); text-decoration: none; }
a.tl-title:hover { color: var(--primary); text-decoration: underline; }

/* ═══ Load More — HTML details 自带开关，无需 JS ═══ */
details.load-more-wrap > summary.load-more-btn { list-style: none; cursor: pointer; text-align: center; user-select: none; }
details.load-more-wrap > summary.load-more-btn::-webkit-details-marker { display: none; }
details.load-more-wrap[open] > summary.load-more-btn { display: none; }
.load-more-wrap { text-align: center; padding: 24px 0 8px; }
.load-more-wrap .day-hidden { text-align: left; }
.load-more-btn {
  display: inline-block;
  padding: 10px 36px;
  background: var(--card);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.load-more-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.load-more-done {
  display: none;
  color: var(--gray-400);
  font-size: 13px;
  padding: 12px 0;
}

@media (max-width: 640px) {
  .tl-desc { padding-left: 0; margin-top: 6px; }
  .tl-time, .tl-source, .tl-score, .tl-tier { font-size: 10px; }
  .load-more-btn { padding: 8px 24px; font-size: 13px; }
  .tl-item { padding-left: 14px; margin-left: 8px; }
  .cat-nav { padding: 0 12px; }
  .cat-btn { padding: 10px 12px; font-size: 12px; }
  .top-story { padding: 14px 16px; }
  .top-story-title { font-size: 15px; }
  .item-card { padding: 20px 18px; }
  .item-title { font-size: 19px; }
  .item-related { padding: 16px 18px; }
}

/* ═══ Responsive ═══ */
@media (max-width: 640px) {
  .report-header h1 { font-size: 22px; }
  .report-header .meta { gap: 12px; flex-direction: column; align-items: center; }
  .highlights { grid-template-columns: 1fr; }
  .source-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  section { padding: 24px 0; }
  .hero-section h1 { font-size: 24px; }
  .hero-section { padding: 40px 16px 32px; }
  .archive-item { flex-wrap: wrap; gap: 10px; }
  .site-nav .nav-links { gap: 12px; }
}
@media print {
  .card:hover { box-shadow: var(--shadow); }
  .report-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card, .highlight-item, .risk-list li, .insight-list li { break-inside: avoid; }
}
