Solved the 1st question:
The tags I was looking for, were:
.cm-header-1
.markdown-preview-view h1
Examples:
/* Underline H1 heading in Edit mode */
.cm-header-1 {
border-bottom: 1px solid var(--text-faint);
}
.cm-header-2 {
border-bottom: 1px solid var(--text-faint);
}
/* ==========headings======= */
/* Underline = border-bottom */
.markdown-preview-view h1 {
border-bottom: 1px solid var(--text-faint);
}
.markdown-preview-view h2 {
border-bottom: 1px solid var(--text-faint);
}