/* Shared article body content – view page (.coco-article-content) and TinyMCE iframe (body.mce-content-body).
   Variables needed when this file is loaded alone (e.g. in TinyMCE iframe). */
.coco-article-content,
body.mce-content-body {
    --coco-article-primary: #e86825;
    --coco-article-primary-dark: #b84f1d;
    --coco-article-text: #212529;
    --coco-article-text-secondary: #6c757d;
    --coco-article-border: #dee2e6;
    --coco-article-bg-subtle: #f8f9fa;
}

/* Base – no max-width so content fills the column; padding is on the column container */
.coco-article-content,
body.mce-content-body {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--coco-article-text);
    max-width: 100%;
}

/* Headings */
.coco-article-content h1,
body.mce-content-body h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
.coco-article-content h1:first-child,
body.mce-content-body h1:first-child {
    margin-top: 0;
}

.coco-article-content h2,
body.mce-content-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.coco-article-content h3,
body.mce-content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.coco-article-content h4,
body.mce-content-body h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.375rem;
}

.coco-article-content h5,
body.mce-content-body h5,
.coco-article-content h6,
body.mce-content-body h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

/* Paragraphs */
.coco-article-content p,
body.mce-content-body p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Lists */
.coco-article-content ul,
body.mce-content-body ul,
.coco-article-content ol,
body.mce-content-body ol {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.coco-article-content li,
body.mce-content-body li {
    margin-bottom: 0.25rem;
}

/* Links */
.coco-article-content a,
body.mce-content-body a {
    color: var(--coco-article-primary);
    text-decoration: none;
}
.coco-article-content a:hover,
body.mce-content-body a:hover {
    color: var(--coco-article-primary-dark);
    text-decoration: underline;
}

/* Blockquote */
.coco-article-content blockquote,
body.mce-content-body blockquote {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-left: 4px solid var(--coco-article-border);
    background-color: var(--coco-article-bg-subtle);
    color: var(--coco-article-text-secondary);
}

/* Code and pre */
.coco-article-content code,
body.mce-content-body code {
    font-family: ui-monospace, monospace;
    font-size: 0.9em;
    padding: 0.15em 0.4em;
    background-color: var(--coco-article-bg-subtle);
    border: 1px solid var(--coco-article-border);
    border-radius: 3px;
}
.coco-article-content pre,
body.mce-content-body pre {
    margin: 1rem 0;
    padding: 1rem;
    overflow-x: auto;
    background-color: var(--coco-article-bg-subtle);
    border: 1px solid var(--coco-article-border);
    border-radius: 4px;
}
.coco-article-content pre code,
body.mce-content-body pre code {
    padding: 0;
    background: none;
    border: none;
}

/* Tables */
.coco-article-content table,
body.mce-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.coco-article-content th,
body.mce-content-body th,
.coco-article-content td,
body.mce-content-body td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--coco-article-border);
    text-align: left;
}
.coco-article-content th,
body.mce-content-body th {
    background-color: var(--coco-article-bg-subtle);
    font-weight: 600;
}

/* Images */
.coco-article-content img,
body.mce-content-body img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}
