/* KOSMOS — статьи / архивы / поиск: стилистика без ломки разметки Reboot */

:root {
  --kosmos-content-max: 1112px;
}

/* Ширина контента блога (кроме хаба, шапки, подвала, glow) */
body:not(.kosmos-home-hub) .site-content.fixed {
  max-width: var(--kosmos-content-max) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
  background: transparent !important;
}

@media (min-width: 768px) {
  body:not(.kosmos-home-hub) .site-content.fixed {
    padding-left: 24px;
    padding-right: 24px;
  }
}

body:not(.kosmos-home-hub) .site-content {
  padding-top: 24px !important;
  background: transparent !important;
}

body:not(.kosmos-home-hub) .site-content-inner {
  gap: 32px;
}

/* Related вне primary — тоже в 1112 */
body:not(.kosmos-home-hub) .related-posts,
body:not(.kosmos-home-hub) .comments-area {
  max-width: var(--kosmos-content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  body:not(.kosmos-home-hub) .related-posts,
  body:not(.kosmos-home-hub) .comments-area {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Типографика статьи */
body.single .entry-title,
body.page .entry-title {
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif) !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--kosmos-page-fg) !important;
  margin-top: 0.4em;
}

body.single .entry-content,
body.page .entry-content,
body.single .article-card,
body.page .article-card {
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--kosmos-page-fg);
}

html[data-theme="dark"] body.single .entry-content,
html[data-theme="dark"] body.page .entry-content {
  color: rgba(244, 244, 244, 0.92);
}

body.single .entry-content a,
body.page .entry-content a {
  color: var(--kosmos-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

html[data-theme="dark"] body.single .entry-content a,
html[data-theme="dark"] body.page .entry-content a {
  color: var(--kosmos-lime);
}

body.single .entry-content a:hover,
body.page .entry-content a:hover {
  opacity: 0.85;
}

body.single .entry-content h2,
body.single .entry-content h3,
body.page .entry-content h2,
body.page .entry-content h3 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--kosmos-page-fg);
}

body.single .entry-content blockquote,
body.page .entry-content blockquote {
  position: relative;
  border: 1px solid rgba(59, 100, 140, 0.18);
  border-left: 3px solid var(--kosmos-blue);
  background: rgba(59, 100, 140, 0.06);
  padding: 18px 22px;
  border-radius: 16px;
  margin: 1.75em 0;
  color: var(--kosmos-page-fg);
  box-shadow: none;
  quotes: none;
}

html[data-theme="dark"] body.single .entry-content blockquote,
html[data-theme="dark"] body.page .entry-content blockquote {
  border-color: rgba(208, 248, 160, 0.18);
  border-left-color: var(--kosmos-lime);
  background: rgba(208, 248, 160, 0.07);
}

body.single .entry-content blockquote p,
body.page .entry-content blockquote p {
  margin: 0 !important;
}

body.single .entry-content blockquote cite,
body.page .entry-content blockquote cite {
  display: block;
  margin-top: 0.75em;
  font-size: 0.85em;
  font-style: normal;
  font-weight: 600;
  color: var(--kosmos-muted);
}

