/* Soft reading surface, scoped to CandleStan's editorial templates. */
.cses-reading .cspl-editorial {
  background: radial-gradient(circle at 90% 1%, rgba(18,170,164,.065), transparent 34%),
              linear-gradient(180deg, #f7fbfc 0%, #fbfdfd 480px, #f8fbfc 100%);
}
.cses-reading .cspl-editorial .cs-story-main {
  box-sizing: border-box;
  padding: clamp(20px, 3vw, 33px);
  border: 1px solid #e5eff1;
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 44px rgba(19,61,79,.045);
}
.cses-reading .cspl-editorial .cs-story-content { color: #253b4d; }
.cses-reading .cspl-editorial .cs-story-content > p { margin: 0 0 1.42em; }
.cses-reading .cspl-editorial .cs-story-content h2 { color: #123955; }
.cses-reading .cspl-editorial .cs-story-priority { display: inline-flex; width: auto; max-width: max-content; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.cspl-editorial .cs-story-content .cses-lead { font-size: 1.08em; color: #173e57; font-weight: 500; }
.cspl-editorial .cs-story-content .cses-note,
.cspl-editorial .cs-story-content .cses-warning { margin: 24px 0; padding: 16px 20px; border-radius: 13px; line-height: 2; }
.cspl-editorial .cs-story-content .cses-note { border-right: 4px solid #12a49d; background: #effaf8; }
.cspl-editorial .cs-story-content .cses-warning { border-right: 4px solid #d7a249; background: #fff9ec; }

.cspl-editorial .cses-faq {
  margin: 36px 0 22px;
  padding: clamp(17px,3vw,26px);
  border: 1px solid #cfe7e6;
  border-radius: 18px;
  background: linear-gradient(140deg, #f4fbfa, #fff 58%);
  box-shadow: 0 12px 30px rgba(16,86,94,.065);
  direction: rtl;
}
.cspl-editorial .cses-faq__head { margin-bottom: 14px; }
.cspl-editorial .cses-faq__head span { display: block; color: #11928d; font: 700 10px Arial,sans-serif; letter-spacing: .12em; }
.cspl-editorial .cses-faq__head h2 { margin: 2px 0 0; color: #153d59; font-size: 22px; }
.cspl-editorial .cses-faq details { padding: 0 15px; border: 1px solid #e1eceb; border-radius: 10px; background: #fff; }
.cspl-editorial .cses-faq details + details { margin-top: 9px; }
.cspl-editorial .cses-faq summary { position: relative; padding: 14px 0 14px 28px; list-style: none; cursor: pointer; color: #173b57; font-size: 15px; font-weight: 700; line-height: 1.8; }
.cspl-editorial .cses-faq summary::-webkit-details-marker { display: none; }
.cspl-editorial .cses-faq summary::after { content: '+'; position: absolute; left: 0; top: 13px; color: #0a938c; font-size: 20px; font-weight: 400; }
.cspl-editorial .cses-faq details[open] summary::after { content: '−'; }
.cspl-editorial .cses-faq__answer { border-top: 1px solid #eaf0ef; padding: 8px 0 12px; color: #465c69; font-size: 14px; line-height: 2; }
.cspl-editorial .cses-faq__answer p { margin: 0 0 7px; }
.cspl-editorial .cses-faq summary:focus-visible { outline: 2px solid #0a938c; outline-offset: 3px; }
.cspl-editorial .cses-source-card { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cspl-editorial .cses-source-card a { display: inline-flex; flex: 0 0 auto; width: auto; max-width: 100%; padding: 9px 14px; border-radius: 9px; font-size: 12px; line-height: 1.6; }
@media (max-width: 760px) {
  .cses-reading .cspl-editorial .cs-story-main { padding: 19px 17px; border-radius: 14px; }
  .cspl-editorial .cses-source-card a { flex: none; }
}

/* Article and news details, scoped to the editorial layout. */
.cspl-editorial .cs-story-hero { padding-bottom:17px; }
.cspl-editorial .cs-story-meta { flex-wrap:wrap; gap:7px; color:#627c8c; font-size:12px; }
.cspl-editorial .cspl-share { margin-top:17px; padding:9px 11px; width:max-content; max-width:100%; border:1px solid #dfecee; border-radius:12px; background:#f7fbfb; gap:7px; }
.cspl-editorial .cspl-share > span { color:#557486; font-size:12px; font-weight:700; margin-left:5px; }
.cspl-editorial .cspl-share a, .cspl-editorial .cspl-share button { gap:6px; min-height:37px; padding:6px 12px; border-radius:9px; box-shadow:0 2px 5px rgba(19,61,79,.04); }
.cspl-editorial .cspl-share svg { flex:none; }
.cspl-editorial .cspl-share .cses-share-telegram { color:#1787ac; }
.cspl-editorial .cspl-share .cses-share-whatsapp { color:#188662; }
.cspl-editorial .cspl-share .cses-share-copy { color:#255273; }
.cspl-editorial .cs-story-cover { padding:9px; border:1px solid #dcebee; border-radius:19px; background:#f5fafb; box-shadow:0 15px 35px rgba(19,61,79,.09); }
.cspl-editorial .cs-story-cover img { height:auto; max-height:520px; aspect-ratio:auto; object-fit:contain; border-radius:11px; }
.cspl-editorial .cs-story-content :is(.wp-block-image, figure, .wp-caption) { margin:27px auto; border-radius:13px; overflow:hidden; max-width:100%; }
.cspl-editorial .cs-story-content :is(.wp-block-image, figure, .wp-caption) img { display:block; max-height:680px; width:auto; max-width:100%; margin:auto; object-fit:contain; border-radius:12px; }
.cspl-editorial .cs-story-content :is(figcaption, .wp-caption-text) { padding:8px 12px; color:#6a7e89; font-size:12px; text-align:center; line-height:1.8; }
.cspl-editorial .cs-story-content img:not(figure img):not(.wp-caption img) { max-width:100%; border-radius:12px; }
.cspl-editorial .cs-story-content .cses-note, .cspl-editorial .cs-story-content .cses-warning { position:relative; padding-right:55px; border:1px solid #d7eae8; }
.cspl-editorial .cs-story-content .cses-note:before, .cspl-editorial .cs-story-content .cses-warning:before { position:absolute; right:17px; top:15px; font-size:20px; line-height:1.4; }
.cspl-editorial .cs-story-content .cses-note:before { content:'💡'; }
.cspl-editorial .cs-story-content .cses-warning:before { content:'⚠️'; }
.cspl-editorial .cses-source-card { margin:25px 0 0; padding:17px 20px; border:1px solid #eadfce; border-right:4px solid #cb9761; border-radius:12px; background:#fdfaf5; box-shadow:none; }
.cspl-editorial .cses-source-card .cs-source-eyebrow { color:#b07538; }
.cspl-editorial .cses-source-card h2 { font-size:16px; margin:2px 0 4px; }
.cspl-editorial .cses-source-card a { color:#82572d; background:#fff; border:1px solid #e7d5be; }
.cspl-editorial .cspl-author { margin-top:25px; background:#f9fcfc; border-color:#d9e9ea; box-shadow:0 5px 18px rgba(19,61,79,.045); }
.cspl-editorial .cspl-sidebar .cspl-panel { padding:16px; border-radius:13px; box-shadow:0 5px 17px rgba(19,61,79,.045); }
.cspl-editorial .cspl-sidebar .cspl-panel h2 { font-size:15px; margin-bottom:8px; }
.cspl-editorial .cspl-sidebar .cspl-recent li a { padding:8px 0; }
.cspl-editorial .cspl-sidebar .cspl-tools-card { padding:16px 18px; border-radius:13px; }
.cspl-editorial .cspl-sidebar .cspl-tools-card__art { max-height:94px; margin-bottom:7px; }
.cspl-editorial .cspl-sidebar .cspl-tools-card h2 { font-size:16px; margin:5px 0; }
.cspl-editorial .cspl-sidebar .cspl-tools-card p { margin-bottom:10px; }
.cspl-editorial .cspl-more { margin-top:36px; }
.cspl-editorial .cspl-more .cs-card-grid { gap:12px; }
.cspl-editorial .cspl-more .cspl-more-card { border-radius:12px; }
.cspl-editorial .cspl-more .cspl-more-card__media { aspect-ratio:2.25/1; }
.cspl-editorial .cspl-more .cs-editorial-card__body { padding:10px 13px 13px; }
.cspl-editorial .cspl-more .cs-editorial-card__body h3 { font-size:14px; line-height:1.7; margin:5px 0 0; }
.cspl-editorial .cspl-more .cs-section-head { margin-bottom:14px; }
.cspl-editorial .cspl-more .cs-section-head h2 { font-size:21px; }
@media(max-width:760px) { .cspl-editorial .cspl-share { width:100%; } .cspl-editorial .cspl-share a, .cspl-editorial .cspl-share button { padding:5px 9px; } .cspl-editorial .cs-story-cover { padding:5px; } }
.cspl-editorial .cs-story-content .candlestan-callout { padding:16px 20px; border:1px solid #d9eae8; border-right:4px solid #15a59a; border-radius:12px; background:#f1faf8; }
.cspl-editorial .cs-story-content .candlestan-callout.candlestan-warning { border-color:#eddec3; border-right-color:#dfaa4c; background:#fff9eb; }

/* v1.2: eliminate template's old market bar before paint. */
.cspl-editorial .cspl-market-links { display:none!important; }
.cspl-editorial .cs-story-content > figure, .cspl-editorial .cs-story-content > .wp-caption { margin-bottom:14px; }
.cspl-editorial .cs-story-content :is(figure figcaption,.wp-caption-text) { padding:5px 8px; margin:0; }
.cspl-editorial .cs-story-content > figure + h2, .cspl-editorial .cs-story-content > figure + h3,
.cspl-editorial .cs-story-content > .wp-caption + h2, .cspl-editorial .cs-story-content > .wp-caption + h3 { margin-top:19px; }
.cspl-editorial .cspl-tools-card__art { display:block; height:auto!important; max-height:137px!important; width:min(100%,240px)!important; object-fit:contain; margin:0 auto 10px!important; }
.cspl-editorial .cses-credits { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:stretch; gap:12px; margin:20px 0 0; }
.cspl-editorial .cses-credits .cspl-author { margin:0; padding:12px 14px; min-width:0; }
.cspl-editorial .cses-credits .cses-source-card { box-sizing:border-box; min-width:0; margin:0; padding:11px 13px; border:1px solid #e8ddcf; border-right:3px solid #c79f75; background:#fbf9f6; border-radius:12px; box-shadow:none; display:flex; justify-content:space-between; gap:6px; flex-wrap:wrap; }
.cspl-editorial .cses-credits .cses-source-card h2 { font-size:13px; color:#554c48; margin:1px 0; }
.cspl-editorial .cses-credits .cses-source-card p { margin:2px 0; color:#514c49; font-size:11px; }
.cspl-editorial .cses-credits .cses-source-card strong { color:#514c49; }
.cspl-editorial .cses-credits .cses-source-card a { margin:0; padding:5px 9px; align-self:center; font-size:11px; white-space:normal; }
.cspl-editorial .cs-story-hero .cs-story-meta { display:inline-flex; vertical-align:middle; padding:9px 12px; border:1px solid #deebee; border-radius:10px; background:#f8fcfc; margin-top:14px; }
.cspl-editorial .cses-faq { background:linear-gradient(140deg,#ecf9f7,#ffffff 70%); border-color:#abd8d2; box-shadow:0 8px 24px rgba(16,86,94,.075); }
.cspl-editorial .cses-faq details { border-color:#cce4e1; box-shadow:0 2px 6px rgba(16,86,94,.035); transition:none!important; animation:none!important; }
.cspl-editorial .cses-faq details[open] { border-color:#95ccc4; background:#fafffe; }
.cspl-editorial .cses-faq summary, .cspl-editorial .cses-faq__answer { transition:none!important; animation:none!important; }
.cspl-editorial .cses-faq summary::after { display:grid; place-items:center; width:23px; height:23px; top:15px; border-radius:50%; background:#e5f7f4; font-size:17px; }
/* Avoid repaint-heavy sticky nested scrolling on long articles. */
.cspl-editorial { background:#f8fbfc!important; }
.cspl-editorial .cspl-sidebar__follow { position:static!important; top:auto!important; max-height:none!important; overflow:visible!important; }
.cspl-editorial .cs-story-main { box-shadow:0 5px 20px rgba(19,61,79,.035)!important; }
@media(max-width:760px) { .cspl-editorial .cses-credits { grid-template-columns:1fr; } .cspl-editorial .cs-story-hero .cs-story-meta { display:flex; } }
.cspl-editorial .cses-hero-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:9px 16px; margin-top:14px; padding:9px 12px; border:1px solid #dce9ed; border-radius:13px; background:linear-gradient(110deg,#f8fbfc,#f2faf9); }
.cspl-editorial .cses-hero-actions .cs-story-meta { margin:0; padding:0; border:0; background:transparent; }
.cspl-editorial .cses-hero-actions .cspl-share { margin:0; padding:0; border:0; background:transparent; }
.cspl-editorial .cses-hero-actions .cspl-share > span { display:none; }
.cspl-editorial .cs-story-content p:has(> img) { margin-bottom:12px; }
.cspl-editorial .cs-story-content p:has(> img) + h2 { margin-top:16px; }
@media(max-width:760px) { .cspl-editorial .cses-hero-actions { align-items:stretch; } .cspl-editorial .cses-hero-actions .cspl-share { width:auto; max-width:100%; } }

/* v1.3 reading rhythm: consistent heading spacing after every paragraph or image. */
.cspl-editorial .cs-story-content > p { margin:0 0 .85em!important; }
.cspl-editorial .cs-story-content > :is(h2,h3,h4) { margin:18px 0 11px!important; }
.cspl-editorial .cs-story-content > :is(p,figure,.wp-caption,ul,ol,blockquote) + :is(h2,h3,h4) { margin-top:19px!important; }
.cspl-editorial .cs-story-content > :is(h2,h3,h4) + :is(h2,h3,h4) { margin-top:14px!important; }
/* Restore the three sidebar blocks as one sticky stack on wide screens. */
@media(min-width:1021px) {
  .cspl-editorial .cspl-sidebar__follow { position:sticky!important; top:18px!important; max-height:calc(100vh - 36px)!important; max-height:calc(100dvh - 36px)!important; overflow-y:auto!important; scrollbar-width:thin; }
  body.admin-bar .cspl-editorial .cspl-sidebar__follow { top:50px!important; max-height:calc(100vh - 68px)!important; max-height:calc(100dvh - 68px)!important; }
}

/* Safe fallback: visually balanced right alignment, with no stretched words. */
.cspl-editorial .cs-story-hero h1 {
  box-sizing:border-box; width:100%!important; max-width:800px;
  margin-inline:auto!important; font-size:clamp(30px,3.36vw,46px)!important;
  font-weight:800!important;
  line-height:1.5!important; letter-spacing:normal!important;
  text-align:right!important; text-align-last:right!important;
  text-wrap:balance; word-break:normal; overflow-wrap:normal;
}
/* Only titles with measured, naturally close-fitting lines receive justification. */
.cspl-editorial .cs-story-hero h1.cses-headline-justified {
  text-align:justify!important; text-align-last:right!important; text-wrap:wrap;
}
@media(max-width:640px) {
  .cspl-editorial .cs-story-hero h1 {
    font-size:clamp(24px,6.4vw,29px)!important; line-height:1.5!important;
    text-align:right!important; text-align-last:right!important;
  }
}

/* Compact callouts, including older posts with a quote nested inside an aside. */
.cspl-editorial .cs-story-content :is(.cses-note,.cses-warning) {
  box-sizing:border-box; min-height:0!important; margin:16px 0!important;
  padding:10px 43px 10px 13px!important; border-radius:10px; line-height:1.85;
}
.cspl-editorial .cs-story-content .cses-note { border-color:#d4e9e6; border-right:3px solid #12a49d; background:#f4faf9; }
.cspl-editorial .cs-story-content .cses-warning { border-color:#eedfc6; border-right:3px solid #d7a249; background:#fffaf0; }
.cspl-editorial .cs-story-content :is(.cses-note,.cses-warning)::before { right:11px; top:10px; font-size:16px; line-height:1.6; }
.cspl-editorial .cs-story-content :is(.cses-note,.cses-warning) :is(p,blockquote) {
  min-height:0!important; margin:0!important; padding:0!important;
  border:0!important; background:none!important; box-shadow:none!important;
  font:inherit; color:inherit;
}
.cspl-editorial .cs-story-content :is(.cses-note,.cses-warning) blockquote::before,
.cspl-editorial .cs-story-content :is(.cses-note,.cses-warning) blockquote::after { content:none!important; display:none!important; }

/* An example remains quiet and distinct from an insight or a warning. */
.cspl-editorial .cs-story-content .cses-example {
  position:relative; box-sizing:border-box; min-height:0!important; margin:16px 0!important;
  padding:10px 43px 10px 13px!important; border:1px solid #d3e4ec;
  border-right:3px solid #518ba5; border-radius:10px; background:#f3f8fb; line-height:1.85;
}
.cspl-editorial .cs-story-content .cses-example::before {
  content:'🧩'; position:absolute; right:11px; top:10px; font-size:16px; line-height:1.6;
}
.cspl-editorial .cs-story-content .cses-example :is(p,blockquote) {
  min-height:0!important; margin:0!important; padding:0!important; border:0!important;
  background:none!important; box-shadow:none!important; font:inherit; color:inherit;
}
.cspl-editorial .cs-story-content .cses-example blockquote::before,
.cspl-editorial .cs-story-content .cses-example blockquote::after { content:none!important; display:none!important; }

/* Mobile reading: balanced headings, justified callouts and compact tables. */
@media(max-width:760px) {
  .cspl-editorial .cs-story-content :is(h2,h3) {
    text-align:right!important; text-align-last:right!important;
    text-wrap:balance; word-break:normal; overflow-wrap:normal;
    letter-spacing:normal!important;
  }
  .cspl-editorial .cs-story-content h2 { font-size:clamp(23px,6vw,29px)!important; line-height:1.65!important; }
  .cspl-editorial .cs-story-content h3 { font-size:clamp(20px,5.2vw,25px)!important; line-height:1.7!important; }
  .cspl-editorial .cs-story-content :is(.cses-note,.cses-warning,.cses-example,.candlestan-callout),
  .cspl-editorial .cs-story-content :is(.cses-note,.cses-warning,.cses-example,.candlestan-callout) :is(p,blockquote) {
    text-align:justify!important; text-align-last:right!important;
  }
  .cspl-editorial .cs-story-content .cspl-table-scroll.cses-table-fit { overflow-x:hidden; }
  .cspl-editorial .cs-story-content .cspl-table-scroll.cses-table-fit > table {
    width:100%!important; min-width:0!important; max-width:100%!important;
    table-layout:fixed; font-size:clamp(11px,3.4vw,13px)!important;
  }
  .cspl-editorial .cs-story-content .cspl-table-scroll.cses-table-fit :is(th,td) {
    box-sizing:border-box; min-width:0; padding:9px 6px!important;
    white-space:normal!important; overflow-wrap:break-word;
    line-height:1.8;
  }
  .cspl-editorial .cses-credits .cses-source-card {
    display:flex; flex-direction:column; align-items:stretch;
    justify-content:center; gap:7px; text-align:right!important;
  }
  .cspl-editorial .cses-credits .cses-source-card > div,
  .cspl-editorial .cses-credits .cses-source-card :is(h2,p,.cs-source-eyebrow) {
    width:100%; text-align:right!important;
  }
  .cspl-editorial .cses-credits .cses-source-card a {
    align-self:flex-start; margin:3px 0 0; text-align:center;
  }
}

/* Article source: two compact groups in RTL order, aligned to the card centre. */
.cspl-editorial .cses-credits .cses-source-card:has(.cses-source-card__heading) {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);
  align-items:center; gap:12px; direction:rtl; text-align:right;
}
.cspl-editorial .cses-credits .cses-source-card__heading,
.cspl-editorial .cses-credits .cses-source-card__details { min-width:0; }
.cspl-editorial .cses-credits .cses-source-card__details {
  display:flex; flex-direction:column; align-items:center; justify-self:start;
  width:max-content; max-width:100%; gap:7px;
}
.cspl-editorial .cses-credits .cses-source-card__details p {
  width:100%; max-width:100%; margin:0; text-align:center!important;
}
.cspl-editorial .cses-credits .cses-source-card__details a {
  align-self:center; max-width:100%; margin:0;
}
@media(max-width:760px) {
  .cspl-editorial .cses-credits .cses-source-card:has(.cses-source-card__heading) {
    display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);
    align-items:center; gap:8px; padding:12px;
  }
  .cspl-editorial .cses-credits .cses-source-card__details p { text-align:center!important; }
  .cspl-editorial .cses-credits .cses-source-card__details a { align-self:center; padding:5px 8px; }
  .cspl-editorial .cs-story-hero h1.cses-balanced-heading,
  .cspl-editorial .cs-story-content :is(h2,h3).cses-balanced-heading {
    text-align:right!important; text-align-last:right!important;
    text-wrap:balance!important; word-break:normal!important;
  }
  .cspl-editorial .cs-story-hero h1.cses-mobile-justified,
  .cspl-editorial .cs-story-content :is(h2,h3).cses-mobile-justified {
    text-align:justify!important; text-align-last:right!important;
    text-wrap:wrap!important; word-break:normal!important;
    letter-spacing:normal!important;
  }
  /* Keep the source label and its action in one left-hand column on phones.
     This must outrank the older generic mobile card rules above. */
  .cspl-editorial .cses-credits .cses-source-card:has(.cses-source-card__heading) > .cses-source-card__details {
    display:flex!important; flex-direction:column!important;
    justify-self:stretch!important; align-items:center!important;
    justify-content:center!important; width:100%!important;
    min-width:0!important; gap:7px!important;
  }
  .cspl-editorial .cses-credits .cses-source-card:has(.cses-source-card__heading) .cses-source-card__details > p {
    width:100%!important; margin:0!important;
    text-align:center!important; white-space:normal!important;
  }
  .cspl-editorial .cses-credits .cses-source-card:has(.cses-source-card__heading) .cses-source-card__details > a {
    align-self:center!important; margin:0!important;
  }
}
