/* Article typography, shared by the public article page and the superadmin rich editor (so the editor looks like the result). */
.article-body { font-size: 1.06rem; line-height: 1.75; overflow-wrap: anywhere; }
.article-body h2 { font-size: 1.5rem; margin: 2.2rem 0 .8rem; clear: both; }
.article-body h3 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; clear: both; }
.article-body ul, .article-body ol { margin-bottom: 1.1rem; }
.article-body li { margin-bottom: .35rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.article-body img.w25 { width: 25%; } .article-body img.w50 { width: 50%; } .article-body img.w75 { width: 75%; } .article-body img.w100 { width: 100%; }
.article-body img.al-left { float: left; margin: .3rem 1.2rem .6rem 0; }
.article-body img.al-right { float: right; margin: .3rem 0 .6rem 1.2rem; }
.article-body img.al-center { display: block; margin: 1.2rem auto; }
.article-body table { clear: both; }
.article-body .blockquote-callout, .article-body blockquote { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 14px 18px; border-radius: 6px; margin: 1.4rem 0; clear: both; }
.article-body hr { clear: both; }
@media (max-width: 575px) {
  .article-body img.al-left, .article-body img.al-right { float: none; display: block; margin: 1rem auto; }
  .article-body img.w25, .article-body img.w50 { width: 60%; }
}

/* captioned pictures + video */
.article-body figure.art-fig { margin: 1.2rem 0; max-width: 100%; }
.article-body figure.art-fig img { width: 100%; margin: 0; float: none; display: block; }
.article-body figure.art-fig figcaption { font-size: .85rem; color: #6c757d; text-align: center; margin-top: .4rem; }
.article-body figure.art-fig.w25 { width: 25%; } .article-body figure.art-fig.w50 { width: 50%; } .article-body figure.art-fig.w75 { width: 75%; } .article-body figure.art-fig.w100 { width: 100%; }
.article-body figure.art-fig.al-left { float: left; margin: .3rem 1.2rem .6rem 0; }
.article-body figure.art-fig.al-right { float: right; margin: .3rem 0 .6rem 1.2rem; }
.article-body figure.art-fig.al-center { margin: 1.2rem auto; }
.article-body .video-embed { margin: 1.4rem 0; clear: both; border-radius: 8px; overflow: hidden; }
@media (max-width: 575px) { .article-body figure.art-fig.al-left, .article-body figure.art-fig.al-right { float: none; margin: 1rem auto; } .article-body figure.art-fig.w25, .article-body figure.art-fig.w50 { width: 60%; } }

/* Rich editor */
.rte-area p[data-cap]::after { content: attr(data-cap); display: block; clear: both; font-size: .85rem; color: #6c757d; text-align: center; }
.rte-area .video-embed { background: #1c2421; color: #fff; border-radius: 8px; padding: 34px 12px; text-align: center; margin: 1rem 0; user-select: none; cursor: pointer; clear: both; }
.rte-area .video-embed::before { content: "▶  YouTube video · " attr(data-yt); }
.rte-area .video-embed.rte-selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.rte-draft { background: #fff7e0; border-bottom: 1px solid #ecd9a0; padding: 8px 12px; font-size: .9rem; display: none; gap: 8px; align-items: center; flex-wrap: wrap; }
.rte-draft.open { display: flex; }
.rte { border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: #f7f8f7; border-radius: 10px 10px 0 0; position: sticky; top: 0; z-index: 5; }
.rte-toolbar .btn { padding: .15rem .55rem; min-width: 2rem; }
.rte-toolbar .rte-sep { width: 1px; background: var(--border); margin: 2px 4px; }
.rte-toolbar .btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.rte-panel { display: none; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px; border-bottom: 1px solid var(--border); background: #fffdf5; font-size: .9rem; }
.rte-panel.open { display: flex; }
.rte-area { min-height: 420px; max-height: 75vh; overflow-y: auto; padding: 18px 22px; outline: none; }
.rte-area:empty::before { content: attr(data-placeholder); color: #8a9690; }
.rte-area img { cursor: pointer; }
.rte-area img.rte-selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.rte-area table td, .rte-area table th { min-width: 3rem; }
.rte-source { width: 100%; min-height: 420px; border: 0; padding: 14px; font-family: var(--font-mono, monospace); font-size: .85rem; outline: none; display: none; }
.rte-status { padding: 6px 12px; border-top: 1px solid var(--border); font-size: .8rem; color: #6c757d; display: flex; justify-content: space-between; }
.rte.dragover { outline: 3px dashed var(--accent); }