/* Блоки внимания Reboot (question/info/…) — в палитру KOSMOS */
body.single .entry-content blockquote.is-style-question,
body.single .entry-content blockquote.question,
body.single .entry-content blockquote.is-style-info,
body.single .entry-content blockquote.info,
body.single .entry-content blockquote.is-style-check,
body.single .entry-content blockquote.check,
body.single .entry-content blockquote.is-style-warning,
body.single .entry-content blockquote.warning,
body.single .entry-content blockquote.is-style-danger,
body.single .entry-content blockquote.danger,
body.single .entry-content blockquote.is-style-quote,
body.single .entry-content blockquote.quote,
body.single .entry-content blockquote.is-style-thumbs-up,
body.single .entry-content blockquote.thumbs-up,
body.single .entry-content blockquote.is-style-thumbs-down,
body.single .entry-content blockquote.thumbs-down,
body.page .entry-content blockquote.is-style-question,
body.page .entry-content blockquote.is-style-info,
body.page .entry-content blockquote.is-style-check,
body.page .entry-content blockquote.is-style-warning,
body.page .entry-content blockquote.is-style-danger,
body.page .entry-content blockquote.is-style-quote {
  padding: 20px 22px 20px 58px !important;
  border-radius: 18px !important;
  border: 1px solid transparent !important;
  border-left-width: 3px !important;
  border-left-style: solid !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.single .entry-content blockquote.is-style-question:before,
body.single .entry-content blockquote.question:before,
body.single .entry-content blockquote.is-style-info:before,
body.single .entry-content blockquote.info:before,
body.single .entry-content blockquote.is-style-check:before,
body.single .entry-content blockquote.check:before,
body.single .entry-content blockquote.is-style-warning:before,
body.single .entry-content blockquote.warning:before,
body.single .entry-content blockquote.is-style-danger:before,
body.single .entry-content blockquote.danger:before,
body.single .entry-content blockquote.is-style-quote:before,
body.single .entry-content blockquote.quote:before,
body.single .entry-content blockquote.is-style-thumbs-up:before,
body.single .entry-content blockquote.thumbs-up:before,
body.single .entry-content blockquote.is-style-thumbs-down:before,
body.single .entry-content blockquote.thumbs-down:before {
  font-size: 22px !important;
  left: 18px !important;
  margin-top: -11px !important;
  opacity: 0.95;
}

/* Question / Info — navy + lime */
body.single .entry-content blockquote.is-style-question,
body.single .entry-content blockquote.question,
body.single .entry-content blockquote.is-style-info,
body.single .entry-content blockquote.info {
  background: rgba(11, 37, 62, 0.06) !important;
  border-color: rgba(59, 100, 140, 0.2) !important;
  border-left-color: var(--kosmos-blue) !important;
  color: var(--kosmos-page-fg) !important;
}

body.single .entry-content blockquote.is-style-question:before,
body.single .entry-content blockquote.question:before,
body.single .entry-content blockquote.is-style-info:before,
body.single .entry-content blockquote.info:before {
  color: var(--kosmos-blue) !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-question,
html[data-theme="dark"] body.single .entry-content blockquote.question,
html[data-theme="dark"] body.single .entry-content blockquote.is-style-info,
html[data-theme="dark"] body.single .entry-content blockquote.info {
  background: rgba(208, 248, 160, 0.08) !important;
  border-color: rgba(208, 248, 160, 0.2) !important;
  border-left-color: var(--kosmos-lime) !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-question:before,
html[data-theme="dark"] body.single .entry-content blockquote.question:before,
html[data-theme="dark"] body.single .entry-content blockquote.is-style-info:before,
html[data-theme="dark"] body.single .entry-content blockquote.info:before {
  color: var(--kosmos-lime) !important;
}

/* Check / thumbs-up — lime */
body.single .entry-content blockquote.is-style-check,
body.single .entry-content blockquote.check,
body.single .entry-content blockquote.is-style-thumbs-up,
body.single .entry-content blockquote.thumbs-up {
  background: rgba(208, 248, 160, 0.18) !important;
  border-color: rgba(208, 248, 160, 0.45) !important;
  border-left-color: #9fd86a !important;
}

body.single .entry-content blockquote.is-style-check:before,
body.single .entry-content blockquote.check:before,
body.single .entry-content blockquote.is-style-thumbs-up:before,
body.single .entry-content blockquote.thumbs-up:before {
  color: #6a9e3d !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-check,
html[data-theme="dark"] body.single .entry-content blockquote.check,
html[data-theme="dark"] body.single .entry-content blockquote.is-style-thumbs-up,
html[data-theme="dark"] body.single .entry-content blockquote.thumbs-up {
  background: rgba(208, 248, 160, 0.12) !important;
  border-color: rgba(208, 248, 160, 0.28) !important;
  border-left-color: var(--kosmos-lime) !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-check:before,
html[data-theme="dark"] body.single .entry-content blockquote.check:before,
html[data-theme="dark"] body.single .entry-content blockquote.is-style-thumbs-up:before,
html[data-theme="dark"] body.single .entry-content blockquote.thumbs-up:before {
  color: var(--kosmos-lime) !important;
}

/* Warning — тёплый, но приглушённый */
body.single .entry-content blockquote.is-style-warning,
body.single .entry-content blockquote.warning {
  background: rgba(196, 140, 60, 0.1) !important;
  border-color: rgba(196, 140, 60, 0.28) !important;
  border-left-color: #c48c3c !important;
}

body.single .entry-content blockquote.is-style-warning:before,
body.single .entry-content blockquote.warning:before {
  color: #c48c3c !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-warning,
html[data-theme="dark"] body.single .entry-content blockquote.warning {
  background: rgba(208, 168, 80, 0.12) !important;
  border-color: rgba(208, 168, 80, 0.28) !important;
  border-left-color: #e0b45a !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-warning:before,
html[data-theme="dark"] body.single .entry-content blockquote.warning:before {
  color: #e0b45a !important;
}

/* Danger / thumbs-down */
body.single .entry-content blockquote.is-style-danger,
body.single .entry-content blockquote.danger,
body.single .entry-content blockquote.is-style-thumbs-down,
body.single .entry-content blockquote.thumbs-down {
  background: rgba(180, 70, 60, 0.08) !important;
  border-color: rgba(180, 70, 60, 0.22) !important;
  border-left-color: #b4463c !important;
}

body.single .entry-content blockquote.is-style-danger:before,
body.single .entry-content blockquote.danger:before,
body.single .entry-content blockquote.is-style-thumbs-down:before,
body.single .entry-content blockquote.thumbs-down:before {
  color: #b4463c !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-danger,
html[data-theme="dark"] body.single .entry-content blockquote.danger,
html[data-theme="dark"] body.single .entry-content blockquote.is-style-thumbs-down,
html[data-theme="dark"] body.single .entry-content blockquote.thumbs-down {
  background: rgba(220, 90, 80, 0.12) !important;
  border-color: rgba(220, 90, 80, 0.28) !important;
  border-left-color: #e07068 !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-danger:before,
html[data-theme="dark"] body.single .entry-content blockquote.danger:before,
html[data-theme="dark"] body.single .entry-content blockquote.is-style-thumbs-down:before,
html[data-theme="dark"] body.single .entry-content blockquote.thumbs-down:before {
  color: #e07068 !important;
}

/* Quote style */
body.single .entry-content blockquote.is-style-quote,
body.single .entry-content blockquote.quote {
  background: rgba(11, 37, 62, 0.04) !important;
  border-color: rgba(11, 37, 62, 0.12) !important;
  border-left-color: var(--kosmos-navy) !important;
}

body.single .entry-content blockquote.is-style-quote:before,
body.single .entry-content blockquote.quote:before {
  color: var(--kosmos-navy) !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-quote,
html[data-theme="dark"] body.single .entry-content blockquote.quote {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  border-left-color: var(--kosmos-lime) !important;
}

html[data-theme="dark"] body.single .entry-content blockquote.is-style-quote:before,
html[data-theme="dark"] body.single .entry-content blockquote.quote:before {
  color: var(--kosmos-lime) !important;
}

/* Meta / breadcrumbs / category */
body.single .breadcrumb,
body.single .breadcrumbs,
body.page .breadcrumb,
body.page .breadcrumbs {
  font-size: 13px;
  color: var(--kosmos-muted);
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif);
}

body.single .breadcrumb a,
body.single .breadcrumbs a {
  color: var(--kosmos-muted);
  text-decoration: none;
}

body.single .breadcrumb a:hover,
body.single .breadcrumbs a:hover {
  color: var(--kosmos-page-fg);
}

body.single .entry-meta,
body.single .post-card__meta,
body.single .entry-info {
  font-size: 13px;
  color: var(--kosmos-muted);
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif);
}

body.single .post-card__category a,
body.single .entry-category a {
  color: var(--kosmos-blue) !important;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
}

html[data-theme="dark"] body.single .post-card__category a,
html[data-theme="dark"] body.single .entry-category a {
  color: var(--kosmos-lime) !important;
}

/* Комментарии */
body.single .comments-title,
body.single .comment-reply-title {
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--kosmos-page-fg);
}

/* Comment form — на всю ширину колонки, без float 32% от Reboot */
body.single .comment-respond,
body.single #respond,
body.single #comments .comment-respond {
  width: 100% !important;
  max-width: 100% !important;
}

body.single .comment-form,
body.single #commentform {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 0 16px;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  float: none !important;
  clear: both;
}

body.single .comment-form > p,
body.single .comment-form .comment-form-author,
body.single .comment-form .comment-form-email,
body.single .comment-form .comment-form-url,
body.single .comment-form .comment-form-comment,
body.single .comment-form .comment-form-cookies-consent,
body.single .comment-form .form-submit,
body.single .comment-respond .comment-form-author,
body.single .comment-respond .comment-form-email,
body.single .comment-respond .comment-form-url {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 1.15rem 0 !important;
  margin-left: 0 !important;
  box-sizing: border-box;
}

body.single .comment-form input[type="text"],
body.single .comment-form input[type="email"],
body.single .comment-form input[type="url"],
body.single .comment-form textarea,
body.single .comment-respond input[type="text"],
body.single .comment-respond input[type="email"],
body.single .comment-respond input[type="url"],
body.single .comment-respond textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  border-radius: 14px !important;
  border: 1px solid rgba(10, 10, 10, 0.14) !important;
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif) !important;
  background: var(--kosmos-page-bg) !important;
  color: var(--kosmos-page-fg) !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  -webkit-appearance: none;
  appearance: none;
}

body.single .comment-form input::placeholder,
body.single .comment-form textarea::placeholder,
body.single .comment-respond input::placeholder,
body.single .comment-respond textarea::placeholder {
  color: var(--kosmos-muted) !important;
  opacity: 1 !important;
  font-weight: 500 !important;
  font-size: 16px !important;
}

body.single .comment-form textarea,
body.single .comment-respond textarea {
  min-height: 168px !important;
  resize: vertical;
}

html[data-theme="dark"] body.single .comment-form input[type="text"],
html[data-theme="dark"] body.single .comment-form input[type="email"],
html[data-theme="dark"] body.single .comment-form input[type="url"],
html[data-theme="dark"] body.single .comment-form textarea,
html[data-theme="dark"] body.single .comment-respond input[type="text"],
html[data-theme="dark"] body.single .comment-respond input[type="email"],
html[data-theme="dark"] body.single .comment-respond input[type="url"],
html[data-theme="dark"] body.single .comment-respond textarea {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: #141414 !important;
  color: #f4f4f4 !important;
}

/* Видимые подписи полей */
body.single .comment-form .kosmos-comment-label,
body.single .comment-form label.screen-reader-text,
body.single .comment-form p > label[for]:not([for="wp-comment-cookies-consent"]) {
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  line-height: 1.3 !important;
  color: var(--kosmos-page-fg) !important;
}

body.single .comment-form .required {
  color: var(--kosmos-blue);
  font-weight: 700;
}

html[data-theme="dark"] body.single .comment-form .required {
  color: var(--kosmos-lime);
}

body.single .comment-form .kosmos-comment-optional {
  font-weight: 500;
  color: var(--kosmos-muted);
  letter-spacing: 0;
}

@media (min-width: 720px) {
  body.single .comment-form,
  body.single #commentform {
    grid-template-columns: 1fr 1fr;
  }

  body.single .comment-form-author,
  body.single .comment-form-email {
    grid-column: span 1;
  }

  body.single .comment-form-url,
  body.single .comment-form-comment,
  body.single .comment-form-cookies-consent,
  body.single .form-submit,
  body.single .comment-notes-after,
  body.single .comment-form > p.akismet-fields-container,
  body.single .comment-form > p[style*="display: none"] {
    grid-column: 1 / -1;
  }
}

body.single .comment-form-cookies-consent {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--kosmos-muted);
}

body.single .comment-form-cookies-consent label {
  display: inline !important;
  margin: 0 !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  color: var(--kosmos-muted) !important;
  letter-spacing: 0 !important;
  clip: auto !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
}

body.single .comment-form-cookies-consent input {
  width: auto !important;
  margin-top: 3px;
  flex-shrink: 0;
}

body.single .comment-form .submit,
body.single .form-submit .submit {
  border-radius: 999px !important;
  border: 0 !important;
  background: var(--kosmos-lime) !important;
  color: var(--kosmos-navy) !important;
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  padding: 14px 28px !important;
  cursor: pointer;
  width: auto !important;
  min-width: 200px;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="light"] body.single .comment-form .submit,
html[data-theme="light"] body.single .form-submit .submit {
  background: var(--kosmos-blue) !important;
  color: #fff !important;
}

body.single .comment-form .submit:hover,
body.single .form-submit .submit:hover {
  transform: none !important;
  opacity: 0.92;
}

/* Related — лёгкие правила; полный блок ниже */

/* Сайдбар — если включён */
body:not(.kosmos-home-hub) .widget-area {
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif);
}

