Fix text splitting in cards. Initial implementation of card segment detection. Style code snippet.