.md-typeset table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.md-typeset table::-webkit-scrollbar { height: 6px; }
.md-typeset table::-webkit-scrollbar-thumb {
    background: var(--md-default-fg-color--lighter);
    border-radius: 3px;
}

/* Benchmark charts. The wrapper owns the box, so the custom element has its final height on the
   first layout pass even before the extracted chart stylesheet arrives; the element only fills the
   wrapper. The mobile heights are a little taller because the axis labels wrap. */
.chart {
    display: block;
    width: 100%;
    margin: 1.25rem 0;
}
.chart--speedup { height: 460px; }
.chart--boxplot { height: 500px; }
@media (max-width: 600px) {
    .chart--speedup { height: 440px; }
    .chart--boxplot { height: 540px; }
}
.chart > c2s-speedup,
.chart > c2s-boxplot {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}

/* A bundle that never defined its element (stale cache, blocked module, JavaScript disabled) must
   not leave a silent hole: the wrapper keeps its height and says what happened. `:defined` flips
   as soon as the element upgrades, so a normal load never shows this; the delay hides it during
   the module fetch. */
.chart--speedup:not(:has(c2s-speedup:defined))::after,
.chart--boxplot:not(:has(c2s-boxplot:defined))::after {
    content: "Chart failed to load. Hard-reload this page (Ctrl+Shift+R, or Cmd+Shift+R) so the browser fetches the chart bundle again.";
    display: block;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid currentColor;
    border-radius: 6px;
    color: var(--md-default-fg-color, #1f2937);
    font-size: 0.75rem;
    line-height: 1.4;
    animation: c2s-chart-fallback 0s 2s both;
}
@keyframes c2s-chart-fallback {
    from { opacity: 0; }
    to { opacity: 1; }
}
