/* ═══════════════════════════════════════════════════════════════════════════
   report_styles.css — 历史报告亮色覆盖层（唯一能触达已归档报告的通道）

   加载顺序：内联 <style> → shared_style.css → 本文件
   因此 shared_style.css 的 :root token 已覆盖内联 :root，
   本文件只需用 !important 覆盖内联 <style> 里的硬编码颜色值。
   ═══════════════════════════════════════════════════════════════════════════ */

html { color-scheme: light; }

body {
  background: var(--bg) !important;
  color: var(--text) !important;
}
.content-wrapper { background: var(--bg) !important; }

/* ── 报告头部：深藏蓝（pokemon.com 风） ──────────────────────────────── */
.report-header {
  background: var(--header-bg) !important;
  color: var(--header-text) !important;
}
.report-header::after {
  background: linear-gradient(90deg, var(--pk-yellow), var(--pk-yellow) 55%, var(--accent)) !important;
}

/* ── 导航条（deploy_report.py 注入的 .site-nav 内联 style） ─────────── */
.site-nav {
  background: var(--header-bg) !important;
  color: var(--header-text) !important;
  border-bottom-color: var(--pk-yellow) !important;
  box-shadow: 0 2px 8px rgba(var(--pk-navy-rgb), 0.18) !important;
}
.site-nav a { color: var(--header-text) !important; }
.site-nav a:hover { color: var(--pk-yellow) !important; }

/* ── 卡片 / 容器 ────────────────────────────────────────────────────── */
.race-section,
.report-card,
.profile-card,
.highlight-card,
.rivalry-card,
.chart-container,
.table-scroll-wrapper,
.lap-table-wrapper {
  background: var(--card-bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ── 表格 ───────────────────────────────────────────────────────────── */
table { color: var(--text); }
thead th {
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
tbody td { border-color: var(--border) !important; }
tbody tr:nth-child(even) { background: var(--table-stripe) !important; }
tbody tr:hover { background: var(--accent-light) !important; }

/* 圈速表 sticky 首列 */
.lap-table-wrapper tbody td:first-child {
  background: var(--card-bg) !important;
  color: var(--text) !important;
  position: sticky;
  left: 0;
  z-index: 2;
}
.lap-table-wrapper tbody tr:nth-child(even) td:first-child {
  background: var(--table-stripe) !important;
}
.lap-table-wrapper .hm-cell:empty { background: var(--bg-elevated); }

/* ── 分组表头（class-group-header） ─────────────────────────────────── */
.class-group-header td {
  background: var(--header-bg) !important;
  color: var(--header-text) !important;
}

/* ── 每场比赛卡片内的深色标题条 ─────────────────────────────────────── */
.race-header {
  background: var(--header-bg) !important;
  color: var(--header-text) !important;
}
.race-header h2 { color: var(--pk-yellow) !important; }
.race-meta, .race-drivers { color: rgba(255,255,255,0.7) !important; }

/* ── 统计卡片渐变（内联硬编码深色渐变） ─────────────────────────────── */
.stat-card,
.info-card,
.report-card-header {
  background: var(--card-bg) !important;
  color: var(--text) !important;
}
.stat-value { color: var(--pk-navy) !important; }

/* ── 语义底色 ───────────────────────────────────────────────────────── */
.score-bar-bg { background: var(--bg-elevated) !important; }
.incident { background: var(--incident-bg) !important; }
.fastest-cell { background: var(--fastest-bg) !important; }

/* ── 目录 / TOC ─────────────────────────────────────────────────────── */
.toc { background: var(--card-bg) !important; border-color: var(--border) !important; }
.toc a { color: var(--accent) !important; }
.toc a:hover { background: var(--accent-light) !important; }

/* ── 奖项横幅（title-banner）保持原有亮色语义渐变，无需覆盖 ────────── */

/* ── 打印 ───────────────────────────────────────────────────────────── */
@media print {
  .report-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-nav { display: none !important; }
}
