.test-specs-panel {
    margin: 32px 0 28px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(8, 12, 24, 0.55);
    box-shadow: var(--shadow);
}

.test-specs-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 16px;
}

.test-spec-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.test-spec-item:last-child {
    border-bottom: none;
}

.test-spec-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--muted);
    min-width: 80px;
    flex-shrink: 0;
}

.test-spec-value {
    font-weight: 700;
}


.test-card-media {
    margin: -4px -4px 4px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.25);
}

.test-card-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
}

.test-detail-og-preview {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.test-detail-og-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.test-card {
    display: grid;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-height: 0;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.test-card:hover {
    border-color: color-mix(in srgb, var(--secondary) 45%, var(--line));
    transform: translateY(-2px);
}

.test-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 0.88rem;
}

.test-metric strong {
    color: var(--muted);
    font-weight: 800;
    margin-right: 6px;
}

.test-card-cta {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--secondary);
}

.test-detail-meta {
    color: var(--muted);
    font-weight: 700;
}

.test-version-badge {
    display: inline-block;
    margin: 10px 0 0;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    border: 1px solid var(--line);
}

.test-version-badge.is-included {
    color: var(--secondary);
    border-color: color-mix(in srgb, var(--secondary) 40%, var(--line));
    background: color-mix(in srgb, var(--secondary) 12%, transparent);
}

.test-version-badge.is-excluded {
    color: var(--muted);
    background: rgba(8, 12, 24, 0.45);
}

.test-version-badge.is-reference {
    color: var(--muted);
    border-color: var(--line);
    background: rgba(8, 12, 24, 0.45);
}

.test-detail-section .video-frame {
    margin: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.22);
}

.video-frame iframe,
.video-frame video,
.video-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.video-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    background:
        radial-gradient(circle at center, color-mix(in srgb, var(--primary) 28%, transparent), transparent 55%),
        rgba(255, 255, 255, 0.04);
    font-weight: 900;
}

.test-scenario-panel,
.test-transcript-panel {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.03);
}

.test-scenario-panel {
    margin-bottom: 24px;
}

.test-scenario-steps {
    margin: 16px 0 0;
    padding-left: 24px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}
.test-scenario-steps li {
    margin-bottom: 8px;
}

.chat-transcript {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 8px;
}

.chat-bubble-row {
    display: flex;
    width: 100%;
}

.chat-bubble-row.sys-row {
    justify-content: center;
}

.chat-bubble-row.ai-row {
    justify-content: flex-start;
}

.chat-bubble-row.user-row {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.chat-bubble.sys {
    max-width: 90%;
    background: transparent;
    color: var(--muted);
    font-size: 0.85rem;
    padding: 0 12px;
}

.chat-bubble.sys pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    text-align: center;
    opacity: 0.8;
}

.chat-bubble.ai {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
    color: var(--text);
}

.chat-bubble.user {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-text {
    margin-bottom: 6px;
}

.chat-text:last-child {
    margin-bottom: 0;
}

.chat-spacer {
    height: 12px;
}

.chat-tool-call {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    margin: 8px 0;
    color: var(--secondary);
    border: 1px solid var(--line);
}

.chat-metrics {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 8px;
    text-align: right;
    opacity: 0.8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.chat-bubble.user .chat-metrics {
    color: rgba(255,255,255,0.8);
}

.test-transcript-hint,
.test-transcript-empty {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.download-card {
    display: grid;
    align-content: space-between;
    gap: 24px;
}

.download-card .button {
    width: fit-content;
}
