/* ============================================================================
 * 三角洲ARG档案馆 · 时间线样式
 * ========================================================================== */

.timeline-container {
  position: relative;
  margin-top: 24px;
  padding-left: 26px;
}

.timeline-line {
  position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--accent-soft), var(--border) 12%, var(--border) 88%, transparent);
}
@media (min-width: 760px) { .timeline-line { left: 9px; } }

.tl-item {
  position: relative;
  padding: 0 0 18px 14px;
}
.js .tl-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}
.js .tl-item.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .tl-item { opacity: 1; transform: none; transition: none; }
}

.tl-dot {
  position: absolute; left: -25px; top: 14px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--text-muted);
  box-shadow: 0 0 0 4px var(--bg);
  transition: border-color var(--transition), background var(--transition);
}
@media (min-width: 760px) { .tl-dot { left: -27px; } }
.tl-important .tl-dot { border-color: var(--accent); background: var(--accent); }
.tl-item:target .tl-dot { box-shadow: 0 0 0 4px var(--bg), 0 0 0 8px var(--accent-soft); }

.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tl-item:hover .tl-card { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow); }
.tl-item:target .tl-card { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-important .tl-card { border-left: 3px solid var(--accent); }

.tl-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-date { font-family: var(--mono); font-size: 13px; color: var(--text-secondary); }
.tl-relative { font-size: 12px; color: var(--text-muted); }
.tl-anchor {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  color: var(--text-muted); opacity: 0; transition: opacity var(--transition), background var(--transition);
}
.tl-item:hover .tl-anchor, .tl-anchor:focus-visible { opacity: 1; }
.tl-anchor:hover { background: var(--accent-soft); color: var(--accent); }

.tl-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 9px 0 7px; }
.tl-title { font-size: 17px; margin-bottom: 5px; }
.tl-summary { color: var(--text-secondary); font-size: 14.5px; }

.tl-details { margin-top: 9px; }
.tl-details summary {
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer; list-style: none;
  color: var(--accent); font-size: 13px; font-weight: 550;
}
.tl-details summary::-webkit-details-marker { display: none; }
.tl-details summary .icon { transition: transform var(--transition); }
.tl-details[open] summary .icon { transform: rotate(90deg); }
.tl-details > p {
  margin-top: 9px; padding: 11px 13px;
  background: var(--surface-2); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 14px; line-height: 1.8;
}

/* 时间线筛选后隐藏条目的过渡 */
.tl-item[hidden] { display: none !important; }

/* 通过 hash 定位到某条事件时的高亮（由 timeline.js 添加） */
.tl-highlight .tl-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}
.tl-highlight .tl-dot { box-shadow: 0 0 0 4px var(--bg), 0 0 0 8px var(--accent-soft); }