/*
 * Shared typography for CMS rich-text fields (issue #525). Single source of truth for
 * both surfaces that render this HTML: the public site (.cms-rich-content, wraps the
 * sanitized description/content output) and the admin editor (CKEditor5's own
 * .ck-content wrapper, scoped the same way here) — so what an editor types looks like
 * what visitors see. Not part of the Vite build: admin is CDN/jQuery only and public
 * site classes get obfuscated at build time (sm-cls-*), so this file is linked directly
 * as a plain <link> on both sides instead.
 */

.cms-rich-content,
.ck-content {
    font-size: 1rem;
    line-height: 1.6;
    color: inherit;
}

.cms-rich-content h1,
.ck-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 1.5em 0 0.5em;
    line-height: 1.25;
}

.cms-rich-content h2,
.ck-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 1.5em 0 0.5em;
    line-height: 1.3;
}

.cms-rich-content h3,
.ck-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 1.25em 0 0.5em;
    line-height: 1.3;
}

.cms-rich-content h4,
.ck-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1em 0 0.5em;
    line-height: 1.3;
}

.cms-rich-content h5,
.ck-content h5,
.cms-rich-content h6,
.ck-content h6 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 1em 0 0.5em;
    line-height: 1.3;
}

.cms-rich-content p,
.ck-content p {
    margin: 0 0 1em;
}

.cms-rich-content ul,
.cms-rich-content ol,
.ck-content ul,
.ck-content ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.cms-rich-content li,
.ck-content li {
    margin: 0 0 0.35em;
}

.cms-rich-content blockquote,
.ck-content blockquote {
    margin: 0 0 1em;
    padding: 0.5em 1em;
    border-left: 3px solid currentColor;
    opacity: 0.85;
    font-style: italic;
}

.cms-rich-content a,
.ck-content a {
    color: #0d6efd;
    text-decoration: underline;
}

.cms-rich-content strong,
.cms-rich-content b,
.ck-content strong,
.ck-content b {
    font-weight: 700;
}

.cms-rich-content em,
.cms-rich-content i,
.ck-content em,
.ck-content i {
    font-style: italic;
}

.cms-rich-content s,
.cms-rich-content del,
.ck-content s,
.ck-content del {
    text-decoration: line-through;
}

.cms-rich-content sub,
.ck-content sub {
    vertical-align: sub;
    font-size: 0.75em;
}

.cms-rich-content sup,
.ck-content sup {
    vertical-align: super;
    font-size: 0.75em;
}

.cms-rich-content mark,
.ck-content mark {
    background: #fff3a3;
    color: inherit;
    padding: 0 0.15em;
}

.cms-rich-content code,
.ck-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.cms-rich-content pre,
.ck-content pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.75em 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0 0 1em;
}

.cms-rich-content pre code,
.ck-content pre code {
    background: none;
    padding: 0;
}

.cms-rich-content hr,
.ck-content hr {
    border: none;
    border-top: 1px solid currentColor;
    opacity: 0.2;
    margin: 1.5em 0;
}

.cms-rich-content > *:first-child,
.ck-content > *:first-child {
    margin-top: 0;
}

.cms-rich-content > *:last-child,
.ck-content > *:last-child {
    margin-bottom: 0;
}
