.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding: var(--space-1) 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--space-3);
  position: relative;
  min-height: 48px;
}

.timeline__node {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: var(--space-0-5);
  position: relative;
  z-index: 1;
}

.timeline__dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-default);
  background-color: var(--surface-base);
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease-out);
}

.timeline__item:not(:last-child) .timeline__node::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  bottom: -2px;
  background-color: var(--border-subtle);
}

.timeline__card {
  padding-bottom: var(--space-4);
}

.timeline__card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.timeline__card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1-5);
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.timeline__card-meta .badge {
  font-size: 10px;
  padding: 1px var(--space-1-5);
}

.timeline__card-detail {
  margin-top: var(--space-1-5);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.5;
}

.timeline__card-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: var(--radius-full);
  background-color: var(--text-disabled);
  flex-shrink: 0;
}

.timeline__item--completed .timeline__dot {
  border-color: var(--status-success);
  background-color: var(--status-success);
}

.timeline__item--completed .timeline__node::after {
  background-color: var(--status-success);
}

.timeline__item--active .timeline__dot {
  border-color: var(--accent-primary);
  background-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.timeline__item--active .timeline__node::after {
  background-color: var(--border-subtle);
}

.timeline__item--pending .timeline__dot {
  border-color: var(--border-default);
  background-color: var(--surface-base);
}

.timeline__item--expired .timeline__dot {
  border-color: var(--status-error);
  background-color: var(--status-error);
}

.timeline__item--expired .timeline__node::after {
  background-color: var(--status-error);
}

.timeline__item--paused .timeline__dot {
  border-color: var(--status-warning);
  background-color: var(--status-warning);
}

.timeline__card--interactive {
  cursor: pointer;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-2) 0;
  transition: background-color var(--duration-fast) var(--ease-out);
}

a.timeline__card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.timeline__card:hover .timeline__card-title {
  color: var(--accent-primary);
}

.timeline__card--interactive:hover {
  background-color: var(--surface-hover);
}

.timeline__card--interactive.timeline__card--selected {
  background-color: var(--surface-selected);
}

.timeline--compact .timeline__item {
  grid-template-columns: var(--space-4) 1fr;
  gap: var(--space-2);
}

.timeline--compact .timeline__dot {
  width: var(--space-2);
  height: var(--space-2);
}

.timeline--compact .timeline__item:not(:last-child) .timeline__node::after {
  top: 14px;
}

.timeline--compact .timeline__card {
  padding-bottom: var(--space-3);
}

.timeline--compact .timeline__card-title {
  font-size: var(--text-xs);
}

.timeline__header {
  margin-bottom: var(--space-4);
}

.timeline__header-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.timeline__header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1-5);
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.timeline__marker {
  font-size: 18px;
  line-height: 1;
  color: var(--border-default);
  flex-shrink: 0;
}

.timeline__item--completed .timeline__marker { color: var(--status-success); }
.timeline__item--pending   .timeline__marker { color: var(--border-default); }
.timeline__item--expired   .timeline__marker { color: var(--status-error); }

.timeline__marker--event { color: var(--accent-primary); }

.timeline--agenda .timeline__item:not(:last-child) .timeline__node::after {
  top: 24px;
  background-color: var(--border-subtle);
}

.timeline--agenda .timeline__item--completed.timeline__item--task .timeline__card-title {
  color: var(--text-tertiary);
  text-decoration: line-through;
  text-decoration-color: var(--text-disabled);
}

.timeline__dm-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px var(--space-1);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background-color: var(--surface-sunken);
  color: var(--text-secondary);
}

.timeline__dm-badge .material-symbols-rounded {
  font-size: 12px;
}

.timeline__card { border-radius: var(--soul-radius-control, 10px); }

.timeline__item--with-actions {
  grid-template-columns: 20px 1fr auto;
  align-items: start;
}

.timeline__actions {
  display: flex;
  align-items: flex-start;
  padding-top: var(--space-0-5);
}

.timeline__row-menu .dropdown__menu {
  min-width: 10rem;
}

.todo-list__filter {
  margin-bottom: var(--space-4);
}
