/*
 * CandleStan Editorial Foundation v0.56
 * Dedicated News / Article / Market Topic surfaces.
 */

body.candlestan-editorial-v056 {
    background:
        radial-gradient(circle at 84% 0%, rgba(33, 208, 190, .10), transparent 30%),
        radial-gradient(circle at 8% 18%, rgba(133, 113, 255, .08), transparent 26%),
        #f8fbfd;
}

.candlestan-editorial-v056 .primary-site-content {
    background: transparent;
}

.cs-editorial {
    direction: rtl;
    color: #092554;
    padding-bottom: 84px;
}

.cs-editorial * { box-sizing: border-box; }
.cs-editorial a { text-decoration: none; }

.cs-editorial-shell {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

.cs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 28px 0 8px;
    color: #73819a;
    font-size: 13px;
}

.cs-breadcrumb a { color: #61718f; transition: color .2s ease; }
.cs-breadcrumb a:hover { color: #09a99b; }

.cs-story {
    max-width: 940px;
    margin: 0 auto;
}

.cs-story-hero {
    text-align: center;
    padding: 48px 36px 34px;
}

.cs-story-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.cs-story-tags span,
.cs-story-type,
.cs-story-topic,
.cs-story-priority {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 4px 11px;
    border: 1px solid #d8e4ea;
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: #526581;
    font-size: 12px;
    font-weight: 700;
}

.cs-story-type {
    color: #008d84 !important;
    background: #effcf9 !important;
    border-color: #c7eee8 !important;
}

.cs-story-priority {
    color: #b62b50 !important;
    border-color: #ffd5df !important;
    background: #fff3f6 !important;
}

.cs-story-priority--breaking {
    color: #fff !important;
    border-color: #c52547 !important;
    background: #c52547 !important;
}

.cs-story-hero h1 {
    margin: 0 auto;
    max-width: 900px;
    color: #06265b;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.45;
    letter-spacing: -.035em;
    font-weight: 900;
}

.cs-story-deck {
    max-width: 780px;
    margin: 22px auto 0;
    color: #5e6f8c;
    font-size: 17px;
    line-height: 2;
}

.cs-story-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 24px;
    color: #7a879d;
    font-size: 13px;
}

.cs-story-cover {
    overflow: hidden;
    margin: 6px 0 34px;
    border: 1px solid #dce6ec;
    border-radius: 28px;
    box-shadow: 0 22px 55px rgba(9, 40, 77, .10);
    background: #eef5f8;
}

.cs-story-cover img {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: cover;
}

.cs-story-layout {
    width: min(820px, 100%);
    margin-inline: auto;
}

.cs-story-summary {
    margin: 0 0 30px;
    padding: 22px 24px;
    border: 1px solid #d8e7ea;
    border-right: 4px solid #14bfae;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(238,252,249,.94), rgba(255,255,255,.96));
}

.cs-story-summary > span {
    display: block;
    margin-bottom: 8px;
    color: #00958a;
    font-size: 12px;
    font-weight: 900;
}

.cs-story-summary p {
    margin: 0;
    color: #334b6c;
    font-size: 15px;
    line-height: 2;
}

.cs-story-content {
    color: #243b5d;
    font-size: 17px;
    line-height: 2.25;
}

.cs-story-content > * { max-width: 100%; }
.cs-story-content p { margin: 0 0 1.45em; }
.cs-story-content h2,
.cs-story-content h3,
.cs-story-content h4 {
    color: #082e63;
    line-height: 1.65;
    margin-top: 2em;
    margin-bottom: .8em;
    font-weight: 900;
}
.cs-story-content h2 { font-size: 28px; }
.cs-story-content h3 { font-size: 22px; }
.cs-story-content a { color: #008e86; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.cs-story-content img { max-width: 100%; height: auto; border-radius: 18px; }
.cs-story-content blockquote {
    margin: 28px 0;
    padding: 18px 22px;
    border-right: 4px solid #0ab7aa;
    background: #f0faf9;
    border-radius: 16px;
}

.cs-source-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    margin-top: 44px;
    padding: 24px 26px;
    border: 1px solid rgba(35, 202, 185, .20);
    border-radius: 22px;
    background: linear-gradient(135deg, #092f66, #0b647c);
    color: #fff;
}

.cs-source-eyebrow,
.cs-kicker,
.cs-section-head > div > span,
.cs-editorial-card__eyebrow {
    display: block;
    color: #0ab8aa;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
}

.cs-source-card h2 { margin: 4px 0 5px; color: #fff; font-size: 22px; }
.cs-source-card p { margin: 0; color: rgba(255,255,255,.76); }
.cs-source-card p strong { color: #fff; margin-left: 8px; }
.cs-source-card a {
    flex: 0 0 auto;
    padding: 11px 16px;
    border-radius: 12px;
    background: #fff;
    color: #07305f;
    font-weight: 900;
}

.cs-related,
.cs-archive-list {
    margin-top: 72px;
}

.cs-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}
.cs-section-head h2 { margin: 4px 0 0; color: #082e63; font-size: 30px; }
.cs-section-head > a { color: #008f85; font-weight: 800; }

.cs-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cs-card-grid--articles { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cs-editorial-card {
    overflow: hidden;
    border: 1px solid #dce7ed;
    border-radius: 22px;
    background: rgba(255,255,255,.93);
    box-shadow: 0 13px 34px rgba(20, 46, 76, .07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cs-editorial-card:hover {
    transform: translateY(-3px);
    border-color: #c6e6e2;
    box-shadow: 0 18px 40px rgba(20, 46, 76, .10);
}

.cs-editorial-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #edf5f8;
}
.cs-editorial-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cs-editorial-card:hover .cs-editorial-card__media img { transform: scale(1.025); }

.cs-media-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #c1cdd8;
    background:
        radial-gradient(circle at 16% 20%, rgba(25,202,187,.12), transparent 24%),
        linear-gradient(135deg, #f2f8fa, #edf2fa);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .14em;
}

.cs-editorial-card__body { padding: 20px 20px 22px; }
.cs-editorial-card__body h2,
.cs-editorial-card__body h3 { margin: 7px 0 9px; color: #092d61; font-size: 19px; line-height: 1.7; }
.cs-editorial-card__body h2 a,
.cs-editorial-card__body h3 a { color: inherit; }
.cs-editorial-card__body p { margin: 0; color: #65758f; font-size: 13px; line-height: 1.9; }

.cs-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    color: #8a96a8;
    font-size: 12px;
}
.cs-card-meta a { color: #008f85; font-weight: 800; }

.cs-archive-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 64px;
    background:
        radial-gradient(circle at 78% 16%, rgba(23, 202, 184, .18), transparent 30%),
        linear-gradient(180deg, rgba(235,251,250,.95), rgba(248,251,253,0));
}

.cs-archive-hero--articles {
    background:
        radial-gradient(circle at 16% 10%, rgba(125, 105, 255, .13), transparent 28%),
        linear-gradient(180deg, rgba(243,245,255,.86), rgba(248,251,253,0));
}

.cs-archive-hero__inner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 34px;
}

.cs-archive-hero h1 { margin: 6px 0 12px; color: #06285d; font-size: clamp(42px, 6vw, 66px); line-height: 1.25; }
.cs-archive-hero p,
.cs-topic-description { max-width: 720px; margin: 0; color: #60718c; font-size: 16px; line-height: 2; }
.cs-archive-hero__home { flex: 0 0 auto; color: #008e84; font-weight: 900; }

.cs-topic-pills {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin: 18px 0 34px;
}
.cs-topic-pills a {
    padding: 8px 13px;
    border: 1px solid #dbe6ec;
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    color: #5d6d86;
    font-size: 12px;
    font-weight: 800;
}
.cs-topic-pills a:hover,
.cs-topic-pills a.is-active { border-color: #bce8e3; background: #ebfaf8; color: #008e84; }

.cs-featured-story {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid #d8e6eb;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(20, 46, 76, .08);
}

.cs-featured-story__media { min-height: 100%; background: #edf5f8; }
.cs-featured-story__media img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; display: block; }
.cs-featured-story__body { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.cs-featured-story__body h2 { margin: 8px 0 13px; font-size: clamp(28px, 3vw, 38px); line-height: 1.55; }
.cs-featured-story__body h2 a { color: #082d60; }
.cs-featured-story__body > p { margin: 0; color: #60718c; font-size: 15px; line-height: 2; }

.cs-archive-list--first { margin-top: 24px; }

.cs-empty-state {
    margin: 36px 0 0;
    padding: 64px 30px;
    text-align: center;
    border: 1px dashed #cadbe3;
    border-radius: 26px;
    background: rgba(255,255,255,.70);
}
.cs-empty-state > span { color: #0a9f94; font-weight: 900; letter-spacing: .12em; }
.cs-empty-state h2 { margin: 8px 0 8px; color: #0a2d60; }
.cs-empty-state p { margin: 0; color: #75839a; }

.cs-pagination { margin-top: 42px; }
.cs-pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.cs-pagination .page-numbers { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #dbe5eb; border-radius: 10px; background: #fff; color: #53647e; }
.cs-pagination .current { background: #0a3d78; color: #fff; border-color: #0a3d78; }

@media (max-width: 980px) {
    .cs-card-grid,
    .cs-card-grid--articles { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cs-featured-story { grid-template-columns: 1fr; }
    .cs-featured-story__media { aspect-ratio: 16 / 8.5; }
    .cs-featured-story__media img { min-height: 0; }
}

@media (max-width: 720px) {
    .cs-editorial { padding-bottom: 58px; }
    .cs-editorial-shell { width: min(100% - 28px, 1180px); }
    .cs-story-hero { padding: 34px 4px 26px; }
    .cs-story-hero h1 { font-size: 31px; }
    .cs-story-deck { font-size: 15px; }
    .cs-story-meta { gap: 7px; }
    .cs-story-cover { border-radius: 20px; margin-bottom: 24px; }
    .cs-story-content { font-size: 16px; line-height: 2.15; }
    .cs-source-card { align-items: stretch; flex-direction: column; }
    .cs-source-card a { text-align: center; }
    .cs-card-grid,
    .cs-card-grid--articles { grid-template-columns: 1fr; }
    .cs-related,
    .cs-archive-list { margin-top: 50px; }
    .cs-section-head { align-items: start; flex-direction: column; }
    .cs-archive-hero { padding: 48px 0 40px; }
    .cs-archive-hero__inner { align-items: start; flex-direction: column; }
    .cs-archive-hero h1 { font-size: 40px; }
    .cs-featured-story__body { padding: 26px 22px; }
    .cs-featured-story__body h2 { font-size: 26px; }
}

/* =========================================================
   CandleStan v0.56.2 — Persian Editorial Justification Polish
   Justify multi-line editorial prose/excerpts while keeping
   headings, metadata, breadcrumbs and actions naturally aligned.
   ========================================================= */
.cs-story-deck,
.cs-story-summary p,
.cs-story-content p,
.cs-story-content li,
.cs-story-content blockquote,
.cs-source-card p,
.cs-archive-hero p,
.cs-topic-description,
.cs-featured-story__body > p,
.cs-editorial-card__body p,
.cs-empty-state p {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: justify;
    text-align-last: right;
    text-justify: inter-word;
    letter-spacing: 0;
    word-spacing: normal;
}

/* Preserve readable list indentation while justifying list copy. */
.cs-story-content ul,
.cs-story-content ol {
    text-align: initial;
}

/* Tiny screens can create exaggerated rivers in very narrow columns.
   Editorial body remains justified; compact card excerpts fall back
   to natural RTL alignment when the usable width becomes too small. */
@media (max-width: 420px) {
    .cs-editorial-card__body p {
        text-align: right;
        text-align-last: auto;
    }
}

/* ==========================================================
 * CandleStan v0.82.3 — Full-bleed Editorial surfaces
 * News and Education/Articles keep the CandleStan fade edge-to-edge.
 * ========================================================== */
body.candlestan-editorial-v056{
    overflow-x:hidden;
    background:
        radial-gradient(circle at 9% 15%, rgba(133,113,255,.08), transparent 25%),
        radial-gradient(circle at 90% 5%, rgba(33,208,190,.10), transparent 24%),
        linear-gradient(180deg,#f9fcfe 0%,#f2faf9 42%,#f8fbfd 74%,#fff 100%);
}
body.candlestan-editorial-v056 .site,
body.candlestan-editorial-v056 .primary-site-content,
body.candlestan-editorial-v056 #primary-content{
    width:100%;
    max-width:none;
    margin:0;
    padding:0;
    background:transparent;
}
body.candlestan-editorial-v056 .cs-editorial{
    width:100vw;
    max-width:100vw;
    min-height:100vh;
    margin-inline:calc(50% - 50vw);
    background:
        radial-gradient(circle at 10% 12%, rgba(133,113,255,.05), transparent 24%),
        radial-gradient(circle at 87% 8%, rgba(33,208,190,.07), transparent 24%),
        linear-gradient(180deg,rgba(249,252,254,.97) 0%,rgba(244,250,249,.96) 36%,rgba(249,252,253,.98) 72%,#fff 100%);
}
@media(max-width:680px){
    body.candlestan-editorial-v056 .cs-editorial{
        width:100%;
        max-width:none;
        margin-inline:0;
    }
}

/* ==========================================================
 * CandleStan v0.82.4 — Mobile Market Topic final polish
 * Mobile-only: compact topic hero, contextual copy and aligned
 * home action. Desktop remains visually unchanged.
 * ========================================================== */
.cs-topic-description--mobile,
.cs-archive-hero__home--mobile {
    display: none;
}

@media (max-width: 720px) {
    .cs-archive-hero--topic {
        padding: 36px 0 24px;
    }

    .cs-archive-hero--topic .cs-archive-hero__inner {
        display: block;
    }

    .cs-archive-hero--topic .cs-archive-hero__home--desktop,
    .cs-archive-hero--topic .cs-topic-description--desktop {
        display: none;
    }

    .cs-archive-hero--topic .cs-topic-description--mobile,
    .cs-archive-hero--topic .cs-archive-hero__home--mobile {
        display: block;
    }

    .cs-archive-hero--topic .cs-topic-hero__summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 12px;
        margin-top: 2px;
    }

    .cs-archive-hero--topic .cs-topic-description--mobile {
        max-width: none;
        margin: 0;
        color: #60718c;
        font-size: 14px;
        line-height: 1.9;
        text-align: right;
        text-align-last: auto;
    }

    .cs-archive-hero--topic .cs-archive-hero__home--mobile {
        align-self: end;
        margin-bottom: 2px;
        white-space: nowrap;
        font-size: 13px;
        line-height: 1.8;
    }

    .cs-editorial--topic .cs-archive-list--first {
        margin-top: 14px;
    }
}

@media (max-width: 420px) {
    .cs-archive-hero--topic {
        padding: 32px 0 20px;
    }

    .cs-archive-hero--topic .cs-archive-hero h1,
    .cs-archive-hero--topic h1 {
        font-size: 38px;
    }

    .cs-archive-hero--topic .cs-topic-hero__summary {
        gap: 9px;
    }

    .cs-archive-hero--topic .cs-topic-description--mobile {
        font-size: 13.5px;
        line-height: 1.85;
    }

    .cs-archive-hero--topic .cs-archive-hero__home--mobile {
        font-size: 12.5px;
    }
}


/* ==========================================================
 * CandleStan v0.82.5 — Mobile Editorial Hero balance
 * Mobile-only: justify Market Topic intro and compact the News /
 * Education archive heroes without touching locked desktop UI.
 * ========================================================== */
@media (max-width: 720px) {
    .cs-archive-hero--topic .cs-topic-description--mobile {
        text-align: justify;
        text-align-last: right;
        text-justify: inter-word;
    }

    .cs-archive-hero--news,
    .cs-archive-hero--articles {
        padding: 36px 0 24px;
    }

    .cs-archive-hero--news .cs-archive-hero__inner,
    .cs-archive-hero--articles .cs-archive-hero__inner {
        display: block;
    }

    .cs-archive-hero--news .cs-archive-hero__home--desktop,
    .cs-archive-hero--articles .cs-archive-hero__home--desktop {
        display: none;
    }

    .cs-archive-hero--news .cs-archive-hero__home--mobile,
    .cs-archive-hero--articles .cs-archive-hero__home--mobile {
        display: block;
    }

    .cs-archive-hero--news .cs-archive-hero__summary,
    .cs-archive-hero--articles .cs-archive-hero__summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 12px;
        margin-top: 2px;
    }

    .cs-archive-hero--news .cs-archive-hero__summary > p,
    .cs-archive-hero--articles .cs-archive-hero__summary > p {
        max-width: none;
        margin: 0;
        font-size: 14px;
        line-height: 1.9;
    }

    .cs-archive-hero--news .cs-archive-hero__home--mobile,
    .cs-archive-hero--articles .cs-archive-hero__home--mobile {
        align-self: end;
        margin-bottom: 2px;
        white-space: nowrap;
        font-size: 13px;
        line-height: 1.8;
    }

    .cs-archive-hero--news + .cs-editorial-shell .cs-topic-pills,
    .cs-archive-hero--articles + .cs-editorial-shell .cs-topic-pills {
        margin-top: 14px;
    }
}

@media (max-width: 420px) {
    .cs-archive-hero--news,
    .cs-archive-hero--articles {
        padding: 32px 0 20px;
    }

    .cs-archive-hero--news h1,
    .cs-archive-hero--articles h1 {
        font-size: 38px;
    }

    .cs-archive-hero--news .cs-archive-hero__summary,
    .cs-archive-hero--articles .cs-archive-hero__summary {
        gap: 9px;
    }

    .cs-archive-hero--news .cs-archive-hero__summary > p,
    .cs-archive-hero--articles .cs-archive-hero__summary > p {
        font-size: 13.5px;
        line-height: 1.85;
    }

    .cs-archive-hero--news .cs-archive-hero__home--mobile,
    .cs-archive-hero--articles .cs-archive-hero__home--mobile {
        font-size: 12.5px;
    }
}
