.diagnosis-timeline {
  --timeline-line: var(--border);
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 4px 0 4px 42px;
}

.timeline-list::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 15px;
  width: 2px;
  border-radius: 999px;
  background: var(--timeline-line);
  content: "";
}

.timeline-item {
  position: relative;
  min-width: 0;
}

.timeline-marker {
  position: absolute;
  top: 18px;
  left: -42px;
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.timeline-item--diagnosis .timeline-marker {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-dim);
}

.timeline-item--finding .timeline-marker {
  border-color: var(--success-border);
  background: var(--success-soft);
  color: var(--success);
}

.timeline-item--therapy .timeline-marker {
  border-color: var(--warning-border);
  background: var(--warning-soft);
  color: var(--warning);
}

.timeline-event.card {
  margin: 0;
  padding: 20px;
}

.timeline-event-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.timeline-event-kind {
  margin: 0 0 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

.timeline-event-date {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.timeline-event-date--unknown {
  color: var(--text-muted);
  font-weight: 400;
}

.timeline-event-title {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.2;
}

.timeline-event-meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.timeline-event-copy {
  margin-top: 16px;
}

.timeline-event-copy p {
  margin: 0 0 8px;
}

.timeline-event-copy p:last-child {
  margin-bottom: 0;
}

.timeline-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 18px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.timeline-details > div {
  min-width: 0;
}

.timeline-details dt {
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-details dd {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.timeline-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .timeline-list {
    padding-left: 34px;
  }

  .timeline-list::before {
    left: 11px;
  }

  .timeline-marker {
    left: -34px;
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .timeline-event.card {
    padding: 16px;
  }

  .timeline-event-header {
    display: block;
  }

  .timeline-event-date {
    margin-top: 8px;
  }
}