body:not(.kosmos-home-hub) .widget-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Архивы / поиск — карточки */
body.archive .post-card,
body.search .post-card,
body.blog:not(.kosmos-home-hub) .post-card {
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif);
}

body.archive .post-card__title a,
body.search .post-card__title a {
  color: var(--kosmos-page-fg) !important;
  text-decoration: none !important;
}

/* —— Hero статьи: не больше слайдера (1112 × ~420), не на весь экран —— */
body.single .entry-image--fullscreen,
body.single .entry-image--wide,
body.single .entry-image--full,
body.single .entry-image--big {
  width: 100% !important;
  max-width: var(--kosmos-content-max) !important;
  height: 380px !important;
  min-height: 280px !important;
  margin: 0 auto 28px !important;
  padding: 0 !important;
  border-radius: 20px;
  overflow: hidden;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  transform: none !important;
  -webkit-transform: none !important;
  flex: none !important;
  -ms-flex: none !important;
  box-sizing: border-box;
  position: relative;
}

@media (min-width: 900px) {
  body.single .entry-image--fullscreen,
  body.single .entry-image--wide,
  body.single .entry-image--full,
  body.single .entry-image--big {
    height: 420px !important;
  }
}

body.single .entry-image__body {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left !important;
  height: 100% !important;
  min-height: 100%;
  box-sizing: border-box;
  padding: 28px 24px 26px !important;
  background-image: linear-gradient(
    180deg,
    rgba(7, 7, 7, 0) 0%,
    rgba(7, 7, 7, 0.15) 40%,
    rgba(7, 7, 7, 0.55) 100%
  ) !important;
  color: #fff !important;
}

@media (min-width: 900px) {
  body.single .entry-image__body {
    padding: 36px 32px 30px !important;
  }
}

body.single .entry-image__body .entry-title {
  color: #fff !important;
  font-size: clamp(24px, 3.2vw, 38px) !important;
  margin: 10px 0 12px !important;
  max-width: 36rem;
}

body.single .entry-image__body .breadcrumb,
body.single .entry-image__body .breadcrumbs {
  color: rgba(255, 255, 255, 0.7) !important;
}

body.single .entry-image__body .breadcrumb a,
body.single .entry-image__body .breadcrumbs a {
  color: rgba(255, 255, 255, 0.75) !important;
}

body.single .entry-image__body .breadcrumb a:hover {
  color: #fff !important;
}

body.single .entry-image__body .post-card__category a {
  color: var(--kosmos-lime) !important;
}

/* Gutenberg alignfull/wide — внутри 1112, без 100vw */
body.single .entry-content .alignfull,
body.single .entry-content .alignwide,
body.page .entry-content .alignfull,
body.page .entry-content .alignwide,
body.single .entry-content .wp-block-image.alignfull,
body.single .entry-content .wp-block-image.alignwide,
body.single .entry-content .wp-block-media-text.alignfull,
body.single .entry-content .wp-block-cover.alignfull {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  transform: none !important;
  -webkit-transform: none !important;
}

body.single .entry-content .alignfull img,
body.single .entry-content .alignwide img,
body.single .entry-content .wp-block-image.alignfull img,
body.single .entry-content .wp-block-image.alignwide img {
  width: 100%;
  height: auto;
  border-radius: 14px;
}

/* ==========================================================================
   Article surface — Apple-level reading experience (#primary / .article-card)
   Только CSS: itemscope / itemprop / H1 / the_content не трогаем.
   ========================================================================== */

body.single #primary.content-area,
body.page #primary.content-area {
  --kn-article-pad-x: 22px;
  --kn-article-pad-y: 28px;
  --kn-article-measure: 42rem; /* ~672px — комфортная колонка чтения */
  --kn-article-surface: rgba(255, 255, 255, 0.72);
  --kn-article-border: rgba(10, 10, 10, 0.08);
  --kn-article-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 24px 64px -28px rgba(11, 37, 62, 0.18),
    0 8px 24px -12px rgba(7, 7, 7, 0.08);
  --kn-chip-bg: rgba(11, 37, 62, 0.05);
  --kn-chip-fg: rgba(7, 7, 7, 0.72);
  --kn-lead-fg: rgba(7, 7, 7, 0.78);
  --kn-rule: rgba(10, 10, 10, 0.08);
  --kn-toc-bg: rgba(11, 37, 62, 0.035);
  --kn-toc-hover: rgba(208, 248, 160, 0.35);
  --kn-code-bg: rgba(11, 37, 62, 0.06);
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

html[data-theme="dark"] body.single #primary.content-area,
html[data-theme="dark"] body.page #primary.content-area {
  --kn-article-surface: rgba(22, 22, 22, 0.88);
  --kn-article-border: rgba(255, 255, 255, 0.08);
  --kn-article-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 28px 72px -24px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(208, 248, 160, 0.04);
  --kn-chip-bg: rgba(255, 255, 255, 0.06);
  --kn-chip-fg: rgba(244, 244, 244, 0.78);
  --kn-lead-fg: rgba(244, 244, 244, 0.78);
  --kn-rule: rgba(255, 255, 255, 0.1);
  --kn-toc-bg: rgba(255, 255, 255, 0.04);
  --kn-toc-hover: rgba(208, 248, 160, 0.12);
  --kn-code-bg: rgba(255, 255, 255, 0.07);
}

@media (min-width: 768px) {
  body.single #primary.content-area,
  body.page #primary.content-area {
    --kn-article-pad-x: 40px;
    --kn-article-pad-y: 40px;
  }
}

@media (min-width: 1024px) {
  body.single #primary.content-area,
  body.page #primary.content-area {
    --kn-article-pad-x: 52px;
    --kn-article-pad-y: 48px;
  }
}

body.single #main.article-card,
body.page #main.article-card,
body.single #main.site-main,
body.page #main.site-main {
  position: relative;
  isolation: isolate;
  background: var(--kn-article-surface) !important;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--kn-article-border) !important;
  border-radius: 28px !important;
  box-shadow: var(--kn-article-shadow);
  padding: var(--kn-article-pad-y) var(--kn-article-pad-x) calc(var(--kn-article-pad-y) + 8px) !important;
  margin: 0 0 40px !important;
  overflow: hidden;
  box-sizing: border-box;
}

body.single #main.article-card::before,
body.page #main.site-main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(208, 248, 160, 0.85),
    rgba(59, 100, 140, 0.55),
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

html[data-theme="light"] body.single #main.article-card::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 100, 140, 0.45),
    rgba(208, 248, 160, 0.7),
    transparent
  );
}

/* Мягкий ambient glow в углу карточки */
body.single #main.article-card::after,
body.page #main.site-main::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(208, 248, 160, 0.16) 0%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 0;
}

