/* benchmark-pages · 站点样式
 * 无框架依赖，自包含。结构类名沿用学术主页惯例（hero / publication-* / container），
 * 便于与上游 Academic Project Page Template 互认。
 * 本文件派生自该模板的版面结构，以 CC BY-SA 4.0 授权。
 */

:root {
  --brand: #2F6B4F;
  --brand-dark: #24523C;
  --brand-tint: #EDF3EF;
  --ink: #1b1f23;
  --ink-soft: #555c64;
  --ink-faint: #8b949e;
  --line: #e2e6ea;
  --bg: #ffffff;
  --bg-alt: #f7f9f8;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .04);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Noto Sans SC",
          "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; font-weight: 700; }

pre, code { font-family: var(--mono); }

/* ── 布局 ───────────────────────────────────────────── */

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.is-max-desktop { max-width: 900px; }

.has-text-centered { text-align: center; }
.has-text-justified { text-align: justify; text-justify: inter-ideograph; }

.section { padding: 56px 0; }
.section.is-light { background: var(--bg-alt); }

.section-title {
  font-size: 30px;
  margin-bottom: .3em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin: 10px auto 0;
  background: var(--brand);
  border-radius: 2px;
}

.section-note {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 28px;
}

/* ── 顶部导航 ───────────────────────────────────────── */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.topnav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topnav-brand { font-weight: 700; color: var(--ink); white-space: nowrap; }

.topnav-links { display: flex; gap: 22px; font-size: 15px; }
.topnav-links a { color: var(--ink-soft); }
.topnav-links a:hover { color: var(--brand-dark); }

/* ── 标题区 ─────────────────────────────────────────── */

.hero { padding: 64px 0 40px; }
.hero .hero-body { padding: 0 0 8px; }

.publication-title {
  font-size: clamp(28px, 4.4vw, 46px);
  letter-spacing: -.015em;
  margin-bottom: 24px;
  max-width: 18em;
  margin-inline: auto;
}

.publication-authors {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 10px;
  line-height: 2;
}

.author-block { display: inline-block; margin-right: 2px; }
.author-block a { color: var(--brand-dark); }
.eql-cntrb { display: block; font-size: 14px; color: var(--ink-faint); margin-top: 6px; }

.publication-links {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.link-block { display: inline-block; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease;
}

.button:hover { background: var(--brand-dark); text-decoration: none; transform: translateY(-1px); }
.button svg { width: 16px; height: 16px; fill: currentColor; }

/* ── teaser / 图 ────────────────────────────────────── */

.teaser img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.subtitle {
  color: var(--ink-soft);
  font-size: 16px;
  margin-top: 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 26px;
}

.gallery-grid figure { margin: 0; }

.gallery-grid img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  display: block;
}

.gallery-grid figcaption {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 10px;
  line-height: 1.6;
}

/* ── 基线锚点 ───────────────────────────────────────── */

.baseline-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  justify-content: center;
  padding: 14px 20px;
  margin: 0 0 20px;
  background: var(--brand-tint);
  border: 1px solid #d5e3da;
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--ink-soft);
}

.baseline-item strong { color: var(--ink); font-weight: 600; margin-right: 4px; }
.baseline-n { color: var(--ink-faint); }

/* ── 榜单表格 ───────────────────────────────────────── */

.leaderboard-table { margin-bottom: 18px; }

/* Tabulator 覆盖：与站点视觉对齐 */
.tabulator {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  background: #fff;
}

.tabulator .tabulator-header {
  background: var(--bg-alt);
  border-bottom: 2px solid var(--line);
  font-weight: 600;
}

.tabulator .tabulator-header .tabulator-col { background: transparent; }

