/* Chip-Bench：只有浅色一套，配色和字体沿用 llm-pk-web。厂商 logo 是按白底设计的。 */
:root {
  color-scheme: light;
  --page: #ffffff;
  --ink-1: #16181d;
  --ink-2: #4b5059;
  --ink-3: #7d838c;
  --line: #e6e8eb;
  --line-2: #d5d9df;
  --wash: #f5f6f8;
  --pill: #e6f2ef;
  --pill-ink: #1f6b5c;
  --ref: #b4532a;
  --radius: 10px;
  --font: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  font-family: var(--font);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink-1); font-size: 15px; line-height: 1.55; }
a { color: inherit; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
svg.logo { display: inline-block; flex: none; vertical-align: -3px; overflow: visible; }

/* 页头、页脚 */
.site-header { padding: 32px 0 8px; }
.site-header h1 { margin: 0; font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.subtitle { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.site-footer { border-top: 1px solid var(--line); margin: 40px 0 0; padding: 18px 0 36px; color: var(--ink-3); font-size: 12.5px; }
.site-footer .brand { margin: 0 0 6px; color: var(--ink-1); font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.site-footer .credit { margin: 0; max-width: 760px; }

/* 三块内容 */
.block { margin: 30px 0 0; }
.block h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 800; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 12px; }
.meta { margin: 0; color: var(--ink-3); font-size: 13.5px; }
.howto { margin: 6px 0 12px; color: var(--ink-3); font-size: 13.5px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 评测覆盖：六个环节一列一格，benchmark 横条按起止环节跨格 */
.flow { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 8px; min-width: 680px; }
.stage { display: flex; align-items: baseline; gap: 6px; padding: 0 2px 6px; border-bottom: 2px solid var(--ink-1); }
.stage-no { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.stage-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.bar {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; text-align: left;
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--page);
}
.bar.pending { border-style: dashed; background: var(--wash); color: var(--ink-3); }
.bar.done { cursor: pointer; transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.bar.done:hover { border-color: var(--ink-3); }
.bar.done[aria-pressed="true"] { border-color: var(--pill-ink); background: var(--pill); box-shadow: inset 0 0 0 1px var(--pill-ink); }
.bar-name { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-best, .bar-status { font-size: 12.5px; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar.pending .bar-status { color: var(--ink-3); }
.bar-best b { font-variant-numeric: tabular-nums; color: var(--ink-1); }

/* 排行榜：名次、模型、条形、分数四列；人工参考线贯穿各行 */
.board { --name-w: 230px; }
.row { display: grid; grid-template-columns: 30px var(--name-w) minmax(0, 1fr) 52px; align-items: center; column-gap: 10px; }
.row + .row { margin-top: 2px; }
.rank { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.who .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { flex: none; padding: 0 6px; border-radius: 5px; background: var(--wash); color: var(--ink-3); font-size: 11.5px; line-height: 18px; }
.track { position: relative; height: 30px; }
.fill { position: absolute; left: 0; top: 6px; bottom: 6px; border-radius: 0 4px 4px 0; transform-origin: left center;
  animation: grow .6s var(--ease-out) both; }
@keyframes grow { from { transform: scaleX(0); } }
.zero { position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.range { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: var(--ink-1); opacity: .55; }
.refline { position: absolute; top: -2px; bottom: -2px; width: 0; border-left: 2px dashed var(--ref); }
.score { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.score.z { color: var(--ink-3); font-weight: 600; }
.axis .track { height: 24px; }
.tick { position: absolute; bottom: 2px; transform: translateX(-50%); color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tick:first-child { transform: none; }
.ref-label { position: absolute; bottom: 2px; transform: translateX(-50%); color: var(--ref); font-size: 12px; font-weight: 700;
  white-space: nowrap; background: var(--page); padding: 0 4px; }

/* 代际趋势 */
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 8px; font-size: 13.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend { min-width: 560px; }
.trend svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.trend .grid { stroke: #eceef1; stroke-width: 1; }
.trend .tick-text { fill: #6b717a; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.trend .refl { stroke: var(--ref); stroke-width: 1.5; stroke-dasharray: 6 5; }
.trend .ref-text { fill: var(--ref); font-size: 12px; font-weight: 700; }
.trend .leader { stroke: #9aa1a9; stroke-width: 1; stroke-dasharray: 3 3; }
.trend .series { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.trend .dot { fill: #fff; stroke-width: 2; }
.trend .lbl { font-size: 12.5px; font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.trend .lbl-score { font-variant-numeric: tabular-nums; font-weight: 700; }

.error { margin: 16px 0; color: #b42318; }

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .site-header { padding-top: 22px; }
  .site-header h1 { font-size: 30px; }
  /* 窄屏排行榜每个模型占两行：名次、模型、分数一行，条形单独一行占满宽度 */
  .row { grid-template-columns: 22px minmax(0, 1fr) 48px; grid-template-areas: "rank who score" ". track track"; column-gap: 6px; }
  .row + .row { margin-top: 8px; }
  .rank { grid-area: rank; }
  .who { grid-area: who; }
  .score { grid-area: score; }
  .track { grid-area: track; height: 16px; }
  .fill, .zero { top: 2px; bottom: 2px; }
  .refline { top: -3px; bottom: -3px; }
  .who .nm { font-size: 14px; }
  .trend { min-width: 640px; }
}
