.section-timeline { --chronik-bg: #eef2e6; background: linear-gradient(180deg, var(--paper) 0%, var(--chronik-bg) 28%, var(--chronik-bg) 72%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.chronik-page { padding-top: 32px; padding-bottom: 54px; }
.chronik-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 18px; }
.chronik-header .eyebrow { margin-bottom: 12px; }
.chronik-header h1 { font-size: clamp(36px, 4.1vw, 52px); letter-spacing: -1.6px; line-height: 1.04; }
.timeline-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin: 0 0 14px; padding: 11px 16px; background: rgb(255 255 255 / 74%); border: 1px solid var(--line); border-radius: 8px; }
.timeline-hint { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.timeline-hint span { color: var(--forest); font-size: 14px; }
.timeline-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; width: 100%; }
.timeline-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-filter { appearance: none; border: 1px solid #c5cfbb; background: var(--white); color: var(--ink); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.timeline-filter:hover { border-color: var(--forest); color: var(--forest); }
.timeline-filter.is-selected { background: var(--forest); border-color: var(--forest); color: var(--white); }
.timeline-scroll-controls { display: inline-flex; gap: 8px; margin-left: auto; }
.timeline-scroll-btn { appearance: none; border: 1px solid #b9c5ae; background: var(--white); color: var(--forest); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease; }
.timeline-scroll-btn:hover:not(:disabled) { background: var(--forest); border-color: var(--forest); color: var(--white); }
.timeline-scroll-btn:disabled { opacity: .42; cursor: default; }

.timeline-stage { position: relative; border: 1px solid var(--line); border-radius: 8px; background: var(--chronik-bg); }
.timeline-scroller { border-radius: 8px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #7c9170 #dfe6d5; cursor: grab; outline: none; }
.timeline-scroller:focus-visible { box-shadow: inset 0 0 0 2px var(--forest); }
.timeline-scroller.is-dragging { cursor: grabbing; user-select: none; }
.timeline-track { --branch-height: 234px; --axis-height: 24px; --track-pad-top: 16px; --track-pad-bottom: 16px; list-style: none; margin: 0; padding: var(--track-pad-top) 54px var(--track-pad-bottom); display: inline-flex; align-items: stretch; min-width: 100%; position: relative; }
.timeline-node { flex: 0 0 168px; width: 168px; display: grid; grid-template-columns: 100%; grid-template-rows: var(--branch-height) var(--axis-height) var(--branch-height); justify-items: center; position: relative; }
.timeline-node[hidden] { display: none !important; }
.timeline-node::before { content: ""; grid-row: 2; grid-column: 1; align-self: center; justify-self: stretch; width: 100%; height: 2px; background: var(--forest); pointer-events: none; z-index: 1; }
.timeline-node.is-first-node::before { width: 50%; justify-self: end; }
.timeline-node.is-last-node::before { width: 50%; justify-self: start; }
.timeline-node.is-first-node.is-last-node::before { display: none; }

.timeline-axis-point { grid-row: 2; grid-column: 1; align-self: center; width: 14px; height: 14px; border-radius: 50%; background: var(--chronik-bg); border: 2.5px solid var(--forest); box-sizing: border-box; z-index: 3; transition: border-color .2s ease, box-shadow .2s ease; }
.timeline-branch { grid-column: 1; display: flex; align-items: center; gap: 14px; z-index: 2; position: relative; }
.timeline-node--top .timeline-branch { grid-row: 1; align-self: end; flex-direction: column-reverse; }
.timeline-node--bottom .timeline-branch { grid-row: 3; align-self: start; flex-direction: column; }

.timeline-connector { display: flex; align-items: center; pointer-events: none; }
.timeline-node--top .timeline-connector { flex-direction: column-reverse; }
.timeline-node--bottom .timeline-connector { flex-direction: column; }
.timeline-line { width: 2px; height: 34px; background: #687f5c; transition: background .2s ease; }
.timeline-node--top .timeline-line { margin-bottom: -5px; }
.timeline-node--bottom .timeline-line { margin-top: -5px; }
.timeline-event-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--forest); flex-shrink: 0; transition: background .2s ease, box-shadow .2s ease; }

.timeline-trigger { appearance: none; border: 0; background: transparent; padding: 4px 6px; border-radius: 14px; cursor: pointer; display: flex; align-items: center; gap: 11px; color: inherit; font: inherit; text-align: center; }
.timeline-node--top .timeline-trigger { flex-direction: column-reverse; }
.timeline-node--bottom .timeline-trigger { flex-direction: column; }
.timeline-trigger:focus-visible { outline: 2px solid var(--forest); outline-offset: 4px; }
.timeline-circle { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 3px solid var(--white); box-shadow: 0 0 0 1.5px #7f9472, 0 8px 20px rgb(24 60 50 / 15%); background: var(--forest); transition: transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s ease; }
.timeline-circle img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .26s ease; }
.timeline-circle img[src$=".png"] { object-position: center; transform: scale(1.25); }
.timeline-summary { display: grid; gap: 3px; width: 244px; justify-items: center; }
.timeline-date { font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #526944; }
.timeline-label { font-family: var(--serif); font-size: 17.5px; font-weight: 400; line-height: 1.2; letter-spacing: -.25px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s ease; }

.timeline-detail { background: var(--white); border: 1px solid #c4ceba; border-radius: 10px; box-shadow: 0 24px 52px rgb(18 42 35 / 24%), 0 4px 14px rgb(18 42 35 / 9%); text-align: left; }
.timeline-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 35%); background: rgb(18 42 35 / 72%); color: var(--white); font-size: 20px; line-height: 1; display: none; place-items: center; cursor: pointer; z-index: 3; }
.timeline-close:hover { background: var(--forest); }
.timeline-card-media { background: #183c32; border-radius: 9px 9px 0 0; overflow: hidden; border-bottom: 1px solid var(--line); }
.timeline-card-media img { width: 100%; height: 214px; object-fit: contain; display: block; margin-inline: auto; }
.timeline-card-body { padding: 15px 19px 17px; }
.timeline-card-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #526944; }
.timeline-era-badge { font-size: 10px; font-weight: 600; letter-spacing: .8px; padding: 2px 8px; border-radius: 999px; background: #eef2e6; color: #465d39; border: 1px solid #d2dac7; }
.timeline-card-body h3 { font-size: 20.5px; line-height: 1.24; letter-spacing: -.35px; color: var(--forest); margin-bottom: 8px; }
.timeline-card-text { font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.timeline-card-text p + p { margin-top: 8px; }
.timeline-source { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.46; color: var(--muted); }
.timeline-source strong { color: var(--forest); }
.timeline-card-body .text-link { margin-top: 10px; font-size: 11.5px; }
.chronik-footer-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 26px; }

html:not(.js) .timeline-scroller { overflow: visible; cursor: default; }
html:not(.js) .timeline-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; padding: 28px 24px; }
html:not(.js) .timeline-node::before, html:not(.js) .timeline-axis-point, html:not(.js) .timeline-connector, html:not(.js) .timeline-scroll-controls { display: none; }
html:not(.js) .timeline-node { width: auto; display: block; }
html:not(.js) .timeline-detail { margin-top: 12px; }

@media (min-width: 761px) {
  .js .timeline-detail { position: fixed; top: 120px; left: 24px; width: min(394px, calc(100vw - 32px)); max-height: calc(100vh - 112px); overflow-y: auto; opacity: 0; visibility: hidden; pointer-events: none; transform: scale(.96); transform-origin: center left; transition: opacity .16s ease, transform .2s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .16s; z-index: 75; }
  .js .timeline-node.is-card-left .timeline-detail { transform-origin: center right; }
  .js .timeline-detail::before { content: ""; position: absolute; top: 0; bottom: 0; left: -92px; width: 96px; }
  .js .timeline-node.is-card-left .timeline-detail::before { left: auto; right: -92px; }
  .js .timeline-node.is-active .timeline-close { display: grid; }
  .js .timeline-node:focus-within .timeline-detail, .js .timeline-node.is-active .timeline-detail { opacity: 1; visibility: visible; pointer-events: auto; transform: scale(1); transition-delay: 0s; }
  .timeline-node:focus-within .timeline-branch, .timeline-node.is-active .timeline-branch { z-index: 15; }
  .timeline-node:focus-within .timeline-circle, .timeline-node.is-active .timeline-circle { transform: scale(1.2); box-shadow: 0 0 0 2px var(--forest), 0 0 0 6px var(--accent), 0 16px 32px rgb(24 60 50 / 24%); }
  .timeline-node:focus-within .timeline-label, .timeline-node.is-active .timeline-label { color: var(--forest); text-decoration: underline; text-decoration-color: #8fa67b; text-underline-offset: 4px; }
  .timeline-node:focus-within .timeline-axis-point, .timeline-node.is-active .timeline-axis-point { background: var(--chronik-bg); border-color: var(--forest); box-shadow: 0 0 0 4px rgb(217 231 163 / 75%); }
  .timeline-node:focus-within .timeline-line, .timeline-node.is-active .timeline-line { background: var(--forest); }
  .timeline-node:focus-within .timeline-event-dot, .timeline-node.is-active .timeline-event-dot { background: var(--forest); box-shadow: 0 0 0 4px var(--accent); }
}

@media (hover: hover) and (min-width: 761px) {
  .js .timeline-node:has(.timeline-trigger:hover, .timeline-detail:hover) .timeline-detail { opacity: 1; visibility: visible; pointer-events: auto; transform: scale(1); transition-delay: 0s; }
  .timeline-node:has(.timeline-trigger:hover, .timeline-detail:hover) .timeline-branch { z-index: 15; }
  .timeline-node:has(.timeline-trigger:hover, .timeline-detail:hover) .timeline-circle { transform: scale(1.2); box-shadow: 0 0 0 2px var(--forest), 0 0 0 6px var(--accent), 0 16px 32px rgb(24 60 50 / 24%); }
  .timeline-node:has(.timeline-trigger:hover, .timeline-detail:hover) .timeline-label { color: var(--forest); text-decoration: underline; text-decoration-color: #8fa67b; text-underline-offset: 4px; }
  .timeline-node:has(.timeline-trigger:hover, .timeline-detail:hover) .timeline-axis-point { background: var(--chronik-bg); border-color: var(--forest); box-shadow: 0 0 0 4px rgb(217 231 163 / 75%); }
  .timeline-node:has(.timeline-trigger:hover, .timeline-detail:hover) .timeline-line { background: var(--forest); }
  .timeline-node:has(.timeline-trigger:hover, .timeline-detail:hover) .timeline-event-dot { background: var(--forest); box-shadow: 0 0 0 4px var(--accent); }
}

@media (max-width: 760px) {
  .chronik-page { padding-top: 34px; padding-bottom: 52px; }
  .chronik-header { display: block; margin-bottom: 20px; }
  .timeline-toolbar { padding: 13px 14px; margin-bottom: 16px; }
  .timeline-scroll-controls { width: 100%; justify-content: space-between; margin-left: 0; }
  .timeline-scroll-btn { flex: 1; text-align: center; }
  .timeline-track { --branch-height: 222px; --track-pad-top: 20px; --track-pad-bottom: 20px; padding-inline: 44px; }
  .timeline-node { flex: 0 0 138px; width: 138px; }
  .timeline-line { height: 32px; }
  .timeline-circle { width: 66px; height: 66px; }
  .timeline-summary { width: 198px; }
  .timeline-label { font-size: 16px; }
  .js .timeline-detail { display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; max-height: calc(100dvh - 102px); overflow-y: auto; z-index: 85; }
  .js .timeline-node.is-active .timeline-detail { display: block; }
  .js .timeline-close { display: grid; }
  .timeline-card-media img { height: 184px; }
  .timeline-node.is-active .timeline-circle { transform: scale(1.14); box-shadow: 0 0 0 2px var(--forest), 0 0 0 6px var(--accent), 0 12px 24px rgb(24 60 50 / 22%); }
  .timeline-node.is-active .timeline-axis-point { background: var(--chronik-bg); box-shadow: 0 0 0 4px rgb(217 231 163 / 75%); }
  .timeline-node.is-active .timeline-event-dot { box-shadow: 0 0 0 4px var(--accent); }
}

@media print {
  .timeline-toolbar, .timeline-axis-point, .timeline-connector, .timeline-close { display: none !important; }
  .timeline-scroller { overflow: visible !important; }
  .timeline-track { display: block !important; padding: 0 !important; }
  .timeline-node::before { display: none; }
  .timeline-node { width: 100% !important; padding: 14px 0; display: block !important; break-inside: avoid; }
  .timeline-detail { position: static !important; opacity: 1 !important; visibility: visible !important; display: block !important; transform: none !important; box-shadow: none; margin-top: 10px; width: 100% !important; max-height: none !important; }
}