html[data-theme="light"] body.single #main.article-card::after {
  background: radial-gradient(
    circle,
    rgba(59, 100, 140, 0.1) 0%,
    transparent 68%
  );
}

body.single #main.article-card > *,
body.page #main.site-main > * {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  body.single #main.article-card,
  body.page #main.site-main {
    animation: kosmos-article-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

@keyframes kosmos-article-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Meta chips —— */
body.single .entry-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch;
  justify-content: flex-start !important;
  gap: 8px !important;
  max-width: var(--kn-article-measure);
  margin: 0 auto 28px !important;
  padding: 0 0 24px !important;
  border-bottom: 1px solid var(--kn-rule) !important;
  font-size: 13px !important;
  line-height: 1.35;
  color: var(--kn-chip-fg) !important;
}

body.single .entry-meta > span {
  display: inline-flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px 6px;
  min-width: 0;
  position: relative !important;
  padding: 8px 12px 8px 12px !important;
  border-radius: 999px;
  background: var(--kn-chip-bg);
  border: 1px solid var(--kn-rule);
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* Reboot: иконки ::before с position:absolute + color:#4d3bfe — ломают чипы */
body.single .entry-meta .entry-author:before,
body.single .entry-meta .entry-comments:before,
body.single .entry-meta .entry-date:before,
body.single .entry-meta .entry-time:before,
body.single .entry-meta .entry-views:before {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  -webkit-transform: none !important;
  -ms-transform: none !important;
  display: inline-block !important;
  flex-shrink: 0;
  margin: 0 2px 0 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  color: var(--kosmos-blue) !important;
  vertical-align: middle;
}

html[data-theme="dark"] body.single .entry-meta .entry-author:before,
html[data-theme="dark"] body.single .entry-meta .entry-comments:before,
html[data-theme="dark"] body.single .entry-meta .entry-date:before,
html[data-theme="dark"] body.single .entry-meta .entry-time:before,
html[data-theme="dark"] body.single .entry-meta .entry-views:before {
  color: var(--kosmos-lime) !important;
}

@media (min-width: 640px) {
  body.single .entry-meta > span {
    padding: 8px 14px !important;
  }
}

body.single .entry-meta .entry-label {
  display: inline !important;
  text-transform: none !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  color: var(--kosmos-muted) !important;
  opacity: 1;
  white-space: nowrap;
  overflow: visible !important;
}

body.single .entry-meta .entry-author,
body.single .entry-meta .entry-time,
body.single .entry-meta .entry-views,
body.single .entry-meta .entry-date,
body.single .entry-meta .entry-comments {
  color: var(--kosmos-page-fg) !important;
  font-weight: 600;
}

body.single .entry-meta a {
  color: inherit !important;
  text-decoration: none !important;
}

body.single .entry-meta a:hover {
  color: var(--kosmos-blue) !important;
}

html[data-theme="dark"] body.single .entry-meta a:hover {
  color: var(--kosmos-lime) !important;
}

/* —— Lead / excerpt —— */
body.single .entry-excerpt {
  max-width: var(--kn-article-measure) !important;
  margin: 0 auto 2rem !important;
  padding: 0 !important;
  font-size: clamp(1.15rem, 1.8vw, 1.375rem) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  line-height: 1.45 !important;
  color: var(--kn-lead-fg) !important;
}

/* —— Reading column —— */
body.single .entry-content,
body.page .entry-content {
  max-width: var(--kn-article-measure);
  margin-left: auto;
  margin-right: auto;
  font-size: 18px !important;
  line-height: 1.75 !important;
  letter-spacing: -0.011em;
  color: var(--kosmos-page-fg);
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] body.single .entry-content,
html[data-theme="dark"] body.page .entry-content {
  color: rgba(244, 244, 244, 0.9);
}

body.single .entry-content > p,
body.page .entry-content > p {
  margin: 0 0 1.35em !important;
}

body.single .entry-content > p:first-of-type,
body.page .entry-content > p:first-of-type {
  font-size: 1.05em;
}

body.single .entry-content a,
body.page .entry-content a {
  color: var(--kosmos-blue) !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(59, 100, 140, 0.35);
  transition: text-decoration-color 0.2s ease, opacity 0.2s ease;
}

html[data-theme="dark"] body.single .entry-content a,
html[data-theme="dark"] body.page .entry-content a {
  color: var(--kosmos-lime) !important;
  text-decoration-color: rgba(208, 248, 160, 0.35);
}

body.single .entry-content a:hover,
body.page .entry-content a:hover {
  opacity: 1;
  text-decoration-color: currentColor;
}

/* Headings */
body.single .entry-content h2,
body.single .entry-content .wp-block-heading,
body.page .entry-content h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  margin: 2.4em 0 0.75em !important;
  padding-top: 0.35em;
  color: var(--kosmos-page-fg) !important;
  scroll-margin-top: 96px;
}

body.single .entry-content h2:first-child,
body.single .entry-content h3:first-child {
  margin-top: 1.2em !important;
}

body.single .entry-content h3,
body.page .entry-content h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.3 !important;
  margin: 1.9em 0 0.55em !important;
  color: var(--kosmos-page-fg) !important;
  scroll-margin-top: 96px;
}

body.single .entry-content h4 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  margin: 1.6em 0 0.45em !important;
}

/* Lists — Reboot рисует номер/точку через li:before { position:absolute }.
   Нельзя уменьшать padding-left у li — иначе цифры наезжают на текст. */
body.single .entry-content ul:not(.table-of-contents__list),
body.single .entry-content ol:not(.table-of-contents__list),
body.page .entry-content ul,
body.page .entry-content ol {
  margin: 1.25em 0 1.5em !important;
  padding: 0 !important;
  list-style: none !important;
  max-width: 100%;
  overflow: visible !important;
}

body.single .entry-content ol.wp-block-list,
body.single .entry-content ol:not([class]):not(.table-of-contents__list),
body.page .entry-content ol.wp-block-list,
body.page .entry-content ol:not([class]) {
  counter-reset: section;
}

body.single .entry-content ul.wp-block-list > li,
body.single .entry-content ul:not([class]) > li,
body.single .entry-content ol.wp-block-list > li,
body.single .entry-content ol:not([class]) > li,
body.page .entry-content ul.wp-block-list > li,
body.page .entry-content ul:not([class]) > li,
body.page .entry-content ol.wp-block-list > li,
body.page .entry-content ol:not([class]) > li {
  position: relative !important;
  display: block !important;
  margin: 0.7em 0 !important;
  padding: 0 0 0 2.25em !important;
  list-style: none !important;
}

body.single .entry-content ul > li::marker,
body.single .entry-content ol > li::marker,
body.page .entry-content ul > li::marker,
body.page .entry-content ol > li::marker {
  content: none !important;
}

/* OL numbers */
body.single .entry-content ol.wp-block-list > li:before,
body.single .entry-content ol:not([class]) > li:before,
body.page .entry-content ol.wp-block-list > li:before,
body.page .entry-content ol:not([class]) > li:before {
  position: absolute !important;
  left: 0 !important;
  top: 0.05em !important;
  width: 1.85em;
  margin: 0 !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  font-size: 0.95em;
  line-height: 1.6;
  text-align: right;
  color: var(--kosmos-blue) !important;
  counter-increment: section;
  content: counter(section) "." !important;
}

html[data-theme="dark"] body.single .entry-content ol.wp-block-list > li:before,
html[data-theme="dark"] body.single .entry-content ol:not([class]) > li:before,
html[data-theme="dark"] body.page .entry-content ol.wp-block-list > li:before,
html[data-theme="dark"] body.page .entry-content ol:not([class]) > li:before {
  color: var(--kosmos-lime) !important;
}

body.single .entry-content ol > li > ol > li,
body.page .entry-content ol > li > ol > li {
  padding-left: 2.75em !important;
}

body.single .entry-content ol > li > ol > li:before,
body.page .entry-content ol > li > ol > li:before {
  content: counters(section, ".") "." !important;
  width: 2.4em;
}

