/* The benchmark history (assets/javascripts/bench.js). Colours are roles, light by
   default and stepped for the dark scheme (slate); the series slots as wikidata-pq's
   dashboard has them. */
.bh-root {
  --bh-ink-2: #52514e;
  --bh-grid: #e1e0d9;
  --bh-s1: #2a78d6;
  --bh-s2: #eb6834;
  --bh-s3: #1baf7a;
  --bh-s4: #eda100;
  --bh-s5: #e87ba4;
  --bh-s6: #008300;
  --bh-s7: #6250d6;
  --bh-s8: #e34948;
  --bh-old: #a3a29b;
  font-variant-numeric: tabular-nums;
}
[data-md-color-scheme="slate"] .bh-root {
  --bh-ink-2: #c3c2b7;
  --bh-grid: #2c2c2a;
  --bh-s1: #3987e5;
  --bh-s2: #d95926;
  --bh-s3: #199e70;
  --bh-s4: #c98500;
  --bh-s5: #d55181;
  --bh-s6: #008300;
  --bh-s7: #9085e9;
  --bh-s8: #e66767;
  --bh-old: #6d6c67;
}
.bh-root .bh-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin: 0.4rem 0;
}
.bh-root select {
  font: inherit;
  color: inherit;
  background: var(--md-default-bg-color);
  border: 1px solid var(--bh-grid);
  border-radius: 4px;
  padding: 0.1rem 0.3rem;
}
.bh-root .bh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  list-style: none;
  margin: 0.4rem 0 0.8rem;
  padding: 0;
}
.md-typeset .bh-root .bh-legend li {
  margin: 0;
  color: var(--bh-ink-2);
}
.bh-root .bh-swatch {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  margin-right: 0.4em;
  vertical-align: -0.1em;
}
.bh-root .bh-grid-charts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 0.8rem 1.2rem;
}
.md-typeset .bh-root .bh-chart {
  margin: 0;
}
.md-typeset .bh-root .bh-chart figcaption {
  margin: 0 0 0.2rem;
  font-weight: 600;
  text-align: left;
  max-width: none;
}
.bh-root svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.bh-root .bh-grid {
  stroke: var(--bh-grid);
  stroke-width: 1;
}
.bh-root .bh-tick,
.bh-root .bh-unit {
  fill: var(--bh-ink-2);
  font-size: 11px;
}
.bh-root .bh-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
}
.bh-root .bh-whisker {
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.55;
}
.bh-root .bh-dot {
  stroke: var(--md-default-bg-color);
  stroke-width: 2;
}
.bh-root .bh-hit {
  fill: transparent;
}
.bh-root a:hover .bh-dot,
.bh-root a:focus .bh-dot {
  stroke: var(--md-default-fg-color);
}
.bh-root .bh-generated {
  color: var(--bh-ink-2);
  font-size: 0.75rem;
}

