/* Page styles for templates/flows/benchmark_review.html. Extracted from an inline <style> block. */
:root {
    --bench-ink: var(--color-text-primary);
    --bench-muted: var(--color-text-secondary);
    --bench-line: var(--color-border-light);
    --bench-panel: var(--color-bg-primary);
    --bench-accent: var(--color-primary-600);
    --bench-accent-soft: var(--color-primary-50);
    --bench-info: var(--color-info-700);
    --bench-success: var(--color-success-700);
    --bench-warning: var(--color-warning-700);
    --bench-danger: var(--color-danger-700);
}

.benchmark-shell {
    display: grid;
    gap: var(--space-6);
}

.benchmark-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.benchmark-panel {
    background: var(--bench-panel);
    border: 1px solid var(--bench-line);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.benchmark-hero-panel {
    background:
        radial-gradient(circle at top right, rgb(255 255 255 / 0.18), transparent 35%),
        linear-gradient(135deg, var(--color-primary-700), var(--color-secondary-700));
    color: var(--color-text-inverse);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.benchmark-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    color: rgba(247, 248, 251, 0.75);
    margin-bottom: 10px;
}

.benchmark-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    margin: 0 0 10px;
    font-weight: 800;
}

.benchmark-subtitle {
    max-width: 52rem;
    color: rgba(247, 248, 251, 0.82);
    font-size: 1rem;
    margin: 0;
}

.benchmark-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.benchmark-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.benchmark-pill.light {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.benchmark-pill.success,
.status-pill.success {
    background: rgba(15, 118, 110, 0.12);
    color: var(--bench-success);
}

.benchmark-pill.info,
.status-pill.info {
    background: rgba(37, 99, 235, 0.12);
    color: var(--bench-info);
}

.benchmark-pill.warning,
.status-pill.warning {
    background: rgba(180, 83, 9, 0.12);
    color: var(--bench-warning);
}

.benchmark-pill.danger,
.status-pill.danger {
    background: rgba(180, 35, 24, 0.12);
    color: var(--bench-danger);
}

.benchmark-hero-panel .benchmark-pill.success,
.benchmark-hero-panel .benchmark-pill.info,
.benchmark-hero-panel .benchmark-pill.warning,
.benchmark-hero-panel .benchmark-pill.danger {
    background: rgb(255 255 255 / 0.14);
    border: 1px solid rgb(255 255 255 / 0.2);
    color: var(--color-text-inverse);
}

.benchmark-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.benchmark-stat-card {
    border-radius: var(--radius-xl);
    background: var(--color-bg-primary);
    border: 1px solid var(--bench-line);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.benchmark-stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bench-muted);
    margin-bottom: 8px;
}

.benchmark-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bench-ink);
    line-height: 1.1;
}

.benchmark-stat-detail {
    margin-top: 6px;
    color: var(--bench-muted);
    font-size: 0.9rem;
}

.benchmark-section {
    margin-top: 0;
}

.benchmark-section-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.benchmark-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bench-ink);
    margin: 0;
}

.benchmark-section-subtitle {
    color: var(--bench-muted);
    margin: 0;
    font-size: 0.92rem;
}

.artifact-grid,
.recommendation-grid,
.execution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.artifact-card,
.recommendation-card,
.execution-card,
.baseline-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--bench-line);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.artifact-card.card {
    padding: 0;
}

.artifact-label,
.recommendation-label,
.mini-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bench-muted);
    margin-bottom: 8px;
}

.artifact-value,
.recommendation-value {
    color: var(--bench-ink);
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.artifact-value code,
.recommendation-value code {
    color: inherit;
    font-size: 0.85rem;
}

.artifact-detail,
.recommendation-detail,
.execution-detail {
    color: var(--bench-muted);
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.45;
}

.recommendation-card.success {
    border-color: rgba(15, 118, 110, 0.22);
    background: linear-gradient(180deg, rgba(15, 118, 110, 0.04), #fff);
}

.recommendation-card.info {
    border-color: rgba(37, 99, 235, 0.22);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.04), #fff);
}

.recommendation-card.warning {
    border-color: rgba(180, 83, 9, 0.22);
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.04), #fff);
}

