/* ForceBench 站点样式 —— 纯 CSS，无构建步骤，无外部依赖。
   配色以浅色为主，同时提供深色适配（prefers-color-scheme）。 */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --text: #14181d;
  --text-muted: #5a6572;
  --text-faint: #808b98;
  --border: #dde3ea;
  --border-strong: #c3ccd6;

  --accent: #2b5bd7;
  --accent-ink: #1c3f9c;
  --accent-soft: #e8eeff;

  --ok: #17714a;
  --ok-soft: #e2f3ea;
  --warn: #8a5a10;
  --warn-soft: #fbf0da;
  --bad: #a3261e;
  --bad-soft: #fbe6e4;
  --none: #5d6773;
  --none-soft: #eceff3;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .05);
  --maxw: 1120px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
          "Source Han Sans SC", "WenQuanYi Micro Hei", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
          "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1317;
    --surface: #171c22;
    --surface-2: #1e242c;
    --text: #e9edf2;
    --text-muted: #a4b0bd;
    --text-faint: #7d8894;
    --border: #2a323b;
    --border-strong: #3c4650;

    --accent: #7ba2ff;
    --accent-ink: #a8c2ff;
    --accent-soft: #1b2540;

    --ok: #6fd6a4;
    --ok-soft: #14301f;
    --warn: #e5b45c;
    --warn-soft: #33260f;
    --bad: #f08d84;
    --bad-soft: #38191a;
    --none: #98a3af;
    --none-soft: #222930;

    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

code, kbd, .mono { font-family: var(--mono); font-size: .88em; }
code {
  background: var(--surface-2);
  padding: .1em .38em;
  border-radius: 4px;
  border: 1px solid var(--border);
}
pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .85rem;
  line-height: 1.6;
}
pre code { background: none; border: 0; padding: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  min-height: 62px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: .01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand .ver {
  font-size: .7rem;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-soft);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 8px;
  line-height: 1.5;
}
.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  display: block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .95rem;
}
.site-nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-weight: 600;
}

/* 外部链接标记与"尚未存在"的导航项。
   论文还没发表，所以它是一段文字而不是链接 —— 死链比没有链接更糟。 */
.site-nav .ext-mark { font-size: .72em; margin-left: 3px; opacity: .7; }
.nav-pending {
  display: block;
  padding: 6px 12px;
  font-size: .95rem;
  color: var(--text-faint);
  cursor: default;
  white-space: nowrap;
}
.nav-pending .pending-mark {
  font-size: .68rem;
  font-weight: 600;
  margin-left: 5px;
  padding: 0 6px;
  border: 1px dashed currentColor;
  border-radius: 999px;
  line-height: 1.6;
  display: inline-block;
  vertical-align: 1px;
}

/* ---------- 原型状态声明 ---------- */
.prototype-banner {
  background: var(--warn-soft);
  border-bottom: 1px solid var(--border-strong);
  color: var(--text);
}
.prototype-banner .wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-top: 12px;
  padding-bottom: 12px;
}
.prototype-banner .tag {
  flex: none;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--warn);
  border: 1.5px solid currentColor;
  border-radius: 4px;
  padding: 1px 7px;
  margin-top: 3px;
}
.prototype-banner p { margin: 0; font-size: .92rem; line-height: 1.6; }

/* 样例数据横幅 —— 必须极其醒目 */
.sample-banner {
  background: repeating-linear-gradient(
    135deg, var(--bad-soft), var(--bad-soft) 12px,
    transparent 12px, transparent 24px);
  border: 2px solid var(--bad);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0;
  color: var(--text);
}
.sample-banner strong { color: var(--bad); }
.sample-banner p { margin: 4px 0 0; font-size: .92rem; }

