/* ==========================================================================
   Vit-Sor Dark Mode CSS v1.3.0
   Системная адаптация десктопа, мобильных, Reboot, Elementor, форм, плагинов и виджетов
   ========================================================================== */

:root {
  --vs-dm-bg: #0f1015;
  --vs-dm-surface: #161822;
  --vs-dm-surface-2: #1c1f2e;
  --vs-dm-border: #282c3f;
  --vs-dm-text: #d8dae2;
  --vs-dm-text-muted: #94a3b8;
  --vs-dm-heading: #f8fafc;
  --vs-dm-link: #a78bfa;
  --vs-dm-link-hover: #c4b5fd;
  --vs-dm-accent: #41b619;
}

/* --------------------------------------------------------------------------
   1. Единый переключатель темы (только значок в самой шапке)
   -------------------------------------------------------------------------- */
.vs-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.25);
  background: rgba(128, 128, 128, 0.08);
  color: #1f2937;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.vs-theme-toggle:hover {
  background: rgba(128, 128, 128, 0.18);
  transform: translateY(-1px);
}

.vs-theme-toggle:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}

html[data-theme="dark"] .vs-theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fde68a;
}

html[data-theme="dark"] .vs-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 767px) {
  .site-header .site-branding {
    padding-left: 64px !important;
    padding-right: 64px !important;
  }

  .vs-theme-toggle {
    position: absolute;
    top: 5px;
    right: 48px;
    width: 32px;
    height: 32px;
    margin-right: 0;
    z-index: 10;
  }
}

@media (max-width: 520px) {
  .site-header .site-branding .site-title,
  .site-header .site-branding .site-title a {
    font-size: clamp(22px, 6.2vw, 30px) !important;
  }
}

/* --------------------------------------------------------------------------
   2. Целевой плавный переход (без универсального селектора *)
   -------------------------------------------------------------------------- */