/* UL bullets */
body.single .entry-content ul.wp-block-list > li:before,
body.single .entry-content ul:not([class]) > li:before,
body.page .entry-content ul.wp-block-list > li:before,
body.page .entry-content ul:not([class]) > li:before {
  position: absolute !important;
  top: 0.55em !important;
  left: 0.35em !important;
  display: block !important;
  width: 7px !important;
  height: 7px !important;
  content: "" !important;
  border: none !important;
  border-radius: 50% !important;
  background: var(--kosmos-blue) !important;
  box-sizing: border-box;
}

html[data-theme="dark"] body.single .entry-content ul.wp-block-list > li:before,
html[data-theme="dark"] body.single .entry-content ul:not([class]) > li:before,
html[data-theme="dark"] body.page .entry-content ul.wp-block-list > li:before,
html[data-theme="dark"] body.page .entry-content ul:not([class]) > li:before {
  background: var(--kosmos-lime) !important;
}

body.single .entry-content li > ul,
body.single .entry-content li > ol,
body.page .entry-content li > ul,
body.page .entry-content li > ol {
  margin: 0.45em 0 0.2em !important;
}

/* Images / figures */
body.single .entry-content figure,
body.single .entry-content .wp-block-image,
body.page .entry-content figure {
  margin: 2rem 0 !important;
}

body.single .entry-content img,
body.page .entry-content img {
  border-radius: 16px !important;
  box-shadow: 0 12px 40px -18px rgba(7, 7, 7, 0.35);
}

html[data-theme="dark"] body.single .entry-content img {
  box-shadow: 0 16px 48px -16px rgba(0, 0, 0, 0.7);
}

body.single .entry-content figcaption,
body.single .entry-content .wp-caption-text {
  margin-top: 0.75em !important;
  font-size: 13px !important;
  color: var(--kosmos-muted) !important;
  text-align: center;
  letter-spacing: 0.01em;
}

/* Inline code / pre */
body.single .entry-content code,
body.page .entry-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: var(--kn-code-bg) !important;
}

body.single .entry-content pre,
body.page .entry-content pre {
  margin: 1.5em 0 !important;
  padding: 1.1em 1.25em !important;
  border-radius: 16px !important;
  background: var(--kn-code-bg) !important;
  border: 1px solid var(--kn-rule);
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.55;
}

body.single .entry-content pre code {
  padding: 0;
  background: transparent !important;
}

/* HR */
body.single .entry-content hr {
  border: 0 !important;
  height: 1px !important;
  margin: 2.5em auto !important;
  max-width: 120px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--kosmos-lime),
    transparent
  );
}

/* Tables */
body.single .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75em 0;
  font-size: 0.95em;
  overflow: hidden;
  border-radius: 14px;
}

body.single .entry-content th,
body.single .entry-content td {
  padding: 12px 14px;
  border: 1px solid var(--kn-rule);
  text-align: left;
}

body.single .entry-content th {
  background: var(--kn-chip-bg);
  font-weight: 700;
}

/* —— Table of contents —— */
body.single .table-of-contents {
  max-width: 100% !important;
  margin: 0 0 2.25em !important;
  padding: 0 !important;
  background: var(--kn-toc-bg) !important;
  border: 1px solid var(--kn-rule) !important;
  border-radius: 20px !important;
  overflow: hidden;
  box-shadow: none !important;
  counter-reset: point;
}

body.single .table-of-contents__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kosmos-muted) !important;
  border-bottom: 1px solid var(--kn-rule);
  background: transparent !important;
}

body.single .table-of-contents__hide {
  cursor: pointer;
  color: inherit !important;
}

body.single .table-of-contents__hide:after {
  content: "▾" !important;
  margin-left: 8px;
  opacity: 0.7;
  font-size: 11px;
}

body.single .table-of-contents.open .table-of-contents__hide:after {
  content: "▴" !important;
}

/* Сброс Reboot + наших ol-стилей: цифры не должны уезжать от текста */
body.single .table-of-contents ol,
body.single .table-of-contents .table-of-contents__list,
body.single .entry-content .table-of-contents ol {
  display: block !important;
  margin: 0 !important;
  padding: 10px 12px 14px !important;
  list-style: none !important;
  counter-reset: point;
}

body.single .table-of-contents ol li,
body.single .table-of-contents .table-of-contents__list li,
body.single .entry-content .table-of-contents ol li {
  display: flex !important;
  flex-direction: row;
  align-items: baseline;
  gap: 0;
  margin: 2px 0 !important;
  padding: 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
}

body.single .table-of-contents ol li::marker,
body.single .entry-content .table-of-contents ol li::marker {
  content: none !important;
  font-size: 0 !important;
}

/* Номер в одной строке с ссылкой, фиксированная колонка */
body.single .table-of-contents ol li:before,
body.single .entry-content .table-of-contents ol li:before {
  display: inline-flex !important;
  flex: 0 0 2rem;
  align-items: center;
  justify-content: flex-end;
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
  margin: 0 10px 0 0 !important;
  padding: 10px 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.35 !important;
  opacity: 1 !important;
  color: var(--kosmos-blue) !important;
  content: counter(point) !important;
  text-align: right;
  box-sizing: border-box;
}

html[data-theme="dark"] body.single .table-of-contents ol li:before,
html[data-theme="dark"] body.single .entry-content .table-of-contents ol li:before {
  color: var(--kosmos-lime) !important;
}

body.single .table-of-contents ol .level-1,
body.single .entry-content .table-of-contents ol .level-1 {
  counter-increment: point;
  counter-reset: sublist;
  margin-left: 0 !important;
}

body.single .table-of-contents ol .level-1:before {
  content: counter(point) !important;
  width: 2rem !important;
}

body.single .table-of-contents ol .level-2,
body.single .entry-content .table-of-contents ol .level-2 {
  counter-reset: sublist3;
  margin-left: 0 !important;
  padding-left: 1.5rem !important;
  font-size: inherit !important;
}

body.single .table-of-contents ol .level-2:before {
  content: counter(point) "." counter(sublist) !important;
  counter-increment: sublist;
  flex: 0 0 2.75rem;
  width: 2.75rem !important;
  min-width: 2.75rem !important;
  max-width: 2.75rem !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  opacity: 0.85 !important;
}

body.single .table-of-contents ol .level-3,
body.single .entry-content .table-of-contents ol .level-3 {
  margin-left: 0 !important;
  padding-left: 2.75rem !important;
}

body.single .table-of-contents ol .level-3:before {
  content: counter(point) "." counter(sublist) "." counter(sublist3) !important;
  counter-increment: sublist3;
  flex: 0 0 3.25rem;
  width: 3.25rem !important;
  min-width: 3.25rem !important;
  max-width: 3.25rem !important;
  font-size: 12px !important;
}

body.single .table-of-contents ol li a,
body.single .table-of-contents__list a {
  display: block !important;
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px 10px 0 !important;
  border-radius: 12px;
  color: var(--kosmos-page-fg) !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  transition: color 0.18s ease, opacity 0.18s ease;
}

body.single .table-of-contents ol .level-2 a,
body.single .table-of-contents__list .level-2 a {
  padding-left: 0 !important;
  font-size: 14px !important;
  font-weight: 500;
  color: var(--kn-chip-fg) !important;
}

/* Hover на всю строку */
body.single .table-of-contents ol li:hover {
  background: var(--kn-toc-hover);
  border-radius: 12px;
}

body.single .table-of-contents ol li:hover a {
  color: var(--kosmos-page-fg) !important;
  background: transparent !important;
  text-decoration: none !important;
}

/* Thumbnail inside article (non-wide) */
body.single .article-post > .entry-image.post-card__thumbnail,
body.single .article-post > .entry-image {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

body.single .article-post > .entry-title {
  max-width: var(--kn-article-measure);
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem) !important;
  margin-bottom: 1rem !important;
}

