.timeline-wrap {
    position: relative;
    max-width: 52rem;
    margin-inline:auto;padding-top: 2.25rem;
    padding-bottom: 4.5rem
}

.timeline-wrap:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 2.5rem;
    left: 1.25rem;
    width: 2px;
    background: linear-gradient(180deg,hsl(var(--gold) / 0),hsl(var(--gold) / .55) 6%,hsl(var(--gold) / .5),hsl(var(--gold) / .55) 94%,hsl(var(--gold) / 0))
}

.timeline {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0
}

.timeline-cap {
    position: absolute;
    left: 1.25rem;
    transform: translate(-50%);
    z-index: 2;
    pointer-events: none
}

.timeline-cap--start {
    top: 0;
    width: 13px;
    height: 13px;
    border-radius: 9999px;
    background: radial-gradient(circle,hsl(var(--gold)) 0%,hsl(var(--gold) / .75) 55%,transparent 72%);
    box-shadow: 0 0 0 5px hsl(var(--background)),0 0 14px hsl(var(--gold) / .55);
    animation: capGlow 4.5s ease-in-out infinite
}

.timeline-cap--end {
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem
}

.timeline-cap__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    color: hsl(var(--gold));
    font-size: 1.1rem;
    background: linear-gradient(135deg,hsl(var(--forest)),hsl(var(--forest-dark)));
    border: 1.5px solid hsl(var(--gold) / .5);
    box-shadow: 0 0 0 6px hsl(var(--background)),0 0 0 7px hsl(var(--gold) / .18),0 8px 22px -8px hsl(var(--forest) / .6)
}

.timeline-cap__label {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .3em;
    color: hsl(var(--primary));
    text-indent: .3em
}

.timeline-item {
    position: relative;
    padding-left: 3.75rem;
    padding-bottom: 2.25rem
}

.timeline-item:last-child {
    padding-bottom: 0
}

.timeline-item:before {
    content: "";
    position: absolute;
    top: 1.25rem;
    left: 2.5rem;
    width: 1.35rem;
    height: 1px;
    background: linear-gradient(90deg,hsl(var(--gold) / .6),hsl(var(--gold) / .12));
    z-index: 0
}

.timeline-item:after {
    content: "";
    position: absolute;
    top: calc(1.25rem - 5px);
    left: calc(3.75rem - 5px);
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    background: hsl(var(--card));
    border-bottom: 1px solid hsl(var(--gold) / .4);
    border-left: 1px solid hsl(var(--gold) / .4);
    z-index: 1
}

.timeline-badge {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg,hsl(var(--forest)),hsl(var(--forest-dark)));
    color: hsl(var(--gold));
    border: 1.5px solid hsl(var(--gold) / .55);
    font-weight: 700;
    font-size: 1rem;
    z-index: 2;
    box-shadow: 0 0 0 5px hsl(var(--background)),0 0 0 6px hsl(var(--gold) / .16),0 6px 18px -6px hsl(var(--forest) / .55);
    transition: transform .45s var(--ease-elegant),box-shadow .45s var(--ease-elegant)
}

.timeline-card {
    overflow: hidden
}

.timeline-watermark {
    position: absolute;
    top: -.85rem;
    right: .4rem;
    font-size: 5.25rem;
    line-height: 1;
    font-weight: 700;
    color: hsl(var(--gold) / .08);
    z-index: 0;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none
}

.timeline-title {
    position: relative;
    display: inline-block;
    padding-bottom: .75rem
}

.timeline-title:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.25rem;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg,hsl(var(--gold) / .85),hsl(var(--gold) / .15));
    transition: width .5s var(--ease-elegant)
}

.timeline-card:hover .timeline-title:after {
    width: 3.5rem
}

.timeline-card:hover .timeline-badge {
    transform: scale(1.06);
    box-shadow: 0 0 0 5px hsl(var(--background)),0 0 0 6px hsl(var(--gold) / .4),0 8px 22px -6px hsl(var(--forest) / .6)
}

.branch-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem
}

.branch-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .8rem;
    font-size: .9rem;
    color: hsl(var(--primary));
    background: hsl(var(--primary) / .05);
    border: 1px solid hsl(var(--gold) / .4);
    border-radius: 9999px;
    transition: background-color .3s var(--ease-elegant),border-color .3s var(--ease-elegant),color .3s var(--ease-elegant)
}

.branch-chip:before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 9999px;
    background: hsl(var(--gold) / .7);
    flex-shrink: 0
}

.branch-chip:hover {
    background: hsl(var(--gold) / .12);
    border-color: hsl(var(--gold) / .7);
    color: hsl(var(--forest-dark))
}

.timeline-item.reveal {
    opacity: 0;
    transform: translateY(26px) scale(.985)
}

.timeline-item.reveal.is-visible {
    opacity: 1;
    transform: none
}

@media (min-width: 768px) {
    .timeline-wrap:before {
        left:50%;
        transform: translate(-50%)
    }

    .timeline-cap {
        left: 50%
    }

    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-bottom: 3rem
    }

    .timeline-item:nth-child(odd) {
        left: 0;
        padding-right: 3.25rem;
        text-align: right
    }

    .timeline-item:nth-child(2n) {
        left: 50%;
        padding-left: 3.25rem
    }

    .timeline-item:nth-child(odd) .timeline-badge {
        left: auto;
        right: -1.25rem
    }

    .timeline-item:nth-child(2n) .timeline-badge {
        left: -1.25rem
    }

    .timeline-item:nth-child(odd):before {
        left: auto;
        right: 1.25rem;
        width: 1.35rem;
        background: linear-gradient(90deg,hsl(var(--gold) / .12),hsl(var(--gold) / .6))
    }

    .timeline-item:nth-child(2n):before {
        left: 1.25rem;
        right: auto;
        width: 1.35rem
    }

    .timeline-item:nth-child(odd):after {
        left: auto;
        right: calc(3.25rem - 5px);
        border-bottom: none;
        border-left: none;
        border-top: 1px solid hsl(var(--gold) / .4);
        border-right: 1px solid hsl(var(--gold) / .4)
    }

    .timeline-item:nth-child(2n):after {
        left: calc(3.25rem - 5px)
    }

    .timeline-item:nth-child(odd) .timeline-title:after {
        left: auto;
        right: 0;
        background: linear-gradient(90deg,hsl(var(--gold) / .15),hsl(var(--gold) / .85))
    }

    .timeline-item:nth-child(odd) .branch-row {
        justify-content: flex-end
    }

    .timeline-item:nth-child(odd) .timeline-watermark {
        right: auto;
        left: .4rem
    }

    .timeline-item:nth-child(odd).reveal {
        transform: translate(-34px) scale(.985)
    }

    .timeline-item:nth-child(2n).reveal {
        transform: translate(34px) scale(.985)
    }

    .timeline-item.reveal.is-visible {
        transform: none
    }
}

@keyframes capGlow {
    0%,to {
        box-shadow: 0 0 0 5px hsl(var(--background)),0 0 10px hsl(var(--gold) / .4)
    }

    50% {
        box-shadow: 0 0 0 5px hsl(var(--background)),0 0 18px hsl(var(--gold) / .7)
    }
}

@media (prefers-reduced-motion: reduce) {
    .timeline-cap--start,.timeline-cap__mark {
        animation: none
    }

    .timeline-item.reveal {
        opacity: 1;
        transform: none
    }
}
