/* Shared reading surfaces. Presentation only: source descriptions and controls stay intact. */
.blog-details-wrap .full_descr,
.cscom-entry-body,
.cscom-entry-summary {
  --ct-bg: #10141e;
  --ct-raised: #151a25;
  --ct-line: #ffffff10;
  --ct-text: #aab3c4;
  --ct-title: #f1f4fa;
  --ct-accent: #ff7b32;
  --ct-radius: 20px;
}

.cscom-entry-body,
.cscom-entry-summary {
  min-width: 0;
  max-width: 100%;
  margin: 28px 0;
  color: var(--ct-text);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

/* Unwrapped legacy prose receives the same reading surface without adding HTML. */
.cscom-entry-body:not(:has(.csart-wrap, .info-block, .csart-desc, .csart-block)),
.cscom-entry-summary {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  background: var(--ct-bg);
}

.cscom-entry-body :is(.csart-wrap, .cscom-description-normalized, .cscom-description-rewritten),
.cscom-entry-body :is(.csart-desc-inner, .csart-final-inner, .info-block-inner, .csart-bbody) {
  min-width: 0;
  max-width: 100%;
  color: var(--ct-text);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  line-height: 1.85;
}

.cscom-entry-body :is(p, li, dd),
.cscom-entry-summary :is(p, li, dd) {
  font-size: 15px;
  line-height: 1.85;
}

.cscom-entry-body :is(p, .csart-desc-inner p, .csart-final-inner p, .info-block p),
.cscom-entry-summary p { margin: 0 0 18px; color: var(--ct-text); }
.cscom-entry-body :is(.csart-desc-inner, .csart-bbody, .csart-final-inner, .info-block-inner) > :last-child,
.cscom-entry-summary > :last-child { margin-bottom: 0; }

.cscom-entry-body :is(h1, h2, h3, h4, h5, h6),
.cscom-entry-summary :is(h1, h2, h3, h4, h5, h6) {
  margin: 30px 0 16px;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.025em;
  color: var(--ct-title);
  scroll-margin-top: 100px;
  overflow-wrap: anywhere;
}

.cscom-entry-body :is(h1, h2) { font-size: clamp(23px, 2.3vw, 29px); }
.cscom-entry-body h3 { font-size: 22px; }
.cscom-entry-body h4 { font-size: 19px; }
.cscom-entry-body :is(h5, h6) { font-size: 16px; }
.cscom-entry-body :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }
.cscom-entry-body :is(.csart-final-inner, .info-block:last-of-type) h2 {
  color: var(--ct-title);
  background: none;
  -webkit-text-fill-color: currentColor;
}
.cscom-entry-body :is(.csart-desc-inner, .csart-final-inner, .info-block) h2::after {
  width: 48px;
  height: 2px;
  background: var(--ct-accent);
  box-shadow: none;
}