body.single .article-post > .breadcrumb {
  max-width: var(--kn-article-measure);
  margin: 0 auto 1rem;
}

/* Tags */
body.single .entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: var(--kn-article-measure);
  margin: 2rem auto 0;
}

body.single .entry-tag {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--kn-chip-bg);
  border: 1px solid var(--kn-rule);
  color: var(--kosmos-page-fg) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

body.single .entry-tag:hover {
  border-color: var(--kosmos-lime);
  background: rgba(208, 248, 160, 0.18);
}

/* Rating — хочется нажать */
body.single .rating-box.kosmos-rating,
body.single .rating-box {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  max-width: var(--kn-article-measure);
  margin: 2.75rem auto 0 !important;
  padding: 28px 28px 26px !important;
  border-radius: 24px;
  background: linear-gradient(
    165deg,
    rgba(208, 248, 160, 0.14) 0%,
    rgba(11, 37, 62, 0.04) 45%,
    rgba(59, 100, 140, 0.08) 100%
  );
  border: 1px solid rgba(208, 248, 160, 0.35);
  box-shadow: 0 18px 48px -28px rgba(11, 37, 62, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
}

html[data-theme="dark"] body.single .rating-box.kosmos-rating,
html[data-theme="dark"] body.single .rating-box {
  background: linear-gradient(
    165deg,
    rgba(208, 248, 160, 0.1) 0%,
    rgba(22, 22, 22, 0.9) 50%,
    rgba(59, 100, 140, 0.12) 100%
  );
  border-color: rgba(208, 248, 160, 0.22);
  box-shadow: 0 22px 56px -24px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(208, 248, 160, 0.06) inset;
}

body.single .kosmos-rating__glow {
  position: absolute;
  top: -40%;
  left: 50%;
  width: 280px;
  height: 180px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse,
    rgba(208, 248, 160, 0.35) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

body.single .rating-box > *:not(.kosmos-rating__glow) {
  position: relative;
  z-index: 1;
}

body.single .kosmos-rating__eyebrow {
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kosmos-blue) !important;
}

html[data-theme="dark"] body.single .kosmos-rating__eyebrow {
  color: var(--kosmos-lime) !important;
}

body.single .rating-box__header {
  margin: 0 !important;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--kosmos-page-fg) !important;
}

body.single .kosmos-rating__hint {
  margin: 0 0 6px !important;
  font-size: 14px !important;
  font-weight: 500;
  color: var(--kosmos-muted) !important;
}

body.single .rating-box .wp-star-rating {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(10, 10, 10, 0.06);
  white-space: nowrap;
}

html[data-theme="dark"] body.single .rating-box .wp-star-rating {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

body.single .rating-box .star-rating-item {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  cursor: pointer !important;
  color: rgba(11, 37, 62, 0.22) !important;
  transition: color 0.15s ease, transform 0.15s ease;
}

html[data-theme="dark"] body.single .rating-box .star-rating-item {
  color: rgba(255, 255, 255, 0.22) !important;
}

body.single .rating-box .star-rating-item .i-ico {
  width: 28px !important;
  height: 28px !important;
  display: block;
}

body.single .rating-box .star-rating-item.hover,
body.single .rating-box .star-rating-item:hover,
body.single .rating-box .wp-star-rating.hover .star-rating-item.hover {
  color: var(--kosmos-lime) !important;
  transform: translateY(-3px) scale(1.08);
}

html[data-theme="light"] body.single .rating-box .star-rating-item.hover,
html[data-theme="light"] body.single .rating-box .wp-star-rating.hover .star-rating-item.hover {
  color: #c9a227 !important; /* тёплый gold на светлой теме — читаемее lime */
}

/* Закрашенный скор (после оценки / текущий) */
body.single .rating-box .star-rating--score-1:not(.hover) .star-rating-item:nth-child(1),
body.single .rating-box .star-rating--score-2:not(.hover) .star-rating-item:nth-child(-n + 2),
body.single .rating-box .star-rating--score-3:not(.hover) .star-rating-item:nth-child(-n + 3),
body.single .rating-box .star-rating--score-4:not(.hover) .star-rating-item:nth-child(-n + 4),
body.single .rating-box .star-rating--score-5:not(.hover) .star-rating-item:nth-child(-n + 5) {
  color: var(--kosmos-lime) !important;
}

html[data-theme="light"] body.single .rating-box .star-rating--score-1:not(.hover) .star-rating-item:nth-child(1),
html[data-theme="light"] body.single .rating-box .star-rating--score-2:not(.hover) .star-rating-item:nth-child(-n + 2),
html[data-theme="light"] body.single .rating-box .star-rating--score-3:not(.hover) .star-rating-item:nth-child(-n + 3),
html[data-theme="light"] body.single .rating-box .star-rating--score-4:not(.hover) .star-rating-item:nth-child(-n + 4),
html[data-theme="light"] body.single .rating-box .star-rating--score-5:not(.hover) .star-rating-item:nth-child(-n + 5) {
  color: #c9a227 !important;
}

body.single .rating-box .star-rating-text {
  margin-top: 4px;
  font-size: 13px;
  color: var(--kosmos-muted);
}

body.single .rating-box.is-rated-pulse {
  animation: kosmos-rating-pulse 0.55s ease;
}

@keyframes kosmos-rating-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(208, 248, 160, 0.35),
      0 18px 48px -28px rgba(11, 37, 62, 0.35);
  }
  100% {
    transform: scale(1);
  }
}

/* Burst layer (как lk-tesla-burst) */
.kosmos-rating-burst {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
  overflow: hidden;
}

.kosmos-rating-burst__star {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.28));
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c9a227;
}

.kosmos-rating-burst__star svg,
.kosmos-rating-burst__star .i-ico {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  body.single .rating-box.is-rated-pulse {
    animation: none;
  }
}

/* Share */
body.single .entry-social {
  max-width: var(--kn-article-measure);
  margin: 1.75rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--kn-rule);
}

body.single .entry-social .social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.single .social-button {
  border-radius: 12px !important;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

body.single .social-button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Author box */
body.single .author-box {
  max-width: var(--kn-article-measure);
  margin: 2rem auto 0;
  padding: 22px !important;
  border-radius: 20px !important;
  background: var(--kn-toc-bg) !important;
  border: 1px solid var(--kn-rule) !important;
}

/* Comments — современный раздел обсуждения (чат-лента) */
body.single #main .comments-area.kosmos-comments,
body.single #main .comments-area {
  max-width: var(--kn-article-measure);
  margin: 2.75rem auto 0 !important;
  padding: 0 !important;
  border-top: 0 !important;
}

body.single .kosmos-comments {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

body.single .kosmos-comments #respond,
body.single .kosmos-comments .comment-respond {
  position: relative;
  margin: 0 !important;
  padding: 24px 22px 22px !important;
  border-radius: 20px;
  background: linear-gradient(
    165deg,
    rgba(208, 248, 160, 0.1) 0%,
    rgba(11, 37, 62, 0.03) 55%,
    rgba(59, 100, 140, 0.06) 100%
  );
  border: 1px solid rgba(208, 248, 160, 0.28);
  box-sizing: border-box;
}

html[data-theme="dark"] body.single .kosmos-comments #respond,
html[data-theme="dark"] body.single .kosmos-comments .comment-respond {
  background: linear-gradient(
    165deg,
    rgba(208, 248, 160, 0.08) 0%,
    rgba(22, 22, 22, 0.85) 50%,
    rgba(59, 100, 140, 0.1) 100%
  );
  border-color: rgba(208, 248, 160, 0.18);
}

body.single .kosmos-comments .comment-reply-title,
body.single .kosmos-comments #reply-title {
  margin: 0 0 18px !important;
  font-size: clamp(1.2rem, 2vw, 1.45rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: var(--kosmos-page-fg) !important;
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif) !important;
}

body.single .kosmos-comments__feed-head {
  margin: 8px 0 0;
  padding: 0 2px;
}

