/* The benchmark page. Layout and chart chrome only; the tokens come from
   ../style.css so the page reads as the site. The series colours are the
   validated pair from the data-viz reference palette, stepped for each
   surface, rather than the link accent: a link and a data mark are not
   the same thing. */
:root {
  --series-1: #2a78d6;
  --series-2: #eb6834;
}
@media (prefers-color-scheme: dark) {
  :root {
    --series-1: #3987e5;
    --series-2: #d95926;
  }
}
main p,
main li {
  max-width: 44rem;
}
h2 {
  margin-top: 1.6rem;
}
h3 {
  font-size: 1rem;
  margin: 1rem 0 0.3rem;
}

/* small multiples: as many panels per row as fit, never squashed */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.6rem;
  margin: 0.6rem 0;
}
.panel-wrap {
  position: relative;
}
svg.panel {
  width: 100%;
  height: auto;
  display: block;
}
.panel .grid {
  stroke: var(--line);
  stroke-width: 1;
}
.panel .axis {
  stroke: var(--muted);
  stroke-width: 1;
}
.panel .tick {
  font:
    10px system-ui,
    sans-serif;
  font-variant-numeric: tabular-nums;
  fill: var(--muted);
}
.panel .title {
  font:
    600 12px system-ui,
    sans-serif;
  fill: var(--fg);
}
.panel .subtitle,
.panel .end-label {
  font:
    10px system-ui,
    sans-serif;
  fill: var(--muted);
}
.panel .series {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
}
.panel .marker {
  stroke: var(--bg);
  stroke-width: 2;
}
.panel .milestone {
  stroke: var(--muted);
  stroke-width: 1;
  opacity: 0.35;
}
.panel .milestone-label {
  font:
    9px system-ui,
    sans-serif;
  fill: var(--muted);
}
.panel .cursor {
  stroke: var(--fg);
  stroke-width: 1;
  opacity: 0.4;
}
.tip {
  position: absolute;
  z-index: 1;
  max-width: 240px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.tip-head {
  font-weight: 600;
}
.tip-commit {
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 0.4rem;
}

a.tag {
  text-decoration: none;
}
a.tag:hover {
  text-decoration: underline;
}
.tip-change {
  color: var(--muted);
  margin-bottom: 0.2rem;
}
td.change {
  white-space: normal;
  min-width: 16rem;
}

/* every value, without hovering */
details.table {
  margin: 0.6rem 0 1rem;
  font-size: 13px;
}
details.table summary {
  cursor: pointer;
  color: var(--accent);
}
.scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  white-space: nowrap;
}
th,
td {
  padding: 0.15rem 0.6rem 0.15rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.prose td,
table.prose th {
  padding-right: 1.2rem;
}
code {
  background: var(--code-bg);
  padding: 0 0.25em;
  border-radius: 3px;
  font-size: 0.92em;
}

/* one change that moved the numbers: title, what it was, what it won */
section.change {
  margin: 1rem 0;
}
section.change h3 {
  margin-bottom: 0.1rem;
}
section.change .meta,
section.change .gain {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
section.change .meta + .gain {
  margin-bottom: 0.3rem;
}

/* the machine and the sitting */
dl#appendix {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 1rem;
  font-size: 13px;
  margin: 0.4rem 0;
}
dl#appendix dt {
  color: var(--muted);
}
dl#appendix dd {
  margin: 0;
}
