.event-timeline {
    grid-column: 1 / -1;
    --timeline-gold: #b78637;
    --timeline-red: #8c2822;
    --timeline-line: linear-gradient(90deg, #d4bc99, var(--timeline-gold), #d4bc99);
    padding: 6px 8px;
}
.timeline-row {
    --line-position: 20px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 8px 36px;
}
.timeline-row:has(.timeline-cover) { --line-position: 86px; }
.timeline-row:nth-child(even) { direction: rtl; }
.timeline-row::before {
    content: "";
    position: absolute;
    inset: var(--line-position) 0 auto;
    height: 2px;
    background: var(--timeline-line);
}
.timeline-row:not(:last-child)::after {
    content: "";
    position: absolute;
    top: var(--line-position);
    right: 0;
    height: calc(100% - var(--line-position) + 22px);
    width: 2px;
    background: #d4bc99;
}
.timeline-row:has(+ .timeline-row .timeline-cover)::after { height: calc(100% - var(--line-position) + 88px); }
.timeline-row:nth-child(even)::after { right: auto; left: 0; }
.timeline-event.event { direction: ltr; position: relative; padding: 0 10px; border: 0; background: none; min-width: 0; }
.timeline-event.event details { margin: 0; }
.timeline-event summary {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: calc(var(--line-position) + 24px) 5px 12px;
    text-align: center;
    list-style: none;
}
.timeline-event summary::-webkit-details-marker { display: none; }
.timeline-dot {
    position: absolute;
    z-index: 1;
    top: var(--line-position);
    left: 50%;
    transform: translate(-50%, -45%);
    width: 22px;
    height: 22px;
    border: 1px solid var(--timeline-gold);
    border-radius: 50%;
    background: radial-gradient(circle, var(--timeline-red) 0 4px, var(--paper) 5px);
    box-shadow: 0 4px 12px #825f4228;
    transition: box-shadow .2s;
}
.timeline-event summary:is(:hover, :focus-visible) .timeline-dot,
.timeline-event details[open] .timeline-dot { box-shadow: 0 0 0 5px #b7863740; }
.timeline-cover {
    position: absolute;
    top: 0;
    width: min(88%, 210px);
    height: 102px;
    object-fit: cover;
    border: 3px solid var(--paper);
    border-radius: 12px;
    box-shadow: 0 12px 26px #38241f24;
    transition: transform .25s;
}
.timeline-event summary:is(:hover, :focus-visible) .timeline-cover { transform: translateY(-4px); }
.timeline-year { color: var(--timeline-red); font: 2.4rem/1 var(--serif); }
.timeline-undated { font-size: 1.3rem; }
.timeline-title { color: var(--ink); font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin-top: 9px; }
.timeline-date, .timeline-excerpt { color: var(--muted); margin-top: 4px; font-size: .82rem; }
.timeline-open { color: #765429; font-size: .78rem; font-weight: 650; margin-top: 10px; }
.timeline-event details[open] .timeline-open > :last-child { display: inline-block; transform: rotate(45deg); }
.timeline-details { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.timeline-details .event-details { margin-top: 0; }
@media (max-width: 760px) {
    .event-timeline { padding: 0 0 0 8px; }
    .timeline-row, .timeline-row:nth-child(even) { display: block; direction: ltr; padding: 0; }
    .timeline-row::before, .timeline-row::after { display: none; }
    .timeline-event.event { border-left: 2px solid #d4bc99; padding: 0 0 20px 20px; }
    .timeline-event summary { align-items: flex-start; padding: 8px 0; text-align: left; }
    .timeline-dot { top: 18px; left: -21px; width: 19px; height: 19px; }
    .timeline-cover { position: static; order: 1; width: min(100%, 280px); height: auto; aspect-ratio: 16 / 9; margin-top: 10px; }
    .timeline-year { font-size: 1.8rem; }
    .timeline-undated { font-size: 1.15rem; }
}