html.vs-theme-transitioning body,
html.vs-theme-transitioning .site-header,
html.vs-theme-transitioning .main-navigation,
html.vs-theme-transitioning .mobile-menu-placeholder,
html.vs-theme-transitioning .site-content,
html.vs-theme-transitioning .site-footer,
html.vs-theme-transitioning .post-card,
html.vs-theme-transitioning .author-box,
html.vs-theme-transitioning .ai-cat-card,
html.vs-theme-transitioning .ai-service-card,
html.vs-theme-transitioning .table-of-contents,
html.vs-theme-transitioning .spoiler-box,
html.vs-theme-transitioning .comment-body {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  html.vs-theme-transitioning * {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   3. Базовые поверхности и глобальная защита текста / ссылок (Reboot + Elementor)
   -------------------------------------------------------------------------- */
html[data-theme="dark"],
html[data-theme="dark"] body {
  color-scheme: dark;
  background-color: var(--vs-dm-bg) !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] #page,
html[data-theme="dark"] .site,
html[data-theme="dark"] .site-content,
html[data-theme="dark"] .site-content-inner,
html[data-theme="dark"] #primary,
html[data-theme="dark"] .content-area,
html[data-theme="dark"] #main,
html[data-theme="dark"] .site-main,
html[data-theme="dark"] .widget-area,
html[data-theme="dark"] .article-post,
html[data-theme="dark"] .entry-content,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .home-content,
html[data-theme="dark"] .home-text,
html[data-theme="dark"] .archive-description,
html[data-theme="dark"] .taxonomy-description,
html[data-theme="dark"] .elementor,
html[data-theme="dark"] .elementor-section,
html[data-theme="dark"] .elementor-container,
html[data-theme="dark"] .elementor-widget-wrap,
html[data-theme="dark"] .e-con,
html[data-theme="dark"] .e-con-inner {
  background-color: transparent !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .entry-title,
html[data-theme="dark"] .entry-title a,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .post-card__title a,
html[data-theme="dark"] .sitemap-list__header h3 a,
html[data-theme="dark"] .comments-title,
html[data-theme="dark"] .comment-reply-title {
  color: var(--vs-dm-heading) !important;
}

/* Запасное правило для ВСЕХ обычных ссылок с минимальной специфичностью (0,1,1) через :where(),
   чтобы перебить цвет темы #3601a0/#111 и inline blue везде (включая .logged-in-as,
   .comment-notes-after, сайдбар, архивы), но уступить явным правилам меню, заголовков
   карточек и кнопок ниже по каскаду. */
html[data-theme="dark"] :where(
  a:not(.btn):not(.button):not(.wp-block-button__link):not(.wp-element-button):not(.elementor-button):not(.ai-hero-btn):not(.ai-cta-btn):not(.ai-cat-card):not(.spoiler-button):not(.social-button):not(.expert-review-button):not([style*="background"])
) {
  color: var(--vs-dm-link) !important;
}

html[data-theme="dark"] :where(
  a:not(.btn):not(.button):not(.wp-block-button__link):not(.wp-element-button):not(.elementor-button):not(.ai-hero-btn):not(.ai-cta-btn):not(.ai-cat-card):not(.spoiler-button):not(.social-button):not(.expert-review-button):not([style*="background"]):hover,
  a:not(.btn):not(.button):not(.wp-block-button__link):not(.wp-element-button):not(.elementor-button):not(.ai-hero-btn):not(.ai-cta-btn):not(.ai-cat-card):not(.spoiler-button):not(.social-button):not(.expert-review-button):not([style*="background"]):focus
) {
  color: var(--vs-dm-link-hover) !important;
}

/* Явные правила для ссылок и SEO псевдо-ссылок темы Reboot (.spanlink, .pseudo-link) */
html[data-theme="dark"] .entry-content a:not(.btn):not(.button):not(.wp-block-button__link):not(.wp-element-button):not(.elementor-button):not(.ai-hero-btn):not(.ai-cta-btn):not(.ai-cat-card):not(.spoiler-button):not([style*="background"]),
html[data-theme="dark"] .comment-content a,
html[data-theme="dark"] .comment-author a,
html[data-theme="dark"] .comment-metadata a,
html[data-theme="dark"] .logged-in-as a,
html[data-theme="dark"] .comment-notes-after a,
html[data-theme="dark"] .comment-respond a,
html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .entry-meta a,
html[data-theme="dark"] .widget_calendar a,
html[data-theme="dark"] .widget_recent_comments a,
html[data-theme="dark"] .post-navigation a,
html[data-theme="dark"] .child-categories ul li a,
html[data-theme="dark"] .spanlink,
html[data-theme="dark"] .pseudo-link,
html[data-theme="dark"] .comment-reply-link {
  color: var(--vs-dm-link) !important;
  border-color: var(--vs-dm-link) !important;
}

html[data-theme="dark"] .entry-content a:not(.btn):not(.button):not(.wp-block-button__link):not(.wp-element-button):not(.elementor-button):not(.ai-hero-btn):not(.ai-cta-btn):not(.ai-cat-card):not(.spoiler-button):not([style*="background"]):hover,
html[data-theme="dark"] .comment-content a:hover,
html[data-theme="dark"] .logged-in-as a:hover,
html[data-theme="dark"] .comment-notes-after a:hover,
html[data-theme="dark"] .comment-respond a:hover,
html[data-theme="dark"] .breadcrumb a:hover,
html[data-theme="dark"] .post-navigation a:hover,
html[data-theme="dark"] .child-categories ul li a:hover,
html[data-theme="dark"] .spanlink:hover,
html[data-theme="dark"] .pseudo-link:hover,
html[data-theme="dark"] .comment-reply-link:hover {
  color: var(--vs-dm-link-hover) !important;
}

/* Белые подписи рубрик на зелёной плашке */
html[data-theme="dark"] a.post-card__category,
html[data-theme="dark"] .post-card__category a,
html[data-theme="dark"] .card-slider__category a,
html[data-theme="dark"] .entry-image__body .post-card__category a {
  color: #ffffff !important;
}

html[data-theme="dark"] .entry-meta,
html[data-theme="dark"] .post-card__meta,
html[data-theme="dark"] .post-card__text,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .site-description,
html[data-theme="dark"] .comment-notes,
html[data-theme="dark"] .comment-notes-after,
html[data-theme="dark"] .entry-bottom__header,
html[data-theme="dark"] figcaption,
html[data-theme="dark"] .wp-caption-text,
html[data-theme="dark"] .comment-metadata {
  color: var(--vs-dm-text-muted) !important;
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .wp-block-separator {
  border-color: var(--vs-dm-border) !important;
  background-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] mark {
  background-color: #3b2f13 !important;
  color: #fde68a !important;
}

html[data-theme="dark"] kbd {
  background-color: var(--vs-dm-surface-2) !important;
  color: var(--vs-dm-heading) !important;
  border: 1px solid var(--vs-dm-border) !important;
}

/* --------------------------------------------------------------------------
   4. Шапка, главное меню, выпадающее подменю (#ecf7e6 fix), мобильная шторка и подвал
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .site-header {
  background-color: var(--vs-dm-surface) !important;
  border-bottom: 1px solid var(--vs-dm-border) !important;
  box-shadow: inset 0 -1px 0 0 var(--vs-dm-border) !important;
}

html[data-theme="dark"] .site-title,
html[data-theme="dark"] .site-title a {
  color: #ffffff !important;
}

html[data-theme="dark"] .humburger span {
  background-color: #e2e8f0 !important;
}

html[data-theme="dark"] .header-search .search-icon:before,
html[data-theme="dark"] .search-icon {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .main-navigation,
html[data-theme="dark"] .main-navigation .sub-menu,
html[data-theme="dark"] .main-navigation ul li .sub-menu,
html[data-theme="dark"] .main-navigation ul li .sub-menu li,
html[data-theme="dark"] .main-navigation ul li.menu-item-has-children:before,
html[data-theme="dark"] .footer-navigation,
html[data-theme="dark"] .footer-navigation ul li .sub-menu li,
html[data-theme="dark"] .footer-navigation ul li.menu-item-has-children:before {
  background-color: #181b26 !important;
  border-color: var(--vs-dm-border) !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .main-navigation ul li .sub-menu {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid var(--vs-dm-border) !important;
}

html[data-theme="dark"] .main-navigation ul li a,
html[data-theme="dark"] .main-navigation ul li span,
html[data-theme="dark"] .main-navigation ul li .spanlink,
html[data-theme="dark"] .footer-navigation ul li a,
html[data-theme="dark"] .footer-navigation ul li span,
html[data-theme="dark"] .footer-navigation ul li .spanlink {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .main-navigation ul li a:hover,
html[data-theme="dark"] .main-navigation ul li span:hover,
html[data-theme="dark"] .main-navigation ul li.current-menu-item > a,
html[data-theme="dark"] .footer-navigation ul li a:hover,
html[data-theme="dark"] .footer-navigation ul li span:hover {
  color: var(--vs-dm-link) !important;
}

html[data-theme="dark"] .mobile-menu-placeholder,
html[data-theme="dark"] .js-mobile-menu-placeholder,
html[data-theme="dark"] .mobile-menu-placeholder .sub-menu,
html[data-theme="dark"] .mobile-menu-placeholder ul li {
  background-color: #161822 !important;
  color: #e2e8f0 !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .mobile-menu-placeholder ul li a,
html[data-theme="dark"] .mobile-menu-placeholder ul li span,
html[data-theme="dark"] .mobile-menu-placeholder ul li .spanlink {
  color: #e2e8f0 !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .search-screen {
  background-color: rgba(15, 16, 21, 0.96) !important;
}

html[data-theme="dark"] .search-screen .search-field {
  background-color: var(--vs-dm-surface-2) !important;
  color: #ffffff !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .site-footer {
  background-color: #0b0c10 !important;
  border-top: 1px solid var(--vs-dm-border) !important;
  color: var(--vs-dm-text-muted) !important;
}

html[data-theme="dark"] .site-footer a,
html[data-theme="dark"] .site-footer .spanlink {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .site-footer a:hover,
html[data-theme="dark"] .site-footer .spanlink:hover {
  color: var(--vs-dm-link-hover) !important;
}

html[data-theme="dark"] .scrolltop {
  background-color: var(--vs-dm-surface-2) !important;
  border: 1px solid var(--vs-dm-border) !important;
}

html[data-theme="dark"] .scrolltop:before {
  color: var(--vs-dm-link) !important;
}

/* --------------------------------------------------------------------------
   5. Карточки, блок «Поделиться», блок автора/рейтинга, пагинация и виджеты
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .post-card,
html[data-theme="dark"] .post-card--grid,
html[data-theme="dark"] .post-card--horizontal,
html[data-theme="dark"] .post-card--standard,
html[data-theme="dark"] .post-card--related,
html[data-theme="dark"] .post-box,
html[data-theme="dark"] .post-box--card,
html[data-theme="dark"] .card-box,
html[data-theme="dark"] .related-posts,
html[data-theme="dark"] .widget,
html[data-theme="dark"] .sitemap-list__block,
html[data-theme="dark"] .post-navigation .nav-previous,
html[data-theme="dark"] .post-navigation .nav-next {
  background-color: var(--vs-dm-surface) !important;
  border-color: var(--vs-dm-border) !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .post-card__title a:hover,
html[data-theme="dark"] .entry-title a:hover {
  color: var(--vs-dm-link-hover) !important;
}

/* Кнопки «Поделиться» в конце статьи (строго изолированы от .site-header .social-links) */
html[data-theme="dark"] .entry-social {
  background-color: transparent !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .entry-social .social-buttons {
  gap: 8px;
}

html[data-theme="dark"] .entry-social .social-button {
  background-color: var(--vs-dm-surface-2) !important;
  border: 1px solid #2e344c !important;
  border-radius: 6px !important;
  color: #cbd5e1 !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

html[data-theme="dark"] .entry-social .social-button:hover {
  background-color: #252a3d !important;
  border-color: #4f46e5 !important;
}

html[data-theme="dark"] .entry-social [data-counter],
html[data-theme="dark"] .entry-social .social-buttons__counter {
  color: #cbd5e1 !important;
}

/* Блок автора и звёздный рейтинг (точные классы Reboot: .author-box__ava, .author-box__rating-title) */
html[data-theme="dark"] .author-box {
  background-color: var(--vs-dm-surface) !important;
  border: 1px solid var(--vs-dm-border) !important;
  border-radius: 10px !important;
  padding: 18px 22px !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .author-box__author,
html[data-theme="dark"] .author-box__author a,
html[data-theme="dark"] .author-box__rating-title,
html[data-theme="dark"] .rating-box__header,
html[data-theme="dark"] .author-box .author-name {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .author-box__author em,
html[data-theme="dark"] .author-box__description,
html[data-theme="dark"] .rating-box__text,
html[data-theme="dark"] .rating-box {
  color: var(--vs-dm-text-muted) !important;
}

html[data-theme="dark"] .author-box .author-box__ava img {
  border: 2px solid var(--vs-dm-border) !important;
  background-color: var(--vs-dm-surface-2) !important;
}

html[data-theme="dark"] .author-box .author-box__ava img[src*="default-avatar"] {
  filter: invert(0.86) brightness(0.92) contrast(1.05);
}

html[data-theme="dark"] .star-rating-item {
  color: #4b5563;
}

html[data-theme="dark"] .star-rating-item.hover,
html[data-theme="dark"] .star-rating--score-1:not(.hover) .star-rating-item:nth-child(1),
html[data-theme="dark"] .star-rating--score-2:not(.hover) .star-rating-item:nth-child(1),
html[data-theme="dark"] .star-rating--score-2:not(.hover) .star-rating-item:nth-child(2),
html[data-theme="dark"] .star-rating--score-3:not(.hover) .star-rating-item:nth-child(1),
html[data-theme="dark"] .star-rating--score-3:not(.hover) .star-rating-item:nth-child(2),
html[data-theme="dark"] .star-rating--score-3:not(.hover) .star-rating-item:nth-child(3),
html[data-theme="dark"] .star-rating--score-4:not(.hover) .star-rating-item:nth-child(1),
html[data-theme="dark"] .star-rating--score-4:not(.hover) .star-rating-item:nth-child(2),
html[data-theme="dark"] .star-rating--score-4:not(.hover) .star-rating-item:nth-child(3),
html[data-theme="dark"] .star-rating--score-4:not(.hover) .star-rating-item:nth-child(4),
html[data-theme="dark"] .star-rating--score-5:not(.hover) .star-rating-item:nth-child(1),
html[data-theme="dark"] .star-rating--score-5:not(.hover) .star-rating-item:nth-child(2),
html[data-theme="dark"] .star-rating--score-5:not(.hover) .star-rating-item:nth-child(3),
html[data-theme="dark"] .star-rating--score-5:not(.hover) .star-rating-item:nth-child(4),
html[data-theme="dark"] .star-rating--score-5:not(.hover) .star-rating-item:nth-child(5) {
  color: var(--vs-dm-accent) !important;
}

html[data-theme="dark"] .entry-tag {
  background-color: var(--vs-dm-surface-2) !important;
  color: var(--vs-dm-text) !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .pagination .page-numbers {
  background-color: var(--vs-dm-surface) !important;
  color: var(--vs-dm-text) !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .pagination .page-numbers.current {
  background-color: #6d28d9 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .widget_calendar caption {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .widget_calendar th,
html[data-theme="dark"] .widget_calendar td {
  background-color: var(--vs-dm-surface) !important;
  color: var(--vs-dm-text) !important;
  border-color: var(--vs-dm-border) !important;
}

/* --------------------------------------------------------------------------
   6. Элементы статей блога (TOC, спойлеры, цитаты, код, таблицы, callouts)
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .table-of-contents {
  background-color: #171924 !important;
  border: 1px solid var(--vs-dm-border) !important;
}

html[data-theme="dark"] .table-of-contents__header,
html[data-theme="dark"] .table-of-contents__hide {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .table-of-contents a {
  color: var(--vs-dm-link) !important;
}

html[data-theme="dark"] .spoiler-box {
  background-color: #191c28 !important;
  border-left-color: var(--vs-dm-accent) !important;
}

html[data-theme="dark"] .spoiler-box__title {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .spoiler-box__body {
  background-color: #141620 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .entry-content blockquote:not(.wpremark) {
  background-color: #161824 !important;
  border-left-color: var(--vs-dm-accent) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .entry-content .wp-block-code,
html[data-theme="dark"] pre {
  background-color: #14151e !important;
  border: 1px solid var(--vs-dm-border) !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] code {
  background-color: #1e2130 !important;
  color: #f472b6 !important;
}

html[data-theme="dark"] pre code {
  background-color: transparent !important;
  color: inherit !important;
}

html[data-theme="dark"] .entry-content table,
html[data-theme="dark"] .wp-block-table table {
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .entry-content th,
html[data-theme="dark"] .wp-block-table th {
  background-color: #1e2235 !important;
  color: var(--vs-dm-heading) !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .entry-content td,
html[data-theme="dark"] .wp-block-table td,
html[data-theme="dark"] .wp-block-table.is-style-stripes tbody tr:nth-child(even) td {
  background-color: var(--vs-dm-surface) !important;
  color: var(--vs-dm-text) !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .entry-content tr:nth-child(even) td,
html[data-theme="dark"] .wp-block-table.is-style-stripes tbody tr:nth-child(odd) td {
  background-color: #191c28 !important;
}

/* Врезки Gutenberg и prompt_templates.py (исключая уже тёмные .incontent-flowchart и адаптивный .vs-mid-widget) */
html[data-theme="dark"] .entry-content .wp-block-group[style*="background"]:not(.incontent-flowchart):not(.vs-mid-widget),
html[data-theme="dark"] .entry-content .geo-quick-answer {
  background: #171a26 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .entry-content .wp-block-group:not(.incontent-flowchart):not(.vs-mid-widget) [style*="color"]:not(a):not(button),
html[data-theme="dark"] .entry-content [style*="color:#1e293b"],
html[data-theme="dark"] .entry-content [style*="color: #1e293b"],
html[data-theme="dark"] .entry-content [style*="color:#1a202c"],
html[data-theme="dark"] .entry-content [style*="color: #1a202c"],
html[data-theme="dark"] .entry-content [style*="color:#334155"],
html[data-theme="dark"] .entry-content [style*="color: #334155"],
html[data-theme="dark"] .entry-content [style*="color:#4a5568"],
html[data-theme="dark"] .entry-content [style*="color: #4a5568"],
html[data-theme="dark"] .entry-content [style*="color:#718096"],
html[data-theme="dark"] .entry-content [style*="color: #718096"],
html[data-theme="dark"] .entry-content [style*="color:#14532d"],
html[data-theme="dark"] .entry-content [style*="color:#78350f"],
html[data-theme="dark"] .entry-content [style*="color:#1e3a8a"] {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .has-white-background-color,
html[data-theme="dark"] .has-light-gray-background-color {
  background-color: var(--vs-dm-surface) !important;
  color: var(--vs-dm-text) !important;
}

/* --------------------------------------------------------------------------
   7. Страницы услуг (/uslugi/), категории и wp-custom-css (.ai-*)
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .ai-service-wrapper,
html[data-theme="dark"] .ai-services-hub {
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .ai-cat-card,
html[data-theme="dark"] .ai-service-card,
html[data-theme="dark"] .ai-service-for-whom,
html[data-theme="dark"] .ai-step,
html[data-theme="dark"] .ai-why-item,
html[data-theme="dark"] .ai-faq-item,
html[data-theme="dark"] .ai-faq details,
html[data-theme="dark"] .ai-benefits,
html[data-theme="dark"] .ai-benefits-list li,
html[data-theme="dark"] .ai-service-benefits div[style*="background"],
html[data-theme="dark"] .ai-service-faq div[style*="background"],
html[data-theme="dark"] .entry-content div[style*="background: #fff"],
html[data-theme="dark"] .entry-content div[style*="background:#fff"],
html[data-theme="dark"] .entry-content div[style*="background: #f8f9fa"],
html[data-theme="dark"] .entry-content div[style*="background:#f8f9fa"],
html[data-theme="dark"] .entry-content div[style*="background: #fdfcff"],
html[data-theme="dark"] .entry-content div[style*="background:#fdfcff"],
html[data-theme="dark"] .entry-content div[style*="background: #f7f5ff"],
html[data-theme="dark"] .entry-content div[style*="background:#f7f5ff"] {
  background: var(--vs-dm-surface) !important;
  border-color: var(--vs-dm-border) !important;
  color: var(--vs-dm-text) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] summary.ai-faq-q,
html[data-theme="dark"] .ai-faq summary {
  background-color: var(--vs-dm-surface-2) !important;
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .ai-cat-title,
html[data-theme="dark"] .ai-cat-name,
html[data-theme="dark"] .ai-card-title,
html[data-theme="dark"] .ai-svc-title,
html[data-theme="dark"] .ai-faq-q,
html[data-theme="dark"] .ai-why-item strong,
html[data-theme="dark"] .ai-benefits h2,
html[data-theme="dark"] .ai-steps h2,
html[data-theme="dark"] .ai-faq h2,
html[data-theme="dark"] .ai-why-block h2,
html[data-theme="dark"] .ai-cat-card h2,
html[data-theme="dark"] .ai-service-for-whom h2,
html[data-theme="dark"] .ai-step strong,
html[data-theme="dark"] .ai-service-faq strong {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .ai-card-btn {
  color: var(--vs-dm-link) !important;
}

html[data-theme="dark"] .ai-card-btn:hover {
  color: var(--vs-dm-link-hover) !important;
  border-color: var(--vs-dm-link-hover) !important;
}

html[data-theme="dark"] .ai-cat-desc,
html[data-theme="dark"] .ai-cat-subtitle,
html[data-theme="dark"] .ai-card-desc,
html[data-theme="dark"] .ai-svc-subtitle,
html[data-theme="dark"] .ai-faq-a,
html[data-theme="dark"] .ai-faq details p,
html[data-theme="dark"] .ai-why-item p,
html[data-theme="dark"] .ai-benefits-list li,
html[data-theme="dark"] .entry-content [style*="color: #1a1a1a"],
html[data-theme="dark"] .entry-content [style*="color:#1a1a1a"],
html[data-theme="dark"] .entry-content [style*="color: #1a1a2e"],
html[data-theme="dark"] .entry-content [style*="color:#1a1a2e"],
html[data-theme="dark"] .entry-content [style*="color: #212529"],
html[data-theme="dark"] .entry-content [style*="color:#212529"],
html[data-theme="dark"] .entry-content [style*="color: #444"],
html[data-theme="dark"] .entry-content [style*="color:#444"],
html[data-theme="dark"] .entry-content [style*="color: #555"],
html[data-theme="dark"] .entry-content [style*="color:#555"] {
  color: #e2e8f0 !important;
}

/* --------------------------------------------------------------------------
   8. WPShop Expert Review, форма комментариев, закрытые паролем страницы, Cookie и спецстраницы
   -------------------------------------------------------------------------- */
/* Expert Review: перекрываем как :root, так и цветовые схемы .expert-review--color-* */
html[data-theme="dark"],
html[data-theme="dark"] .expert-review,
html[data-theme="dark"] .expert-review[class*="expert-review--color-"] {
  --expert-review-main-bg: #181a26;
  --expert-review-main-color: #7c3aed;
  --expert-review-main-color-gradient: #a78bfa;
  --expert-review-text-color: #d8dae2;
  --expert-review-text-color-light: #c4b5fd;
}

html[data-theme="dark"] .expert-review {
  background-color: #181a26 !important;
  color: var(--vs-dm-text) !important;
  border: 1px solid var(--vs-dm-border) !important;
}

html[data-theme="dark"] .expert-review-expert-header,
html[data-theme="dark"] .expert-review-expert-bio-name,
html[data-theme="dark"] .expert-review-score-line__score,
html[data-theme="dark"] .expert-review-qa-header,
html[data-theme="dark"] .expert-review-pluses-minuses-header,
html[data-theme="dark"] .expert-review-score-header {
  color: #c4b5fd !important;
}

html[data-theme="dark"] .expert-review-expert-bio-description {
  color: var(--vs-dm-text-muted) !important;
  opacity: 0.9 !important;
}

html[data-theme="dark"] .expert-review-qa__text {
  background-color: #202334 !important;
  color: #e2e8f0 !important;
  border: 1px solid var(--vs-dm-border) !important;
}

html[data-theme="dark"] .expert-review-qa__text:before {
  border-right-color: #202334 !important;
}

html[data-theme="dark"] .expert-review-expert + .expert-review-qa:before,
html[data-theme="dark"] .expert-review-qa + .expert-review-score:before,
html[data-theme="dark"] .expert-review-score + .expert-review-pluses-minuses:before {
  background: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .expert-review-score-line__progress-container {
  background: #10121a !important;
  border: 1px solid var(--vs-dm-border) !important;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .expert-review-button,
html[data-theme="dark"] .expert-review-score-summary__average {
  color: #ffffff !important;
}

html[data-theme="dark"] .expert-review-like-rating {
  background: var(--vs-dm-surface) !important;
  color: var(--vs-dm-text) !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .expert-review-like-rating .expert-review-like-rating-item:nth-child(odd),
html[data-theme="dark"] .expert-review-like-rating--style-1 .expert-review-like-rating-item:nth-child(odd),
html[data-theme="dark"] .expert-review-like-rating--table-1 .expert-review-like-rating-item:nth-child(odd) {
  background: var(--vs-dm-surface-2) !important;
}

html[data-theme="dark"] .expert-review-like-rating--style-1 .expert-review-like-rating-item:first-child {
  background: #272219 !important;
}

html[data-theme="dark"] .expert-review-like-rating--style-1 .expert-review-like-rating-item__position:before {
  border-color: #475569 !important;
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .expert-review-like-rating--style-2 .expert-review-like-rating-item,
html[data-theme="dark"] .expert-review-like-rating--table-1,
html[data-theme="dark"] .expert-review-like-rating--table-1 .expert-review-like-rating-item__position,
html[data-theme="dark"] .expert-review-like-rating--table-1 .expert-review-like-rating-item__count {
  border-color: var(--vs-dm-border) !important;
}

/* Комментарии, форма авторизованного пользователя и .vit-sor-comment-notice */
html[data-theme="dark"] .comment-list .comment-body {
  background-color: var(--vs-dm-surface) !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .comment-respond {
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .logged-in-as,
html[data-theme="dark"] .comment-notes,
html[data-theme="dark"] .comment-notes-after,
html[data-theme="dark"] .comment-form label,
html[data-theme="dark"] .comment-form-cookies-consent label,
html[data-theme="dark"] .comment-awaiting-moderation {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .logged-in-as a,
html[data-theme="dark"] .comment-notes-after a {
  color: var(--vs-dm-link) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

html[data-theme="dark"] .logged-in-as a:hover,
html[data-theme="dark"] .comment-notes-after a:hover {
  color: var(--vs-dm-link-hover) !important;
}

html[data-theme="dark"] .comment-form-author input,
html[data-theme="dark"] .comment-form-email input,
html[data-theme="dark"] .comment-form-url input,
html[data-theme="dark"] .comment-form-comment textarea,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color: #1b1e2b !important;
  border-color: #31374a !important;
  color: #ffffff !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] input::-webkit-input-placeholder,
html[data-theme="dark"] textarea::-webkit-input-placeholder {
  color: #8b95a8 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .comment-respond .form-submit input,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .wp-block-button__link {
  color: #ffffff !important;
}

/* Форма ввода пароля WordPress (.post-password-form) на /photo-restore/, /photo-animate/, /photo-and-video/ */
html[data-theme="dark"] .post-password-form,
html[data-theme="dark"] .post-password-form p,
html[data-theme="dark"] .post-password-form label {
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .post-password-form input[type="submit"],
html[data-theme="dark"] .post-password-form button[type="submit"] {
  background-color: #6d28d9 !important;
  color: #ffffff !important;
  border: 1px solid #7c3aed !important;
  border-radius: 6px;
  padding: 6px 16px;
  cursor: pointer;
}

html[data-theme="dark"] .post-password-form input[type="submit"]:hover,
html[data-theme="dark"] .post-password-form button[type="submit"]:hover {
  background-color: #7c3aed !important;
}

html[data-theme="dark"] .vit-sor-comment-notice {
  background: #12261e !important;
  border-color: #22c55e !important;
  color: #bbf7d0 !important;
}

/* Cookie-баннер (Clearfy Pro .clearfy-cookie, #vit-sor-cookie-banner и универсальный атрибут) */
html[data-theme="dark"] #vit-sor-cookie-banner,
html[data-theme="dark"] #vit-sor-cookie-modal > div,
html[data-theme="dark"] #clearfy-cookie,
html[data-theme="dark"] .clearfy-cookie,
html[data-theme="dark"] #cookie-notice,
html[data-theme="dark"] .cookie-notice,
html[data-theme="dark"] #cookie-law-info-bar,
html[data-theme="dark"] .cookie-law-info-bar,
html[data-theme="dark"] [data-vs-cookie-banner="1"] {
  background: #161822 !important;
  background-color: #161822 !important;
  color: #d8dae2 !important;
  border-color: #282c3f !important;
  border-top: 1px solid #282c3f !important;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.55) !important;
}

html[data-theme="dark"] #vit-sor-cookie-banner [style*="color:#555"],
html[data-theme="dark"] #vit-sor-cookie-banner [style*="color: #555"],
html[data-theme="dark"] #vit-sor-cookie-settings,
html[data-theme="dark"] #clearfy-cookie p,
html[data-theme="dark"] .clearfy-cookie p,
html[data-theme="dark"] .clearfy-cookie__text,
html[data-theme="dark"] .clearfy-cookie-text,
html[data-theme="dark"] #cookie-notice p,
html[data-theme="dark"] .cookie-notice p,
html[data-theme="dark"] [data-vs-cookie-banner="1"] p,
html[data-theme="dark"] [data-vs-cookie-banner="1"] span {
  color: #d8dae2 !important;
}

html[data-theme="dark"] #clearfy-cookie a,
html[data-theme="dark"] .clearfy-cookie a,
html[data-theme="dark"] #cookie-notice a,
html[data-theme="dark"] .cookie-notice a,
html[data-theme="dark"] [data-vs-cookie-banner="1"] a {
  color: var(--vs-dm-link) !important;
}

html[data-theme="dark"] #clearfy-cookie a:hover,
html[data-theme="dark"] .clearfy-cookie a:hover,
html[data-theme="dark"] [data-vs-cookie-banner="1"] a:hover {
  color: var(--vs-dm-link-hover) !important;
}

html[data-theme="dark"] #vit-sor-cookie-customize {
  background: #232736 !important;
  color: #e2e8f0 !important;
  border-color: #3b4259 !important;
}

html[data-theme="dark"] #clearfy-cookie button,
html[data-theme="dark"] .clearfy-cookie button,
html[data-theme="dark"] .clearfy-cookie-ok,
html[data-theme="dark"] .clearfy-cookie__button button,
html[data-theme="dark"] #cookie-notice .cn-button,
html[data-theme="dark"] .cookie-notice .cn-button,
html[data-theme="dark"] [data-vs-cookie-banner="1"] button,
html[data-theme="dark"] [data-vs-cookie-banner="1"] .button,
html[data-theme="dark"] [data-vs-cookie-banner="1"] a.button {
  background: #4f46e5 !important;
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  border: 1px solid #6366f1 !important;
}

html[data-theme="dark"] #clearfy-cookie button:hover,
html[data-theme="dark"] .clearfy-cookie button:hover,
html[data-theme="dark"] [data-vs-cookie-banner="1"] button:hover,
html[data-theme="dark"] [data-vs-cookie-banner="1"] .button:hover {
  background: #6366f1 !important;
  background-color: #6366f1 !important;
}

/* Главная: Обо мне */
html[data-theme="dark"] .about-me-section {
  background: linear-gradient(135deg, #181924 0%, #11121a 100%) !important;
  border: 1px solid var(--vs-dm-border) !important;
}

html[data-theme="dark"] .about-me-section h2,
html[data-theme="dark"] .section-title {
  color: #ffffff !important;
}

html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .clients-count,
html[data-theme="dark"] .expertise-item {
  color: #cbd5e1 !important;
}

/* Полезные ссылки (/poleznye-ssilki/) */
html[data-theme="dark"] .useful-links-block,
html[data-theme="dark"] .link-title,
html[data-theme="dark"] .benefit-item,
html[data-theme="dark"] .notice-text {
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .link-card,
html[data-theme="dark"] .partnership-notice,
html[data-theme="dark"] .price-tag {
  background: var(--vs-dm-surface) !important;
  border-color: var(--vs-dm-border) !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .link-header {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .link-header:hover {
  background-color: var(--vs-dm-surface-2) !important;
}

html[data-theme="dark"] .feature-badge {
  background: #1e293b !important;
  color: #93c5fd !important;
}

/* Оживление фотографий (post-157) */
html[data-theme="dark"] .animation-promo-block,
html[data-theme="dark"] .intro-text,
html[data-theme="dark"] .usage-list li,
html[data-theme="dark"] .highlight-box p,
html[data-theme="dark"] .cta-text {
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .usage-list,
html[data-theme="dark"] .highlight-box,
html[data-theme="dark"] .portfolio-item {
  background: var(--vs-dm-surface) !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .usage-list h3,
html[data-theme="dark"] .portfolio-section h3 {
  color: var(--vs-dm-heading) !important;
}

/* Портфолио (/portfolio/) и Отзывы (/otzyvi/) */
html[data-theme="dark"] .portfolio-container,
html[data-theme="dark"] .reviews-section,
html[data-theme="dark"] .section-description,
html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .new-works-text,
html[data-theme="dark"] .section-header p {
  color: var(--vs-dm-text-muted) !important;
}

html[data-theme="dark"] .section-header h2,
html[data-theme="dark"] .portfolio-container h2,
html[data-theme="dark"] .portfolio-container h3 {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .reviews-section .review-item {
  border: 1px solid var(--vs-dm-border) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .tab-button {
  background: var(--vs-dm-surface) !important;
  color: #cbd5e1 !important;
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .tab-button:hover {
  background: var(--vs-dm-surface-2) !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}

html[data-theme="dark"] .tab-button.active {
  background: #2e1065 !important;
  color: #ffffff !important;
  border-color: #7c3aed !important;
}

/* NanoBanana (/nanobanana/) */
html[data-theme="dark"] .nano-banana-comparison,
html[data-theme="dark"] .nano-banana-comparison .comparison-container,
html[data-theme="dark"] .nano-banana-comparison .before-wrapper,
html[data-theme="dark"] .nano-banana-comparison .after-wrapper {
  background: var(--vs-dm-bg) !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .nano-banana-comparison .header h1,
html[data-theme="dark"] .nano-banana-comparison .modal-right h2,
html[data-theme="dark"] .nano-banana-comparison .prompt-section h3,
html[data-theme="dark"] .nano-banana-comparison .share-title {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .nano-banana-comparison .header p {
  color: var(--vs-dm-text-muted) !important;
}

html[data-theme="dark"] .nano-banana-comparison .gallery-item,
html[data-theme="dark"] .nano-banana-comparison .modal-content,
html[data-theme="dark"] .nano-banana-comparison .prompt-box {
  background: var(--vs-dm-surface) !important;
  border-color: var(--vs-dm-border) !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .nano-banana-comparison .tag {
  background: #1e293b !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] .nano-banana-comparison .copy-btn:hover {
  background: var(--vs-dm-surface-2) !important;
  color: var(--vs-dm-link-hover) !important;
}

html[data-theme="dark"] .nano-banana-comparison .filter-btn,
html[data-theme="dark"] .nano-banana-comparison .category-btn,
html[data-theme="dark"] .nano-banana-comparison .before-label,
html[data-theme="dark"] .nano-banana-comparison .after-label,
html[data-theme="dark"] .nano-banana-comparison .close-modal {
  background: var(--vs-dm-surface-2) !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .nano-banana-comparison .filter-btn.active,
html[data-theme="dark"] .nano-banana-comparison .category-btn.active {
  background: #6d28d9 !important;
  color: #ffffff !important;
}

/* Обучающие материалы / курсы (/photo-restore/, /photo-animate/, /photo-and-video/) */
html[data-theme="dark"] .elementor-2600,
html[data-theme="dark"] .elementor-2612 {
  --dark: #f8fafc;
  --grey: #cbd5e1;
  --bg-body: #0f1015;
  --bg-card: #161822;
  --bg-blue-muted: #1e293b;
  --bg-pink-muted: #2e1828;
}

html[data-theme="dark"] .elementor-2600 .tag,
html[data-theme="dark"] .elementor-2612 .tag {
  background: #1e293b !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] .elementor-2600 .section-icon,
html[data-theme="dark"] .elementor-2612 .section-icon {
  background: #1e293b !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .elementor-2600 .stat-card,
html[data-theme="dark"] .elementor-2612 .stat-card,
html[data-theme="dark"] .elementor-2600 .chk-item,
html[data-theme="dark"] .elementor-2612 .chk-item,
html[data-theme="dark"] .elementor-2600 .footer,
html[data-theme="dark"] .elementor-2612 .footer,
html[data-theme="dark"] .elementor-2600 .footer-time,
html[data-theme="dark"] .elementor-2612 .footer-time {
  border-color: var(--vs-dm-border) !important;
}

html[data-theme="dark"] .elementor-2600 .progress-container,
html[data-theme="dark"] .elementor-2612 .progress-container {
  background: var(--vs-dm-surface-2) !important;
}

html[data-theme="dark"] .elementor-2600 .congrats-message,
html[data-theme="dark"] .elementor-2612 .congrats-message {
  background: linear-gradient(135deg, #172536 0%, #13251e 100%) !important;
}

html[data-theme="dark"] .elementor-2612 [style*="background: #FFF3E0"],
html[data-theme="dark"] .elementor-2612 [style*="background:#FFF3E0"] {
  background: #2b2114 !important;
  color: #fde68a !important;
}

html[data-theme="dark"] .elementor-2612 [style*="color: #5d4037"],
html[data-theme="dark"] .elementor-2612 [style*="color:#5d4037"] {
  color: #fde68a !important;
}

html[data-theme="dark"] .learning-block {
  background: var(--vs-dm-surface) !important;
  color: var(--vs-dm-text) !important;
  border: 1px solid var(--vs-dm-border) !important;
}

html[data-theme="dark"] .learning-block h2,
html[data-theme="dark"] .learning-block h3,
html[data-theme="dark"] .learning-block .lesson-item span {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .learning-block .card,
html[data-theme="dark"] .learning-block .lesson-item {
  background: var(--vs-dm-surface-2) !important;
  border-color: var(--vs-dm-border) !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .learning-block .lesson-item:hover {
  background: #23273a !important;
}

html[data-theme="dark"] .learning-block .card p,
html[data-theme="dark"] .learning-block .telegram-content p {
  color: var(--vs-dm-text-muted) !important;
}

html[data-theme="dark"] .learning-block .card a,
html[data-theme="dark"] .learning-block .button,
html[data-theme="dark"] .learning-block .telegram-content .button {
  color: #ffffff !important;
}

html[data-theme="dark"] .learning-block .password-block {
  background: #1e2235 !important;
  border-color: #3730a3 !important;
}

html[data-theme="dark"] .learning-block .password-label {
  color: #93c5fd !important;
}

html[data-theme="dark"] .learning-block .password-value {
  background: #0f1015 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .learning-block .telegram-block {
  background: linear-gradient(135deg, #152232 0%, #161822 80%) !important;
  border-color: #1e3a5f !important;
}

html[data-theme="dark"] .learning-block .footer-note {
  background: var(--vs-dm-surface-2) !important;
  border-color: var(--vs-dm-border) !important;
  color: var(--vs-dm-text) !important;
}

/* --------------------------------------------------------------------------
   9. Умный адаптивный виджет середины статьи (.vs-mid-widget) + мобильный фикс legacy
   -------------------------------------------------------------------------- */
.entry-content .vs-mid-widget {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  margin: 32px 0;
  color: #1e293b;
  box-sizing: border-box;
}

.entry-content .vs-mid-widget__header {
  margin-bottom: 18px;
}

.entry-content .vs-mid-widget__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4f46e5;
  margin-bottom: 6px;
}

.entry-content .vs-mid-widget__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: #0f172a;
}

.entry-content .vs-mid-widget__subtitle {
  margin: 6px 0 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.entry-content .vs-mid-widget__grid {
  display: grid;
  gap: 14px;
}

.entry-content .vs-mid-widget__grid--steps,
.entry-content .vs-mid-widget__grid--metrics {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.entry-content .vs-mid-widget__grid--versus {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry-content .vs-mid-widget__card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.entry-content .vs-mid-widget__card.is-featured {
  border-color: #6366f1;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.1);
}

.entry-content .vs-mid-widget__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.entry-content .vs-mid-widget__metric-value {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  color: #4f46e5;
  font-variant-numeric: tabular-nums;
}

.entry-content .vs-mid-widget__badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
}

.entry-content .vs-mid-widget__card-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
}

.entry-content .vs-mid-widget__card-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #475569;
}

.entry-content .vs-mid-widget__points {
  margin: 2px 0 0 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #334155;
}

.entry-content .vs-mid-widget__points li {
  margin-bottom: 5px;
}

.entry-content .vs-mid-widget__points li:last-child {
  margin-bottom: 0;
}

.entry-content .vs-mid-widget__list {
  display: grid;
  gap: 10px;
}

.entry-content .vs-mid-widget__decision-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #4f46e5;
  border-radius: 10px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(0, 1.4fr);
  gap: 10px 18px;
  align-items: center;
}

.entry-content .vs-mid-widget__decision-when {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
}

.entry-content .vs-mid-widget__decision-do {
  font-size: 13.5px;
  line-height: 1.5;
  color: #334155;
}

.entry-content .vs-mid-widget__note {
  margin: 16px 0 0 0;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

/* Тёмная тема для .vs-mid-widget */
html[data-theme="dark"] .entry-content .vs-mid-widget {
  background: var(--vs-dm-surface) !important;
  border-color: var(--vs-dm-border) !important;
  color: var(--vs-dm-text) !important;
}

html[data-theme="dark"] .entry-content .vs-mid-widget__eyebrow {
  color: var(--vs-dm-link) !important;
}

html[data-theme="dark"] .entry-content .vs-mid-widget__title,
html[data-theme="dark"] .entry-content .vs-mid-widget__card-title,
html[data-theme="dark"] .entry-content .vs-mid-widget__decision-when {
  color: var(--vs-dm-heading) !important;
}

html[data-theme="dark"] .entry-content .vs-mid-widget__subtitle,
html[data-theme="dark"] .entry-content .vs-mid-widget__card-desc,
html[data-theme="dark"] .entry-content .vs-mid-widget__points,
html[data-theme="dark"] .entry-content .vs-mid-widget__decision-do,
html[data-theme="dark"] .entry-content .vs-mid-widget__note {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .entry-content .vs-mid-widget__card,
html[data-theme="dark"] .entry-content .vs-mid-widget__decision-row {
  background: var(--vs-dm-surface-2) !important;
  border-color: var(--vs-dm-border) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="dark"] .entry-content .vs-mid-widget__card.is-featured {
  border-color: #7c3aed !important;
}

html[data-theme="dark"] .entry-content .vs-mid-widget__decision-row {
  border-left-color: #7c3aed !important;
}

html[data-theme="dark"] .entry-content .vs-mid-widget__step-num,
html[data-theme="dark"] .entry-content .vs-mid-widget__badge {
  background: #2e1065 !important;
  color: #ddd6fe !important;
}

html[data-theme="dark"] .entry-content .vs-mid-widget__metric-value {
  color: var(--vs-dm-link) !important;
}

html[data-theme="dark"] .entry-content .vs-mid-widget__note {
  border-top-color: var(--vs-dm-border) !important;
}

/* Адаптация под планшеты и смартфоны */
@media (max-width: 767px) {
  .entry-content .vs-mid-widget {
    padding: 18px 16px;
    margin: 26px 0;
  }

  .entry-content .vs-mid-widget__title {
    font-size: 18px;
  }

  .entry-content .vs-mid-widget__grid--versus,
  .entry-content .vs-mid-widget__decision-row {
    grid-template-columns: 1fr;
  }

  .entry-content .vs-mid-widget__grid--steps {
    grid-template-columns: 1fr;
    border-left: 2px solid #cbd5e1;
    padding-left: 14px;
  }

  html[data-theme="dark"] .entry-content .vs-mid-widget__grid--steps {
    border-left-color: #3b4259;
  }

  .entry-content .vs-mid-widget__grid--metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Мобильная починка уже опубликованных legacy-блоков .incontent-flowchart */
  .entry-content .incontent-flowchart {
    padding: 20px 16px !important;
  }

  .entry-content .incontent-flowchart > div[style*="display:flex"] {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .entry-content .incontent-flowchart > div[style*="display:flex"] > div[style*="min-width"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    text-align: left !important;
  }

  .entry-content .incontent-flowchart > div[style*="display:flex"] > div:not([style*="min-width"]) {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .entry-content .vs-mid-widget__grid--metrics {
    grid-template-columns: 1fr;
  }
}
