.backtest-heading-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.backtest-legend { display:flex; align-items:center; gap:.4rem; font-size:.875rem; }
.backtest-legend-sample { display:inline-block; width:24px; height:0; border-top:2px solid currentColor; }
.backtest-legend-sample.backtest-sti { color:#087f5b; border-top-style:dashed; }
.backtest-legend-sample.backtest-strategy { color:#2563eb; border-top-width:3px; }
.backtest-metric-value .backtest-sti { color:#087f5b; }
.backtest-metric-value .backtest-strategy { color:#2563eb; }
.theme-dark .backtest-legend-sample.backtest-sti, .theme-dark .backtest-metric-value .backtest-sti { color:#34d399; }
.theme-dark .backtest-legend-sample.backtest-strategy, .theme-dark .backtest-metric-value .backtest-strategy { color:#60a5fa; }
.backtest-range { display:flex; align-items:flex-end; flex-wrap:wrap; gap:.65rem; }
.backtest-range label { display:block; font-size:.8rem; margin-bottom:.3rem; }
.backtest-range input { width:7.5rem; }
.backtest-range-separator { padding-bottom:.5rem; }
.backtest-metric-value { display:flex; justify-content:space-between; align-items:baseline; gap:.5rem; }
.backtest-metric-value span { font-size:.8rem; }
.backtest-metric-value strong { font-size:1.1rem; font-variant-numeric:tabular-nums; }
.backtest-metric-help { margin:0 0 1rem; font-size:.8125rem; color:#526174; }
.backtest-metric-help summary { min-height:40px; display:inline-flex; align-items:center; cursor:pointer; color:#1762c4; }
.backtest-metric-help p { max-width:70ch; margin:.35rem 0 0; }
.theme-dark .backtest-metric-help { color:#cbd5e1; }
.theme-dark .backtest-metric-help summary { color:#9bc8ff; }
.backtest-canvas-wrap { height:420px; position:relative; }
#momentum-backtest { width:100%; height:100%; touch-action:pan-y; }
@media(max-width:575px) {
    .backtest-metrics { margin-left:-.35rem; margin-right:-.35rem; }
    .backtest-metrics>div { padding-left:.35rem; padding-right:.35rem; }
    .backtest-metric { padding:.7rem!important; }
    .backtest-metric-value { flex-wrap:wrap; gap:.1rem .4rem; }
    .backtest-metric-value strong { font-size:1rem; }
    .backtest-canvas-wrap { height:330px; }
}
