:root {
    --timeline-bg: #f5f7fb;
    --timeline-card-bg: #fff;
    --timeline-border: #e2e6f0;
    --timeline-primary: #3056d3;
    --timeline-primary-soft: #eaf0ff;
    --timeline-highlight: #ff7a18;
    --timeline-text-muted: #6b7280;
}

.timeline-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.timeline-page .card {
    background: var(--timeline-card-bg);
    border-radius: 18px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 14px 45px rgba(15, 23, 42, 0.08);
}

.timeline-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: linear-gradient(135deg, #eef2ff, #fdf2f8);
}

.timeline-hero-text h1 {
    margin-bottom: 0.4rem;
}

.timeline-hero-text p {
    color: var(--timeline-text-muted);
}

.timeline-hero .breadcrumb {
    font-size: 0.9rem;
    color: var(--timeline-text-muted);
    margin-bottom: 0.25rem;
}

.timeline-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--timeline-card-bg);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(48, 86, 211, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-card span {
    color: var(--timeline-text-muted);
    font-size: 0.9rem;
}

.stat-card strong {
    font-size: 1.8rem;
    color: #111827;
}

.stat-card-note {
    font-size: 0.85rem;
    color: var(--timeline-text-muted);
}

.timeline-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    align-items: end;
}

.timeline-filters label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.timeline-filters select,
.timeline-filters input[type="text"] {
    width: 100%;
    border: 1px solid var(--timeline-border);
    border-radius: 12px;
    padding: 0.65rem 0.9rem;
    font-size: 1rem;
    background: #f8fafc;
}

.search-field input {
    background: #fff;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    grid-column: 1 / -1;
}

.timeline-btn {
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-btn.primary {
    background: var(--timeline-primary);
    color: #fff;
    box-shadow: 0 10px 25px rgba(48, 86, 211, 0.35);
}

.timeline-btn.ghost {
    background: transparent;
    border: 1px solid var(--timeline-border);
    color: #111827;
}

.timeline-btn:hover {
    transform: translateY(-1px);
}

.timeline-category-overview .section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.category-chip-list {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-chip {
    padding: 0.6rem 0.85rem;
    border-radius: 14px;
    background: var(--timeline-primary-soft);
    color: var(--timeline-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.category-chip.active {
    background: var(--timeline-primary);
    color: #fff;
}

.chip-count {
    font-size: 0.85rem;
    opacity: 0.9;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid var(--timeline-border);
    padding-bottom: 0.8rem;
    margin-bottom: 1.2rem;
}

.live-search-hint {
    font-size: 0.9rem;
    color: var(--timeline-text-muted);
}

.timeline-flow {
    position: relative;
}

.timeline-year-group {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-left: 2px solid var(--timeline-border);
    margin-left: 60px;
    position: relative;
}

.timeline-year-group::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    border-left: 2px solid var(--timeline-border);
}

.year-badge {
    position: absolute;
    left: -60px;
    top: 1.5rem;
    background: #111827;
    color: #fff;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 1px;
}

.timeline-year-group.is-collapsed {
    display: none;
}

.timeline-entry-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--timeline-border);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    position: relative;
}

.timeline-entry-card::before {
    content: '';
    position: absolute;
    left: -2.3rem;
    top: 1.4rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--timeline-primary);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--timeline-primary-soft);
}

.timeline-year-group:nth-child(even) .timeline-entry-card::before {
    background: var(--timeline-highlight);
    box-shadow: 0 0 0 2px rgba(255, 122, 24, 0.25);
}

.timeline-entry-card.is-highlight {
    border-color: rgba(255, 122, 24, 0.5);
    box-shadow: 0 12px 28px rgba(255, 122, 24, 0.18);
}

.entry-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.95rem;
    color: var(--timeline-text-muted);
}

.entry-date {
    font-weight: 700;
    color: #111827;
}

.entry-category {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--timeline-primary-soft);
    color: var(--timeline-primary);
    font-size: 0.85rem;
}

.entry-highlight {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 122, 24, 0.15);
    color: var(--timeline-highlight);
    font-size: 0.85rem;
    font-weight: 700;
}

.entry-title {
    margin: 0.75rem 0;
}

.entry-summary {
    color: #374151;
    line-height: 1.6;
}

.entry-photo {
    margin: 1rem 0;
    border-radius: 14px;
    overflow: hidden;
}

.entry-photo img {
    width: 100%;
    display: block;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--timeline-text-muted);
    margin-top: 0.8rem;
}

.entry-link {
    color: var(--timeline-primary);
    font-weight: 600;
}

.timeline-empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.live-search-empty {
    background: #fff7ed;
    border: 1px dashed #fdba74;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    color: #9a3412;
    margin-bottom: 1rem;
}

.timeline-entry-card.is-hidden-by-search {
    display: none;
}

@media (max-width: 768px) {
    .timeline-year-group {
        grid-template-columns: 1fr;
        margin-left: 20px;
    }

    .year-badge {
        left: -30px;
    }

    .timeline-entry-card::before {
        left: -1.4rem;
    }

    .filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}
