/* ── 科技蓝青 · Code Lab（仅 .main 内容区；壳层用 news-styles，勿在此重定义 topbar/sidebar） ── */
  body[data-page*="github"] .main,
  body[data-page*="rank"] .main {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel2: #eef2f7;
    --text: #0f172a;
    --muted: #64748b;
    --line: #dbe3ee;
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --accent-on: #ffffff;
    --hero-from: #0f172a;
    --hero-to: #1e3a8a;
    --hero-text: #f8fafc;
    --hero-rule: #38bdf8;
    --link: #1d4ed8;
    --growth: #0d9488;
  }
  html[data-theme="dark"] body[data-page*="github"] .main,
  html[data-theme="dark"] body[data-page*="rank"] .main {
    --bg: #0b1220;
    --panel: #111827;
    --panel2: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: #334155;
    --accent: #38bdf8;
    --accent-light: #0c1929;
    --accent-on: #0b1220;
    --hero-from: #020617;
    --hero-to: #0c4a6e;
    --hero-text: #f1f5f9;
    --hero-rule: #38bdf8;
    --link: #7dd3fc;
    --growth: #2dd4bf;
  }

  body[data-page*="github"] .hero,
  body[data-page*="rank"] .hero {
    position: relative; overflow: hidden;
    background:
      linear-gradient(135deg, var(--hero-from) 0%, color-mix(in srgb, var(--hero-to) 88%, var(--hero-rule)) 55%, var(--hero-to) 100%);
    color: var(--hero-text); border-radius: 16px; padding: 28px 24px; margin-bottom: 20px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
    width: 100%; box-sizing: border-box;
  }
  body[data-page*="github"] .hero::before,
  body[data-page*="rank"] .hero::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--hero-rule);
  }
  body[data-page*="github"] .hero::after,
  body[data-page*="rank"] .hero::after {
    content: ""; position: absolute; right: -36px; top: -40px; width: 160px; height: 160px;
    border-radius: 50%; background: color-mix(in srgb, var(--hero-rule) 22%, transparent);
    pointer-events: none;
  }
  body[data-page*="github"] .hero h1,
  body[data-page*="rank"] .hero h1 {
    position: relative; z-index: 1; font-size: 24px; font-weight: 700; margin-bottom: 6px; letter-spacing: 0.01em;
    font-family: inherit;
  }
  body[data-page*="github"] .hero .date,
  body[data-page*="rank"] .hero .date { position: relative; z-index: 1; font-size: 14.5px; opacity: 0.9; }
  body[data-page*="github"] .hero .subtitle,
  body[data-page*="rank"] .hero .subtitle { position: relative; z-index: 1; font-size: 14.5px; opacity: 0.78; margin-top: 4px; }

  .stats-bar {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px; margin-bottom: 12px; width: 100%; max-width: 100%;
  }
  /* 月榜等 4 项统计：桌面四列等宽，避免第 4 项单独掉行 */
  .stats-bar:has(> .stat-item:nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .stat-item {
    min-width: 0; background: var(--panel); border: 1px solid var(--line);
    border-radius: 12px; padding: 14px; text-align: center;
  }
  .stat-item .num {
    font-size: clamp(13px, 3.6vw, 22px); font-weight: 700; color: var(--accent);
    line-height: 1.25; overflow-wrap: break-word; word-break: keep-all;
  }
  .stat-item .num.growth { color: var(--growth); }
  .stat-item .label { font-size: 11px; color: var(--muted); margin-top: 4px; }
  .trend-summary {
    background: var(--accent-light); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
    border-radius: 12px; padding: 16px; margin-bottom: 20px; font-size: 14px; line-height: 1.75;
  }
  body[data-page*="github"] .section-title,
  body[data-page*="rank"] .section-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 18px; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px solid var(--line); color: var(--text);
    font-family: inherit; text-transform: none; letter-spacing: normal; padding-left: 0;
  }
  body[data-page*="github"] .section-title::before,
  body[data-page*="rank"] .section-title::before {
    content: ""; width: 16px; height: 3px; border-radius: 2px; background: var(--accent); flex: none;
  }
  .project-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
    padding: 18px; margin-bottom: 14px; scroll-margin-top: 80px;
    transition: box-shadow 0.2s; max-width: 100%; overflow: hidden;
  }
  .project-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
  .project-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-width: 0;
    --title-size: 17px; /* 序号高度与标题字号共用 */
  }
  .rank-badge {
    flex-shrink: 0; box-sizing: border-box;
    height: var(--title-size); min-width: calc(var(--title-size) * 1.45);
    padding: 0 6px; margin: 0; border-radius: 5px; border: none;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; line-height: 1;
    background: var(--panel2); color: var(--accent);
    font-variant-numeric: tabular-nums;
  }
  .rank-badge.top3 { background: var(--accent); color: var(--accent-on); }
  .project-title { flex: 1; min-width: 0; font-size: var(--title-size); font-weight: 700; line-height: 1.35; margin: 0; }
  .project-title a {
    color: var(--link); text-decoration: none;
    overflow-wrap: anywhere; word-break: break-word;
  }
  .project-title a:hover { color: var(--accent); }
  .project-lead {
    font-size: 15px; color: var(--muted); line-height: 1.75;
    margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
  }
  .project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
  .meta-item { font-size: 13px; color: var(--muted); background: var(--panel2); padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line); }
  .meta-item.growth { color: var(--growth); font-weight: 600; }
  .meta-item.app-dev { color: var(--accent); font-weight: 600; }
  .analysis-section { background: var(--panel2); border-radius: 8px; padding: 14px; }
  .block-label { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.04em; margin-bottom: 4px; }
  .block-content { font-size: 14.5px; line-height: 1.75; margin-bottom: 10px; color: var(--text); }
  .block-content:last-child { margin-bottom: 0; }
  .source-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    padding: 14px 16px; margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center;
  }
  .source-card a { color: var(--link); font-weight: 600; text-decoration: none; }
  .source-card a:hover { color: var(--accent); }
  body[data-page*="github"] .page-toc a.cur,
  body[data-page*="rank"] .page-toc a.cur {
    background: color-mix(in srgb, var(--accent) 16%, var(--panel));
    color: var(--accent) !important; font-weight: 700;
    border-left: 2px solid var(--accent); padding-left: 10px;
  }
  @media (max-width: 768px) {
    .stats-bar {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }
    .stats-bar:has(> .stat-item:nth-child(4)) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stat-item { min-width: 0; padding: 12px 8px; }
    .stat-item .num { font-size: 16px; overflow-wrap: anywhere; word-break: break-word; line-height: 1.25; }
  }
/* GitHub 榜 section-title（覆盖 AI 日报同名规则） */
body[data-page*="github"] .section-title,
body[data-page*="rank"] .section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  border-left: none;
  text-transform: none;
  letter-spacing: normal;
  padding-left: 0;
}

