Try this. It only works for reading mode. The looks to be no difference in the style classes between resolved and unresolved links in code/live modes.
.markdown-rendered .internal-link.is-unresolved {
--link-unresolved-color: #6272a4;
font-size: var(--font-ui-small);
}