.rich-content {
    color: var(--tenant-text, inherit);
    font-family: var(--tenant-body-font, inherit);
    font-size: inherit;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.rich-content > :first-child {
    margin-top: 0;
}

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

.rich-content p {
    margin: 0.7em 0;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
    margin: 0.85em 0 0.6em;
    color: inherit;
    font-family: var(--tenant-heading-font, inherit);
    font-weight: 800;
    line-height: 1.2;
    text-wrap: balance;
}

.rich-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);

}

.rich-content h2 {
    font-size: clamp(1.65rem, 3vw, 2rem);
    color: #07552D;
}

.rich-content h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.65rem);
    color: #148A3B;
}

.rich-content h4 {
    font-size: 1.25rem;
    color: #94C83D;
}

.rich-content h5 {
    font-size: 1.1rem;
    color: #07552D;
}

.rich-content h6 {
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #148A3B;
}

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

.rich-content ul {
    list-style: disc outside;
}

.rich-content ol {
    list-style: decimal outside;
}

.rich-content ul ul {
    list-style-type: circle;
}

.rich-content ul ul ul {
    list-style-type: square;
}

.rich-content ol ol {
    list-style-type: lower-alpha;
}

.rich-content ol ol ol {
    list-style-type: lower-roman;
}

.rich-content li {
    margin: 0.35em 0;
    padding-left: 0.2em;
}

.rich-content li > p {
    margin: 0.25em 0;
}

.rich-content li > ul,
.rich-content li > ol {
    margin: 0.35em 0;
}

.rich-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.25em;
    border-left: 4px solid var(--tenant-primary, #0a7845);
    border-radius: 0 var(--tenant-radius-base, 8px) var(--tenant-radius-base, 8px) 0;
    background: #f1f5f9;
    background: color-mix(in srgb, var(--tenant-primary, #0a7845) 8%, white);
    color: inherit;
    font-style: italic;
}

.rich-content blockquote > :first-child {
    margin-top: 0;
}

.rich-content blockquote > :last-child {
    margin-bottom: 0;
}

.rich-content a {
    color: var(--tenant-primary, #0a7845);
    font-weight: 650;
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

.rich-content a:hover {
    text-decoration-thickness: 0.14em;
}

.rich-content strong,
.rich-content b {
    font-weight: 750;
}

.rich-content code {
    padding: 0.15em 0.35em;
    border-radius: 0.3em;
    background: #e2e8f0;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

.rich-content pre {
    max-width: 100%;
    margin: 1.5em 0;
    padding: 1em 1.25em;
    overflow-x: auto;
    border-radius: var(--tenant-radius-base, 8px);
    background: #0f172a;
    color: #f8fafc;
    line-height: 1.6;
    white-space: pre;
}

.rich-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 0.9em;
}

.rich-content hr {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid #cbd5e1;
}

.rich-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 1.5em auto;
    border-radius: var(--tenant-radius-base, 8px);
}

.rich-content figure {
    margin: 1.5em 0;
}

.rich-content figure img {
    margin: 0 auto;
}

.rich-content figcaption {
    margin-top: 0.6em;
    color: #64748b;
    font-size: 0.875em;
    line-height: 1.5;
    text-align: center;
}

.rich-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1.5em 0;
    overflow-x: auto;
    border-collapse: collapse;
    border-spacing: 0;
}

.rich-content th,
.rich-content td {
    min-width: 8rem;
    padding: 0.7em 0.85em;
    border: 1px solid #cbd5e1;
    text-align: left;
    vertical-align: top;
}

.rich-content th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
}

.rich-content tbody tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.08);
}

.rich-content.ProseMirror {
    min-height: inherit;
    outline: none;
}

.rich-content.ProseMirror p.is-editor-empty:first-child::before {
    float: left;
    height: 0;
    color: #94a3b8;
    content: attr(data-placeholder);
    pointer-events: none;
}

.rich-content.ProseMirror .ProseMirror-selectednode {
    outline: 3px solid color-mix(in srgb, var(--tenant-primary, #0a7845) 45%, transparent);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .rich-content ul,
    .rich-content ol {
        padding-left: 1.4em;
    }

    .rich-content th,
    .rich-content td {
        min-width: 7rem;
    }
}
