/* Public rendering for HTML produced by the local CKEditor Full build. */
.rich-content {
    min-width: 0;
    overflow-wrap: anywhere;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
    color: var(--color-text);
    font-weight: 950;
    line-height: 1.65;
}

.rich-content h1 { font-size: clamp(1.55rem, 4vw, 2.25rem); }
.rich-content h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
.rich-content h3 { font-size: clamp(1.12rem, 2.5vw, 1.45rem); }
.rich-content h4 { font-size: 1.1rem; }
.rich-content h5,
.rich-content h6 { font-size: 1rem; }

.rich-content p,
.rich-content address {
    margin: 0 0 1rem;
    line-height: 2.05;
}

.rich-content ul,
.rich-content ol {
    margin: 0 0 1rem;
    padding-inline-start: 1.55rem;
}

.rich-content li + li {
    margin-top: 0.3rem;
}

.rich-content blockquote {
    margin: 1.25rem 0;
    border-inline-start: 0.3rem solid var(--color-primary);
    border-radius: var(--radius-lg);
    background: var(--color-primary-50);
    padding: 0.9rem 1.1rem;
    color: var(--color-text);
}

.rich-content figure {
    max-width: 100%;
    margin: 1.25rem auto;
    text-align: center;
}

.rich-content img,
.rich-content video,
.rich-content iframe {
    max-width: 100%;
}

.rich-content img {
    height: auto;
}

.rich-content figcaption {
    margin-top: 0.45rem;
    color: var(--color-muted);
    font-size: 0.82rem;
    text-align: center;
}

.rich-content table {
    width: 100%;
    max-width: 100%;
    margin: 1.25rem 0;
    border-collapse: collapse;
    background: var(--ui-app-surface-elevated, #fff);
}

.rich-content caption {
    margin-bottom: 0.55rem;
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 850;
}

.rich-content th,
.rich-content td {
    min-width: 6rem;
    border: 1px solid var(--color-border);
    padding: 0.6rem 0.75rem;
    text-align: start;
    vertical-align: top;
}

.rich-content th {
    background: var(--color-primary-50);
    color: var(--color-text);
    font-weight: 900;
}

.rich-content pre {
    max-width: 100%;
    overflow-x: auto;
    direction: ltr;
    border-radius: var(--radius-lg);
    background: #0f172a;
    padding: 1rem;
    color: #e2e8f0;
    line-height: 1.75;
    text-align: left;
    white-space: pre;
}

.rich-content code {
    direction: ltr;
    border-radius: 0.35rem;
    background: rgba(15, 23, 42, 0.08);
    padding: 0.08rem 0.3rem;
    font-family: Consolas, "Courier New", monospace;
    unicode-bidi: embed;
}

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

.rich-content hr {
    margin: 1.6rem 0;
    border: 0;
    border-top: 1px solid var(--color-border);
}

.rich-content a {
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .rich-content {
        overflow-x: auto;
    }

    .rich-content table {
        min-width: 34rem;
    }
}