.recommendation-card.danger {
    border-color: rgba(180, 35, 24, 0.22);
    background: linear-gradient(180deg, rgba(180, 35, 24, 0.04), #fff);
}

.two-column-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 16px;
}

.baseline-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.baseline-metric {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    padding: 14px;
    border: 1px solid var(--bench-line);
}

.baseline-metric .value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--bench-ink);
}

.baseline-metric .detail {
    color: var(--bench-muted);
    font-size: 0.86rem;
    margin-top: 4px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.8rem;
    font-weight: 700;
}

.tag-chip.present {
    background: rgba(15, 118, 110, 0.12);
    color: var(--bench-success);
}

.tag-chip.missing {
    background: rgba(180, 35, 24, 0.1);
    color: var(--bench-danger);
}

.comparison-table-wrap,
.run-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-xl);
    border: 1px solid var(--bench-line);
    background: var(--color-bg-primary);
}

.comparison-table,
.run-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.comparison-table th,
.comparison-table td,
.run-table th,
.run-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(23, 32, 51, 0.08);
    vertical-align: top;
}

.comparison-table th,
.run-table th {
    background: var(--color-bg-secondary);
    color: var(--bench-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 800;
}

.comparison-table tr:last-child td,
.run-table tr:last-child td {
    border-bottom: 0;
}

.rank-badge {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bench-accent-soft);
    color: var(--bench-accent);
    font-weight: 800;
}

.model-cell-main {
    color: var(--bench-ink);
    font-weight: 800;
    line-height: 1.3;
}

.model-cell-meta {
    color: var(--bench-muted);
    margin-top: 4px;
    font-size: 0.84rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-bar {
    position: relative;
    height: 10px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 8px;
    min-width: 120px;
}

.metric-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.metric-bar.quality > span {
    background: linear-gradient(90deg, var(--color-success-600), var(--color-success-500));
}

.metric-bar.duration > span {
    background: linear-gradient(90deg, var(--color-warning-600), var(--color-warning-500));
}

.note-block {
    color: var(--bench-muted);
    font-size: 0.88rem;
    line-height: 1.45;
    max-width: 26rem;
}

.empty-state-panel {
    text-align: center;
    border-radius: var(--radius-xl);
    border: 1px dashed var(--color-border-medium);
    background: var(--color-bg-secondary);
    padding: 48px 24px;
    color: var(--bench-muted);
}

.execution-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.execution-id {
    font-weight: 800;
    color: var(--bench-ink);
    text-decoration: none;
}

.execution-id:hover {
    text-decoration: underline;
}

.execution-meta {
    color: var(--bench-muted);
    font-size: 0.9rem;
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.execution-model-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.execution-model-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: var(--radius-full);
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    font-size: 0.76rem;
    font-weight: 700;
}

details.raw-json {
    background: var(--color-bg-primary);
    border: 1px solid var(--bench-line);
    border-radius: var(--radius-xl);
    padding: 18px;
}

details.raw-json summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--bench-ink);
}

details.raw-json pre {
    margin-top: 16px;
    max-height: 540px;
    overflow: auto;
    background: #111827;
    color: #e5eef8;
    border-radius: 14px;
    padding: 18px;
}

@media (max-width: 991px) {
    .benchmark-shell {
        gap: var(--space-4);
    }

    .benchmark-hero,
    .two-column-grid {
        grid-template-columns: 1fr;
    }
}

[data-bs-theme="dark"] .benchmark-stat-card,
[data-bs-theme="dark"] .artifact-card,
[data-bs-theme="dark"] .recommendation-card,
[data-bs-theme="dark"] .execution-card,
[data-bs-theme="dark"] .baseline-card,
[data-bs-theme="dark"] .comparison-table-wrap,
[data-bs-theme="dark"] .run-table-wrap,
[data-bs-theme="dark"] details.raw-json {
    background: var(--color-bg-secondary);
}
