/*
 * Article blocks: the News Express builder's blocks (Business/Services/NewsExpress/Builder/ArticleRenderer.cs) and the
 * site's classic story blocks (NewsHelper.Generate*: .floatedcontent > .floatedTime, .floatedList, .floatedNumber,
 * .floatedOpinion, .floatedAnalysis, .floatedQuote, .floatedText), on the article page and the builder's preview.
 * The builder's editor uses a scoped copy (ClientApp/news-builder: npm run build:site), so the three look the same.
 *
 * Layout follows the width of the article column, not the screen (container queries on .bodyText): side blocks stand
 * beside the text only when the column is wide enough, and the editor (a narrower column next to its panel) lays them
 * out exactly like the site does at the same column width. The HTML reads well without this file (the app gets it
 * as is); nx-article-blocks.js adds the gallery viewer, the video popup, the comparison slider and the map.
 *
 * The site's own rules for the classic blocks go up to .newsDetails .firstColumn .floatedTime .left .title (0-5-0);
 * the overrides here start with .bodyText.bodyText.bodyText (0-3-0) and win on order (this file loads after them).
 * Test page: /AdminPanel/NewsExpressV2/BlocksSample (?view=live, ?lang=en).
 */

.bodyText {
    --nxa-accent: #07b9ff;
    --nxa-accent-ink: #0284c7;
    --nxa-accent-soft: #e6f7ff;
    --nxa-ink: #1f2328;
    --nxa-ink-2: #3d4248;
    --nxa-muted: #6b7280;
    --nxa-line: #dfe5ea;
    --nxa-card: #fff;
    --nxa-radius: 8px;
    --nxa-space: 32px;
    --nxa-side: 42%;
    container: nxa-body / inline-size;
}
/* The site shows the body as an inline-block; a size container needs a normal block to take the column's width. */
.bodyText.bodyText.bodyText { display: block; width: 100%; }

/* ------------------------------------------------------------------ text */

/* Text next to a side block keeps to its own column beside it (its box stops at the side block, so it never runs
   under it, and the editor's outline shows exactly where it is). The "Start below it" option (nx-clear) puts a text
   block under the side blocks instead. */
.bodyText.bodyText.bodyText > p { margin: 0 0 1em; display: flow-root; }
.bodyText.bodyText.bodyText > .nx-clear { clear: both; }
.bodyText.bodyText.bodyText > h2, .bodyText.bodyText.bodyText > h3, .bodyText.bodyText.bodyText > h4 { display: flow-root; color: var(--nxa-ink); font-weight: 800; line-height: 1.4; margin: 36px 0 12px; }
.bodyText.bodyText.bodyText > h2 { font-size: 26px; }
.bodyText.bodyText.bodyText > h3 { font-size: 22px; }
.bodyText.bodyText.bodyText > h4 { font-size: 19px; }
/* Lists sit beside a side block instead of running under it (their bullets would be hidden by it). */
.bodyText.bodyText.bodyText > ul, .bodyText.bodyText.bodyText > ol { display: flow-root; margin: 0 0 1em; padding-inline-start: 26px; }
.bodyText.bodyText.bodyText > ul > li, .bodyText.bodyText.bodyText > ol > li { margin: 0 0 8px; padding-inline-start: 4px; list-style: disc; font-size: inherit; font-weight: inherit; line-height: 1.7; }
.bodyText.bodyText.bodyText > ol > li { list-style: decimal; }
.bodyText.bodyText.bodyText > ul > li:last-child, .bodyText.bodyText.bodyText > ol > li:last-child { margin-bottom: 0; }
.bodyText.bodyText.bodyText > ul > li::marker, .bodyText.bodyText.bodyText > ol > li::marker { color: var(--nxa-accent); font-weight: 800; }

/* The article body gives images a bottom padding; the blocks lay out their own. */
.nx-image img, .nx-gallery img, .nx-ba img, .nx-video img, .nx-related img, .nx-quote-author img, .nx-before-after img { padding: 0; }

