/* CandleStan single-story layout. Scoped to the two plugin templates. */
.cspl-editorial .cs-editorial-shell { width: min(1260px, calc(100% - 44px)); }
.cspl-editorial .cs-breadcrumb { padding: 29px 0 24px; }
.cspl-editorial .cspl-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 300px);
    gap: 32px;
    align-items: stretch;
    direction: rtl;
}
.cspl-editorial .cspl-story { min-width: 0; max-width: none; margin: 0; }
.cspl-editorial .cs-story-hero { width: min(100%, 800px); max-width: 800px; margin: 0 0 0 auto; padding: 2px 0 25px; text-align: right; }
.cspl-editorial .cs-story-tags { justify-content: flex-start; margin-bottom: 12px; }
.cspl-editorial .cs-story-hero h1 {
    max-width: 100%; margin: 0; text-align: justify; text-align-last: right;
    font-size: clamp(31px, 3.15vw, 48px);
    line-height: 1.47;
    letter-spacing: -.025em;
}
.cspl-editorial .cs-story-meta { justify-content: flex-start; margin-top: 17px; }
.cspl-editorial .cs-story-cover { width: min(100%, 800px); max-width: 800px; margin: 0 0 23px auto; border-radius: 18px; box-shadow: 0 14px 40px rgba(9,40,77,.08); overflow: hidden; }
.cspl-editorial .cs-story-cover img { display: block; width: 100%; max-width: 100%; height: auto; max-height: 390px; aspect-ratio: 16 / 8; object-fit: cover; }
.cspl-editorial .cs-story-layout { width: 100%; }
.cspl-editorial .cs-story-main { width: min(100%, 800px); margin-right: 0; margin-left: auto; }
.cspl-editorial .cs-story-summary { margin-bottom: 23px; padding: 18px 22px; border-radius: 14px; }
.cspl-editorial .cs-story-content { font-size: 16.5px; line-height: 2.2; }
.cspl-editorial .cs-story-content h2 { scroll-margin-top: 96px; }
.cspl-editorial .cs-story-content figure { max-width: 100%; }
.cspl-editorial .cs-story-content img { height: auto; }
.cspl-editorial .cs-story-content table { width: 100%; border-collapse: collapse; font-size: .9em; }
.cspl-editorial .cs-story-content td,
.cspl-editorial .cs-story-content th { padding: 10px; border: 1px solid #dbe8ed; }
/* Calm, centered tables for articles and news. The scroll region prevents mobile overflow. */
.cspl-editorial .cs-story-content .cspl-table-scroll {
    box-sizing: border-box; max-width: 100%; margin: 22px auto 26px;
    overflow-x: auto; border: 1px solid #d9e8e9; border-radius: 13px;
    background: #fff; box-shadow: 0 5px 19px rgba(16, 65, 82, .045);
    scrollbar-width: thin; scrollbar-color: #aacdca transparent;
}
.cspl-editorial .cs-story-content .cspl-table-scroll:focus-visible { outline: 3px solid #13a69e; outline-offset: 3px; }
.cspl-editorial .cs-story-content .cspl-table-scroll > table {
    box-sizing: border-box; width: 100%!important; max-width: 760px;
    margin: 0 auto!important; border: 0!important; border-collapse: separate;
    border-spacing: 0; background: #fff; font-size: .91em;
}
.cspl-editorial .cs-story-content .cspl-table-scroll :is(th,td) {
    padding: 12px 14px; border: 0; border-bottom: 1px solid #e3eeee;
    border-left: 1px solid #e3eeee; text-align: center; vertical-align: middle;
    line-height: 1.9; color: #284556; background: transparent;
}
.cspl-editorial .cs-story-content .cspl-table-scroll tr > :last-child { border-left: 0; }
.cspl-editorial .cs-story-content .cspl-table-scroll tr:last-child > * { border-bottom: 0; }
.cspl-editorial .cs-story-content .cspl-table-scroll :is(thead tr,tbody:first-child tr:first-child) > * {
    background: #eaf6f4; color: #174d59; font-weight: 700;
}
.cspl-editorial .cs-story-content .cspl-table-scroll tbody tr:nth-child(even) > * { background: #f8fbfa; }
.cspl-editorial .cs-story-content .cspl-table-scroll tbody tr:hover > * { background: #f1f9f7; }
@media (max-width: 640px) {
    .cspl-editorial .cs-story-content .cspl-table-scroll > table { min-width: 550px; }
    .cspl-editorial .cs-story-content .cspl-table-scroll :is(th,td) { padding: 10px 12px; }
}

/* Give a deliberate center alignment to single calculation lines without moving surrounding prose. */
.cspl-editorial .cs-story-content > p[style*="text-align: center"],
.cspl-editorial .cs-story-content > p[style*="text-align:center"],
.cspl-editorial .cs-story-content > p.aligncenter,
.cspl-editorial .cs-story-content > p.has-text-align-center {
    text-align: center!important; text-align-last: center!important;
}
.cspl-editorial .cs-source-card { margin-top: 30px; }
.cspl-editorial .cs-related { margin-top: 64px; }
.cspl-editorial .cs-card-grid { gap: 16px; }

.cspl-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 17px; color: #70829a; font-size: 12px; }
.cspl-share a, .cspl-share button {
    min-height: 34px; display: inline-flex; align-items: center; justify-content: center;
    padding: 5px 11px; border: 1px solid #dce8ed; border-radius: 999px;
    background: rgba(255,255,255,.9); color: #264866;
    font: inherit; font-weight: 750; cursor: pointer; text-decoration: none;
}
.cspl-share a:hover, .cspl-share button:hover { border-color: #18ada0; color: #008e84; }
.cspl-editorial a:focus-visible, .cspl-editorial button:focus-visible,
.cspl-editorial summary:focus-visible { outline: 3px solid #159f96; outline-offset: 3px; }

.cspl-editorial .cspl-sidebar { min-width: 0; align-self: stretch; display: flex; flex-direction: column; gap: 16px; }
.cspl-sidebar__follow { position: sticky; top: 18px; z-index: 2; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 36px); overflow-y: auto; scrollbar-width: thin; }
body.admin-bar .cspl-sidebar__follow { top: 50px; max-height: calc(100vh - 68px); }
.cspl-panel {
    border: 1px solid #dae7ed; border-radius: 16px;
    padding: 19px; background: rgba(255,255,255,.97);
    box-shadow: 0 7px 25px rgba(21,57,91,.045);
}
.cspl-panel h2 { margin: 0 0 14px; color: #102f60; font-size: 17px; line-height: 1.6; }
.cspl-recent ul { padding: 0; margin: 0; list-style: none; }
.cspl-recent li + li { border-top: 1px solid #e8eff2; }
.cspl-recent li a { display: flex; align-items: center; gap: 11px; padding: 11px 0; color: #18385a; font-size: 13px; font-weight: 750; line-height: 1.85; }
.cspl-recent li:first-child a { padding-top: 0; }
.cspl-recent li:last-child a { padding-bottom: 0; }
.cspl-recent li a:hover { color: #008f86; }
.cspl-recent img { flex: 0 0 66px; width: 66px; height: 57px; object-fit: cover; border-radius: 9px; }
.cspl-quicklinks a { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid #e6eef2; color: #174066; font-size: 14px; font-weight: 780; }
.cspl-quicklinks a:hover { color: #008f86; }
.cspl-toc { flex: 0 0 auto; max-height: min(36vh, 265px); overflow-y: auto; scrollbar-width: thin; }
.cspl-toc ol, .cspl-mobile-toc ol { list-style: none; margin: 0; padding: 0; }
.cspl-toc li + li, .cspl-mobile-toc li + li { border-top: 1px solid #e6eef2; }
.cspl-toc li a, .cspl-mobile-toc li a { display: block; padding: 11px 4px; color: #536b80; font-size: 13px; line-height: 1.7; }
.cspl-toc li a:hover, .cspl-toc li a.is-active, .cspl-mobile-toc a:hover { color: #008d84; }
.cspl-toc li a.is-active { padding-right: 10px; border-radius: 7px; background: #edf9f7; font-weight: 850; }
.cspl-progress { width: 100%; height: 4px; margin: 0 0 10px; overflow: hidden; border-radius: 999px; background: #e8f0f3; }
.cspl-progress span { display: block; width: 0; height: 100%; background: #0bb6a7; transition: width .12s linear; }
.cspl-mobile-toc { display: none; }

.cspl-tools-card {
    position: relative; isolation: isolate; overflow: hidden;
    border-radius: 17px; padding: 21px 22px 23px;
    background: radial-gradient(circle at 20% 20%, #176781, transparent 52%), linear-gradient(132deg,#092c51,#064d65); color: #fff;
}
.cspl-tools-card__art { display: block; width: 100%; height: auto; max-height: 150px; object-fit: contain; margin: 0 0 12px; }
.cspl-tools-card > span { color: #7fe1d7; font-size: 12px; font-weight: 800; }
.cspl-tools-card h2 { margin: 9px 0; color: #fff; font-size: 19px; line-height: 1.55; }
.cspl-tools-card p { margin: 0 0 17px; color: #d8e9ed; font-size: 13px; line-height: 1.9; }
.cspl-tools-card a { display: inline-flex; gap: 12px; padding: 9px 14px; border-radius: 9px; background: #fff; color: #12395c; font-size: 13px; font-weight: 850; }
.cspl-tools-card a:hover { background: #d5faf1; }

.cspl-market-links { margin: 20px 0 24px; padding: 17px 19px; border: 1px solid #d8e9e9; border-radius: 14px; background: #f4fbfa; }
.cspl-market-links h2 { margin: 0 0 10px; color: #153c57; font-size: 17px; }
.cspl-market-links > div { display: flex; flex-wrap: wrap; gap: 9px; }
.cspl-market-links a { display: inline-block; padding: 7px 11px; border: 1px solid #d2e7e4; border-radius: 9px; background: #fff; color: #086e72; font-size: 13px; font-weight: 800; text-decoration: none; }
.cspl-market-links a:hover, .cspl-market-chip-link:hover { color: #064b56; border-color: #10a996; }
.cspl-market-links--existing { margin: 12px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid #d8e9e9; border-radius: 0; background: none; }
.cspl-market-chip-link { display: inline-flex; color: inherit; text-decoration: none; border-radius: 9px; }

.cspl-more .cspl-more-card { overflow: hidden; }
.cspl-more .cspl-more-card__media {
    display: block; overflow: hidden; aspect-ratio: 3 / 2;
    background: #eaf3f4;
}
.cspl-editorial .cspl-more .cspl-more-card__media {
    /* The suite's wider media rule otherwise takes precedence over 3:2 art. */
    aspect-ratio: 3 / 2 !important;
}
.cspl-more .cspl-more-card__media img {
    display: block; width: 100%; height: 100%; object-fit: contain;
}
.cspl-more-card__graphic { display: flex; align-items: flex-end; width: 100%; height: 100%; padding: 18px; color: #fff; background: radial-gradient(circle at 75% 25%, #57cbc0 0 6%, transparent 7% 100%), repeating-linear-gradient(95deg, transparent 0 20px, #ffffff16 21px 23px, transparent 24px 44px), linear-gradient(130deg,#0e3862,#05827f); }
.cspl-more-card__graphic--market { background: radial-gradient(circle at 70% 36%,#e6c466 0 13%,#b48236 14% 16%,transparent 17%), linear-gradient(120deg,#122f56,#087475); }
.cspl-more-card__graphic--calendar { background: repeating-linear-gradient(90deg,transparent 0 34px,#ffffff12 35px 36px), linear-gradient(125deg,#123657,#428b9a); }
.cspl-more-card__graphic--tools { background: linear-gradient(135deg,#122c4e,#0ca294); }
.cspl-more-card__graphic span { padding: 6px 12px; border: 1px solid #ffffff7c; border-radius: 7px; background: #092b4bae; font-size: 13px; font-weight: 800; }

.cspl-inline-promo {
    display: flex; align-items: center; justify-content: space-between; gap: 22px;
    margin: 32px 0 38px; padding: 25px 28px;
    border-radius: 17px; background: linear-gradient(110deg,#103b63,#07667a);
    color: #fff; text-align: right;
}
.cspl-inline-promo__text > span { display: block; margin-bottom: 4px; color: #78e2d8; font-size: 12px; font-weight: 800; }
.cspl-inline-promo__text > strong { display: block; font-size: 20px; line-height: 1.55; }
.cspl-inline-promo__text p { margin: 5px 0 0 !important; color: #e0edf2; font-size: 13px; line-height: 1.8; text-align: right; }
.cspl-inline-promo > a { flex: 0 0 auto; display: inline-flex; gap: 10px; padding: 11px 16px; border-radius: 10px; background: #fff; color: #103a5e; font-size: 13px; font-weight: 850; text-decoration: none; }
.cspl-inline-promo > a:hover { background: #e9faf7; }
.cspl-ad { margin: 30px 0 36px; }
.cspl-ad--sidebar { margin: 0; }
.cspl-ad-label { display: block; margin-bottom: 6px; color: #8493a3; font-size: 11px; text-align: center; }
.cspl-ad a { display: block; overflow: hidden; border: 1px solid #dce8ed; border-radius: 15px; background: #fff; }
.cspl-ad img { display: block; width: 100%; height: auto; }
.cspl-author { display: flex; align-items: center; gap: 13px; margin-top: 34px; padding: 15px 18px; border: 1px solid #e1ebef; border-radius: 14px; background: #fff; }
.cspl-author__mark { display: grid; place-items: center; flex: 0 0 41px; width: 41px; height: 41px; border-radius: 50%; background: #e6f8f4; color: #057e83; font-size: 22px; font-weight: 900; }
.cspl-author strong, .cspl-author small { display: block; }
.cspl-author strong { color: #123458; font-size: 14px; }
.cspl-author small { margin-top: 3px; color: #718397; font-size: 12px; line-height: 1.8; }

@media (max-width: 980px) {
    .cspl-editorial .cspl-grid { grid-template-columns: minmax(0,1fr) 255px; gap: 20px; }
    .cspl-editorial .cs-story-hero h1 { font-size: clamp(28px, 3.5vw, 40px); }
}
@media (max-width: 760px) {
    .cspl-editorial .cs-editorial-shell { width: min(100% - 30px, 620px); }
    .cspl-editorial .cs-breadcrumb { padding: 17px 0 20px; }
    .cspl-editorial .cspl-grid { display: flex; flex-direction: column; gap: 31px; }
    .cspl-editorial .cspl-grid > * { width: 100%; }
    .cspl-editorial .cs-story-hero { padding: 4px 0 22px; }
    .cspl-editorial .cs-story-hero h1 { font-size: clamp(28px, 7.2vw, 37px); }
    .cspl-editorial .cs-story-cover { border-radius: 14px; }
    .cspl-editorial .cs-story-cover img { max-height: 310px; }
    .cspl-editorial .cs-story-content { font-size: 16px; }
    .cspl-editorial .cspl-sidebar { display: grid; grid-template-columns: 1fr; }
    .cspl-sidebar__follow { position: static; max-height: none; overflow: visible; }
    .cspl-toc { display: none; }
    .cspl-mobile-toc { display: block; margin: 0 0 24px; padding: 14px 18px; border: 1px solid #dce9ed; border-radius: 13px; background: #fff; }
    .cspl-mobile-toc summary { color: #0a3763; font-weight: 850; cursor: pointer; }
    .cspl-mobile-toc nav { margin-top: 12px; }
    .cspl-editorial .cs-related { margin-top: 40px; }
}
@media (max-width: 480px) {
    .cspl-inline-promo { flex-direction: column; align-items: stretch; gap: 15px; padding: 21px; }
    .cspl-inline-promo__text > strong { font-size: 18px; }
    .cspl-inline-promo > a { align-self: flex-start; }
    .cspl-editorial .cs-source-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .cspl-progress span { transition: none; }
}

/* A quiet in-story tool recommendation, distinct from full advertising banners. */
.cspl-editorial .cspl-inline-promo {
    box-sizing: border-box; min-height: 0; gap: 14px;
    margin: 19px 0 22px; padding: 11px 15px;
    border: 1px solid #dbe9e8; border-right: 3px solid #159b94;
    border-radius: 11px; background: #f5faf9; color: #173d50;
    box-shadow: 0 3px 12px rgba(15, 76, 88, .035);
}
.cspl-editorial .cspl-inline-promo__text > span {
    margin-bottom: 1px; color: #247c78; font-size: 10.5px; font-weight: 700;
}
.cspl-editorial .cspl-inline-promo__text > strong {
    color: #173b51; font-size: 15px; font-weight: 750; line-height: 1.55;
}
.cspl-editorial .cspl-inline-promo__text p {
    margin: 1px 0 0!important; color: #647b84; font-size: 11.5px;
    line-height: 1.7; text-align: right;
}
.cspl-editorial .cspl-inline-promo > a {
    min-height: 0; padding: 6px 10px; border: 1px solid #cee3e1;
    border-radius: 8px; background: #fff; color: #126b69;
    font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.cspl-editorial .cspl-inline-promo > a:hover { border-color: #159b94; background: #eff9f6; color: #084e50; }
@media (max-width: 480px) {
    .cspl-editorial .cspl-inline-promo { align-items: flex-start; gap: 8px; padding: 11px 13px; }
}

/* Strong terms stay quiet in prose, with the CandleStan teal used as a reading cue. */
.cspl-editorial .cs-story-content :is(p,li,td,th,blockquote) :is(strong,b) { color: #174c5b; }
.cspl-editorial .cs-story-content a :is(strong,b) { color: inherit; }

/* A clearer invitation for the tool, with restrained brand color and the same compact footprint. */
.cspl-editorial .cspl-inline-promo {
    position: relative; overflow: hidden; padding: 13px 17px;
    border-color: #c7e3df; border-right: 4px solid #079d98;
    background: linear-gradient(110deg,#e7f7f4 0%,#f3fbfa 58%,#fff 100%);
    box-shadow: 0 5px 17px rgba(13,86,92,.075);
}
.cspl-editorial .cspl-inline-promo::before {
    content: ''; position: absolute; inset-inline-start: 0; top: 0; width: 90px; height: 90px;
    border-radius: 50%; transform: translate(-38%,-54%);
    background: rgba(24,174,159,.07); pointer-events: none;
}
.cspl-editorial .cspl-inline-promo__text { position: relative; }
.cspl-editorial .cspl-inline-promo__text > span { color: #087e79; font-weight: 800; letter-spacing: .01em; }
.cspl-editorial .cspl-inline-promo__text > strong { color: #103f57; font-size: 15.5px; font-weight: 800; }
.cspl-editorial .cspl-inline-promo > a {
    position: relative; border-color: #168f88; background: #087e79; color: #fff;
    padding: 7px 12px; box-shadow: 0 2px 7px rgba(8,126,121,.13);
}
.cspl-editorial .cspl-inline-promo > a:hover { background: #076b68; color: #fff; border-color: #076b68; }
@media (max-width: 480px) {
    .cspl-editorial .cspl-inline-promo { padding: 12px 15px; }
}