body.single .kosmos-comments__eyebrow {
  margin: 0 0 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kosmos-blue) !important;
}

html[data-theme="dark"] body.single .kosmos-comments__eyebrow {
  color: var(--kosmos-lime) !important;
}

body.single .kosmos-comments__feed-title {
  margin: 0 0 6px !important;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  color: var(--kosmos-page-fg) !important;
}

body.single .kosmos-comments__feed-hint {
  margin: 0 !important;
  font-size: 14px !important;
  color: var(--kosmos-muted) !important;
}

body.single .kosmos-comments .comment-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.single .kosmos-comments .comment-list > .comment,
body.single .kosmos-comments .comment-list .comment {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Карточка сообщения */
body.single .kosmos-comments .comment-body {
  position: relative;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "avatar meta"
    "avatar content"
    "avatar reply";
  column-gap: 14px;
  row-gap: 6px;
  margin: 0 !important;
  padding: 16px 16px 14px !important;
  padding-left: 16px !important; /* сброс Reboot 50px */
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(10, 10, 10, 0.08);
  box-shadow: 0 10px 28px -22px rgba(11, 37, 62, 0.35);
  box-sizing: border-box;
}

html[data-theme="dark"] body.single .kosmos-comments .comment-body {
  background: rgba(22, 22, 22, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px -20px rgba(0, 0, 0, 0.7);
}

body.single .kosmos-comments .comment-avatar {
  grid-area: avatar;
  width: 48px !important;
  margin: 0 !important;
  position: relative;
  z-index: 1;
}

body.single .kosmos-comments .comment-avatar img,
body.single .kosmos-comments .comment-avatar .avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  display: block;
  object-fit: cover;
  border: 2px solid rgba(208, 248, 160, 0.55);
  box-shadow: 0 4px 12px rgba(11, 37, 62, 0.12);
}

html[data-theme="dark"] body.single .kosmos-comments .comment-avatar img {
  border-color: rgba(208, 248, 160, 0.35);
}

body.single .kosmos-comments .comment-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 2px 0 4px !important;
}

body.single .kosmos-comments .comment-author,
body.single .kosmos-comments cite.comment-author {
  font-style: normal !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: -0.015em;
  color: var(--kosmos-page-fg) !important;
  cursor: pointer;
}

body.single .kosmos-comments .comment-author-post {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(208, 248, 160, 0.35);
  color: var(--kosmos-navy) !important;
}

html[data-theme="dark"] body.single .kosmos-comments .comment-author-post {
  background: rgba(208, 248, 160, 0.18);
  color: var(--kosmos-lime) !important;
}

body.single .kosmos-comments .comment-time {
  font-size: 12px !important;
  font-weight: 500;
  color: var(--kosmos-muted) !important;
}

body.single .kosmos-comments .comment-content {
  grid-area: content;
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: var(--kosmos-page-fg) !important;
  letter-spacing: -0.01em;
}

body.single .kosmos-comments .comment-content p {
  margin: 0 0 0.65em !important;
}

body.single .kosmos-comments .comment-content p:last-child {
  margin-bottom: 0 !important;
}

body.single .kosmos-comments .comment-content a {
  color: var(--kosmos-blue) !important;
  text-underline-offset: 2px;
}

html[data-theme="dark"] body.single .kosmos-comments .comment-content a {
  color: var(--kosmos-lime) !important;
}

body.single .kosmos-comments .reply {
  grid-area: reply;
  margin: 4px 0 0 !important;
}

body.single .kosmos-comments .comment-reply-link {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 12px !important;
  border-radius: 999px;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  color: var(--kosmos-blue) !important;
  background: rgba(59, 100, 140, 0.08);
  border: 1px solid rgba(59, 100, 140, 0.16);
  opacity: 1 !important;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none !important;
}

html[data-theme="dark"] body.single .kosmos-comments .comment-reply-link {
  color: var(--kosmos-lime) !important;
  background: rgba(208, 248, 160, 0.08);
  border-color: rgba(208, 248, 160, 0.22);
}

body.single .kosmos-comments .comment-reply-link:hover {
  background: rgba(208, 248, 160, 0.35) !important;
  border-color: rgba(208, 248, 160, 0.55) !important;
  color: var(--kosmos-navy) !important;
}

html[data-theme="dark"] body.single .kosmos-comments .comment-reply-link:hover {
  color: var(--kosmos-navy) !important;
}

/* Вложенные ответы — ветка слева */
body.single .kosmos-comments .children {
  list-style: none !important;
  margin: 12px 0 0 !important;
  padding: 0 0 0 18px !important;
  border-left: 2px solid rgba(208, 248, 160, 0.55);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html[data-theme="dark"] body.single .kosmos-comments .children {
  border-left-color: rgba(208, 248, 160, 0.28);
}

body.single .kosmos-comments .children .comment-body {
  background: rgba(11, 37, 62, 0.03) !important;
}

html[data-theme="dark"] body.single .kosmos-comments .children .comment-body {
  background: rgba(255, 255, 255, 0.03) !important;
}

@media (max-width: 520px) {
  body.single .kosmos-comments .comment-body {
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 10px;
    padding: 14px 12px 12px !important;
  }

  body.single .kosmos-comments .comment-avatar,
  body.single .kosmos-comments .comment-avatar img,
  body.single .kosmos-comments .comment-avatar .avatar {
    width: 40px !important;
    height: 40px !important;
  }

  body.single .kosmos-comments .children {
    padding-left: 10px !important;
  }
}

/* Related — лаконичная сетка, умеренные скругления (не «слизанно») */
body.single .related-posts,
body.single #related-posts {
  width: 100% !important;
  max-width: var(--kosmos-content-max) !important;
  margin: 40px auto 56px !important;
  padding: 0 0 8px !important;
  box-sizing: border-box;
  float: none !important;
}

body.single .related-posts.fixed {
  max-width: var(--kosmos-content-max) !important;
}

body.single .related-posts__header,
body.single .related-posts .section-title,
body.single .related-posts .related-posts__title {
  font-family: var(--kosmos-font, Manrope, system-ui, sans-serif) !important;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.25 !important;
  text-align: left !important;
  margin: 0 0 22px !important;
  color: var(--kosmos-page-fg) !important;
}

body.single .related-posts .post-cards,
body.single .related-posts .post-cards--vertical {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  float: none !important;
}

@media (min-width: 640px) {
  body.single .related-posts .post-cards--vertical {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 20px !important;
  }
}

@media (min-width: 960px) {
  body.single .related-posts .post-cards--vertical {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 28px 22px !important;
  }
}

body.single .related-posts .post-card,
body.single .related-posts .post-card--related {
  display: flex !important;
  flex-direction: column;
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  height: auto !important;
}

body.single .related-posts .post-card__thumbnail {
  /* Reboot: flex-basis:0 + absolute img — высота схлопывалась */
  position: relative !important;
  display: block !important;
  flex: 0 0 auto !important;
  flex-grow: 0 !important;
  flex-basis: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 200px !important;
  height: 0 !important; /* вместе с padding-bottom даёт стабильный кадр; fallback — min-height */
  padding-bottom: 66.666% !important; /* 3:2 */
  margin: 0 0 12px !important;
  overflow: hidden !important;
  border-radius: 10px;
  background: rgba(11, 37, 62, 0.08);
  line-height: 0;
}

@supports (aspect-ratio: 1) {
  body.single .related-posts .post-card__thumbnail {
    height: auto !important;
    padding-bottom: 0 !important;
    aspect-ratio: 3 / 2;
    min-height: 200px !important;
  }
}

html[data-theme="dark"] body.single .related-posts .post-card__thumbnail {
  background: rgba(255, 255, 255, 0.06);
}