.cscom-entry-body :is(strong, b), .cscom-entry-summary :is(strong, b) { color: #e3e8f2; font-weight: 700; }
.cscom-entry-body :is(h1, h2, h3, h4, h5, h6) :is(strong, b) { color: inherit; }
.cscom-entry-body a:not([class]),
.cscom-entry-body .info-block a:not([class]) {
  color: #ff9c66 !important;
  text-decoration: underline !important;
  text-decoration-color: #ff7b3250 !important;
  text-underline-offset: 4px;
  transition: color .18s ease, text-decoration-color .18s ease;
}
.cscom-entry-body a:not([class]):hover { color: #ffc6a6 !important; text-decoration-color: currentColor !important; }
.cscom-entry-body :is(a, button, summary):focus-visible,
.blog-details-wrap .full_descr :is(.dlx94-mainbtn, .dl-card, .cs-share-btn):focus-visible {
  outline: 2px solid var(--ct-accent) !important;
  outline-offset: 4px;
}

/* Match editorial and original feature cards, including older inline presentation. */
.cscom-entry-body :is(.csart-desc, .csart-block, .csart-itbl-wrap, .csart-final, .info-block),
.blog-details-wrap .full_descr :is(.csacc-details, .cs-share-box, .fgv-wrap) {
  margin-bottom: 24px;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  background: var(--ct-bg);
  box-shadow: 0 12px 30px #05070b18;
  transition: border-color .22s ease, box-shadow .22s ease;
}
.cscom-entry-body :is(.csart-desc, .info-block):hover { transform: none; border-color: #ff7b322b; box-shadow: 0 12px 30px #05070b18; }
.cscom-entry-body :is(.csart-desc, .csart-final, .info-block)::before {
  background: radial-gradient(ellipse at 100% 0%, #ff7b3208, transparent 60%);
  transform: none;
}
.cscom-entry-body :is(.csart-desc, .csart-final, .info-block)::after {
  width: 2px;
  top: 26px;
  bottom: 26px;
  background: var(--ct-accent);
  filter: none;
  opacity: .7;
}
.cscom-entry-body :is(.csart-desc-inner, .csart-final-inner, .info-block-inner) { padding: clamp(24px, 3vw, 34px); }
.cscom-entry-body .csart-bbody { padding: 26px; }
.cscom-entry-body :is(.csart-bhead, .csart-itbl-head) {
  gap: 14px;
  padding: 20px 26px;
  border-color: var(--ct-line);
  background: var(--ct-raised);
}
.cscom-entry-body :is(.csart-bhead, .csart-itbl-head)::before { width: 2px; background: var(--ct-accent); }
.cscom-entry-body :is(.csart-bttl, .csart-itbl-ttl) { font-size: 17px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; text-transform: none; }
.cscom-entry-body :is(.csart-bsub, .csart-itbl-sub, .csart-hcard-txt) { color: var(--ct-text); font-size: 13px; line-height: 1.75; }
.cscom-entry-body :is(.csart-bico, .csart-itbl-ico, .csart-hcard-ico) {
  color: var(--ct-accent);
  background: #ff7b3210;
  border-color: #ff7b3226;
  box-shadow: none;
}

/* The normalizer already supplies an outer card around malformed legacy fragments. */
.cscom-entry-body .cscom-description-normalized .info-block {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.cscom-entry-body .cscom-description-normalized .info-block-inner { padding: 0; }

.cscom-entry-body .csart-hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 26px; }
.cscom-entry-body .csart-hcard { padding: 24px; border: 1px solid var(--ct-line); border-radius: 18px; background: var(--ct-raised); box-shadow: none; }
.cscom-entry-body .csart-hcard:hover { transform: translateY(-2px); border-color: #ff7b3238; box-shadow: none; }
.cscom-entry-body .csart-hcard-ttl { margin-bottom: 8px; font-size: 16px; line-height: 1.4; text-transform: none; letter-spacing: -.01em; }
.cscom-entry-body .csart-meta { gap: 8px; margin-bottom: 26px; }
.cscom-entry-body .csart-chip { padding: 8px 12px; color: var(--ct-text); background: var(--ct-raised); border-color: var(--ct-line); font-size: 11px; }
.cscom-entry-body .csart-chip--hot { color: #ffad7f; border-color: #ff7b322a; background: #ff7b320b; }

.cscom-entry-body :is(ul, ol):not([class]) { margin: 18px 0; padding-left: 24px; }
.cscom-entry-body :is(ul, ol):not([class]) > li { margin: 8px 0; }
.cscom-entry-body li::marker { color: var(--ct-accent); }
.cscom-entry-body .csart-flist { gap: 10px; }
.cscom-entry-body .csart-flist > li {
  margin: 0;
  padding: 15px 18px;
  border-color: var(--ct-line);
  border-radius: 13px;
  background: var(--ct-raised);
  color: var(--ct-text);
  line-height: 1.8;
}
.cscom-entry-body .csart-flist > li:hover { transform: none; background: #181e2b; border-color: #ffffff18; }
.cscom-entry-body .csart-flist-dot { margin-top: 4px; color: var(--ct-accent); background: #ff7b3210; border-color: #ff7b3226; }
.cscom-entry-body .info-block li { color: var(--ct-text); background: var(--ct-raised); border-color: var(--ct-line); border-radius: 13px; }
.cscom-entry-body .info-block li:hover { transform: none; }
.cscom-entry-body .csart-final-inner ul li { line-height: 1.8; color: var(--ct-text); }
.cscom-entry-body hr { margin: 30px 0; border: 0; border-top: 1px solid var(--ct-line); }
.cscom-entry-body .csart-div { margin: 30px 0; }
.cscom-entry-body .csart-div-lbl { color: #8590a5; background: var(--ct-raised); border-color: var(--ct-line); padding: 6px 12px; }

/* Table layout remains a table; wide legacy tables scroll inside the description. */
.cscom-entry-body :is(.csart-itbl-wrap, .cscom-description-table-scroll) { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: #475065 var(--ct-bg); }
.cscom-entry-body table { max-width: 100%; margin: 20px 0; border-collapse: collapse; border-spacing: 0; background: var(--ct-bg); }
.cscom-entry-body table.csart-itbl { display: table; width: 100%; margin: 0; table-layout: auto; }
.cscom-entry-body table :is(td, th),
.cscom-entry-body .cscom-description-table :is(td, th),
.cscom-entry-body .csart-itbl td:first-child,
.cscom-entry-body .csart-itbl td:last-child {
  padding: 15px 20px;
  border: 1px solid var(--ct-line);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.cscom-entry-body .csart-itbl td:first-child { color: #a4aec1; }
.cscom-entry-body .csart-itbl td:last-child { color: #d5dce9; }
.cscom-entry-body table :is(th, thead td) { color: var(--ct-title); font-weight: 700; background: var(--ct-raised); }
.cscom-entry-body table tbody tr:hover { background: #ffffff03; }
.cscom-entry-body table caption { padding: 18px 20px; font-family: 'Exo 2', sans-serif; font-size: 17px; color: var(--ct-title); text-align: left; }

/* Neutral code surfaces override the old BBCode inline border and 200px height. */
.cscom-entry-body :is(pre, .codeMessage) {
  max-width: 100%;
  max-height: none !important;
  margin: 18px 0;
  padding: 20px 22px;
  overflow-x: auto;
  border: 1px solid #ffffff12 !important;
  border-radius: 16px;
  background: #0c1019 !important;
  color: #ced7e8 !important;
  text-shadow: none !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
  tab-size: 4;
}
.cscom-entry-body pre { white-space: pre; overflow-wrap: normal; }
.cscom-entry-body .codeMessage { white-space: pre-wrap; overflow-wrap: anywhere; }
.cscom-entry-body .bbCodeBlock { margin: 22px 0; background: transparent; box-shadow: none; }
.cscom-entry-body .bbCodeName { padding: 0 4px 7px !important; color: #8590a5; font-size: 11px !important; letter-spacing: .08em; }
.cscom-entry-body .bbCodeBlock .codeMessage { margin: 0; }
.cscom-entry-body :is(code, kbd, samp) { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; color: #ffb88f; }
.cscom-entry-body pre code { padding: 0; color: inherit; background: none; white-space: inherit; }
.cscom-entry-body blockquote,
.cscom-entry-body .quoteMessage {
  margin: 24px 0;
  padding: 22px 26px;
  border: 1px solid var(--ct-line) !important;
  border-left: 3px solid var(--ct-accent) !important;
  border-radius: 0 16px 16px 0;
  background: var(--ct-raised);
  color: #c3ccdc;
  text-shadow: none !important;
  font-size: 15px;
  line-height: 1.85;
}
.cscom-entry-body :is(img, video, iframe) { max-width: 100%; }
.cscom-entry-body :is(img, video) { height: auto; }
.cscom-entry-body figure { max-width: 100%; margin: 26px 0; }
.cscom-entry-body figcaption { margin-top: 10px; color: #8590a5; font-size: 12px; line-height: 1.6; }

/* Keep semantic source colors, with contrast suitable for dark reading surfaces. */
.cscom-entry-body :is([style*="color:green" i], [style*="color: green" i], font[color="green" i]) { color: #8ed8aa !important; }
.cscom-entry-body :is([style*="color:red" i], [style*="color: red" i], [style*="color:#ff0000" i], [style*="color: #ff0000" i], font[color="red" i]) { color: #ff9b8e !important; }
.cscom-entry-body :is([style*="color:blue" i], [style*="color: blue" i], [style*="color:#0000ff" i], [style*="color: #0000ff" i], font[color="blue" i]) { color: #91bcff !important; }
.cscom-entry-body :is([style*="color:orange" i], [style*="color: orange" i], font[color="orange" i]) { color: #ffad76 !important; }
.cscom-entry-body :is([style*="color:#292929" i], [style*="color: #292929" i], [style*="color:black" i], [style*="color: black" i], font[color="black" i]) { color: var(--ct-text) !important; }
.cscom-entry-body [style*="color" i] :is(strong, b),
.cscom-entry-body font[color] :is(strong, b) { color: inherit; }

/* FAQ keeps its existing open/closed grid behaviour. */
.cscom-entry-body .xfaq26-list { gap: 12px !important; }
.cscom-entry-body .xfaq26-entry { border-color: var(--ct-line) !important; border-radius: 16px !important; background: var(--ct-raised) !important; }
.cscom-entry-body .xfaq26-entry[data-open] { border-color: #ff7b3240 !important; box-shadow: none !important; }
.cscom-entry-body .xfaq26-hdr { padding: 20px !important; gap: 13px !important; }
.cscom-entry-body .xfaq26-entry[data-open] .xfaq26-hdr { background: #ff7b3206 !important; }
.cscom-entry-body .xfaq26-label { font-size: 16px !important; line-height: 1.5 !important; }
.cscom-entry-body .xfaq26-answer { padding: 20px 24px !important; border-color: var(--ct-line) !important; color: var(--ct-text) !important; font-size: 14px !important; line-height: 1.85 !important; }
.cscom-entry-body .xfaq26-idx { background: #ffffff06 !important; color: #a5afc0 !important; }
.cscom-entry-body .xfaq26-entry[data-open] .xfaq26-idx { background: #ff7b3220 !important; color: #ffad7f !important; }

.blog-details-wrap .full_descr .cscom-detail-extra { margin: 26px 0; }
.blog-details-wrap .full_descr .csacc-summary { padding: 20px 24px; background: var(--ct-raised); }
.blog-details-wrap .full_descr .csacc-title-text { font-size: 17px; text-transform: none; letter-spacing: -.01em; }
.blog-details-wrap .full_descr .csacc-body { padding: 24px; background: var(--ct-bg); }
.blog-details-wrap .full_descr :is(.csacc-row, .csacc-step) { padding: 15px 18px; border-color: var(--ct-line); border-radius: 13px; background: var(--ct-raised); }
.blog-details-wrap .full_descr :is(.csacc-step-text, .csacc-row-label) { color: var(--ct-text); font-size: 14px; line-height: 1.8; }
.blog-details-wrap .full_descr .csacc-details[open] { border-color: #ff7b3238; box-shadow: none; }
.blog-details-wrap .full_descr .csacc-details[open] .csacc-summary { border-color: var(--ct-line); background: #181c27; }
.blog-details-wrap .full_descr .csvir-card { padding: 22px 24px; border-radius: 18px; box-shadow: none; }
.blog-details-wrap .full_descr .csvir-desc { font-size: 13px; line-height: 1.8; }
.blog-details-wrap .full_descr .cs-share-box { padding: 26px; }
.blog-details-wrap .full_descr .cs-share-box:hover { transform: none; box-shadow: none; }
.blog-details-wrap .full_descr .cs-share-btn { border-radius: 12px; }
.blog-details-wrap .full_descr .cs-share-field textarea { padding: 15px; border-color: var(--ct-line); border-radius: 12px; background: #0c1019; color: var(--ct-text); line-height: 1.7; }

.blog-details-wrap .full_descr .dlx94-panel {
  --dlx94-accent: #ff7b32;
  --dlx94-accent-2: #ffad7f;
  --dlx94-accent-3: #ff9b60;
  --dlx94-muted: #aab3c4;
  --dlx94-muted-2: #8e9bb1;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 28px 0;
  padding: 22px;
  border-color: var(--ct-line);
  border-radius: var(--ct-radius);
  background: radial-gradient(ellipse at 100% 0%, #ff7b320a, transparent 65%), var(--ct-raised);
  box-shadow: none;
}
.blog-details-wrap .full_descr .dlx94-panel::after { width: 2px; box-shadow: none; }
.blog-details-wrap .full_descr .dlx94-mainbtn { min-height: 56px; padding: 16px 22px; border-radius: 14px; background: linear-gradient(120deg, #f87730, #ff9a5e); color: #10141e !important; font-size: 15px; line-height: 1.5; letter-spacing: 0; text-transform: none; box-shadow: 0 8px 20px #ff7b321a; }
.blog-details-wrap .full_descr .dlx94-mainbtn__text { white-space: normal; }
.blog-details-wrap .full_descr .dlx94-mainbtn__ico { color: #10141e; background: #10141e0c; border-color: #10141e10; }
.blog-details-wrap .full_descr .dlx94-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.blog-details-wrap .full_descr .dlx94-metric { justify-content: flex-start; min-width: 0; gap: 10px; padding: 12px 14px; border-color: var(--ct-line); background: #10141e80; box-shadow: none; }
.blog-details-wrap .full_descr .dlx94-metric__label { font-size: 10px; line-height: 1.5; letter-spacing: .04em; }
.blog-details-wrap .full_descr .dlx94-metric__value { font-family: 'Exo 2', sans-serif; font-size: 18px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.blog-details-wrap .full_descr .dl-card { min-height: 92px; padding: 22px; border-radius: 18px; box-shadow: none; }

.cscom-comments { margin-top: 34px; }
.cscom-comments .vkcom-wrap { margin: 0; border-color: #ffffff10; border-radius: 20px; background: #10141e; box-shadow: none; }
.cscom-comments .vkcom-head { padding: 26px; background: #151a25; border-color: #ffffff10; }
.cscom-comments .vkcom-head-title { font-size: 21px; line-height: 1.4; text-transform: none; letter-spacing: -.02em; }
.cscom-comments :is(.vkcom-head-sub, .vkcom-card-desc) { color: #aab3c4; font-size: 13px; line-height: 1.75; }
.cscom-comments .vkcom-motiv { gap: 12px; margin-top: 20px; }
.cscom-comments .vkcom-card { padding: 16px; border-color: #ffffff10; border-radius: 14px; background: #10141e; }
.cscom-comments .vkcom-widget { padding: 24px; }

@media (max-width: 767px) {
  .cscom-entry-body, .cscom-entry-summary { margin: 24px 0; font-size: 14px; }
  .cscom-entry-body :is(p, li, dd, .csart-desc-inner, .csart-final-inner, .info-block-inner, .csart-bbody) { font-size: 14px; }
  .cscom-entry-body :is(.csart-desc-inner, .csart-final-inner, .info-block-inner) { padding: 24px; }
  .cscom-entry-body :is(.csart-bbody, .csart-bhead, .csart-itbl-head) { padding: 20px; }
  .blog-details-wrap .full_descr :is(.csacc-body, .csacc-summary, .cs-share-box) { padding: 20px; }
  .cscom-comments :is(.vkcom-head, .vkcom-widget) { padding: 22px; }
}

@media (max-width: 479px) {
  .cscom-entry-body :is(.csart-desc-inner, .csart-final-inner, .info-block-inner) { padding: 22px 20px; }
  .cscom-entry-body :is(.csart-bbody, .csart-bhead, .csart-itbl-head) { padding: 18px; }
  .cscom-entry-body .csart-hgrid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cscom-entry-body .csart-hcard { padding: 22px; }
  .cscom-entry-body .csart-flist > li { padding: 14px; }
  .cscom-entry-body table :is(td, th),
  .cscom-entry-body .cscom-description-table :is(td, th),
  .cscom-entry-body .csart-itbl td:first-child,
  .cscom-entry-body .csart-itbl td:last-child { padding: 12px 14px; font-size: 13px; }
  .cscom-entry-body :is(pre, .codeMessage) { padding: 16px; font-size: 12px; }
  .cscom-entry-body .xfaq26-hdr { padding: 17px !important; }
  .cscom-entry-body .xfaq26-answer { padding: 18px !important; }
  .blog-details-wrap .full_descr .dlx94-panel { padding: 16px; }
  .blog-details-wrap .full_descr .dlx94-metric { padding: 10px; }
  .blog-details-wrap .full_descr .dlx94-metric__ico { width: 26px; height: 26px; flex-basis: 26px; }
  .blog-details-wrap .full_descr .dlx94-metric__value { font-size: 16px; }
  .cscom-comments .vkcom-motiv { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .cscom-entry-body *, .cscom-entry-body *::before, .cscom-entry-body *::after,
  .blog-details-wrap .full_descr .cscom-detail-extra *,
  .blog-details-wrap .full_descr .dlx94-panel * { animation: none !important; transition: none !important; }
}