/* Shared: block titles, captions, cards. */
.nx-block-title.nx-block-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; line-height: 1.4; color: var(--nxa-ink); margin: 0 0 14px; }
.nx-block-title.nx-block-title::before { content: ""; flex: 0 0 auto; width: 4px; height: 1.1em; border-radius: 2px; background: var(--nxa-accent); }
.bodyText .imgInfo.imgInfo { display: block; margin: 0; padding: 8px 0 0; border: 0; font-size: 14px; line-height: 1.6; font-style: normal; text-align: start; color: var(--nxa-muted); word-break: normal; }
.bodyText .imgInfo.imgInfo::before { content: none; }
.nx-credit { color: #9aa1a9; }
.nx-credit::before { content: "· "; }

/* Every block that isn't text: the same space above and below, and never beside a side block. */
.bodyText > .floatedcontent, .nx-image, .nx-gallery, .nx-before-after, .nx-videos, .nx-embed, .nx-map, .nx-factbox, .nx-table, .nx-related, .nx-note {
    margin-block: var(--nxa-space);
}
.nx-image:not(.nx-side), .nx-gallery, .nx-before-after, .nx-videos, .nx-embed, .nx-map, .nx-factbox, .nx-table, .nx-related, .nx-note, .nx-divider,
.bodyText > .floatedcontent:has(> .floatedQuote) { clear: both; }

/* ------------------------------------------------------------------ side blocks
   Highlight, timeline, key points, key number, opinion, analysis and a side image stand beside the text (at the
   column's start) when the column is at least 620px wide; otherwise they take the whole width. Two in a row stack. */

.bodyText.bodyText.bodyText .floatedcontent > :where([class^="floated"]) { float: none; width: auto; margin: 0; padding: 0; border: 0; background: none; }
.bodyText.bodyText.bodyText > .floatedcontent { display: flow-root; }

@container nxa-body (min-width: 620px) {
    .bodyText.bodyText.bodyText > .floatedcontent:not(:has(> .floatedQuote)), .bodyText.bodyText.bodyText > .nx-image.nx-side {
        display: block; float: inline-start; clear: both; width: var(--nxa-side); margin-block: 8px 24px; margin-inline-end: 32px;
    }
}

/* Highlighted text */
.bodyText.bodyText.bodyText .floatedText { border-top: 4px solid var(--nxa-accent); padding-top: 14px; color: var(--nxa-ink); font-size: 24px; font-weight: 800; line-height: 1.5; }

/* Timeline: one line at the start with a dot per date; the date above its title, so any date fits. */
.bodyText.bodyText.bodyText .floatedTime { display: block; }
.bodyText.bodyText.bodyText .floatedTime .time { display: block; position: relative; padding: 0 0 22px; padding-inline-start: 28px; }
.bodyText.bodyText.bodyText .floatedTime .time::before { content: ""; position: absolute; top: 7px; inset-inline-start: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--nxa-card); border: 3px solid var(--nxa-accent); box-sizing: border-box; }
.bodyText.bodyText.bodyText .floatedTime .time::after { content: ""; position: absolute; top: 25px; bottom: 0; inset-inline-start: 6px; width: 2px; background: #bfe9fb; }
.bodyText.bodyText.bodyText .floatedTime .time:last-of-type { padding-bottom: 0; }
.bodyText.bodyText.bodyText .floatedTime .time:last-of-type::after { content: none; }
.bodyText.bodyText.bodyText .floatedTime .right, .bodyText.bodyText.bodyText .floatedTime .left { flex: none; width: auto; padding: 0; position: static; }
.bodyText.bodyText.bodyText .floatedTime .right::after, .bodyText.bodyText.bodyText .floatedTime .date::after { content: none; }
.bodyText.bodyText.bodyText .floatedTime .date { display: block; color: var(--nxa-accent-ink); font-size: 15px; font-weight: 800; line-height: 1.6; }
.bodyText.bodyText.bodyText .floatedTime .left .title { color: var(--nxa-ink); font-size: 19px; font-weight: 800; line-height: 1.45; text-align: start; }
.bodyText.bodyText.bodyText .floatedTime .left .description { color: var(--nxa-ink-2); font-size: 16px; font-weight: 400; line-height: 1.6; text-align: start; margin-top: 2px; }
.bodyText.bodyText.bodyText .floatedTime .left .title:empty, .bodyText.bodyText.bodyText .floatedTime .left .description:empty { display: none; }

/* Key points */
.bodyText.bodyText.bodyText .floatedList { background: var(--nxa-card); border: 1px solid var(--nxa-line); border-top: 4px solid var(--nxa-accent); border-radius: 0 0 var(--nxa-radius) var(--nxa-radius); padding: 18px 20px; }
.bodyText.bodyText.bodyText .floatedList .title { color: var(--nxa-ink); font-size: 20px; font-weight: 800; line-height: 1.4; text-align: start; margin: 0 0 12px; padding: 0; border: 0; }
.bodyText.bodyText.bodyText .floatedList .title:empty { display: none; }
.bodyText.bodyText.bodyText .floatedList ul { margin: 0; padding: 0; }
.bodyText.bodyText.bodyText .floatedList ul li, .bodyText.bodyText.bodyText .floatedList ul li:last-of-type { position: relative; list-style: none; margin: 0 0 10px; padding-inline-start: 20px; font-size: 17px; font-weight: 500; line-height: 1.6; color: var(--nxa-ink-2); }
.bodyText.bodyText.bodyText .floatedList ul li:last-child { margin-bottom: 0; }
.bodyText.bodyText.bodyText .floatedList ul li::before { content: ""; position: absolute; top: .65em; inset-inline-start: 0; width: 8px; height: 8px; border-radius: 2px; background: var(--nxa-accent); }

/* Key number */
.bodyText.bodyText.bodyText .floatedNumber { background: var(--nxa-card); border: 1px solid var(--nxa-line); border-top: 4px solid var(--nxa-accent); border-radius: 0 0 var(--nxa-radius) var(--nxa-radius); padding: 18px 20px; }
.bodyText.bodyText.bodyText .floatedNumber .title { color: var(--nxa-accent-ink); font-size: 13px; font-weight: 800; line-height: 1.6; letter-spacing: .02em; margin: 0 0 4px; }
.bodyText.bodyText.bodyText .floatedNumber .subtitle { color: var(--nxa-ink); font-size: 19px; font-weight: 800; line-height: 1.45; }
.bodyText.bodyText.bodyText .floatedNumber .number { color: var(--nxa-accent); font-size: 56px; font-weight: 900; line-height: 1.15; margin: 6px 0; text-align: start; overflow-wrap: anywhere; }
.bodyText.bodyText.bodyText .floatedNumber .description { color: var(--nxa-ink-2); font-size: 16px; line-height: 1.6; border: 0; padding: 0; }

/* Opinion */
.bodyText.bodyText.bodyText .floatedOpinion .box { position: relative; background: var(--nxa-card); border: 1px solid var(--nxa-line); border-top: 4px solid var(--nxa-accent); border-radius: 0 0 var(--nxa-radius) var(--nxa-radius); padding: 18px 20px; }
.bodyText.bodyText.bodyText .floatedOpinion .circle { position: static; transform: none; display: inline-flex; width: auto; height: auto; border: 0; border-radius: 999px; background: var(--nxa-accent-soft); color: var(--nxa-accent-ink); font-size: 14px; font-weight: 800; line-height: 1.6; padding: 2px 12px; margin: 0 0 12px; }
.bodyText.bodyText.bodyText .floatedOpinion .author { display: block; border: 0; padding: 0; margin: 0 0 6px; }
.bodyText.bodyText.bodyText .floatedOpinion .author .authorText { color: var(--nxa-accent-ink); font-size: 15px; font-weight: 700; text-align: start; }
.bodyText.bodyText.bodyText .floatedOpinion .author:has(.authorText:empty) { display: none; }
.bodyText.bodyText.bodyText .floatedOpinion .title { color: var(--nxa-ink); font-size: 19px; font-weight: 800; line-height: 1.5; margin: 0 0 8px; }
.bodyText.bodyText.bodyText .floatedOpinion .description { color: var(--nxa-ink-2); font-size: 16px; line-height: 1.6; }

/* Analysis */
.bodyText.bodyText.bodyText .floatedAnalysis { background: var(--nxa-card); border: 1px solid var(--nxa-line); border-inline-start: 4px solid var(--nxa-accent); border-radius: var(--nxa-radius); padding: 18px 20px; }
.bodyText.bodyText.bodyText .floatedAnalysis .title { color: var(--nxa-ink); font-size: 20px; font-weight: 800; line-height: 1.5; margin: 0 0 8px; }
.bodyText.bodyText.bodyText .floatedAnalysis .description { color: var(--nxa-ink-2); font-size: 16px; line-height: 1.6; text-align: start; }

/* "Read the full text" (opinion, analysis) */
.bodyText.bodyText.bodyText .floatedcontent .readMore { margin: 12px 0 0; font-size: 15px; font-weight: 800; line-height: 1.6; }
.bodyText.bodyText.bodyText .floatedcontent .readMore a { color: var(--nxa-accent-ink); text-decoration: none; }
.bodyText.bodyText.bodyText .floatedcontent .readMore a::after { content: " ←"; }
.bodyText.bodyText.bodyText .floatedcontent .readMore a:dir(ltr)::after { content: " →"; }
.bodyText.bodyText.bodyText .floatedcontent .readMore:has(a[href=""]) { display: none; }

/* Quote: across the column, with a bar at its start. Only the opening quote mark is shown. */
.bodyText.bodyText.bodyText .floatedQuote { border-inline-start: 4px solid var(--nxa-accent); padding-inline-start: 24px; }
.bodyText.bodyText.bodyText .floatedQuote .imgContainer { max-width: none; margin: 0 0 6px; }
.bodyText.bodyText.bodyText .floatedQuote .imgContainer img { display: block; width: 34px; height: auto; }
.bodyText.bodyText.bodyText .floatedQuote .imgContainer ~ .imgContainer { display: none; }
.bodyText.bodyText.bodyText .floatedQuote .title { color: var(--nxa-ink); font-size: 24px; font-weight: 800; line-height: 1.55; margin: 0; }
.nx-quote-author { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 14px; font-size: 15px; line-height: 1.5; }
.nx-quote-author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.nx-quote-speaker { font-weight: 800; color: var(--nxa-ink); }
.nx-quote-role { color: var(--nxa-muted); }
.nx-quote-role::before { content: "· "; }

/* ------------------------------------------------------------------ media */

.nx-image img { display: block; width: 100%; height: auto; border-radius: var(--nxa-radius); }
@container nxa-body (min-width: 620px) {
    .bodyText.bodyText.bodyText > .nx-image.nx-side { width: 40%; }
}

/* Carousel buttons (gallery, videos): round, with a drawn chevron (nx-article-blocks.js iconButton). */
.nx-car-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; margin: 0; border-radius: 50%; border: 1px solid var(--nxa-line); background: #fff; color: var(--nxa-ink); cursor: pointer; box-shadow: 0 1px 3px rgba(16,24,40,.12); transition: background-color .15s, color .15s, opacity .2s, transform .15s; }
.nx-car-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nx-car-btn:hover:not(:disabled) { background: var(--nxa-accent); border-color: var(--nxa-accent); color: #fff; }
.nx-car-btn:active:not(:disabled) { transform: scale(.94); }
.nx-car-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.nx-car-btn:focus-visible { outline: 3px solid rgba(7,185,255,.45); outline-offset: 2px; }

/* Gallery. Without the script: the photos one under another, each with its caption. */
.nx-gallery { position: relative; }
.nx-gallery > figure { margin: 0 0 16px; }
.nx-gallery figure a { display: block; cursor: zoom-in; }
.nx-gallery img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--nxa-radius); }
/* With it: one large photo at a time, the arrows on it, its number and caption under it, then the thumbnails. */
.nx-gallery-stage { position: relative; border-radius: var(--nxa-radius); overflow: hidden; background: #0f1419; }
.nx-gallery-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.nx-gallery-strip::-webkit-scrollbar { display: none; }
.nx-gallery-strip > figure { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.nx-gallery-strip img { aspect-ratio: 16 / 10; border-radius: 0; }
.bodyText .nx-gallery-strip figcaption, .bodyText .nx-gallery-strip .imgInfo.imgInfo { display: none; }   /* shown under the photo (.nx-gallery-caption) */
.nx-gallery-stage .nx-car-btn { position: absolute; z-index: 2; border: 0; background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.nx-gallery-stage .nx-car-btn:disabled { opacity: 0; pointer-events: none; }
.nx-gallery-prev { top: calc(50% - 20px); inset-inline-start: 14px; }
.nx-gallery-next { top: calc(50% - 20px); inset-inline-end: 14px; }
.nx-gallery-expand.nx-gallery-expand { top: 12px; inset-inline-end: 12px; width: 36px; height: 36px; }
.nx-gallery-expand svg { width: 18px; height: 18px; }
.nx-gallery-caption { display: flex; gap: 12px; align-items: baseline; min-height: 34px; padding: 10px 2px 0; font-size: 14px; line-height: 1.6; color: var(--nxa-muted); }
.nx-gallery-count { flex: 0 0 auto; font-weight: 800; color: var(--nxa-ink); direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.nx-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; padding: 3px; overflow-x: auto; scrollbar-width: none; }
.nx-gallery-thumbs::-webkit-scrollbar { display: none; }
.nx-gallery-thumb { flex: 0 0 auto; width: 88px; padding: 0; margin: 0; border: 0; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: .5; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .15s, outline-color .15s; }
.nx-gallery-thumb img { aspect-ratio: 16 / 10; border-radius: 0; }
.nx-gallery-thumb:hover { opacity: .85; }
.nx-gallery-thumb.on { opacity: 1; outline-color: var(--nxa-accent); }
@container nxa-body (max-width: 480px) {
    .nx-gallery-prev, .nx-gallery-next { width: 34px; height: 34px; top: calc(50% - 17px); }
    .nx-gallery-prev { inset-inline-start: 10px; }
    .nx-gallery-next { inset-inline-end: 10px; }
    .nx-gallery-thumb { width: 64px; }
}

/* Before / after: two images; the script turns them into a slider. */
.nx-before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nx-before-after figure { margin: 0; }
.nx-before-after img { display: block; width: 100%; height: auto; border-radius: var(--nxa-radius); }
.nx-before-after > figcaption { grid-column: 1 / -1; }
.nx-before-after.nx-ba-on { display: block; }
/* Shaped like the after image (the script sets aspect-ratio); both images fill it. Always left-to-right: in Arabic
   pages the range control would otherwise run right to left, so dragging right would move the divider left. */
.nx-ba { direction: ltr; position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--nxa-radius); user-select: none; touch-action: pan-y; cursor: col-resize; background: #000; }
.nx-ba img, .nx-ba .nx-ba-top { position: absolute; inset: 0; }
.nx-ba img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.nx-ba .nx-ba-top { clip-path: inset(0 50% 0 0); }
.nx-ba-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.4); pointer-events: none; }
.nx-ba-line::after { content: "\2194"; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; color: #111; font-size: 20px; line-height: 40px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.nx-ba-label { position: absolute; top: 12px; padding: 3px 10px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }
.nx-ba-label.before { left: 12px; }
.nx-ba-label.after { right: 12px; }
.nx-ba input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: col-resize; }

/* Videos: cards in a row under a header with the title, the number of videos and the arrows; a card plays its video
   in a popup. Three cards across in a wide column, two in a medium one, one and a bit on a phone. */
.nx-videos { position: relative; }
.nx-videos-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.nx-videos-head .nx-block-title.nx-block-title { margin: 0; }
.nx-videos-count { min-width: 22px; text-align: center; font-size: 12px; font-weight: 800; line-height: 1.7; color: #fff; background: var(--nxa-accent); border-radius: 999px; padding: 0 7px; }
.nx-videos-nav { margin-inline-start: auto; display: flex; gap: 8px; }
.nx-videos-nav[hidden] { display: none; }
.nx-videos-nav .nx-car-btn { width: 36px; height: 36px; }
.nx-videos-nav .nx-car-btn svg { width: 18px; height: 18px; }
.bodyText .nx-videos ul { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; margin: 0; padding: 2px 0 4px; scrollbar-width: none; }
.nx-videos ul::-webkit-scrollbar { display: none; }
.bodyText.bodyText.bodyText .nx-videos ul > li { display: block; flex: 0 0 80%; scroll-snap-align: start; margin: 0; padding: 0; list-style: none; }
.nx-videos ul > li::before { content: none; }
@container nxa-body (min-width: 480px) { .bodyText.bodyText.bodyText .nx-videos ul > li { flex-basis: calc((100% - 14px) / 2); } }
@container nxa-body (min-width: 700px) { .bodyText.bodyText.bodyText .nx-videos ul > li { flex-basis: calc((100% - 28px) / 3); } }
.bodyText.bodyText.bodyText .nx-video, .bodyText.bodyText.bodyText .nx-video:hover { position: relative; display: block; color: var(--nxa-ink); text-decoration: none; opacity: 1; }
.nx-video img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--nxa-radius); background: #1f2733; box-shadow: 0 1px 3px rgba(16,24,40,.12); transition: filter .15s; }
.bodyText .nx-video span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--nxa-ink); }
/* The play button, centred on the thumbnail (16:9: its centre is 28.125% of the card's width down). */
.nx-video::before { content: ""; position: absolute; z-index: 1; left: calc(50% - 26px); top: 0; margin-top: calc(28.125% - 26px); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.94); box-shadow: 0 4px 16px rgba(0,0,0,.3); transition: transform .15s, background-color .15s; }
.nx-video::after { content: ""; position: absolute; z-index: 2; left: calc(50% - 5px); top: 0; margin-top: calc(28.125% - 9px); border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--nxa-accent); }
.nx-video:hover::before, .nx-video:focus-visible::before { transform: scale(1.1); background: #fff; }
.nx-video:hover img { filter: brightness(.86); }

/* Social posts */
.nx-embed { margin-inline: auto; text-align: center; }
.nx-embed iframe { display: block; width: 100%; max-width: 540px; margin: 0 auto; border: 0; border-radius: var(--nxa-radius); background: #fff; }
.nx-embed-instagram iframe { height: 720px; }
.nx-embed-tiktok iframe { max-width: 330px; height: 740px; }
.nx-embed-facebook iframe { max-width: 500px; height: 620px; }
.nx-embed-telegram iframe { height: 520px; }
.nx-embed-youtube iframe { max-width: 100%; aspect-ratio: 16 / 9; height: auto; }
/* Until (or unless) the X widget loads, its quote shows the post link: one long word that must wrap on a phone. */
.nx-embed { max-width: 100%; min-width: 0; }
.nx-embed blockquote, .nx-embed blockquote a { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.bodyText .nx-embed figcaption { margin-top: 6px; font-size: 12px; font-style: normal; direction: ltr; word-break: break-all; text-align: center; }
.bodyText.bodyText.bodyText .nx-embed figcaption a { color: var(--nxa-muted); }
.nx-embed .twitter-tweet { margin-inline: auto; }

/* Map */
.nx-map { height: 440px; border-radius: var(--nxa-radius); overflow: hidden; background: #e8edf2; }
.nx-map:not([data-map]) { display: none; }
/* Map tiles and markers are images: the article body's image padding would leave gaps between tiles. */
.bodyText .nx-map img { padding: 0; max-width: none; }
.nx-map .leaflet-popup-content h3 { font-size: 15px; margin: 0 0 4px; }
.nx-map .leaflet-popup-content p { margin: 0; }
@container nxa-body (max-width: 480px) { .nx-map { height: 320px; } }

/* ------------------------------------------------------------------ boxes */

/* Fact box: labels and values side by side; one under the other in a narrow column. */
.nx-factbox { background: var(--nxa-card); border: 1px solid var(--nxa-line); border-top: 4px solid var(--nxa-accent); border-radius: 0 0 var(--nxa-radius) var(--nxa-radius); padding: 18px 22px; }
.nx-factbox dl { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; margin: 0; font-size: 16px; line-height: 1.6; }
.nx-factbox dt, .nx-factbox dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--nxa-line); }
.nx-factbox dt:first-of-type, .nx-factbox dt:first-of-type + dd { border-top: 0; padding-top: 0; }
.nx-factbox dt { font-weight: 800; color: var(--nxa-ink); padding-inline-end: 24px; }
.nx-factbox dd { color: var(--nxa-ink-2); }
@container nxa-body (max-width: 480px) {
    .nx-factbox dl { grid-template-columns: 1fr; }
    .nx-factbox dd { border-top: 0; padding-top: 0; }
}

/* Table: scrolls sideways inside its box when it can't fit. */
.nx-table { background: var(--nxa-card); border: 1px solid var(--nxa-line); border-radius: var(--nxa-radius); padding: 18px 20px; overflow-x: auto; overflow-y: hidden; }
.nx-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.nx-table caption { caption-side: top; text-align: start; font-weight: 800; font-size: 20px; line-height: 1.4; padding: 0 0 12px; color: var(--nxa-ink); }
.nx-table th, .nx-table td { border-bottom: 1px solid var(--nxa-line); padding: 10px 12px; text-align: start; vertical-align: top; }
.nx-table th { background: var(--nxa-accent-soft); color: var(--nxa-ink); font-weight: 800; white-space: nowrap; }
.nx-table tbody tr:nth-child(even) td { background: #f8fafb; }
.nx-table tr:last-child td { border-bottom: 0; }
.bodyText .nx-table .nx-source { margin: 10px 0 0; font-size: 13px; font-style: normal; text-align: start; color: var(--nxa-muted); }
@container nxa-body (max-width: 480px) {
    .nx-table { padding: 14px; }
    .nx-table table { font-size: 14px; }
    .nx-table th, .nx-table td { padding: 8px; }
}

/* Read also */
.bodyText.bodyText.bodyText .nx-related a { display: grid; grid-template-columns: 132px 1fr; grid-template-areas: "img label" "img title"; align-content: center; gap: 4px 16px; padding: 14px; background: var(--nxa-card); border: 1px solid var(--nxa-line); border-inline-start: 4px solid var(--nxa-accent); border-radius: var(--nxa-radius); color: var(--nxa-ink); text-decoration: none; }
.bodyText.bodyText.bodyText .nx-related a:hover { opacity: 1; box-shadow: 0 2px 10px rgba(16,24,40,.08); }
.nx-related-label { grid-area: label; color: var(--nxa-accent-ink); font-size: 13px; font-weight: 800; line-height: 1.5; }
.nx-related img { grid-area: img; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.nx-related-title { grid-area: title; font-weight: 800; font-size: 17px; line-height: 1.55; }
.bodyText.bodyText.bodyText .nx-related a:not(:has(img)) { grid-template-columns: 1fr; grid-template-areas: "label" "title"; }
@container nxa-body (max-width: 420px) { .bodyText.bodyText.bodyText .nx-related a { grid-template-columns: 96px 1fr; gap: 2px 12px; } .nx-related-title { font-size: 16px; } }

/* Editor's note and update */
.nx-note { padding: 14px 18px; background: var(--nxa-card); border: 1px solid var(--nxa-line); border-inline-start: 4px solid var(--nxa-ink-2); border-radius: var(--nxa-radius); font-size: 16px; line-height: 1.6; color: var(--nxa-ink-2); }
.nx-note strong { color: var(--nxa-ink); margin-inline-end: 6px; }
.nx-note.nx-update { background: #fff8e8; border-color: #f3dfb0; border-inline-start-color: #e8a317; }
.nx-note time { font-weight: 700; direction: ltr; unicode-bidi: isolate; margin-inline-end: 6px; color: #9a6a00; }

/* Divider: a short centred rule */
.bodyText .nx-divider { width: 72px; height: 0; border: 0; border-top: 3px solid var(--nxa-accent); border-radius: 2px; margin: 40px auto; opacity: .8; }

/* ------------------------------------------------------------------ full-screen viewer (gallery photos and videos) */
.nx-viewer { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 64px 24px; }
.nx-viewer[hidden] { display: none; }
.nx-viewer-stage { width: 100%; max-width: 1100px; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.nx-viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.nx-viewer-stage .nx-viewer-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 100%; }
.nx-viewer-stage iframe, .nx-viewer-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.nx-viewer-caption { color: #fff; font-size: 15px; text-align: center; margin-top: 12px; min-height: 22px; max-width: 900px; }
.nx-viewer button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; line-height: 44px; cursor: pointer; padding: 0; }
.nx-viewer button:hover { background: rgba(255,255,255,.25); }
.nx-viewer button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.nx-viewer .nx-viewer-close { top: 10px; right: 12px; }
.nx-viewer .nx-viewer-prev { left: 12px; top: calc(50% - 22px); }
.nx-viewer .nx-viewer-next { right: 12px; top: calc(50% - 22px); }
.nx-viewer-count { position: absolute; top: 20px; left: 20px; color: #fff; opacity: .7; font-size: 13px; direction: ltr; }
@media (max-width: 767px) {
    .nx-viewer { padding: 56px 8px 16px; }
    .nx-viewer .nx-viewer-prev, .nx-viewer .nx-viewer-next { top: auto; bottom: 14px; }
}

/* ------------------------------------------------------------------ narrow column (phones, the editor's narrow view) */
@container nxa-body (max-width: 480px) {
    .bodyText { --nxa-space: 26px; }
    .bodyText.bodyText.bodyText .floatedText { font-size: 21px; }
    .bodyText.bodyText.bodyText .floatedQuote { padding-inline-start: 16px; }
    .bodyText.bodyText.bodyText .floatedQuote .title { font-size: 20px; }
    .bodyText.bodyText.bodyText .floatedNumber .number { font-size: 46px; }
    .bodyText.bodyText.bodyText .floatedList, .bodyText.bodyText.bodyText .floatedNumber, .bodyText.bodyText.bodyText .floatedOpinion .box,
    .bodyText.bodyText.bodyText .floatedAnalysis, .nx-factbox { padding: 16px; }
    .bodyText.bodyText.bodyText > h2 { font-size: 23px; }
    .bodyText.bodyText.bodyText > h3 { font-size: 20px; }
}

/* ------------------------------------------------------------------ block style options (ArticleBlockStyle.cs)
   Classes the editor's per-block options give a block's element. Doubled selectors outweigh the article body's own
   rules (.bodyText p…) without !important. */
.nx-align-center.nx-align-center { text-align: center; }
.nx-align-end.nx-align-end { text-align: end; }
.nx-align-justify.nx-align-justify { text-align: justify; }

.nx-above-0.nx-above-0 { margin-top: 0; }
.nx-above-s.nx-above-s { margin-top: 8px; }
.nx-above-l.nx-above-l { margin-top: 48px; }
.nx-below-0.nx-below-0 { margin-bottom: 0; }
.nx-below-s.nx-below-s { margin-bottom: 8px; }
.nx-below-l.nx-below-l { margin-bottom: 48px; }

.nx-tone-soft.nx-tone-soft { background: rgba(2, 132, 199, .07); padding: 16px 20px; border-radius: 8px; }
.nx-tone-accent.nx-tone-accent { background: rgba(2, 132, 199, .07); border-inline-start: 4px solid var(--nxa-accent, #07b9ff); padding: 16px 20px; border-radius: 8px; }
.nx-tone-outline.nx-tone-outline { border: 1px solid #b9dcea; padding: 16px 20px; border-radius: 8px; }
ul.nx-tone-soft, ol.nx-tone-soft, ul.nx-tone-accent, ol.nx-tone-accent, ul.nx-tone-outline, ol.nx-tone-outline { padding-inline-start: 44px; }

/* Narrow: centred at about 70% of the column (portrait photos, embeds); the whole column when it is narrow.
   Wide: a little wider than the column when there is room beside it. */
.nx-w-narrow.nx-w-narrow { width: 70%; margin-inline: auto; }
@container nxa-body (max-width: 560px) { .nx-w-narrow.nx-w-narrow { width: 100%; } }
@container nxa-body (min-width: 760px) {
    .nx-w-wide.nx-w-wide { width: calc(100% + 60px); max-width: none; margin-inline-start: -60px; }
}
