/* Rich-text from CKEditor — restores spacing reset by theme `* { margin:0; padding:0 }` */
.editor-content {
    color: #000;
    font-size: 1.05rem;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
}

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

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

.editor-content p {
    margin: 0 0 1em;
    line-height: 1.7;
    color: #000;
}

.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6 {
    color: #000;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.25em 0 0.6em;
}

.editor-content h1 { font-size: 1.75rem; }
.editor-content h2 { font-size: 1.5rem; }
.editor-content h3 { font-size: 1.25rem; }
.editor-content h4 { font-size: 1.1rem; }

.editor-content ul,
.editor-content ol {
    margin: 0 0 1em;
    padding-left: 1.75em;
    list-style-position: outside;
}

.editor-content ul {
    list-style-type: disc;
}

.editor-content ol {
    list-style-type: decimal;
}

.editor-content ul ul {
    list-style-type: circle;
    margin-bottom: 0;
}

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

.editor-content li {
    margin: 0.35em 0;
    padding-left: 0.35em;
    line-height: 1.6;
    color: #000;
}

/* CKEditor / Word often wrap list text in <p> with large margin-left */
.editor-content li > p {
    margin: 0 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    display: inline;
}

.editor-content li > p + p {
    display: block;
    margin-top: 0.5em !important;
}

.editor-content li > span,
.editor-content li > strong,
.editor-content li > em {
    margin-left: 0 !important;
}

/* Flatten accidental indent on top-level blocks (keep nested lists) */
.editor-content > p[style*="margin-left"],
.editor-content > div[style*="margin-left"],
.editor-content > h1[style*="margin-left"],
.editor-content > h2[style*="margin-left"],
.editor-content > h3[style*="margin-left"],
.editor-content > h4[style*="margin-left"] {
    margin-left: 0 !important;
    text-indent: 0 !important;
}

.editor-content blockquote {
    margin: 1em 0;
    padding: 0.75em 1em;
    border-left: 4px solid #c9d987;
    background: #f7f9ef;
    color: #333;
}

.editor-content a {
    color: #0b7533;
    text-decoration: underline;
}

.editor-content strong,
.editor-content b {
    font-weight: 700;
    color: #000;
}

.editor-content em,
.editor-content i {
    font-style: italic;
}

.editor-content img,
.editor-content figure,
.editor-content video,
.editor-content iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

.editor-content figure {
    margin: 1.25em 0;
}

.editor-content figcaption {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.4em;
}

.editor-content .table,
.editor-content figure.table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 1em 0;
}

.editor-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    table-layout: auto;
}

.editor-content th,
.editor-content td {
    border: 1px solid #ccc;
    padding: 0.6em 0.75em;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
    color: #000;
}

.editor-content th {
    background: #f3f3f3;
    font-weight: 700;
}

.editor-content hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 1.5em 0;
}

.editor-content pre,
.editor-content code {
    font-family: Consolas, Monaco, monospace;
    font-size: 0.95em;
}

.editor-content pre {
    background: #f5f5f5;
    padding: 1em;
    overflow-x: auto;
    margin: 1em 0;
}
