/* =========================================================================
   Article body typography (news-portal reading style).
   Shared by the public article page (.sg-article.article-body) and the
   admin article editor canvas (.ae-canvas.article-body) so the editor is
   a true "what you see is what readers get" surface.
   Only classes produced by the admin article editor are styled here.
   ========================================================================= */
.article-body {
    --ab-ink: #0f1b33;
    --ab-text: #27344a;
    --ab-muted: #64748b;
    --ab-accent: #2563eb;
    --ab-accent-soft: #eff5ff;
    --ab-line: #e5e9f0;
    --ab-mark: #fff1a8;
    color: var(--ab-text);
    font-size: 1.075rem;
    line-height: 1.8;
    overflow-wrap: break-word;
}
.article-body::after { content: ""; display: table; clear: both; }
.article-body > :first-child { margin-top: 0; }

.article-body p { margin: 0 0 1.15em; }
.article-body h2,
.article-body h3,
.article-body h4 { color: var(--ab-ink); line-height: 1.3; letter-spacing: -.012em; font-weight: 700; }
.article-body h2 { font-size: 1.65rem; margin: 1.9em 0 .55em; padding-left: 14px; border-left: 4px solid var(--ab-accent); }
.article-body h3 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.article-body h4 { font-size: 1.1rem; margin: 1.4em 0 .45em; }

.article-body a { color: var(--ab-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body a:hover { text-decoration-thickness: 2px; }
.article-body strong, .article-body b { color: var(--ab-ink); font-weight: 700; }
.article-body mark { background: var(--ab-mark); color: inherit; padding: .05em .2em; border-radius: 3px; }

.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.article-body li { margin: .4em 0; padding-left: .2em; }
.article-body ul li::marker { color: var(--ab-accent); }
.article-body ol li::marker { color: var(--ab-accent); font-weight: 700; }

.article-body blockquote {
    position: relative;
    margin: 1.8em 0;
    padding: 1.1em 1.4em 1.1em 3.4em;
    border-left: 4px solid var(--ab-accent);
    background: var(--ab-accent-soft);
    border-radius: 0 12px 12px 0;
    color: var(--ab-ink);
    font-size: 1.12em;
    font-style: italic;
    line-height: 1.65;
}
.article-body blockquote::before {
    content: "\201C";
    position: absolute;
    left: .45em;
    top: .05em;
    font: 700 3.2em/1 Georgia, "Times New Roman", serif;
    color: var(--ab-accent);
    opacity: .5;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body pre {
    margin: 1.5em 0;
    padding: 16px 18px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    overflow-x: auto;
    font: .88rem/1.65 Consolas, "SFMono-Regular", Menlo, monospace;
    white-space: pre;
}
.article-body code { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .9em; background: #f1f5f9; padding: .1em .35em; border-radius: 5px; }
.article-body pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

.article-body hr { border: 0; margin: 2.4em 0; text-align: center; height: auto; overflow: visible; background: none; }
.article-body hr::before { content: "\2022  \2022  \2022"; color: var(--ab-muted); letter-spacing: .6em; font-size: 1.1em; white-space: pre; }

/* Images */
.article-body img { max-width: 100%; height: auto; }
.article-body figure { margin: 1.8em 0; }
.article-body .article-figure img { display: block; width: 100%; border-radius: 12px; background: #f1f5f9; }
.article-body figcaption {
    margin-top: .6em;
    padding-left: 10px;
    border-left: 3px solid var(--ab-line);
    color: var(--ab-muted);
    font-size: .86rem;
    line-height: 1.5;
}
.article-body .article-figure.is-center { width: 72%; margin-left: auto; margin-right: auto; }
.article-body .article-figure.is-left,
.article-body .article-figure.is-right { width: 46%; margin-top: .35em; margin-bottom: 1em; }
.article-body .article-figure.is-left { float: left; margin-right: 1.6em; }
.article-body .article-figure.is-right { float: right; margin-left: 1.6em; }
@media (min-width: 1100px) {
    .article-body .article-figure.is-wide { margin-left: -110px; margin-right: -110px; }
}

/* Video embed (16:9) */
.article-body .article-embed iframe,
.article-body .article-embed .ae-embed-preview { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; background: #0b1220; }

/* Highlight / key-points box */
.article-body .article-callout {
    margin: 1.8em 0;
    padding: 1.2em 1.4em;
    border: 1px solid #fde68a;
    background: #fffbeb;
    border-radius: 14px;
    color: #3d2f0b;
}
.article-body .article-callout > :last-child { margin-bottom: 0; }
.article-body .article-callout h2,
.article-body .article-callout h3,
.article-body .article-callout h4 { margin-top: 0; border: 0; padding: 0; color: #78350f; font-size: 1.1rem; }

/* "Also read" related-article box */
.article-body .article-readalso {
    clear: both;
    display: block;
    margin: 1.8em 0;
    padding: .95em 1.2em;
    border: 1px solid var(--ab-line);
    border-left: 4px solid #dc2626;
    background: #fff;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 1px 2px rgba(15, 27, 51, .04), 0 6px 18px rgba(15, 27, 51, .05);
    line-height: 1.5;
}
.article-body .article-readalso strong { display: block; margin-bottom: .2em; color: #dc2626; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.article-body .article-readalso a { color: var(--ab-ink); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.article-body .article-readalso a:hover { color: var(--ab-accent); text-decoration: underline; }

/* Tables */
.article-body table { width: 100%; margin: 1.6em 0; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.article-body th, .article-body td { padding: 10px 12px; border: 1px solid var(--ab-line); text-align: left; vertical-align: top; }
.article-body thead th, .article-body tr:first-child > th { background: #f1f5f9; color: var(--ab-ink); font-weight: 700; }
.article-body tbody tr:nth-child(even) td { background: #fafbfd; }
.article-body caption { caption-side: bottom; padding-top: 8px; color: var(--ab-muted); font-size: .85rem; text-align: left; }

@media (max-width: 640px) {
    .article-body { font-size: 1.02rem; }
    .article-body h2 { font-size: 1.4rem; }
    .article-body .article-figure.is-left,
    .article-body .article-figure.is-right,
    .article-body .article-figure.is-center { float: none; width: auto; margin-left: 0; margin-right: 0; }
    .article-body table { display: block; overflow-x: auto; white-space: nowrap; }
    .article-body blockquote { padding-left: 2.8em; }
}

/* Admin-only preview notice on draft / scheduled articles (see BlogController.Details). */
.article-preview-banner {
    position: sticky; top: 0; z-index: 60;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
    padding: 10px 16px; background: #fffbeb; border-bottom: 1px solid #fcd34d;
    color: #78350f; font-size: .92rem; line-height: 1.45; text-align: center;
}
.article-preview-banner strong { padding: 2px 8px; border-radius: 6px; background: #f59e0b; color: #fff; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.article-preview-banner a { color: #92400e; font-weight: 700; text-decoration: underline; }