.tabulator-row.tabulator-row-even { background: #fcfdfc; }
.tabulator-row:hover { background: var(--brand-tint) !important; }

.tabulator-row.is-top .tabulator-cell { font-weight: 600; }
.tabulator-row.is-top { background: #f3f8f5; }

.tabulator-row.is-flagged .tabulator-cell:first-child::after {
  content: "★";
  color: var(--brand);
  margin-left: 6px;
  font-size: 12px;
}

.ci-cell { color: var(--ink-faint); font-size: 13px; }

.table-footnote {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 26px;
}

.metrics-note {
  background: #fff;
  border-left: 3px solid var(--brand);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}

.metrics-note h3 { font-size: 16px; margin-bottom: .5em; }
.metrics-note ul { margin: 0; padding-left: 1.2em; }
.metrics-note li { font-size: 15px; color: var(--ink-soft); margin-bottom: 4px; }

/* ── 细分热力图 ─────────────────────────────────────── */

.heat-block { margin-bottom: 42px; }

.heat-block h3 {
  font-size: 19px;
  margin-bottom: .2em;
}

.heat-block .heat-note {
  font-size: 14px;
  color: var(--ink-faint);
  margin: 0 0 14px;
}

.heat-scroll { overflow-x: auto; border-radius: var(--radius); }

table.heat {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table.heat th, table.heat td {
  padding: 9px 12px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

table.heat thead th {
  background: var(--bg-alt);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

table.heat th.heat-model, table.heat td.heat-model {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  font-weight: 500;
  border-right: 1px solid var(--line);
}

table.heat thead th.heat-model { z-index: 3; background: var(--bg-alt); }

table.heat tbody tr:last-child td { border-bottom: none; }
table.heat td.heat-empty { color: var(--ink-faint); background: #fafbfa; }

/* ── 关键发现 ───────────────────────────────────────── */

.findings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.finding-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.finding-card h3 { font-size: 17px; margin-bottom: .5em; }
.finding-card p { font-size: 15px; color: var(--ink-soft); margin: 0; }

/* ── BibTeX ─────────────────────────────────────────── */

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.bibtex-header .section-title::after { margin-left: 0; }

pre#bibtex-code {
  background: #1e2429;
  color: #e6edf3;
  padding: 20px 22px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all .12s ease;
}

.copy-bibtex-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.copy-bibtex-btn.is-done { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── 页脚 ───────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
  background: var(--bg-alt);
  font-size: 14px;
  color: var(--ink-soft);
}

.footer p { margin: 0 0 8px; }
.footer-meta { color: var(--ink-faint); font-size: 13px; margin-top: 16px !important; }

/* ── 窄屏 ───────────────────────────────────────────── */

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 40px 0; }
  .section-title { font-size: 24px; }
  .hero { padding: 40px 0 28px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .baseline-bar { gap: 6px 20px; font-size: 14px; }
  .topnav-links { gap: 16px; font-size: 14px; }
}

@media print {
  .topnav, .copy-bibtex-btn, .footer-meta { display: none; }
  .section { padding: 20px 0; page-break-inside: avoid; }
}

/* Manuscript-specific presentation; upstream structure and attribution retained. */
:root {
  --brand: #2F6690;
  --brand-dark: #254C68;
  --brand-tint: #EDF4F8;
  --ink-faint: #64717D;
  --bg-alt: #F5F8FA;
}
.paper-tagline { max-width: 42em; margin: 0 auto 24px; font-size: 18px; color: var(--ink-soft); }
.publication-meta { margin-bottom: 10px; font-size: 18px; color: var(--ink-soft); line-height: 2; }
.affiliation { display: block; font-size: 15px; line-height: 1.8; }
.correspondence { display: block; font-size: 14px; margin-top: 8px; }
.publication-authors sup { font-size: 11px; margin-left: 2px; }
.baseline-bar { border-color: #CEDDE8; }
.tabulator-row.is-top { background: #EDF4F8; }
.gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.gallery-grid .figure-wide { grid-column: 1 / -1; order: -1; }
.gallery-grid figure { min-width: 0; }
.figure-link { display: block; }
.figure-open { display: inline-block; font-size: 13px; margin-top: 10px; }
.gallery-grid img { padding: 12px; border-color: #D9E2E9; }
.content { overflow-wrap: anywhere; }
.content p { margin-top: 18px; }
.content.has-text-justified { text-align: left; }
.section-title { margin-bottom: 20px; }
.findings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.finding-card { padding: 22px 20px; }
.metrics-note { line-height: 1.65; }
#lb-search { min-width: 0 !important; }
@media (max-width: 720px) {
  .gallery-grid, .findings-grid { grid-template-columns: 1fr; }
  .topnav-inner { flex-wrap: wrap; height: auto; padding: 10px 18px; gap: 3px; }
  .topnav-brand { width: 100%; font-size: 15px; }
  .topnav-links { gap: 20px; }
  .container { padding-inline: 18px; }
  .publication-title { font-size: 28px; }
  .publication-authors { font-size: 17px; }
  .paper-tagline { font-size: 16px; }
  .baseline-bar label { width: 100%; }
  .gallery-grid img { padding: 4px; }
}
