article h1 {
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.25;
}

article h2 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

article h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

article h4 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

#benchmark-results-root {
  margin-top: 1.5rem;
}

.benchmark-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.benchmark-overview-item {
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.75rem 0.85rem;
  background: color-mix(in srgb, var(--color-bg-primary) 88%, var(--bs-body-color) 12%);
}

.benchmark-overview-item strong,
.benchmark-overview-item span {
  display: block;
}

.benchmark-overview-item strong {
  margin-bottom: 0.35rem;
}

.benchmark-overview-item .benchmark-profile {
  display: inline-flex;
  margin-right: 0.25rem;
}

.benchmark-profile-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.benchmark-profile-button {
  min-height: 1.5rem;
  border: 1px solid currentColor;
  border-radius: 0.5rem;
  padding: 0.12rem 0.55rem;
  background: transparent;
  color: var(--bs-body-color);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.benchmark-profile-button[aria-pressed="true"] {
  color: #fff;
}

.benchmark-profile-button-default[aria-pressed="true"] {
  background: #2563eb;
  border-color: #2563eb;
}

.benchmark-profile-button-heavy[aria-pressed="true"] {
  background: #b45309;
  border-color: #b45309;
}

.benchmark-profile-button-smoke[aria-pressed="true"] {
  background: #64748b;
  border-color: #64748b;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.86rem;
  line-height: 1.25;
}

.benchmark-table th,
.benchmark-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.benchmark-table th {
  font-weight: 700;
}

.benchmark-trend-table {
  table-layout: auto;
  white-space: normal;
}

.benchmark-trend-table th:first-child,
.benchmark-trend-table td:first-child {
  min-width: 11rem;
}

.benchmark-number,
.benchmark-status {
  white-space: nowrap;
}

.benchmark-group-row th {
  padding-top: 1.15rem;
  background: color-mix(in srgb, var(--color-bg-primary) 78%, var(--bs-body-color) 22%);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.benchmark-data-row td {
  padding-top: 0.85rem;
}

.benchmark-scenario-name {
  font-weight: 700;
}

.benchmark-trend-table a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.benchmark-detail-row td {
  padding-top: 0;
  padding-bottom: 0.9rem;
  background: color-mix(in srgb, var(--color-bg-primary) 96%, var(--bs-body-color) 4%);
}

.benchmark-detail-content {
  display: grid;
  gap: 0.35rem;
  white-space: normal;
}

.benchmark-row-meta {
  display: block;
}

.benchmark-row-meta > span {
  display: inline;
  font-style: italic;
}

.benchmark-details {
  display: inline;
  margin-left: 0.45rem;
}

.benchmark-details summary {
  cursor: pointer;
  font-weight: 700;
  display: inline;
  list-style: none;
}

.benchmark-details summary::marker {
  content: "";
}

.benchmark-details summary::-webkit-details-marker {
  display: none;
}

.benchmark-details[open] {
  display: inline;
}

.benchmark-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.45rem 0.75rem;
  margin: 0.55rem 0 0;
}

.benchmark-telemetry-grid div {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.15rem;
  min-width: 0;
}

.benchmark-telemetry-grid dt {
  font-size: 0.72rem;
  line-height: 1.15;
  opacity: 0.72;
}

.benchmark-telemetry-grid dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
}

.benchmark-card-list {
  display: grid;
  gap: 1rem;
}

.benchmark-card {
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
  background: var(--color-bg-primary);
}

.benchmark-card-missing {
  opacity: 0.78;
}

.benchmark-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.benchmark-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.benchmark-card-header h3 span {
  font-weight: 400;
  opacity: 0.75;
}

.benchmark-card-header p {
  margin: 0.35rem 0 0;
  opacity: 0.75;
}

.benchmark-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.benchmark-card-grid h4 {
  margin-top: 0;
}

.benchmark-card-value {
  margin: 0.5rem 0 0;
  font-weight: 700;
}

.benchmark-chart {
  width: 100%;
  height: 180px;
  display: block;
}

.benchmark-chart-frame {
  position: relative;
  min-width: 0;
  outline: none;
}

.benchmark-chart-frame:focus {
  outline: 2px solid color-mix(in srgb, var(--bs-body-color) 55%, transparent);
  outline-offset: 0.25rem;
}

.benchmark-chart-line {
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.benchmark-chart-crosshair {
  stroke: var(--bs-body-color);
  stroke-width: 1;
  opacity: 0;
  pointer-events: none;
}

.benchmark-chart-hover-point {
  opacity: 0;
  pointer-events: none;
  stroke: var(--color-bg-primary);
  stroke-width: 2;
}

.benchmark-chart-tooltip {
  position: absolute;
  z-index: 2;
  width: max-content;
  min-width: 12.5rem;
  max-width: min(22rem, calc(100% - 1rem));
  border: 1px solid var(--color-border);
  border-radius: 0.35rem;
  padding: 0.45rem 0.55rem;
  background: color-mix(in srgb, var(--color-bg-primary) 88%, var(--bs-body-color) 12%);
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.25);
  font-size: 0.72rem;
  line-height: 1.28;
  opacity: 0;
  pointer-events: none;
  overflow-wrap: normal;
  transform: translate(-50%, calc(-100% - 0.45rem));
  transition: opacity 0.08s ease-in-out;
}

.benchmark-chart-tooltip strong {
  display: block;
  margin-bottom: 0.12rem;
}

.benchmark-chart-tooltip-left {
  transform: translate(0.35rem, calc(-100% - 0.45rem));
}

.benchmark-chart-tooltip-center {
  transform: translate(-50%, calc(-100% - 0.45rem));
}

.benchmark-chart-tooltip-right {
  transform: translate(calc(-100% - 0.35rem), calc(-100% - 0.45rem));
}

.benchmark-chart-frame-active .benchmark-chart-crosshair,
.benchmark-chart-frame-active .benchmark-chart-hover-point,
.benchmark-chart-frame-active .benchmark-chart-tooltip {
  opacity: 1;
}

.benchmark-chart-note {
  margin: 0.25rem 0 0;
  font-size: 0.76rem;
  opacity: 0.72;
}

.benchmark-axis {
  stroke: rgb(var(--bs-body-color-rgb));
  opacity: 0.45;
  stroke-width: 1;
}

.benchmark-grid {
  stroke: rgb(var(--bs-body-color-rgb));
  opacity: 0.22;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.benchmark-axis-label {
  fill: var(--bs-body-color);
  opacity: 0.92;
  font-size: 0.72rem;
  font-weight: 500;
}

.benchmark-muted,
.benchmark-empty-chart {
  opacity: 0.75;
}

.benchmark-error,
.benchmark-status-warning {
  color: #dc2626;
}

.benchmark-status-improved {
  color: #15803d;
}

.benchmark-status-noisy {
  color: #a16207;
}

.benchmark-status-missing,
.benchmark-status-profile-mismatch {
  color: #64748b;
}

.benchmark-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.benchmark-profile-list,
.benchmark-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.benchmark-profile-list {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.benchmark-profile {
  min-height: 1.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.benchmark-profile-default {
  background: #2563eb;
}

.benchmark-profile-heavy {
  background: #b45309;
}

.benchmark-profile-smoke {
  background: #64748b;
}
