/* WhyNext 报告公共样式：① ≤640px 时把多列表格改成逐行卡片 ② 报告目录（浮动按钮 + 手机底部抽屉 / 电脑右侧抽屉）。配套脚本 /assets/atlas-report.js。 */
@media (max-width: 640px) {
  html { font-size: 16px !important; }
  .max-w-3xl, .max-w-4xl, .max-w-5xl, .max-w-6xl, .max-w-7xl { padding-left: 12px !important; padding-right: 12px !important; }
  .p-5, .p-6, .p-8 { padding: 14px !important; }
  .p-4 { padding: 12px !important; }
  .pl-4 { padding-left: 10px !important; }
  table.atlas-stack, table.atlas-stack tbody { display: block; width: 100%; }
  table.atlas-stack thead, table.atlas-stack tr.atlas-head { display: none; }
  table.atlas-stack tr { display: block; padding: 10px 0; border-bottom: 1px solid rgba(148,163,184,0.18); }
  table.atlas-stack tr:last-child { border-bottom: 0; }
  table.atlas-stack td { display: block; padding: 2px 0 !important; text-align: left !important; white-space: normal !important; border: 0 !important; background: transparent; }
  table.atlas-stack td.atlas-short { display: inline-block; margin-right: 16px; }
  table.atlas-stack td:first-child { font-weight: 600; padding-bottom: 4px !important; }
  table.atlas-stack td[data-label]:not(:first-child)::before { content: attr(data-label) "："; color: #64748b; font-size: 0.8rem; font-weight: 400; }
  html[lang^="en"] table.atlas-stack td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; }
}

/* ===== 报告目录（atlas-report.js 自动生成）===== */
.atoc-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, #eab308, #f59e0b); transition: width .1s linear; pointer-events: none; }
.atoc-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 55;
  display: inline-flex; align-items: center; gap: 8px; max-width: min(72vw, 360px); padding: 10px 16px; border-radius: 999px;
  background: rgba(15,23,42,.92); color: #f1f5f9; border: 1px solid rgba(234,179,8,.45); box-shadow: 0 6px 24px rgba(0,0,0,.45);
  font: 600 15px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .2s, opacity .2s; }