/* ---------- 通用版式 ---------- */
main { padding: 32px 0 64px; }
h1 { font-size: 1.95rem; line-height: 1.35; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; margin: 44px 0 14px; letter-spacing: -.005em; }
h3 { font-size: 1.05rem; margin: 26px 0 8px; }
p { margin: 0 0 14px; }
.lede { font-size: 1.08rem; color: var(--text-muted); max-width: 62ch; }
.muted { color: var(--text-muted); }
.small { font-size: .87rem; }
.center { text-align: center; }

hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.note {
  border-left: 4px solid var(--border-strong);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin: 18px 0;
}
.note.caution { border-left-color: var(--warn); background: var(--warn-soft); }
.note.info { border-left-color: var(--accent); background: var(--accent-soft); }
.note p:last-child { margin-bottom: 0; }
.note-title { font-weight: 700; display: block; margin-bottom: 4px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: .96rem;
  font-family: inherit;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
@media (prefers-color-scheme: dark) {
  .btn { color: #0f1317; }
}

/* ---------- 首页 ---------- */
.hero { padding: 20px 0 8px; }
.hero h1 { font-size: 2.3rem; max-width: 20ch; }
.hero .question {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-ink);
  max-width: 46ch;
  margin-bottom: 16px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-card h3 { margin: 0; font-size: 1.02rem; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.task-card .tid {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--text-faint);
  word-break: break-all;
}
.task-card p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.task-card dl { margin: 6px 0 0; font-size: .85rem; }
.task-card dt { color: var(--text-faint); font-size: .8rem; }
.task-card dd { margin: 0 0 6px; color: var(--text-muted); }

/* 任务分类标记 —— 文字 + 形状，不单靠颜色 */
.cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .74rem;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  white-space: nowrap;
  line-height: 1.6;
}
.cat.force_classification { color: var(--accent-ink); background: var(--accent-soft); }
.cat.contact_rich { color: var(--warn); background: var(--warn-soft); }
.cat .glyph { font-weight: 700; }

/* ---------- 覆盖率摘要 ---------- */
.coverage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(240px, 320px) 1fr;
  align-items: start;
}
@media (max-width: 720px) { .coverage { grid-template-columns: 1fr; } }

.coverage-headline { font-size: 2.4rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.coverage-headline .of { font-size: 1.1rem; font-weight: 500; color: var(--text-muted); }
.coverage-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 10px 0 14px;
}
.coverage-bar > span { display: block; height: 100%; background: var(--ok); }

.status-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.status-legend li { display: flex; gap: 9px; align-items: baseline; font-size: .89rem; }
.status-legend .count { font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }

/* 覆盖矩阵。列数由渲染时写入的 --mcols 决定，不写死模型个数。 */
.matrix { display: grid; gap: 6px; }
.matrix-row {
  display: grid;
  grid-template-columns: minmax(92px, 1.4fr) repeat(var(--mcols, 3), minmax(40px, 1fr));
  gap: 6px;
  align-items: center;
}
.matrix-row .rowlab {
  font-size: .76rem;
  color: var(--text-muted);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.matrix-head .rowlab, .matrix-head .cell {
  font-size: .74rem;
  color: var(--text-faint);
  font-family: var(--font);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.matrix .cell.headcell {
  background: none;
  border: 0;
  height: auto;
}
.matrix .cell {
  height: 26px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
}

/* 状态视觉：颜色 + 字形 + 底纹，三重编码 */
.st-complete { background: var(--ok-soft) !important; color: var(--ok) !important; border-color: var(--ok) !important; }
.st-partial  { background: var(--warn-soft) !important; color: var(--warn) !important; border-color: var(--warn) !important; }
.st-invalid  {
  color: var(--bad) !important;
  border-color: var(--bad) !important;
  background: repeating-linear-gradient(45deg, var(--bad-soft), var(--bad-soft) 4px, transparent 4px, transparent 8px) !important;
}
.st-missing  {
  color: var(--none) !important;
  border-color: var(--border-strong) !important;
  border-style: dashed !important;
  background: repeating-linear-gradient(135deg, var(--none-soft), var(--none-soft) 5px, transparent 5px, transparent 10px) !important;
}

/* ---------- 更新时间线 ---------- */
.news { list-style: none; margin: 0 0 14px; padding: 0; }
.news-item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 0 18px;
  position: relative;
  padding: 0 0 18px 0;
}
.news-item::before {
  content: "";
  position: absolute;
  left: 112px;
  top: 10px;
  bottom: -6px;
  width: 1px;
  background: var(--border);
}
.news-item:last-child::before { display: none; }
.news-item::after {
  content: "";
  position: absolute;
  left: 108px;
  top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
}
.news-when {
  text-align: right;
  font-size: .82rem;
  font-family: var(--mono);
  color: var(--text-muted);
  padding-top: 2px;
  white-space: nowrap;
}
.news-body { padding-left: 14px; }
.news-kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  font-weight: 700;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  line-height: 1.7;
  color: var(--text-muted);
  background: var(--surface-2);
}
.news-kind.k-results, .news-kind.k-eval { color: var(--ok); background: var(--ok-soft); }
.news-kind.k-web { color: var(--accent-ink); background: var(--accent-soft); }
.news-kind.k-fix { color: var(--warn); background: var(--warn-soft); }
.news-title { margin: 5px 0 0; font-weight: 600; }
.news-detail { margin: 3px 0 0; font-size: .88rem; color: var(--text-muted); }
.news-src { margin: 4px 0 0; font-size: .78rem; color: var(--text-faint); }
.news-src code { font-size: .95em; }

