/**
 * Deployment changelog page styles.
 * Tabbed timeline, cards, badges; read-only layout.
 */
* { box-sizing: border-box; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #f7f9fc;
    color: #334155;
    line-height: 1.6;
    font-size: 15px;
}
.changelog-page { max-width: 1280px; margin: 0 auto; padding: 24px 24px 48px; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 6px; color: #6271eb; }
.page-header p { margin: 0; font-size: 0.9375rem; color: #64748b; }
.page-header-system { font-weight: 600; color: #475569; font-size: 0.9em; }

.tabs-wrap { position: sticky; top: 0; background: #f7f9fc; z-index: 10; padding: 4px 0 16px; margin-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 4px;
}
.tab-btn {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-family: inherit; font-size: 0.875rem; font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}
.tab-btn:hover { color: #334155; background: #e2e8f0; }
.tab-btn.active { color: #6271eb; background: #eff6ff; border-bottom: 2px solid #6271eb; margin-bottom: -2px; }

.tab-panel { display: none; padding-top: 8px; }
.tab-panel.active { display: block; }

.timeline { position: relative; padding-left: 24px; border-left: 2px solid #e2e8f0; margin-left: 6px; }
.timeline-date { font-size: 0.8125rem; font-weight: 600; color: #64748b; margin: 24px 0 12px; text-transform: uppercase; letter-spacing: 0.02em; }
.timeline-date:first-child { margin-top: 0; }
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6271eb;
}
.timeline-item.status-success::before { background: #16a34a; }
.timeline-item.status-failed::before { background: #dc2626; }

.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}
.card-expandable .card-preview {
    cursor: pointer;
    user-select: none;
    outline: none;
    margin: -20px -24px 0 -24px;
    padding: 20px 24px 16px 24px;
    border-radius: 10px 10px 0 0;
}
.card-expandable .card-preview:hover { background: #f8fafc; }
.card-expandable .card-preview:focus-visible { box-shadow: inset 0 0 0 2px #6271eb; }
.card-preview-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.card-preview-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.card-preview-body {
    flex: 1;
    min-width: 0;
    padding: 0;
    margin: 0;
}
.card-preview-body .card-title,
.card-preview-body .card-badges,
.card-preview-body .card-link {
    margin-left: 0;
    padding-left: 0;
}
.card-title-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eff6ff;
    color: #6271eb;
}
.card-title-icon svg {
    width: 18px;
    height: 18px;
}
.card-preview-body .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 0 0 12px 0;
}
.card-preview-body .card-badges {
    margin: 0 0 14px 0;
}
.card-preview-body .card-link {
    margin: 0;
}

.card-chevron {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-right: 1.5px solid #64748b;
    border-bottom: 1.5px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}
.card-expanded .card-chevron { transform: rotate(-135deg); margin-top: 10px; }
.card-detail {
    display: none;
    padding-top: 16px;
    margin-top: 4px;
}
.card-expanded .card-detail { display: block; }
@media (max-width: 640px) {
    .card-expandable .card-preview { margin: -16px -18px 0 -18px; padding: 16px 18px 12px 18px; }
}
.card-block { margin-bottom: 20px; }
.card-block:last-child { margin-bottom: 0; }
.section-heading {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin: 0;
    padding: 10px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
    box-sizing: border-box;
}
.card-block-summary .section-heading { margin: 0 0 12px 0; }
.section-separator { display: none; }
.section-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 4px;
}
.card-block-overview .card-title { font-size: 1.0625rem; font-weight: 600; margin: 0 0 0; color: #0f172a; line-height: 1.4; }
.card-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-block; padding: 4px 10px; font-size: 0.75rem; font-weight: 500; border-radius: 6px; }
.badge-repo { background: #dbeafe; color: #1d4ed8; }
.badge-env { background: #dcfce7; color: #15803d; }
.badge-branch { background: #dcfce7; color: #15803d; }
.badge-author { background: #f1f5f9; color: #475569; }
.badge-event { background: #fef3c7; color: #b45309; }
.badge-source { background: #e0e7ff; color: #4338ca; }
.card-block-summary .card-summary { font-size: 0.9375rem; white-space: pre-wrap; margin: 0; color: #334155; line-height: 1.6; }
.card-summary ul { margin: 8px 0 0; padding-left: 20px; }
.card-summary li { margin-bottom: 4px; }
.card-files { margin: 0; padding-left: 20px; }
.card-files code { font-family: ui-monospace, monospace; font-size: 0.875rem; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; color: #334155; }
.card-link { font-size: 0.875rem; }
.card-link a { color: #6271eb; text-decoration: none; }
.card-link a:hover { text-decoration: underline; }
.empty-state { text-align: center; color: #64748b; padding: 48px 16px; font-size: 0.9375rem; }

@media (max-width: 640px) {
    .changelog-page { padding: 16px 12px 32px; }
    .card { padding: 16px 18px; }
    .card-preview-body .card-title { font-size: 1rem; margin-bottom: 10px; }
    .card-preview-body .card-badges { margin-bottom: 12px; }
    .card-title-icon { width: 28px; height: 28px; }
    .card-title-icon svg { width: 16px; height: 16px; }
}
