
.history-timeline{margin:48px 0;text-align:left;color:#303729}
.history-timeline h2{font-size:28px;font-weight:700;color:#555740;margin-bottom:18px}
.timeline-playback{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:28px}
.timeline-playback button,.timeline-editor button{border:1px solid #cbd0bf;border-radius:7px;background:#fff;padding:8px 12px;font-size:13px;color:#3f4932;cursor:pointer}
.timeline-playback button[aria-pressed=true]{background:#555740;color:white}
.timeline-playback button:disabled,.timeline-editor button:disabled{opacity:.4;cursor:default}
.timeline-playback [hidden],.timeline-events [hidden]{display:none!important}
.timeline-counter{font-size:12px;color:#6a705f;margin-left:8px}
.timeline-events{list-style:none!important;margin:0;padding:0!important;display:grid;gap:24px}
.timeline-event{display:grid;grid-template-columns:140px minmax(0,1fr);gap:24px;list-style:none;position:relative}
.timeline-date{display:flex;gap:10px;align-items:flex-start;padding-top:20px;font-size:16px;font-weight:700;color:#7a7b58}
.timeline-symbol{background:#eef0e3;border-radius:50%;width:32px;height:32px;flex-shrink:0;display:grid;place-items:center;color:#c83429}
.timeline-story{border-left:3px solid #7a7b58;background:#f7f8f4;border-radius:0 12px 12px 0;padding:24px;min-width:0}
.timeline-story h3{font-size:22px;font-weight:700;margin:0 0 12px;color:#363c2f}
.timeline-text{white-space:pre-line;font-size:16px;line-height:1.75;margin:0}
.timeline-story blockquote{font-style:italic;border-left:3px solid #c83429;padding-left:18px}
.timeline-image{width:100%;max-height:420px;object-fit:contain;border-radius:8px;margin-top:20px}
.timeline-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
.timeline-cards .timeline-event{display:block}.timeline-cards .timeline-date{padding:0 0 12px}
.timeline-presenting .timeline-events{grid-template-columns:1fr}.timeline-presenting .timeline-event{animation:timeline-enter .35s ease}
@keyframes timeline-enter{from{opacity:.4;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.timeline-presenting .timeline-event{animation:none}}
.timeline-empty{padding:28px;border:1px dashed #b8c0a8;border-radius:10px;color:#6c735f;text-align:center}
.timeline-editor{border:1px solid #d8dece;border-radius:12px;background:#fff;padding:22px}
.timeline-editor h2{font-size:20px;font-weight:700;color:#555740;margin-bottom:8px}
.timeline-editor p{font-size:13px;line-height:1.6;color:#6b715f;margin-bottom:14px}
.timeline-palette,.timeline-event-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.timeline-palette button{background:#eef0e3;font-weight:600}
.timeline-edit-event{border:1px solid #dce1d4;border-radius:10px;padding:16px;margin:20px 0;background:#fafbf8;min-width:0}
.timeline-edit-event legend{font-weight:700;color:#555740;padding:0 8px}
.timeline-editor label{display:flex;flex-direction:column;gap:6px;font-size:13px;margin:12px 0}
.timeline-editor input:not([type=checkbox]),.timeline-editor textarea,.timeline-editor select{border:1px solid #c9cebf;border-radius:6px;padding:8px;max-width:100%;background:white;box-sizing:border-box}
.timeline-editor input[type=number]{max-width:110px}.timeline-editor input[type=checkbox]{align-self:start}
.timeline-edit-thumb{max-height:160px;max-width:100%;object-fit:contain;margin:10px 0}
.timeline-editor button:focus-visible,.timeline-playback button:focus-visible{outline:3px solid #88966b;outline-offset:2px}
@media(max-width:650px){.timeline-event{grid-template-columns:1fr;gap:8px}.timeline-date{padding-top:0}.timeline-cards{grid-template-columns:1fr}.timeline-story{padding:18px}.timeline-editor{padding:14px}}

/* Connected chronology: the rail follows the actual bullet positions, including
   photos of different heights and the single-column mobile layout. */
.history-timeline:not(.timeline-presenting) .timeline-events:not(.timeline-cards){position:relative;isolation:isolate;gap:32px}
.history-timeline:not(.timeline-presenting) .timeline-events:not(.timeline-cards)::before,
.history-timeline:not(.timeline-presenting) .timeline-events:not(.timeline-cards)::after{content:"";position:absolute;left:var(--rail-left,8px);top:var(--rail-start,32px);width:3px;transform:translateX(-50%);border-radius:3px;pointer-events:none;z-index:-1}
.history-timeline:not(.timeline-presenting) .timeline-events:not(.timeline-cards)::before{height:var(--rail-length,calc(100% - 64px));background:#d9ddcf}
.history-timeline:not(.timeline-presenting) .timeline-events:not(.timeline-cards)::after{height:var(--rail-progress,0px);background:#7a7b58}
.timeline-events:not(.timeline-cards) .timeline-date{gap:14px;padding-top:24px;line-height:1.4}
.timeline-events:not(.timeline-cards) .timeline-symbol{width:16px;height:16px;margin-top:3px;border:3px solid #a4ab93;background:#fff;font-size:0;box-shadow:0 0 0 5px white;transition:background .2s,border-color .2s,box-shadow .2s}
.timeline-events .timeline-story{transition:background .2s,border-color .2s,box-shadow .2s}
.timeline-events .is-active .timeline-story{background:#f0f3e9;border-left-color:#c83429;box-shadow:0 4px 20px #39432612}
.timeline-events .is-active .timeline-date{color:#a72b24}
.timeline-events:not(.timeline-cards) .is-active .timeline-symbol{background:#c83429;border-color:#c83429;box-shadow:0 0 0 5px #f9e7e2}
.timeline-events:not(.timeline-cards) .is-past .timeline-symbol{background:#7a7b58;border-color:#7a7b58}
.timeline-events:not(.timeline-cards) .timeline-story{border-radius:10px}
@media(max-width:650px){
 .timeline-events:not(.timeline-cards) .timeline-event{padding-left:34px}
 .timeline-events:not(.timeline-cards) .timeline-date{padding-top:0;position:relative}
 .timeline-events:not(.timeline-cards) .timeline-symbol{position:absolute;left:-34px;top:0}
}
@media(prefers-reduced-motion:reduce){.timeline-events .timeline-story,.timeline-events .timeline-symbol{transition:none}}

/* Dates entered directly in the rich-text history editor. The content remains
   in its original HTML list; only its reading presentation is enhanced. */
[data-history-dated-lists] .history-dated-list{position:relative;isolation:isolate;list-style:none!important;padding:0!important;margin:2em 0;text-align:left}
[data-history-dated-lists] .history-dated-list::before,[data-history-dated-lists] .history-dated-list::after{content:"";position:absolute;left:10px;top:var(--dated-start,1em);width:3px;border-radius:3px;pointer-events:none;z-index:-1}
[data-history-dated-lists] .history-dated-list::before{height:var(--dated-length,calc(100% - 2em));background:#dce1d2}
[data-history-dated-lists] .history-dated-list::after{height:var(--dated-progress,0px);background:#7a7b58}
[data-history-dated-lists] .history-dated-list>.history-dated-event{position:relative;list-style:none!important;display:block;margin:0 0 1.1em!important;padding:.4em .75em .65em 2em!important;line-height:1.7;text-align:left;border-radius:0 10px 10px 0;transition:background .2s;overflow-wrap:anywhere}
[data-history-dated-lists] .history-dated-event::before{content:"";position:absolute;left:4px;top:calc(1em - 6px);width:15px;height:15px;box-sizing:border-box;border:3px solid #9ca68a;background:#fff;border-radius:50%;box-shadow:0 0 0 4px #fff}
[data-history-dated-lists] .history-dated-event.is-active{background:linear-gradient(to right,transparent 25px,#f0f3e9 25px)}
[data-history-dated-lists] .history-dated-event.is-active::before{background:#c83429;border-color:#c83429;box-shadow:0 0 0 4px #f9e7e2}
[data-history-dated-lists] .history-dated-event.is-past::before{background:#7a7b58;border-color:#7a7b58}
[data-history-dated-lists] .history-dated-event>p:first-child{margin-top:0}
[data-history-dated-lists] .history-dated-event>p:last-child{margin-bottom:0}
@media(prefers-reduced-motion:reduce){[data-history-dated-lists] .history-dated-event{transition:none}}