/* ---------- 资源卡片 ---------- */
.res-card h3 {
  margin-top: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.rs {
  font-size: .7rem;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  line-height: 1.6;
  white-space: nowrap;
}
.rs-ready { color: var(--ok); background: var(--ok-soft); }
.rs-partial { color: var(--warn); background: var(--warn-soft); }
.rs-pending {
  color: var(--none);
  background: var(--none-soft);
  border-style: dashed;
}
.res-card p:last-child { margin-bottom: 0; }

/* ---------- 视角控制条 ---------- */
.lb-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 18px;
  padding: 14px 16px;
  margin: 14px 0 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.lb-controls .ctl-title {
  flex-basis: 100%;
  font-weight: 700;
  font-size: .92rem;
}
.lb-controls .ctl { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lb-controls label { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.lb-controls select {
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  max-width: 100%;
}
.lb-controls .ctl-hint { font-size: .72rem; color: var(--text-faint); }
.lb-controls .ctl-reset { padding: 7px 14px; font-size: .86rem; align-self: flex-end; }

.view-summary {
  margin: 12px 0 2px;
  font-size: .9rem;
  color: var(--text-muted);
}
.view-note { margin: 0 0 12px; max-width: 78ch; }

table.lb thead th.ref-col { background: var(--accent-soft); }
.ref-mark {
  display: inline-block;
  margin-left: 6px;
  font-size: .66rem;
  font-weight: 700;
  color: var(--accent-ink);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 6px;
  vertical-align: 2px;
  line-height: 1.7;
}

/* ---------- 提交记录表 ---------- */
table.lb.subs-table { min-width: 760px; }
table.lb.subs-table td { vertical-align: top; }
.subs-table .tid {
  display: block;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text-faint);
  font-weight: 400;
  word-break: break-all;
}
.subs-table .subline {
  display: block;
  font-size: .76rem;
  color: var(--text-faint);
  margin-top: 2px;
  max-width: 30ch;
}
.subs-table .tagline {
  font-size: .72rem;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0 7px;
  white-space: nowrap;
}
.finput-pill {
  font-family: var(--mono);
  font-size: .76rem;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---------- Leaderboard 表 ---------- */
.table-scroll {
  /* position:relative 是必需的，不是装饰：表格里的 .visually-hidden 是绝对定位，
     没有已定位的祖先时它会以视口为包含块，在窄屏上把整个文档撑宽 —— 表现为
     手机上莫名其妙的横向滚动。让滚动容器成为包含块，它就被一起裁掉了。 */
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}
table.lb {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 940px;
  font-size: .93rem;
}
table.lb caption {
  text-align: left;
  padding: 14px 16px 10px;
  font-size: .87rem;
  color: var(--text-muted);
}
table.lb th, table.lb td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
table.lb thead th {
  background: var(--surface-2);
  font-size: .85rem;
  border-bottom: 2px solid var(--border-strong);
  position: sticky;
  top: 0;
  z-index: 3;
}
table.lb thead th .mname { display: block; font-weight: 700; font-size: .96rem; }
table.lb thead th .mid { display: block; font-family: var(--mono); font-size: .72rem; color: var(--text-faint); font-weight: 400; }
table.lb thead th .finput {
  display: inline-block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: .7rem;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 400;
}
table.lb tbody th[scope="row"] {
  background: var(--surface);
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 150px;
  border-right: 1px solid var(--border);
  font-weight: 600;
}
table.lb tbody th[scope="row"] .tid {
  display: block;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text-faint);
  font-weight: 400;
  word-break: break-all;
}
table.lb tbody tr:hover td { background: var(--surface-2); }
table.lb tr.group-head th {
  background: var(--surface-2);
  font-size: .87rem;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-strong);
  border-top: 1px solid var(--border-strong);
  position: static;
}
table.lb tr.group-head .glabel { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 单元格内的结果块 */
.res { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.res .rate { font-size: 1.22rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.25; }
.res .ci { font-size: .78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.res .nk { font-size: .75rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.res svg { display: block; margin-top: 2px; }

.res.nodata { min-width: 118px; }
.res .flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .84rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  border: 1.5px solid currentColor;
  align-self: flex-start;
  line-height: 1.5;
}
.res .flag .glyph { font-size: .95em; }
/* 缺格 / 无效结果的四重编码：字形 + 文字 + 边框样式 + 斜纹底。
   任何一条都能单独把它和"跑出来的低分"区分开，不依赖颜色。 */
.flag.f-missing {
  color: var(--none);
  border-style: dashed;
  background: repeating-linear-gradient(
    135deg, var(--none-soft), var(--none-soft) 5px,
    transparent 5px, transparent 10px);
}
.flag.f-invalid {
  color: var(--bad);
  border-style: double;
  border-width: 3px;
  background: repeating-linear-gradient(
    45deg, var(--bad-soft), var(--bad-soft) 4px,
    transparent 4px, transparent 8px);
}
.flag.f-partial { color: var(--warn); background: var(--warn-soft); border-style: dotted; }

.card-links { margin: 8px 0 0; font-size: .85rem; }
.res .why { font-size: .76rem; color: var(--text-muted); max-width: 24ch; }
.res .struck { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .75; }

.fn-ref {
  font-size: .72rem;
  vertical-align: super;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- head_to_head 显著性 ---------- */
table.lb th.h2h-col { border-left: 2px solid var(--border-strong); }
table.lb td:last-child { border-left: 1px solid var(--border); }

.res.h2h { min-width: 168px; }
.res .diff {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.res .pval {
  font-size: .8rem;
  font-family: var(--mono);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* 显著性标记：颜色 + 字形 + 文字，三重编码 */
.sig {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid currentColor;
  align-self: flex-start;
  line-height: 1.5;
  margin-top: 2px;
  max-width: 100%;
}
.sig .glyph { flex: none; }
.sig-strong { color: var(--ok); background: var(--ok-soft); }
.sig-weak { color: var(--warn); background: var(--warn-soft); border-style: dashed; }
.sig-ns { color: var(--none); background: var(--none-soft); border-style: dotted; }

.legend .swatch.sig-strong,
.legend .swatch.sig-weak,
.legend .swatch.sig-ns { border-width: 1.5px; }

table.lb.h2h-table { min-width: 720px; }
table.lb.h2h-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.lb.h2h-table td.num .diff { margin-right: 6px; }

/* 图例 */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 16px 0 0;
  padding: 14px 16px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .86rem;
}
.legend li { display: flex; gap: 8px; align-items: center; }
.legend .swatch {
  width: 22px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; flex: none;
}

.footnotes { margin: 18px 0 0; padding: 0 0 0 0; list-style: none; font-size: .86rem; color: var(--text-muted); }
.footnotes li { margin-bottom: 6px; }
.footnotes .marker { font-weight: 700; color: var(--accent); margin-right: 6px; }

/* ---------- 状态 / 错误面板 ---------- */
.datastate {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 24px;
  background: var(--surface);
  text-align: center;
}
.datastate h2 { margin-top: 0; }
.datastate .icon { font-size: 2rem; line-height: 1; display: block; margin-bottom: 8px; }
.datastate .detail {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-faint);
  word-break: break-all;
  margin-top: 10px;
}
.datastate .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.loading { color: var(--text-muted); padding: 28px 0; text-align: center; }

/* ---------- 元信息条 ---------- */
.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: .85rem;
  color: var(--text-muted);
  margin: 14px 0 24px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.meta-strip b { color: var(--text); font-weight: 600; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  font-size: .87rem;
  color: var(--text-muted);
}
.site-footer .wrap { display: flex; gap: 16px 32px; flex-wrap: wrap; justify-content: space-between; }
.site-footer p { margin: 0 0 6px; }

/* ---------- 表格（关于页等） ---------- */
table.plain { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 14px 0; }
table.plain th, table.plain td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; }
table.plain thead th { background: var(--surface-2); }

.tbl-wrap { overflow-x: auto; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero h1 { font-size: 1.75rem; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.2rem; }
  main { padding: 22px 0 48px; }
  .wrap { padding: 0 14px; }
  .site-header .wrap { min-height: 0; }
  .brand { font-size: 1.05rem; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav ul { gap: 2px; }
  .site-nav a { padding: 5px 9px; font-size: .88rem; }
  table.lb { min-width: 820px; font-size: .86rem; }
  table.lb.h2h-table { min-width: 660px; }
  table.lb th, table.lb td { padding: 8px 9px; }
  table.lb tbody th[scope="row"] { min-width: 116px; max-width: 130px; }
  .res { min-width: 116px; }
  .res.nodata { min-width: 100px; }
  .res.h2h { min-width: 132px; }
  .res .rate { font-size: 1.05rem; }
  .res .diff { font-size: .96rem; }
  .res.h2h svg { display: none; }
  .sig { font-size: .72rem; padding: 1px 6px; }
  .res .ci { font-size: .73rem; white-space: normal; }
  .res .errbar { display: none; }   /* 窄屏隐藏误差棒图形，CI 文字始终保留 */
  .coverage-headline { font-size: 1.9rem; }
  .matrix-row { grid-template-columns: minmax(60px, 1.1fr) repeat(var(--mcols, 3), minmax(28px, 1fr)); gap: 4px; }
  .matrix .cell { height: 24px; font-size: .72rem; }
  .matrix-row .rowlab { font-size: .68rem; }

  /* 时间线在窄屏改为单列，日期挪到条目上方 */
  .news-item { grid-template-columns: 1fr; gap: 0; padding-left: 16px; padding-bottom: 16px; }
  .news-item::before { left: 3px; top: 14px; }
  .news-item::after { left: 0; top: 8px; }
  .news-when { text-align: left; }
  .news-body { padding-left: 0; }

  /* 控制条在窄屏每行一个，select 撑满可用宽度 */
  .lb-controls { gap: 10px; padding: 12px 14px; }
  .lb-controls .ctl { flex: 1 1 100%; }
  .lb-controls select { width: 100%; }
  .lb-controls .ctl-reset { width: 100%; }

  table.lb.subs-table { min-width: 620px; }
  .subs-table .subline { max-width: 22ch; }
}

.scroll-hint {
  font-size: .8rem;
  color: var(--text-faint);
  margin: 8px 0 0;
}
@media (min-width: 761px) { .scroll-hint { display: none; } }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
