:root {
  color-scheme: light dark;
  --bg: #f2f5fa;
  --panel: #ffffff;
  --soft: #f6f8fc;
  --ink: #152437;
  --muted: #506177;
  --line: #dbe3ee;
  --accent: #145db6;
  --accent-soft: #e8f1fc;
  --good: #007565;
  --bad: #a63337;
  --bar: #3c78c5;
  --warn: #855019;
  --warn-soft: #fff4df;
  --series-0: #236ac4;
  --series-1: #007b72;
  --series-2: #b64a40;
  --series-3: #8352b0;
  --series-4: #8b5a09;
  --series-5: #005e91;
  --series-6: #496525;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1420;
    --panel: #131e2d;
    --soft: #182637;
    --ink: #eef4fd;
    --muted: #a6b6c9;
    --line: #324257;
    --accent: #93c4ff;
    --accent-soft: #23364c;
    --good: #63d8b9;
    --bad: #ff918a;
    --bar: #75aef1;
    --warn: #f1c58a;
    --warn-soft: #392b1f;
    --series-0: #7fbbff;
    --series-1: #64deca;
    --series-2: #ff938d;
    --series-3: #d1a7ff;
    --series-4: #ffcf80;
    --series-5: #a0dbe6;
    --series-6: #d0df83;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.65 system-ui, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
h1, h2, h3, h4, p, figure, dl { margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.14; letter-spacing: -.035em; }
h2 { font-size: 1.3rem; line-height: 1.4; }
h3 { font-size: 1.06rem; line-height: 1.45; }
p + p { margin-top: .75rem; }
a { color: var(--accent); text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, .table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
code, .numeric { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: .875rem; color: var(--muted); }
.wrap { width: min(82rem, calc(100% - 4rem)); margin-inline: auto; min-width: 0; }
.skip { position: absolute; inset: -5rem auto auto 1rem; z-index: 1; padding: .5rem 1rem; background: var(--panel); }
.skip:focus { top: 1rem; }
.topbar { border-bottom: 1px solid var(--line); background: var(--panel); }
.masthead { display: flex; align-items: center; gap: clamp(1rem, 4vw, 3.5rem); min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .65rem; flex: none; color: var(--ink); font-weight: 750; text-decoration: none; letter-spacing: -.025em; }
.mark { display: flex; align-items: flex-end; gap: 3px; width: 2rem; height: 2rem; padding: .43rem; border-radius: .55rem; background: var(--accent); }
.mark i { flex: 1; height: 45%; border-radius: 1px; background: var(--panel); }
.mark i:nth-child(2) { height: 70%; }
.mark i:nth-child(3) { height: 100%; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; padding-block: .45rem; }
nav a { padding: .39rem .68rem; color: var(--muted); font-size: .875rem; font-weight: 600; border-radius: .4rem; text-decoration: none; white-space: nowrap; }
nav a:hover, nav [aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
main { min-height: 70vh; padding-block: 2.55rem 3.5rem; }
.footer { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1.25rem 1.75rem; color: var(--muted); font-size: .875rem; }
.page-title { margin-bottom: 1.6rem; }
.page-title p { margin-top: .65rem; max-width: 66ch; color: var(--muted); }
.title-line { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.15rem; }
.tag { display: inline-block; width: fit-content; border-radius: .38rem; padding: .15rem .55rem; background: var(--accent-soft); color: var(--accent); font-size: .84rem; font-weight: 650; white-space: nowrap; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.release-meta { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin: 1.4rem 0 1.5rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--panel); }
.release-meta > div { padding: .8rem 1.1rem; min-width: 0; }
.release-meta > div + div { border-left: 1px solid var(--line); }
.release-meta dt { color: var(--muted); font-size: .875rem; }
.release-meta dd { margin: .15rem 0 0; font-weight: 650; overflow-wrap: anywhere; }
.release-meta dd small { display: block; color: var(--muted); font-weight: 400; font-size: .845rem; }
.shas { margin: 1.5rem 0; overflow-wrap: anywhere; }
.shas table { min-width: 0; }
.shas summary { font-size: .95rem; }
.section-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .65rem 1rem; margin-bottom: .85rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .8rem; background: var(--panel); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; padding: 1.02rem 1.1rem .3rem; }
.card-head h3 { font-size: 1.14rem; }
.card-head a { font-size: .875rem; white-space: nowrap; }
.card table { border-bottom: none; min-width: 0; }
.card .table-scroll { border-radius: 0; }
.card .empty { padding: .6rem 1.07rem 1rem; }
.aggregate + .aggregate { border-top: 1px solid var(--line); }
.aggregate h3 { padding: .25rem 1.1rem 0; color: var(--muted); font-size: .91rem; font-weight: 550; }
.aggregate + .aggregate h3 { padding-top: .85rem; }
.kpi { display: grid; align-items: baseline; grid-template-columns: 1fr auto; gap: .05rem .6rem; margin: .6rem .88rem .85rem; padding: .65rem .72rem .72rem; border-radius: .58rem; background: var(--soft); }
.kpi .kpi-profile { grid-column: 1 / -1; color: var(--muted); font-size: .875rem; }
.kpi strong { font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.2; letter-spacing: -.045em; }
.kpi p { margin: 0; }
.kpi-control { display: flex; align-items: center; gap: .65rem; font-size: .875rem; color: var(--muted); }
.table-hint { margin-bottom: .3rem; }
.card .table-hint { padding-inline: 1.07rem; }
.table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border-radius: .55rem; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
th, td { padding: .49rem .7rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .875rem; font-weight: 650; }
td { font-size: .875rem; }
thead { background: var(--soft); }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { color: var(--ink); font-weight: 550; }
.table-scroll tr > th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--panel); }
.table-scroll thead th:first-child { background: var(--soft); }
.table-scroll[data-scrollable] tr > th:first-child { box-shadow: 1px 0 var(--line); }
.result-table { min-width: 27rem; }
.aggregate td, .aggregate th { padding: .41rem .74rem; }
.aggregate td:first-child, .aggregate th:first-child { padding-left: 1.07rem; }
.sort { display: inline-flex; align-items: center; gap: .25rem; padding: 0; border: 0; background: transparent; color: inherit; text-align: inherit; font: inherit; cursor: pointer; }
.sort::after { content: "↕"; color: var(--muted); opacity: .62; }
[aria-sort="ascending"] .sort::after { content: "↑"; color: var(--accent); opacity: 1; }
[aria-sort="descending"] .sort::after { content: "↓"; color: var(--accent); opacity: 1; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.notable { font-weight: 750; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem .9rem; margin-bottom: 1.05rem; }
.filters label { display: flex; flex-direction: column; gap: .25rem; font-size: .875rem; color: var(--muted); }
.filters input, .filter-select select { min-width: 0; color: var(--ink); font: inherit; border: 1px solid var(--line); border-radius: .45rem; background: var(--panel); padding: .49rem .67rem; }
.filter-select select { appearance: none; padding-right: 1.8rem; cursor: pointer; }
.filter-select { position: relative; }
.filter-select::after { content: ""; width: .42rem; height: .42rem; position: absolute; right: .75rem; bottom: .88rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.filters output { align-self: center; }
.bench-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; }
details { min-width: 0; border: 1px solid var(--line); border-radius: .66rem; background: var(--panel); }
summary { cursor: pointer; padding: .73rem 1rem; color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
summary:hover { color: var(--accent); }
summary::marker { color: var(--accent); }
summary .tag { margin-left: .55rem; }
.detail-body { border-top: 1px solid var(--line); padding: .95rem 1rem; }
.detail-body > p { margin-bottom: .65rem; }
.detail-body h3 { margin-bottom: .4rem; }
.detail-body .extra { margin-top: .85rem; }
.extra .detail-body > section + section { margin-top: 1rem; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: .85rem; align-items: start; }
.result-grid > * { min-width: 0; }
.chart { min-width: 0; padding: .42rem .65rem; background: var(--soft); border-radius: .55rem; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
svg text { fill: var(--muted); font-family: system-ui, "Noto Sans CJK SC", sans-serif; font-size: 15px; }
svg .tick { font-family: var(--mono); font-size: 14px; }
svg .gridline { stroke: var(--line); stroke-width: 1; }
svg .zero { stroke: var(--muted); stroke-width: 1.25; }
svg .bar { fill: var(--bar); opacity: .85; }
svg .bar.good { fill: var(--good); }
svg .bar.bad { fill: var(--bad); }
svg .whisker { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
svg .trend-line { stroke: var(--series); stroke-width: 2; fill: none; }
svg .trend-dot, .legend-dot { fill: var(--series); background: var(--series); }
.trend-viewport { overflow-x: auto; }
.trend-viewport svg { min-width: 28rem; }
.legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; list-style: none; padding: 0; margin: .55rem 0 .85rem; font-size: .875rem; }
.legend-dot { display: inline-block; width: .58rem; height: .58rem; margin-right: .35rem; border-radius: 50%; }
.note { border-left: 3px solid var(--accent); padding: .75rem .9rem; background: var(--panel); color: var(--muted); border-radius: 0 .5rem .5rem 0; }
.prose { padding: 1.25rem clamp(1rem, 3vw, 1.85rem); border: 1px solid var(--line); border-radius: .75rem; background: var(--panel); }
.prose section + section, .prose h2:not(:first-child) { margin-top: 1.6rem; }
.prose h2 { margin-bottom: .6rem; }
.prose p { max-width: 87ch; }
.prose .table-scroll { margin-block: .55rem .95rem; border: 1px solid var(--line); }
.prose .table-scroll table { min-width: 47rem; }
.prose ul { padding-left: 1.55rem; }
.prose li + li { margin-top: .45rem; }
.prose code { color: var(--accent); overflow-wrap: anywhere; }
.definitions > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; padding: .48rem 0; }
.definitions dt { font: 650 .95rem/1.65 var(--mono); }
.definitions dd { margin: 0; }

@media (max-width: 64rem) {
  .result-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 47rem) {
  .wrap { width: calc(100% - 2rem); }
  .masthead { display: block; padding-top: .75rem; }
  nav { gap: .1rem; margin-left: -.42rem; }
  nav a { padding: .29rem .45rem; }
  main { padding-top: 1.65rem; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .release-meta > div { padding: .65rem .6rem; }
  .release-meta dd { font-size: .875rem; }
  .aggregate td, .aggregate th { padding-inline: .43rem; }
  .aggregate td:first-child, .aggregate th:first-child { padding-left: .7rem; }
  .filters input { width: min(100%, 13.5rem); }
  summary { padding-inline: .7rem; }
  .detail-body { padding-inline: .7rem; }
  .table-scroll tr > th:first-child { max-width: 8rem; overflow-wrap: anywhere; }
  .result-table tr > th:first-child { min-width: 5.75rem; }
  .chart { padding-inline: .2rem; }
  .bar-chart text { font-size: 20px; }
  .bar-chart .tick { font-size: 18px; }
}
