/* ==================== Benchmark / Runtime Cards — Vision Banana style ==================== */

/* Single-card wrapper used by both the benchmark chart and the runtime chart. */
.benchmark-single-card {
    max-width: 760px;
    margin: 12px auto 28px;
}

.chart-card {
    padding: 26px 26px 22px;
    border-radius: 14px;
    background: #f6f9fc;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 18px;
    gap: 4px;
}

.chart-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    font-family: "Avenir", "Avenir Next Cyr", "Inter", sans-serif;
}

.chart-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 6px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: #64748b;
    font-family: "Avenir", "Avenir Next Cyr", "Inter", sans-serif;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chart-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 3px;
    background: #cbd5e1;
}

.chart-legend-swatch.light {
    background: #b9d4ee;
}

.chart-legend-swatch.dark {
    background: #4E95D9;
}

.bar-group {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
    height: 240px;
    padding: 28px 6px 0;
    box-sizing: content-box;
}

.bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 90px;
    height: 100%;
    justify-content: flex-end;
}

.bar-value {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    font-family: "Avenir", "Avenir Next Cyr", "Inter", sans-serif;
    text-align: center;
    pointer-events: none;
}

.bar-value.highlight {
    color: #2f78c4;
    font-weight: 800;
}

.bar-track {
    width: 100%;
    height: 0;
    background: transparent;
    border-radius: 6px 6px 0 0;
    overflow: visible;
    position: relative;
    transition: height 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Default + second bars share one solid grey — no variants, no gradient. */
.bar-fill {
    width: 100%;
    height: 100%;
    border-radius: 6px 6px 0 0;
    background: #cbd5e1;
}

.bar-fill.highlight {
    background: #4E95D9;
}

/* Grouped (paired) bars — VideoMME / runtime "both" style */
.bar-col.grouped .bar-track-pair {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 3px;
    width: 100%;
    height: 100%;
}

.bar-col.grouped .bar-sub {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

.bar-col.grouped .bar-sub .bar-value {
    font-size: 10.5px;
}

.bar-fill.light {
    background: #b9d4ee;
}

.bar-fill.dark {
    background: #4E95D9;
}

/* Static runtime bar chart only (#runtimeCard) — LLaVA-Video-7B paired grays; interactive #runtime-comparison unchanged */
#runtimeCard .bar-fill.baseline-llava-light,
#runtimeCard .bar-fill.llava-light {
    background: #e2e8f0;
}

#runtimeCard .bar-fill.llava-dark {
    background: #64748b;
}

.bar-labels {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
    padding: 0 6px;
}

.bar-label {
    flex: 1;
    max-width: 90px;
    text-align: center;
    font-size: 11px;
    color: #475569;
    font-weight: 500;
    line-height: 1.35;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    font-family: "Avenir", "Avenir Next Cyr", "Inter", sans-serif;
}

.bar-label.highlight {
    color: #2f78c4;
    font-weight: 700;
}

.bar-label .ours-sup {
    display: block;
    color: #4E95D9;
    font-style: italic;
    font-weight: 700;
    font-size: 10px;
    margin-top: 2px;
}

.bar-label .label-sub {
    display: block;
    color: #94a3b8;
    font-weight: 400;
    font-size: 10px;
    margin-top: 2px;
    font-style: italic;
}

.chart-note {
    margin-top: 10px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
    text-align: center;
    font-family: "Avenir", "Avenir Next Cyr", "Inter", sans-serif;
}

@media (max-width: 600px) {
    .benchmark-single-card {
        width: 100%;
        overflow-x: hidden;
        padding-bottom: 0;
    }

    .chart-card {
        padding: 16px 10px 12px;
    }
    .bar-group {
        height: 200px;
        gap: 4px;
        padding-top: 18px;
    }
    .bar-col {
        max-width: none;
        min-width: 0;
    }
    .bar-label {
        max-width: none;
        font-size: 8px;
        line-height: 1.15;
    }
    .bar-value {
        font-size: 8px;
        margin-bottom: 2px;
    }
    .bar-col.grouped .bar-sub .bar-value {
        font-size: 7px;
    }
}

@media (max-width: 420px) {
    .chart-card {
        padding: 14px 8px 10px;
    }

    .bar-group {
        height: 184px;
        gap: 3px;
        padding-top: 16px;
    }

    .bar-label {
        font-size: 7px;
        line-height: 1.1;
    }

    .bar-value {
        font-size: 7px;
    }
}
