/**
 * Styling for editor-managed rich text fields (.rich-text).
 *
 * These wrappers hold WYSIWYG field output, so the editor can add links,
 * bold text and lists. Link colour is inherited from the surrounding text so
 * the same rules stay readable on light and dark section backgrounds.
 */

.rich-text > p {
    margin: 0 0 1em;
}

.rich-text > p:last-child {
    margin-bottom: 0;
}

.rich-text a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    transition: opacity 0.2s ease-in-out;
}

.rich-text a:hover,
.rich-text a:focus {
    opacity: 0.75;
    text-decoration-thickness: 2px;
}

.rich-text a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}

.rich-text ul,
.rich-text ol {
    margin: 0 0 1em 1.25rem;
    padding: 0;
    list-style: revert;
}

.rich-text li {
    margin-bottom: 0.25em;
}

.rich-text strong,
.rich-text b {
    font-weight: 700;
}

.rich-text em,
.rich-text i {
    font-style: italic;
}
