.BenchmarkGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--GridGap);
}

.Benchmark {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: var(--SpaceBase);
    padding: var(--CardPadding);
}

.BenchmarkHeader {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--SpaceTiny) var(--SpaceSmall);
}

.BenchmarkTitle {
    font-size: var(--SizeHeading);
    letter-spacing: var(--TrackingSnug);
}

.BenchmarkTag,
.ProductLegend,
.BenchmarkRows dd {
    font-size: var(--SizeCaption);
    color: var(--InkMuted);
}

.BenchmarkEmpty {
    display: grid;
    place-items: center;
    min-height: 11rem;
    padding: var(--SpaceSmall);
    border: 1px solid rgb(136 169 221 / 0.12);
    border-radius: var(--RadiusMedium);
    background: repeating-linear-gradient(to top, rgb(136 169 221 / 0.065) 0 1px, transparent 1px 25%);
    color: var(--InkMuted);
    text-align: center;
    font-size: var(--SizeSmall);
}

.Performance [data-product="azure"] { --SeriesColor: var(--SeriesSmall); }
.Performance [data-product="macsploit"] { --SeriesColor: var(--SeriesMedium); }
.Performance [data-product="opiumware"] { --SeriesColor: var(--SeriesLarge); }

.ProductLegend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--SpaceTiny) var(--SpaceMedium);
}

.ProductLegend li,
.BenchmarkRows dt {
    display: inline-flex;
    align-items: center;
    gap: var(--SpaceTiny);
}

.ProductLegend li::before,
.BenchmarkRows dt::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--SeriesColor);
}

.BenchmarkRows {
    grid-row: 2 / -1;
    display: grid;
    align-content: center;
}

.BenchmarkRows > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--SpaceSmall);
    padding-block: var(--SpaceBase);
    border-bottom: 1px solid var(--BorderSubtle);
}

.BenchmarkRows > div:first-child {
    border-top: 1px solid var(--BorderSubtle);
}

@media (width < 60rem) {
    .BenchmarkGrid { grid-template-columns: minmax(0, 1fr); }
}

.BenchmarkMethod {
    position: relative;
    z-index: 5;
    width: fit-content;
    margin-top: var(--SpaceMedium);
}

.MethodButton {
    display: inline-flex;
    align-items: center;
    min-height: var(--ControlSmall);
    padding-inline: var(--SpaceSmall);
    border: 1px solid var(--BorderDefault);
    border-radius: var(--RadiusRound);
    font-size: var(--SizeCaption);
    gap: var(--SpaceTiny);
    background: var(--SurfaceBase);
    color: var(--InkMuted);
    transition: color var(--DurationFast) var(--EaseOut), background-color var(--DurationFast) var(--EaseOut);
}

.MethodButton:hover,
.MethodButton[aria-expanded="true"] {
    color: var(--InkStrong);
    background: var(--SurfaceBase);
}

.MethodButton svg {
    flex-shrink: 0;
}

.MethodPanel {
    position: absolute;
    bottom: calc(100% + 0.625rem);
    left: 0;
    width: min(23rem, calc(100vw - 2 * var(--PageGutter)));
    padding: var(--SpaceBase);
    border: 1px solid var(--BorderDefault);
    border-radius: var(--RadiusMedium);
    background: var(--SurfaceGlass);
    box-shadow: var(--ShadowSoft);
    backdrop-filter: blur(0.75rem) saturate(1.3);
    font-size: var(--SizeCaption);
    line-height: 1.6;
    color: var(--InkMuted);
}

.MethodPanel::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 0.75rem;
}

.MethodPanel h3 {
    margin-bottom: var(--SpaceTiny);
    font-size: var(--SizeSmall);
    font-weight: var(--WeightMedium);
    letter-spacing: var(--TrackingSnug);
    color: var(--InkStrong);
}

.MethodMetrics dt {
    color: var(--InkStrong);
    font-weight: var(--WeightMedium);
}

.MethodMetrics {
    display: grid;
    gap: var(--SpaceTiny);
    margin-block: var(--SpaceBase);
}

.MethodMetrics > div {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: var(--SpaceSmall);
}

.MethodMetrics dd {
    margin: 0;
}

html:has(.MethodDialog[open]) {
    overflow: hidden;
}

.MethodDialog {
    width: min(25rem, calc(100% - 2rem));
    max-width: none;
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--BorderDefault);
    border-radius: var(--RadiusMedium);
    background: var(--SurfaceRaised);
    color: var(--InkMuted);
    box-shadow: var(--ShadowFloating);
}

.MethodDialog::backdrop {
    background: var(--SurfaceOverlay);
    backdrop-filter: blur(0.25rem);
}

.MethodDialog .MethodPanel {
    position: static;
    width: auto;
    padding: var(--SpaceMedium);
    border: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
}

.MethodDialog .MethodPanel::after {
    content: none;
}

.MethodDialog h3 {
    padding-right: var(--ControlSmall);
}

.MethodClose {
    position: absolute;
    top: var(--SpaceSmall);
    right: var(--SpaceSmall);
    display: grid;
    place-items: center;
    width: var(--ControlSmall);
    height: var(--ControlSmall);
    border-radius: var(--RadiusRound);
    color: var(--InkMuted);
}

.MethodClose:hover {
    background: var(--SurfaceHover);
    color: var(--InkStrong);
}