body.single .related-posts .post-card__thumbnail a {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

body.single .related-posts .post-card__thumbnail a:before {
  display: none !important; /* фиолетовый оверлей Reboot */
}

body.single .related-posts .post-card__thumbnail img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: none !important;
  -webkit-transform: none !important;
  border-radius: 0 !important;
  display: block !important;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

body.single .related-posts .post-card:hover .post-card__thumbnail img {
  transform: scale(1.03) !important;
  -webkit-transform: scale(1.03) !important;
}

body.single .related-posts .post-card__title {
  margin: 0 0 6px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  line-height: 1.3 !important;
}

body.single .related-posts .post-card__title a {
  color: var(--kosmos-page-fg) !important;
  text-decoration: none !important;
}

body.single .related-posts .post-card__title a:hover {
  color: var(--kosmos-blue) !important;
}

html[data-theme="dark"] body.single .related-posts .post-card__title a:hover {
  color: var(--kosmos-lime) !important;
}

body.single .related-posts .post-card__description {
  margin: 0 0 10px !important;
  font-size: 13.5px !important;
  line-height: 1.45 !important;
  color: var(--kosmos-muted) !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.single .related-posts .post-card__meta {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: auto 0 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  color: var(--kosmos-muted) !important;
  border: 0 !important;
}

body.single .related-posts .post-card__comments,
body.single .related-posts .post-card__views,
body.single .related-posts .post-card__date {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  position: relative;
  padding-left: 0 !important;
  margin: 0 !important;
  color: var(--kosmos-muted) !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Понятные иконки вместо кружков ◉/◐ */
body.single .related-posts .post-card__comments:before,
body.single .related-posts .post-card__views:before,
body.single .related-posts .post-card__date:before {
  content: "" !important;
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  display: inline-block !important;
  width: 13px !important;
  height: 13px !important;
  margin: 0 !important;
  flex-shrink: 0;
  opacity: 0.85;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  color: var(--kosmos-blue);
}

html[data-theme="dark"] body.single .related-posts .post-card__comments:before,
html[data-theme="dark"] body.single .related-posts .post-card__views:before,
html[data-theme="dark"] body.single .related-posts .post-card__date:before {
  color: var(--kosmos-lime);
}

/* Комментарии — пузырь */
body.single .related-posts .post-card__comments:before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-6.6L7 21.4c-.6.4-1.4-.1-1.4-.8V17H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-6.6L7 21.4c-.6.4-1.4-.1-1.4-.8V17H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
}

/* Просмотры — глаз */
body.single .related-posts .post-card__views:before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5c5.2 0 9.5 4.2 10.7 7-1.2 2.8-5.5 7-10.7 7S2.5 14.8 1.3 12C2.5 9.2 6.8 5 12 5zm0 2.5A4.5 4.5 0 1 0 12 16a4.5 4.5 0 0 0 0-8.5zm0 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5c5.2 0 9.5 4.2 10.7 7-1.2 2.8-5.5 7-10.7 7S2.5 14.8 1.3 12C2.5 9.2 6.8 5 12 5zm0 2.5A4.5 4.5 0 1 0 12 16a4.5 4.5 0 0 0 0-8.5zm0 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z'/%3E%3C/svg%3E");
}

/* Дата — календарь (если есть) */
body.single .related-posts .post-card__date:before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2zm13 8H4v10h16V10zM4 8h16V6H4v2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2zm13 8H4v10h16V10zM4 8h16V6H4v2z'/%3E%3C/svg%3E");
}

/* Sidebar quieter next to premium article */
body.single .widget-area .widget {
  border-radius: 14px;
  padding: 16px 16px 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(10, 10, 10, 0.08);
  margin-bottom: 16px;
}

html[data-theme="dark"] body.single .widget-area .widget {
  background: rgba(22, 22, 22, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
}

/* —— Правая колонка: primary + sidebar строго внутри 1112 —— */
@media (min-width: 992px) {
  body.single.kosmos-has-sidebar .site-content.fixed {
    max-width: var(--kosmos-content-max) !important; /* 1112, не шире */
  }

  body.single.kosmos-has-sidebar .site-content-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 260px;
    column-gap: 20px;
    align-items: start;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    min-width: 0;
  }

  /*
   * Reboot: .content-area { max-width: calc(100% - 300px); padding-right: 70px }
   * даёт большую «дыру» между карточкой статьи и сайдбаром (особенно без hero).
   */
  body.single.kosmos-has-sidebar #primary.content-area {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    flex-basis: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    justify-self: stretch;
  }

  body.single.kosmos-has-sidebar #main.article-card,
  body.single.kosmos-has-sidebar #main.site-main {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
  }

  body.single.kosmos-has-sidebar .widget-area,
  body.single.kosmos-has-sidebar .kosmos-widget-area {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    flex-basis: auto !important;
    flex-grow: 0 !important;
    min-width: 0 !important;
    min-height: 1px;
    order: 2 !important;
    padding-bottom: 40px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    justify-self: stretch;
  }

  /* Hero / related на всю ширину сетки внутри 1112 */
  body.single.kosmos-has-sidebar .entry-image {
    grid-column: 1 / -1;
  }
}

body.single .kosmos-widget-area .sticky-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.single .kosmos-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.single .kosmos-side__block {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(10, 10, 10, 0.08);
  box-shadow: 0 10px 28px -22px rgba(11, 37, 62, 0.3);
}

html[data-theme="dark"] body.single .kosmos-side__block {
  background: rgba(22, 22, 22, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
}

body.single .kosmos-side__title {
  margin: 0 0 14px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  color: var(--kosmos-page-fg) !important;
}

body.single .kosmos-side__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.single .kosmos-side__item {
  margin: 0 !important;
  padding: 0 !important;
}

body.single .kosmos-side__card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  text-decoration: none !important;
  color: inherit !important;
}

body.single .kosmos-side__thumb {
  display: block;
  width: 72px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(11, 37, 62, 0.08);
  flex-shrink: 0;
}

body.single .kosmos-side__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transform: none !important;
  position: static !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

body.single .kosmos-side__thumb--empty {
  background: linear-gradient(135deg, #0b253e, #3b648c);
}

body.single .kosmos-side__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

body.single .kosmos-side__cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--kosmos-blue);
}

html[data-theme="dark"] body.single .kosmos-side__cat {
  color: var(--kosmos-lime);
}

body.single .kosmos-side__name {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--kosmos-page-fg);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.single .kosmos-side__card:hover .kosmos-side__name {
  color: var(--kosmos-blue);
}

html[data-theme="dark"] body.single .kosmos-side__card:hover .kosmos-side__name {
  color: var(--kosmos-lime);
}

body.single .kosmos-side__meta {
  font-size: 11px;
  color: var(--kosmos-muted);
}

body.single .kosmos-side__cats-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.single .kosmos-side__cats-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none !important;
  color: var(--kosmos-page-fg) !important;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s ease;
}

body.single .kosmos-side__cats-list a:hover {
  background: rgba(208, 248, 160, 0.22);
}

body.single .kosmos-side__cat-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--kosmos-muted);
  font-variant-numeric: tabular-nums;
}

body.single .kosmos-side__tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.single .kosmos-side__tags-cloud a {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  color: var(--kosmos-page-fg) !important;
  background: rgba(11, 37, 62, 0.05);
  border: 1px solid rgba(10, 10, 10, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease;
}

html[data-theme="dark"] body.single .kosmos-side__tags-cloud a {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

body.single .kosmos-side__tags-cloud a:hover {
  background: rgba(208, 248, 160, 0.28);
  border-color: rgba(208, 248, 160, 0.55);
}

/* Related на всю ширину сетки внутри контейнера (без второго 1112+padding) */
body.single.kosmos-has-sidebar .related-posts,
body.single.kosmos-has-sidebar #related-posts {
  grid-column: 1 / -1;
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

@media (max-width: 991px) {
  body.single .kosmos-widget-area {
    display: none !important;
  }
}

/* Мобильная плотность */
@media (max-width: 640px) {
  body.single #main.article-card,
  body.page #main.site-main {
    border-radius: 22px !important;
  }

  body.single .entry-content,
  body.page .entry-content {
    font-size: 17px !important;
    line-height: 1.7 !important;
  }
}
