/* Rich editor — admin + frontend post content */
.tox-tinymce {
    border-radius: 8px !important;
    border-color: #e8eaed !important;
}

.tox .tox-toolbar__primary {
    background: #f8f9fc !important;
}

.tox .tox-edit-area__iframe {
    background: #fff !important;
}

/* Formatted post content on frontend */
.entry.themeform .fp-rich-content,
.fp-rich-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #444;
}

.fp-rich-content > :first-child,
.wiki-article-body > :first-child,
.wiki-content > :first-child,
.fp-wiki-markup-content > :first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.fp-rich-content h1,
.fp-rich-content h2,
.fp-rich-content h3,
.fp-rich-content h4,
.fp-rich-content h5,
.fp-rich-content h6 {
    color: #1a1a1a;
    margin: 1.5em 0 0.75em;
    font-weight: 700;
    line-height: 1.3;
}

.fp-rich-content h2 { font-size: 1.75rem; }
.fp-rich-content h3 { font-size: 1.4rem; }
.fp-rich-content h4 { font-size: 1.15rem; }
.fp-rich-content h5 { font-size: 1.05rem; }
.fp-rich-content h6 { font-size: 1rem; }

.fp-rich-content p { margin: 0 0 1.25em; }

.fp-rich-content ul,
.fp-rich-content ol {
    margin: 0 0 1.25em 1.5em;
    padding: 0;
}

.fp-rich-content li { margin-bottom: 0.4em; }

.fp-rich-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.25em;
    border-left: 4px solid #33b5b5;
    background: #f8f9fc;
    color: #555;
    font-style: italic;
}

.fp-rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1em 0;
}

.fp-rich-content iframe,
.fp-rich-content video,
.fp-rich-content .wp-block-embed__wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 6px;
    margin: 1em 0;
    display: block;
}

.fp-rich-content .wp-block-embed__wrapper iframe,
.fp-rich-content .wp-block-embed__wrapper video {
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    margin: 0;
}

.fp-rich-content a {
    color: #33b5b5;
    text-decoration: underline;
}

.fp-rich-content a:hover {
    color: #2aa8a8;
}

.fp-rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.fp-rich-content th,
.fp-rich-content td {
    border: 1px solid #e8e8e8;
    padding: 10px 14px;
    text-align: left;
}

.fp-rich-content th {
    background: #f6f7fb;
    font-weight: 600;
}

.fp-rich-content pre,
.fp-rich-content code {
    background: #f4f4f4;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.9em;
}

.fp-rich-content pre {
    padding: 1em;
    overflow-x: auto;
    margin: 1.5em 0;
}

.fp-rich-content code {
    padding: 2px 6px;
}

.fp-rich-content hr {
    border: none;
    border-top: 2px solid #e8e8e8;
    margin: 2em 0;
}