.atoc-fab:hover { border-color: #eab308; }
.atoc-fab:focus-visible, .atoc-item:focus-visible, .atoc-close:focus-visible { outline: 2px solid #eab308; outline-offset: 2px; }
.atoc-fab svg { flex: none; }
.atoc-fab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atoc-fab-count { flex: none; color: #eab308; font-variant-numeric: tabular-nums; }
.atoc-backdrop { position: fixed; inset: 0; z-index: 56; background: rgba(2,6,23,.55); opacity: 0; pointer-events: none; transition: opacity .2s; }
.atoc-panel { position: fixed; z-index: 57; background: #0f172a; color: #e2e8f0; border: 1px solid rgba(148,163,184,.2);
  display: flex; flex-direction: column; visibility: hidden; transition: transform .25s cubic-bezier(.2,.8,.2,1), visibility .25s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.atoc-open .atoc-backdrop { opacity: 1; pointer-events: auto; }
.atoc-open .atoc-panel { visibility: visible; transform: none; }
.atoc-open .atoc-fab { opacity: 0; pointer-events: none; }
/* 手机：底部抽屉 */
.atoc-panel { left: 0; right: 0; bottom: 0; max-height: 75vh; border-radius: 18px 18px 0 0; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
.atoc-panel::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: rgba(148,163,184,.4); margin: 8px auto 0; }
/* 电脑：右侧抽屉 */
@media (min-width: 1024px) {
  .atoc-panel { left: auto; top: 0; right: 0; bottom: 0; width: 340px; max-height: none; border-radius: 0; transform: translateX(100%); }
  .atoc-panel::before { display: none; }
}
.atoc-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 10px; border-bottom: 1px solid rgba(148,163,184,.15); }
.atoc-title { font-weight: 700; font-size: 16px; color: #f8fafc; }
.atoc-close { background: none; border: 0; color: #94a3b8; font-size: 26px; line-height: 1; padding: 4px 8px; cursor: pointer; border-radius: 8px; }
.atoc-list { list-style: none; margin: 0; padding: 8px 8px 16px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.atoc-item { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; padding: 11px 12px; min-height: 44px; border-radius: 10px;
  color: #cbd5e1; text-decoration: none; font-size: 15px; line-height: 1.4; border-left: 3px solid transparent; }
.atoc-item:hover { background: rgba(148,163,184,.08); color: #f8fafc; }
.atoc-item.is-active { background: rgba(234,179,8,.1); color: #fde68a; border-left-color: #eab308; font-weight: 600; }
.atoc-num { flex: none; min-width: 3.6em; font-size: 12px; color: #64748b; }
.atoc-item.is-active .atoc-num { color: #eab308; }
.atoc-sub { display: none; list-style: none; margin: 0 0 4px; padding: 0 0 0 3.9em; }
.atoc-sub.is-open { display: block; }
.atoc-sub .atoc-item { min-height: 36px; padding: 7px 12px; font-size: 13.5px; color: #94a3b8; }
.atoc-sub .atoc-item.is-active { background: none; color: #fde68a; }
.atoc-top { color: #94a3b8; font-size: 14px; }
[data-atoc] { scroll-margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .atoc-panel, .atoc-backdrop, .atoc-fab, .atoc-progress { transition: none; } }
@media print { .atoc-fab, .atoc-panel, .atoc-backdrop, .atoc-progress { display: none !important; } }

/* ===== 旧版报告浅色化（<html class="atlas-legacy">，配色由 atlas-report.js 的 legacyTheme 按实际颜色换算） =====
   换色完成前先隐藏正文避免深色闪一下；脚本失败时 2 秒后照常显示。 */
@keyframes atlas-show { to { opacity: 1; } }
html.atlas-legacy { color-scheme: light; background: #fff !important; }
html.atlas-legacy body { background: #fff !important; padding-top: 44px !important; position: relative; opacity: 0; animation: atlas-show 0s 2s forwards; }
html.atlas-legacy.atlas-ready body { opacity: 1; animation: none; }
html.atlas-legacy body, html.atlas-legacy body :where(p, li, td, th, div, span) { font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
html.atlas-legacy body :where(h1, h2) { font-family: "Noto Serif SC", "Source Serif 4", "Songti SC", "STSong", Georgia, serif !important; letter-spacing: 0 !important; }
html.atlas-legacy[lang^="en"] body :where(h1, h2) { font-family: "Source Serif 4", Georgia, "Times New Roman", serif !important; }
html.atlas-legacy .sitebar { position: absolute; top: 0; left: 0; right: 0; height: 44px; background: #0b2545; z-index: 60; font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
html.atlas-legacy .sitebar-in { max-width: 1080px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 22px; }
html.atlas-legacy .sitebar a { color: rgba(255,255,255,.75); text-decoration: none; font-size: 14px; line-height: 1; white-space: nowrap; }
html.atlas-legacy .sitebar a:hover { color: #fff; }
html.atlas-legacy .sitebar .sb-brand { color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .18em; }
html.atlas-legacy .sitebar .sb-brand i { font-style: normal; color: #e8c76a; margin: 0; }
html.atlas-legacy .sitebar .sb-brand::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -4px; background: url(/assets/logo.svg) center/contain no-repeat; }
html.atlas-legacy .sitebar nav { display: flex; gap: 20px; flex: 1; min-width: 0; }
html.atlas-legacy .sitebar .sb-lang { padding: 3px 9px; border: 1px solid rgba(255,255,255,.35); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
@media (max-width: 640px) {
  html.atlas-legacy .sitebar-in { padding: 0 16px; gap: 14px; }
  html.atlas-legacy .sitebar nav { gap: 14px; }
  html.atlas-legacy .sitebar .sb-opt { display: none; }
  html.atlas-legacy .sitebar .sb-brand { font-size: 12px; letter-spacing: .12em; }
}
@media print { html.atlas-legacy body { padding-top: 0 !important; } html.atlas-legacy .sitebar { display: none; } }

/* 旧版报告的目录也用浅色版（与 atlas-research.css 同款） */
html.atlas-legacy .atoc-progress { background: #0b2545; height: 2px; }
html.atlas-legacy .atoc-fab { background: #0b2545; color: #fff; border-color: #0b2545; box-shadow: 0 4px 16px rgba(11,37,69,.25); font-family: "Inter",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
html.atlas-legacy .atoc-fab:hover { border-color: #b8860b; }
html.atlas-legacy .atoc-fab-count { color: #e8c76a; }
html.atlas-legacy .atoc-panel { background: #fff; color: #111827; border-color: #e5e7eb; font-family: "Inter",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
html.atlas-legacy .atoc-panel::before { background: #d1d5db; }
html.atlas-legacy .atoc-head { border-bottom-color: #e5e7eb; }
html.atlas-legacy .atoc-title { color: #0b2545; }
html.atlas-legacy .atoc-close { color: #6b7280; }
html.atlas-legacy .atoc-item { color: #374151; }
html.atlas-legacy .atoc-item:hover { background: #f6f7f9; color: #111827; }
html.atlas-legacy .atoc-item.is-active { background: #eef2f8; color: #0b2545; border-left-color: #0b2545; }
html.atlas-legacy .atoc-num { color: #9ca3af; }
html.atlas-legacy .atoc-item.is-active .atoc-num { color: #b8860b; }
html.atlas-legacy .atoc-sub .atoc-item { color: #6b7280; }
html.atlas-legacy .atoc-sub .atoc-item.is-active { color: #0b2545; }
html.atlas-legacy .atoc-backdrop { background: rgba(17,24,39,.35); }
html.atlas-legacy table.atlas-stack td[data-label]:not(:first-child)::before { color: #9ca3af; }
html.atlas-legacy table.atlas-stack tr { border-bottom-color: #e5e7eb; }
@media (max-width: 640px) { html.atlas-legacy .sitebar nav { overflow-x: auto; scrollbar-width: none; } html.atlas-legacy .sitebar nav::-webkit-scrollbar { display: none; } }
/* 旧版报告里不少表格写死了 min-width（如 420px），手机上把整页撑出横向滚动；窄屏取消 */
@media (max-width: 640px) { html.atlas-legacy table { min-width: 0 !important; } }
@media (max-width: 640px) { html.atlas-legacy table:not(.atlas-stack) { display: block; max-width: 100%; overflow-x: auto; } }
