:root {
  --ink: #1c1e21;
  --muted: #6b7280;
  --rule: #e5e7eb;
  --accent: #b45309;          /* 与图中末端轨迹的橙色呼应 */
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1240px;     /* 和顶部 teaser (.hero) 同宽 */
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

header {
  border-bottom: 1px solid var(--rule);
  padding: 64px 0 40px;
  text-align: center;
}

.title {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.acronym { font-weight: 700; }

/* 首字母下划线，对应标题里的缩写 */
.u {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.authors {
  font-size: 19px;
  margin: 0 0 4px;
}

.venue {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* ---------- sections ---------- */

main { padding: 8px 0 40px; }

section { margin: 52px 0; }

h2 {
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 16px;
  text-align: center;
}

h3 {
  font-size: 19px;
  font-weight: 500;
  margin: 40px 0 12px;
  color: var(--muted);
}

.lede {
  margin: 0 0 8px;          /* 不再居中成窄栏，直接顶到正文左边缘 */
  text-align: left;
  color: var(--ink);        /* 和摘要正文同色 */
  font-size: 16px;
}

figure { margin: 0; }

img, video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--bg-soft);
}

figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink);        /* 和摘要正文同色 */
  text-align: center;
}

/* teaser 和 method 的长段落说明左对齐；视频下面的短标签仍居中 */
.hero figcaption,
section > figure > figcaption {
  text-align: left;
}

/* 顶部 teaser，和正文 .wrap 同宽 */
.hero {
  max-width: 1240px;
  margin: 40px auto 0;
  padding: 0 24px;
}

/* 真机视频宫格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.grid video { border-radius: 5px; }

/* 并排对比：窄屏时自动堆叠 */
.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 22px;
}

.tag {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.tag.fail { background: #b0272d; }
.tag.ok   { background: #1f7a45; }

/* 真机视频区: 强调是原速播放。徽章跟在标题后面，所以要能和大字号基线对齐 */
.lede strong { color: var(--ink); }

.speed-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #1f7a45;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

code {
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 90%;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding: 26px 0 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

footer p { margin: 0; }

@media (max-width: 640px) {
  .title { font-size: 26px; }
  body { font-size: 16px; }
}

/* ---------- 论文表格的图表 ---------- */
.chart { margin-top: 18px; }

.chart-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 18px;
}

.chart-tabs button {
  padding: 6px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.chart-tabs button:hover { border-color: var(--muted); }

.chart-tabs button.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.bar-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--rule);
}

.bar-row:first-child { border-top: none; }

.bar-label {
  font-size: 14px;
  color: var(--ink);
  text-align: right;
}

.bar-stack { display: grid; gap: 5px; }

.bar-line {
  display: grid;
  grid-template-columns: 88px 1fr 92px;   /* 左列要放得下 "Glob. Expert" */
  gap: 10px;
  align-items: center;
}

.bar-tag {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.bar-track {
  height: 15px;
  background: var(--bg-soft);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  width: 0;                       /* JS 设成目标百分比，产生生长动画 */
  height: 100%;
  border-radius: 3px;
  transition: width .7s cubic-bezier(.22,.7,.3,1);
}

.bar-fill.is-empty { background: none; }

/* 方法分组配色: 自己的方法用强调色，基线用中性色 */
.g-classical { background: #c9ccd2; }
.g-neural    { background: #8d93b8; }
.g-pre       { background: #e0b184; }
.g-ours      { background: var(--accent); }
.bar-fill.alt { opacity: .55; }   /* 每组的第二根柱子(另一个 expert / 调优前) */

.bar-val {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.bar-val.is-muted { color: var(--muted); font-size: 12px; }

.chart-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.key {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  margin: 0 5px 0 14px;
  vertical-align: -1px;
}

.chart-note .key:first-child { margin-left: 0; }
.k-classical { background: #c9ccd2; }
.k-neural    { background: #8d93b8; }
.k-pre       { background: #e0b184; }
.k-ours      { background: var(--accent); }

@media (max-width: 640px) {
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .bar-label { text-align: left; }
}

.axis-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