/* The hero chart (#bench-hero), after wikidata-pq's: each line on its own axis */
.md-typeset .bh-root .bh-hero {
  position: relative;
  margin: 0.4rem 0 1.4rem;
  padding: 0.7rem 0.9rem 0.6rem;
  border: 1px solid var(--bh-grid);
  border-radius: 8px;
  min-width: 0;
}
.bh-hero .bh-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1rem;
}
.md-typeset .bh-hero h2.bh-hero-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.bh-hero .bh-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.bh-hero .bh-seg button {
  font: inherit;
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--bh-grid);
  border-radius: 999px;
  background: transparent;
  color: var(--bh-ink-2);
  cursor: pointer;
}
.bh-hero .bh-seg button[aria-checked="true"] {
  border-color: var(--bh-ink-2);
  color: var(--md-default-fg-color);
  font-weight: 600;
}
.bh-hero button:focus-visible,
.bh-hero a:focus-visible {
  outline: 2px solid var(--md-default-fg-color);
  outline-offset: 1px;
}
.bh-hero .bh-hero-focus,
.bh-hero .bh-hero-commit {
  font-size: 0.72rem;
  color: var(--bh-ink-2);
  margin: 0.4rem 0 0.2rem;
  overflow-wrap: anywhere;
}
.bh-hero .bh-hero-focus strong,
.bh-hero .bh-hero-commit strong {
  color: var(--md-default-fg-color);
}
.bh-hero .bh-hero-commit {
  margin: 0.1rem 0 0.5rem;
}
.bh-hero .bh-hero-chart {
  width: 100%;
  min-width: 0;
}
.bh-hero .bh-hero-chart svg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
}
.bh-hero .bh-tick {
  font-size: 11px;
}
.bh-hero .bh-hero-unit {
  font-weight: 600;
}
.bh-hero .bh-hero-rule {
  stroke: var(--bh-ink-2);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.bh-hero .bh-hero-axis {
  stroke-width: 1.5;
}
.bh-hero .bh-hero-xlink text {
  font-weight: 600;
}
.bh-hero .bh-hero-xlink:hover text,
.bh-hero .bh-hero-xlink:focus-visible text {
  text-decoration: underline;
}
.bh-hero .bh-hero-line {
  fill: none;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: 0.55;
}
.bh-hero .bh-dashed {
  stroke-dasharray: 6 4;
}
.bh-hero .bh-hero-line.is-dim {
  opacity: 0.12;
}
.bh-hero .bh-hero-line.is-on {
  stroke-width: 3;
  opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .bh-hero .bh-hero-line {
    transition: opacity 120ms ease-out, stroke-width 120ms ease-out;
  }
}
.bh-hero .bh-hero-band {
  opacity: 0.16;
  stroke: none;
}
.bh-hero .bh-marker {
  stroke: var(--md-default-bg-color);
  stroke-width: 1.5;
}
.bh-hero .bh-cross {
  stroke: var(--bh-ink-2);
  stroke-width: 1;
}
.bh-hero .bh-hero-hit {
  fill: transparent;
  cursor: crosshair;
  outline: none;
}
.bh-hero .bh-hero-hit:focus-visible {
  stroke: var(--md-default-fg-color);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.bh-hero .bh-tip {
  position: absolute;
  z-index: 3;
  width: min(22rem, 92%);
  pointer-events: none;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--bh-grid);
  background: var(--md-default-bg-color);
  color: var(--bh-ink-2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-size: 0.66rem;
  line-height: 1.45;
}
.bh-hero .bh-tip[hidden] {
  display: none;
}
.bh-hero .bh-tip-title {
  color: var(--md-default-fg-color);
  font-weight: 600;
}
.bh-hero .bh-tip-subject {
  margin-bottom: 0.2rem;
}
.bh-hero .bh-tip-row .bh-swatch {
  width: 0.7em;
  height: 0.7em;
}
.bh-hero .bh-tip-row.is-on {
  color: var(--md-default-fg-color);
  font-weight: 600;
}
.bh-hero .bh-hero-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: 0.6rem 1rem;
  margin: 0.3rem 0 0.4rem;
}
.bh-hero .bh-hero-lgroup {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bh-hero .bh-hero-ghead {
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.bh-hero .bh-hero-item {
  font: inherit;
  font-size: 0.68rem;
  display: grid;
  grid-template-columns: 22px auto 1fr;
  gap: 0.45rem;
  align-items: center;
  padding: 0.15rem 0.2rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--bh-ink-2);
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.bh-hero .bh-hero-item .bh-num {
  justify-self: end;
}
.bh-hero .bh-hero-item.is-focus {
  color: var(--md-default-fg-color);
  font-weight: 600;
  background: color-mix(in srgb, var(--bh-grid) 55%, transparent);
}
.md-typeset .bh-hero .bh-hero-note {
  margin: 0.3rem 0 0;
  font-size: 0.66rem;
  color: var(--bh-ink-2);
}
@media (max-width: 40em) {
  .md-typeset .bh-root .bh-hero {
    padding: 0.6rem 0.6rem 0.4rem;
  }
}

/* The Alternatives page's chart (#alternatives-hero) */
.bh-hero .bh-hero-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
}
.bh-hero .bh-cmp-one {
  stroke: var(--bh-ink-2);
  stroke-width: 1.5;
}
.bh-hero .bh-cmp-ref {
  font-weight: 600;
}
.bh-hero .bh-cmp-band {
  fill: var(--bh-grid);
  opacity: 0.35;
}
.bh-hero .bh-cmp-corpus {
  font-size: 12px;
  font-weight: 600;
  fill: var(--md-default-fg-color);
}
.bh-hero .bh-cmp-ci {
  stroke-width: 2;
  stroke-linecap: round;
}
.bh-hero .bh-cmp-val {
  font-weight: 600;
  /* (a halo, so a whisker passing behind a value does not strike it through) */
  paint-order: stroke;
  stroke: var(--md-default-bg-color);
  stroke-width: 3px;
  stroke-linejoin: round;
}
/* A single-threaded decoder's point: hollow (its whisker dashed) */
.bh-hero .bh-cmp-hollow {
  fill: var(--md-default-bg-color);
  stroke-width: 2;
}
.bh-root .bh-swatch.is-hollow {
  box-sizing: border-box;
  border: 2px solid;
  background: transparent;
}
.bh-hero .bh-cmp-arm {
  transition: opacity 120ms ease-out;
}
.bh-hero .bh-cmp-arm.is-dim {
  opacity: 0.15;
}
.bh-hero .bh-cmp-legend {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}
.bh-hero .bh-cmp-legend .bh-hero-item {
  grid-template-columns: 0.9em auto 1fr;
}
