/*
Theme Name: Reboot Child
Theme URI: https://wpshop.ru/themes/reboot
Author: WPShop.biz
Author URI: http://wpshop.biz/
Template: reboot
Version: 1.0.0
*/

/* Below you can add your CSS styles */
/* Ниже Вы можете добавить свои CSS стили */

body {font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";}
h1,h2,h3,h4,h5,h6 {font-family:-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";}

/* =========================================================================
   Кибер Лис — Dark Mode
   Добавить в конец reboot_child/style.css
   Привязка строго к html[data-theme="dark"] + точечным классам темы Reboot.
   Без селекторов article/* и без !important.
   ========================================================================= */
 
/* ---------- Базовый фон/текст страницы ---------- */
html[data-theme="dark"] body {
  background-color: #0f1115;
  color: #d1d5db;
}
 
/* ---------- Кнопка-переключатель темы (стили не зависят от текущей темы) ---------- */
.theme-mode-switch {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
}

.theme-mode-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0 none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .15s ease;
}

.theme-mode-toggle:hover {
  background-color: rgba(242, 118, 0, .12);
}

.theme-mode-toggle:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

.theme-mode-toggle:focus-visible {
  background-color: rgba(242, 118, 0, .18);
  outline: 2px solid #f27600;
  outline-offset: 2px;
}

.theme-mode-toggle__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s ease, transform .25s ease;
  pointer-events: none;
}

.theme-mode-toggle__icon svg {
  width: 26px;
  height: 26px;
  display: block;
  overflow: visible;
}

.theme-mode-toggle__icon--sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-mode-toggle__icon--moon {
  opacity: 0;
  transform: scale(.6) rotate(-30deg);
}

html[data-theme="dark"] .theme-mode-toggle {
  color: #f27600;
}

html[data-theme="dark"] .theme-mode-toggle:hover,
html[data-theme="dark"] .theme-mode-toggle:focus-visible {
  background-color: rgba(242, 118, 0, .16);
}

html[data-theme="dark"] .theme-mode-toggle__icon--sun {
  opacity: 0;
  transform: scale(.6) rotate(30deg);
}

html[data-theme="dark"] .theme-mode-toggle__icon--moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ---------- Шапка: логичная группировка ----------
   Слева — бренд, справа — действия (соцсети / поиск / тема) плотной группой. */
@media (min-width: 768px) {
  .site-header-inner {
    justify-content: flex-start;
    gap: 16px;
  }

  .site-header-inner > .site-branding {
    margin-right: auto;
    flex: 0 1 auto;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.header-actions .social-links {
  margin: 0;
  text-align: left;
  font-size: 1em;
}

.header-actions .social-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
}

.header-actions .social-button {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  justify-content: center;
}

/* После клика по TG/Дзен не оставлять оранжевый пунктирный outline
   (у Reboot a:focus { outline: thin dotted } + color #f27600). */
.header-actions .social-button:focus,
.header-actions .social-button:active,
.site-header .social-button:focus,
.site-header .social-button:active,
.mobile-menu-tools .social-button:focus,
.mobile-menu-tools .social-button:active {
  outline: none;
  box-shadow: none;
}

.header-actions .social-button:focus:not(:focus-visible),
.site-header .social-button:focus:not(:focus-visible),
.mobile-menu-tools .social-button:focus:not(:focus-visible) {
  outline: none;
}

.header-actions .social-button:focus-visible,
.site-header .social-button:focus-visible,
.mobile-menu-tools .social-button:focus-visible {
  outline: 2px solid #f27600;
  outline-offset: 2px;
  border-radius: 50%;
}

/* Единый визуальный размер глифа: Telegram / Zen / поиск / тема */
.header-actions .social-button:before {
  width: 26px;
  height: 26px;
  margin: 0;
  background-size: 26px 26px;
  background-repeat: no-repeat;
  background-position: center;
}

.header-actions .header-search {
  position: static;
  top: auto;
  right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
}

.header-actions .header-search .search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.header-actions .header-search .search-icon:before {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  margin: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%23555' stroke-width='2'/%3E%3Cpath d='M20 20l-3.8-3.8' stroke='%23555' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 26px 26px;
  font-size: 0;
}

.header-actions .header-search .search-icon:hover:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%23f27600' stroke-width='2'/%3E%3Cpath d='M20 20l-3.8-3.8' stroke='%23f27600' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.header-actions .header-search .search-icon.close:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='%23555' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.header-actions .theme-mode-switch {
  margin: 0;
}

.header-actions .lang-switch-wrap {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(15, 17, 21, 0.12);
  color: #111827;
  background: rgba(15, 17, 21, 0.04);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.lang-switch:hover,
.lang-switch:focus-visible {
  color: #f27600;
  background: rgba(242, 118, 0, 0.08);
  border-color: rgba(242, 118, 0, 0.35);
  outline: none;
  text-decoration: none;
}

.lang-switch__code {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] .lang-switch {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: #fdba74;
}

html[data-theme="dark"] .lang-switch:hover,
html[data-theme="dark"] .lang-switch:focus-visible {
  color: #fdba74;
  background: rgba(242, 118, 0, 0.22);
  border-color: #f27600;
}


/* ---------- Мобильная шапка ----------
   [лого + название] ………… [EN] [тема] [☰]
   Соцсети и поиск — внутри выезжающего меню (.mobile-menu-tools). */
@media (max-width: 767px) {
  #masthead.site-header {
    padding-top: 0;
    padding-bottom: 0;
  }

  .site-header-inner {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-header-inner > .site-branding {
    display: flex;
    order: 1;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding-left: 0;
    padding-right: 0;
    text-align: left;
    pointer-events: auto;
  }

  .site-header-inner .site-branding__body {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-header-inner .site-logotype {
    flex: 0 0 auto;
    line-height: 0;
  }

  .site-header-inner .site-logotype img {
    max-height: 44px;
    width: auto;
  }

  .site-header-inner .site-title {
    font-size: 1.25em;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header-inner > .header-actions {
    order: 2;
    margin-left: 0;
    margin-right: 0;
    flex: 0 0 auto;
    gap: 10px;
  }

  /* Соцсети/поиск уезжают в меню через JS; прячем на случай до переноса */
  .site-header-inner > .header-actions .social-links,
  .site-header-inner > .header-actions .header-search {
    display: none;
  }

  .site-header-inner > .header-actions .lang-switch-wrap,
  .site-header-inner > .header-actions .theme-mode-switch {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto;
    margin: 0;
  }

  .site-header-inner > .header-actions .lang-switch {
    min-width: 44px;
    height: 44px;
    font-size: 13px;
    border-width: 1.5px;
    color: #111827;
    background: rgba(15, 17, 21, 0.06);
    border-color: rgba(15, 17, 21, 0.18);
  }

  html[data-theme="dark"] .site-header-inner > .header-actions .lang-switch {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: #fdba74 !important;
  }

  .site-header-inner > .header-actions .theme-mode-toggle {
    width: 44px;
    height: 44px;
  }

  .site-header-inner > .header-actions .theme-mode-toggle__icon svg {
    width: 24px;
    height: 24px;
  }

  .site-header-inner > .humburger {
    position: relative;
    top: auto;
    left: auto;
    order: 3;
    flex: 0 0 auto;
    z-index: 2;
    width: 28px;
    height: 20px;
    margin-left: 12px;
  }

  .site-header-inner > .humburger span {
    margin-left: -14px;
  }

  .site-header-inner > .humburger.open span:first-child {
    transform: translateY(9px) rotate(45deg) translateZ(0);
  }

  .site-header-inner > .humburger.open span:last-child {
    transform: translateY(-9px) rotate(-45deg) translateZ(0);
  }

  /* Источник «дёрганья»: у .site-header margin-bottom:30px, тема компенсирует
     margin-top:-30px только на .open → скачок при открытии/закрытии.
     Обнуляем оба отступа на мобилке — меню стыкуется без прыжка. */
  #masthead.site-header,
  .site-header {
    margin-bottom: 0;
  }

  .mobile-menu-placeholder,
  .mobile-menu-placeholder.open,
  .site-header + .mobile-menu-placeholder.open,
  .main-navigation + .mobile-menu-placeholder.open {
    margin-top: 0;
    transition: none;
  }

  .mobile-menu-placeholder + .site-content {
    margin-top: 0;
  }

  /* Отступ контента от шапки — через site-content, не через margin шапки
     (иначе снова появится скачок мобильного меню). */
  .site-content {
    padding-top: 16px;
  }

  /* Тема тянет блоки на −30px (компенсация старого margin шапки) */
  .site-content .section-block {
    margin-top: 0;
  }

  /* jQuery slideToggle анимирует padding/margin у nav — фиксируем, чтобы
     отступы пунктов меню не «дышали» во время анимации */
  #site-navigation-mobile.main-navigation {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .mobile-menu-placeholder #header_menu.menu > li > a,
  .mobile-menu-placeholder #header_menu.menu > li > span,
  #site-navigation-mobile #header_menu.menu > li > a,
  #site-navigation-mobile #header_menu.menu > li > span {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}

/* Панель соцсетей + поиска внутри мобильного меню */
.mobile-menu-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 16px 12px 20px;
  border-top: 1px solid rgba(242, 118, 0, .2);
}

.mobile-menu-tools .social-links {
  margin: 0;
}

.mobile-menu-tools .social-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.mobile-menu-tools .social-button,
.mobile-menu-tools .header-search,
.mobile-menu-tools .header-search .search-icon {
  width: 48px;
  height: 48px;
  margin: 0;
}

.mobile-menu-tools .social-button {
  justify-content: center;
}

.mobile-menu-tools .social-button:before {
  width: 26px;
  height: 26px;
  margin: 0;
  background-size: 26px 26px;
  background-repeat: no-repeat;
  background-position: center;
}

.mobile-menu-tools .header-search {
  position: static;
  top: auto;
  right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-tools .header-search .search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  filter: none;
  cursor: pointer;
}

/* Только SVG — без emoji 🔍 поверх */
.mobile-menu-tools .header-search .search-icon:before {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  margin: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%23555' stroke-width='2'/%3E%3Cpath d='M20 20l-3.8-3.8' stroke='%23555' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 26px 26px;
  font-size: 0;
}

.mobile-menu-tools .header-search .search-icon:hover:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%23f27600' stroke-width='2'/%3E%3Cpath d='M20 20l-3.8-3.8' stroke='%23f27600' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.mobile-menu-tools .header-search .search-icon.close:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='%23555' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .mobile-menu-tools {
  border-top-color: rgba(242, 118, 0, .28);
}

html[data-theme="dark"] .mobile-menu-tools .header-search .search-icon:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%23d1d5db' stroke-width='2'/%3E%3Cpath d='M20 20l-3.8-3.8' stroke='%23d1d5db' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .mobile-menu-tools .header-search .search-icon:hover:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%23f27600' stroke-width='2'/%3E%3Cpath d='M20 20l-3.8-3.8' stroke='%23f27600' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .mobile-menu-tools .header-search .search-icon.close:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='%23d1d5db' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- Мобильное меню: общий стиль + оранжевый акцент ----------
   Без верхней inset-линии у меню: иначе при открытии она «подъезжает»
   к серому разделителю шапки. Акцент — у шапки снизу и у панели tools. */
.mobile-menu-placeholder .main-navigation,
#site-navigation-mobile.main-navigation {
  background-color: #fff;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 0 #f2f5f9;
}

/* Небольшой зазор между шапкой и первым пунктом — на inner, не на nav
   (jQuery slideToggle трогает padding у nav). */
.mobile-menu-placeholder .main-navigation-inner,
#site-navigation-mobile .main-navigation-inner {
  padding-top: 10px;
}

.mobile-menu-placeholder .main-navigation ul li > a,
.mobile-menu-placeholder .main-navigation ul li > span,
#site-navigation-mobile.main-navigation ul li > a,
#site-navigation-mobile.main-navigation ul li > span {
  color: #111;
  transition: color .2s ease, background-color .2s ease;
}

.mobile-menu-placeholder .main-navigation ul li > a:hover,
.mobile-menu-placeholder .main-navigation ul li > a:focus,
#site-navigation-mobile.main-navigation ul li > a:hover,
#site-navigation-mobile.main-navigation ul li > a:focus {
  color: #f27600;
  background-color: rgba(242, 118, 0, .06);
}

.mobile-menu-placeholder .main-navigation ul li.current-menu-item > a,
.mobile-menu-placeholder .main-navigation ul li.current-menu-ancestor > a,
#site-navigation-mobile.main-navigation ul li.current-menu-item > a,
#site-navigation-mobile.main-navigation ul li.current-menu-ancestor > a {
  color: #f27600;
}

.mobile-menu-placeholder .main-navigation ul li.menu-item-has-children::before,
#site-navigation-mobile.main-navigation ul li.menu-item-has-children::before {
  background: transparent;
}

.mobile-menu-placeholder .main-navigation ul li.menu-item-has-children::after,
#site-navigation-mobile.main-navigation ul li.menu-item-has-children::after {
  color: #f27600;
  opacity: .75;
}

.mobile-menu-placeholder .main-navigation ul li .sub-menu,
#site-navigation-mobile.main-navigation ul li .sub-menu {
  background: transparent;
  margin-right: 0;
  box-shadow: inset 3px 0 0 0 rgba(242, 118, 0, .35);
}

.mobile-menu-placeholder .main-navigation ul li .sub-menu li > a,
.mobile-menu-placeholder .main-navigation ul li .sub-menu li > span,
#site-navigation-mobile.main-navigation ul li .sub-menu li > a,
#site-navigation-mobile.main-navigation ul li .sub-menu li > span {
  color: #4b5563;
  font-weight: 600;
}

.mobile-menu-placeholder .main-navigation ul li .sub-menu li > a:hover,
.mobile-menu-placeholder .main-navigation ul li .sub-menu li > a:focus,
#site-navigation-mobile.main-navigation ul li .sub-menu li > a:hover,
#site-navigation-mobile.main-navigation ul li .sub-menu li > a:focus {
  color: #f27600;
  background-color: rgba(242, 118, 0, .06);
}
 
/* ---------- Шапка (header#masthead) ----------
   В светлой теме шапка/меню/контент — один белый фон.
   В тёмной делаем так же: общий фон #0f1115, без «полос» и жёстких бордеров.
   Только лёгкая линия-разделитель, как #f2f5f9 на белом. */
html[data-theme="dark"] #masthead.site-header {
  background-color: #0f1115;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .site-header-inner {
  background-color: transparent;
}

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

html[data-theme="dark"] .site-title a:hover,
html[data-theme="dark"] .site-title a:focus {
  color: #fb923c;
}
 
html[data-theme="dark"] .humburger span {
  background-color: #d1d5db;
}

/* Дзен: PNG-логотип (официальный squircle). Старый SVG path давал
   «пустую рамку» в Firefox. Ссылка — js-link без href на dzen.ru (ETP). */
.header-actions .social-button--yandexzen:before,
.site-header .social-button--yandexzen:before,
.mobile-menu-tools .social-button--yandexzen:before,
.entry-social .social-button--yandexzen:before {
  content: none !important;
  display: none !important;
  background: none !important;
}

.kiberlis-dzen-icon {
  display: block !important;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  pointer-events: none;
  border-radius: 6px;
  object-fit: contain;
}

.header-actions .social-button--yandexzen,
.site-header .social-button--yandexzen,
.mobile-menu-tools .social-button--yandexzen {
  cursor: pointer;
  color: inherit;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
}

.header-actions .social-button--yandexzen:hover .kiberlis-dzen-icon,
.site-header .social-button--yandexzen:hover .kiberlis-dzen-icon,
.mobile-menu-tools .social-button--yandexzen:hover .kiberlis-dzen-icon {
  opacity: .85;
  filter: none;
}

/* Поиск: светлая SVG-лупа в тёмной теме (размер уже задан выше) */
html[data-theme="dark"] .header-actions .header-search .search-icon,
html[data-theme="dark"] .header-search .search-icon {
  filter: none;
  color: #d1d5db;
}

html[data-theme="dark"] .header-actions .header-search .search-icon:before,
html[data-theme="dark"] .header-search .search-icon:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%23d1d5db' stroke-width='2'/%3E%3Cpath d='M20 20l-3.8-3.8' stroke='%23d1d5db' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .header-actions .header-search .search-icon:hover:before,
html[data-theme="dark"] .header-search .search-icon:hover:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%23f27600' stroke-width='2'/%3E%3Cpath d='M20 20l-3.8-3.8' stroke='%23f27600' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .header-actions .header-search .search-icon.close:before,
html[data-theme="dark"] .header-search .search-icon.close:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='%23d1d5db' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
 
/* ---------- Навигация (десктоп + мобильное) ---------- */
html[data-theme="dark"] #site-navigation.main-navigation,
html[data-theme="dark"] #site-navigation-mobile.main-navigation,
html[data-theme="dark"] .mobile-menu-placeholder .main-navigation {
  background-color: #0f1115;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .main-navigation-inner {
  background-color: transparent;
}
 
html[data-theme="dark"] #header_menu.menu > li > a,
html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li > a,
html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li > span,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li > a,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li > span {
  color: #d1d5db;
}
 
html[data-theme="dark"] #header_menu.menu > li > a:hover,
html[data-theme="dark"] #header_menu.menu > li > a:focus,
html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li > a:hover,
html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li > a:focus,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li > a:hover,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li > a:focus {
  color: #f27600;
  background-color: rgba(242, 118, 0, .1);
}

html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li.current-menu-item > a,
html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li.current-menu-ancestor > a,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li.current-menu-item > a,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li.current-menu-ancestor > a {
  color: #f27600;
}

html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li.menu-item-has-children::before,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li.menu-item-has-children::before {
  background: transparent;
}

html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li.menu-item-has-children::after,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li.menu-item-has-children::after {
  color: #f27600;
  opacity: .8;
}
 
/* Десктопные выпадающие подменю */
html[data-theme="dark"] #site-navigation #header_menu .sub-menu {
  background-color: #181b20;
  border: 1px solid #2d323b;
}
 
html[data-theme="dark"] #site-navigation #header_menu .sub-menu a {
  color: #d1d5db;
}
 
html[data-theme="dark"] #site-navigation #header_menu .sub-menu a:hover {
  color: #f27600;
}

/* Мобильные подпункты — оранжевая направляющая слева */
html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li .sub-menu,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li .sub-menu {
  background: transparent;
  border: none;
  margin-right: 0;
  box-shadow: inset 3px 0 0 0 rgba(242, 118, 0, .4);
}

html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li .sub-menu a,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li .sub-menu a {
  color: #9ca3af;
}

html[data-theme="dark"] .mobile-menu-placeholder .main-navigation ul li .sub-menu a:hover,
html[data-theme="dark"] #site-navigation-mobile.main-navigation ul li .sub-menu a:hover {
  color: #f27600;
  background-color: rgba(242, 118, 0, .1);
}
 
/* ---------- Блок "Новые статьи" на главной (.section-block, .post-card) ---------- */
html[data-theme="dark"] .section-block__title {
  color: #f3f4f6;
}

html[data-theme="dark"] .page-header .page-title,
html[data-theme="dark"] .page-title {
  color: #f3f4f6;
}
 
html[data-theme="dark"] .post-card__title a {
  color: #f3f4f6;
}
 
html[data-theme="dark"] .post-card__title a:hover {
  color: #fb923c;
}
 
html[data-theme="dark"] .post-card__description {
  color: #d1d5db;
}
 
html[data-theme="dark"] .post-card__meta,
html[data-theme="dark"] .post-card__comments,
html[data-theme="dark"] .post-card__views {
  color: #9ca3af;
}
 
html[data-theme="dark"] .post-card__category {
  background-color: #f27600;
  color: #0f1115;
}
 
/* ---------- Сайдбар (.sticky-sidebar, виджеты) ---------- */
html[data-theme="dark"] .widget-header {
  color: #f3f4f6;
}

/* Обложки и превью: скругление в обеих темах.
   В светлой — тонкая рамка, иначе белые картинки сливаются с фоном. */
.post-card__thumbnail,
.entry-image.post-card__thumbnail,
.entry-image,
.widget_media_image {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f5f7;
  box-shadow: 0 0 0 1px rgba(15, 17, 21, .12);
}

.widget_media_image {
  border-radius: 12px;
}

.post-card--sidebar .post-card__thumbnail,
.widget .post-card__thumbnail {
  box-shadow: 0 0 0 1px rgba(15, 17, 21, .12);
}

.post-card__thumbnail img,
.entry-image img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

/* Белые баннеры/обложки в тёмной теме — рамка + лёгкий тёмный мат */
html[data-theme="dark"] .widget_media_image {
  border-radius: 12px;
  overflow: hidden;
  background: #14161b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .14),
    0 10px 28px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .widget_media_image a {
  position: relative;
  display: block;
  line-height: 0;
}

html[data-theme="dark"] .widget_media_image a:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(15, 17, 21, .14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
}

html[data-theme="dark"] .widget_media_image img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(.88) saturate(.96);
}

html[data-theme="dark"] .post-card__thumbnail,
html[data-theme="dark"] .entry-image.post-card__thumbnail,
html[data-theme="dark"] .entry-image {
  background: #12151a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}

/* Оверлей только на ссылку с картинкой — не на бейдж рубрики */
html[data-theme="dark"] .post-card__thumbnail > a,
html[data-theme="dark"] .entry-image > a.kiberlis-zoomable,
html[data-theme="dark"] .entry-image > a:has(img, picture) {
  position: relative;
  display: block;
}

html[data-theme="dark"] .post-card__thumbnail > a:after,
html[data-theme="dark"] .entry-image > a.kiberlis-zoomable:after,
html[data-theme="dark"] .entry-image > a:has(img, picture):after,
html[data-theme="dark"] .entry-image:not(:has(> a)):after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(15, 17, 21, .16);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .post-card__thumbnail .post-card__category,
html[data-theme="dark"] .entry-image .post-card__category {
  z-index: 2;
}

html[data-theme="dark"] .post-card__category a,
html[data-theme="dark"] .entry-image .post-card__category a {
  position: static;
  display: inline;
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: 0;
}

html[data-theme="dark"] .post-card__category a:after,
html[data-theme="dark"] .entry-image .post-card__category a:after {
  content: none !important;
  display: none !important;
}

html[data-theme="dark"] .post-card--sidebar .post-card__thumbnail,
html[data-theme="dark"] .widget .post-card__thumbnail {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .post-card--sidebar .post-card__thumbnail > a:after,
html[data-theme="dark"] .widget .post-card__thumbnail > a:after {
  background: rgba(15, 17, 21, .12);
}

/* =========================================================================
   Содержание (TOC) + entry-meta — светлая и тёмная тема
   ========================================================================= */

/* --- Разделитель после мета-блока статьи (было 3px #f2f2f2) --- */
.entry-meta {
  border-bottom: 1px solid rgba(15, 17, 21, .1);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

html[data-theme="dark"] .entry-meta {
  border-bottom-color: rgba(255, 255, 255, .1);
}

/* --- TOC в тексте статьи --- */
.entry-content .table-of-contents {
  background-color: transparent;
  border: none;
  border-left: 2px solid #f27600;
  margin: 0 0 28px;
  padding: 4px 0 4px 18px;
}

.entry-content .table-of-contents__header {
  padding: 0 0 10px;
  margin: 0 0 10px;
  font-size: .95em;
  font-weight: 600;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(15, 17, 21, .08);
}

.entry-content .table-of-contents__hide {
  color: #374151;
}

.entry-content .table-of-contents__hide:after {
  margin-left: 8px;
  opacity: .45;
  font-size: .85em;
}

.entry-content .table-of-contents ol {
  margin: 0;
  padding: 0;
}

.entry-content .table-of-contents ol li a {
  color: #4b5563;
  line-height: 1.45;
}

.entry-content .table-of-contents ol li a:hover,
.entry-content .table-of-contents ol li a:focus {
  color: #f27600;
}

html[data-theme="dark"] .entry-content .table-of-contents {
  border-left-color: #f27600;
}

html[data-theme="dark"] .entry-content .table-of-contents__header {
  border-bottom-color: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .entry-content .table-of-contents__header,
html[data-theme="dark"] .entry-content .table-of-contents__hide {
  color: #e5e7eb;
}

html[data-theme="dark"] .entry-content .table-of-contents ol li a {
  color: #c4c9d2;
}

html[data-theme="dark"] .entry-content .table-of-contents ol li a:hover,
html[data-theme="dark"] .entry-content .table-of-contents ol li a:focus {
  color: #fb923c;
}

/* ---------- Якоря заголовков (Add Anchor Links) ---------- */
/* Плагин: float:left + margin-left:-20px — на мобиле иконка уезжает к краю экрана */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  position: relative;
}

.entry-content .aal_anchor {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: 1;
  color: #9ca3af;
  text-decoration: none;
  vertical-align: middle;
  border-radius: 8px;
  -webkit-transition: opacity .18s ease, color .15s ease, background-color .15s ease;
  transition: opacity .18s ease, color .15s ease, background-color .15s ease;
}

.entry-content .aal_anchor:hover,
.entry-content .aal_anchor:focus,
.entry-content .aal_anchor:focus-visible {
  color: #f27600;
  background: rgba(242, 118, 0, .1);
  outline: none;
}

.entry-content .aal_svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  vertical-align: middle;
  pointer-events: none;
}

/* Десктоп: иконка в левом отступе заголовка, плавно при наведении */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .entry-content h1,
  .entry-content h2,
  .entry-content h3,
  .entry-content h4,
  .entry-content h5,
  .entry-content h6 {
    display: block;
    padding-right: 0;
  }

  .entry-content .aal_anchor {
    position: absolute;
    top: 0.12em;
    left: -2rem;
    right: auto;
    width: 1.7rem;
    height: 1.7rem;
    opacity: 0;
  }

  .entry-content .aal_svg {
    visibility: visible;
    width: 16px;
    height: 16px;
  }

  .entry-content h1:hover .aal_anchor,
  .entry-content h2:hover .aal_anchor,
  .entry-content h3:hover .aal_anchor,
  .entry-content h4:hover .aal_anchor,
  .entry-content h5:hover .aal_anchor,
  .entry-content h6:hover .aal_anchor,
  .entry-content .aal_anchor:focus,
  .entry-content .aal_anchor:focus-visible {
    opacity: 1;
  }
}

/* Мобильный / тач: иконка справа у заголовка, всегда слегка видна */
@media (max-width: 767px), (hover: none) {
  .entry-content h1,
  .entry-content h2,
  .entry-content h3,
  .entry-content h4,
  .entry-content h5,
  .entry-content h6 {
    padding-right: 2.25rem;
  }

  .entry-content .aal_anchor {
    position: absolute;
    top: 0.1em;
    right: 0;
    width: 28px;
    height: 28px;
    opacity: 1;
  }

  .entry-content .aal_svg {
    visibility: visible;
    opacity: 0.5;
    width: 15px;
    height: 15px;
    -webkit-transition: opacity .15s ease;
    transition: opacity .15s ease;
  }

  .entry-content .aal_anchor:active,
  .entry-content .aal_anchor:focus,
  .entry-content .aal_anchor:focus-visible {
    color: #f27600;
    background: rgba(242, 118, 0, .1);
  }

  .entry-content .aal_anchor:active .aal_svg,
  .entry-content .aal_anchor:focus .aal_svg,
  .entry-content .aal_anchor:focus-visible .aal_svg {
    opacity: 1;
  }
}

html[data-theme="dark"] .entry-content .aal_anchor {
  color: #6b7280;
}

html[data-theme="dark"] .entry-content .aal_anchor:hover,
html[data-theme="dark"] .entry-content .aal_anchor:focus,
html[data-theme="dark"] .entry-content .aal_anchor:focus-visible {
  color: #f27600;
  background: rgba(242, 118, 0, .12);
}

/* ---------- Типографика заголовков ---------- */
.entry-title {
  font-weight: 700;
  letter-spacing: -.028em;
  line-height: 1.18;
  margin: .55em 0 .75em;
  color: #111827;
  text-wrap: balance;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.entry-content .wp-block-heading {
  color: #111827;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.28;
  scroll-margin-top: 5.5rem;
  text-wrap: pretty;
}

.entry-content h1,
.entry-content .wp-block-heading:is(h1) {
  font-size: 1.7em;
  margin: 1.6em 0 .65em;
  letter-spacing: -.025em;
}

.entry-content h2,
.entry-content .wp-block-heading:is(h2) {
  font-size: 1.48em;
  margin: 1.9em 0 .7em;
  padding: 0 0 .42em;
  border-bottom: 1px solid rgba(15, 17, 21, .1);
  position: relative;
}

.entry-content h2:after,
.entry-content .wp-block-heading:is(h2):after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 44px;
  height: 3px;
  background: #f27600;
  border-radius: 2px;
}

.entry-content h3,
.entry-content .wp-block-heading:is(h3) {
  font-size: 1.22em;
  margin: 1.55em 0 .55em;
  padding-left: 12px;
  border-left: 3px solid #f27600;
  letter-spacing: -.015em;
}

.entry-content h4,
.entry-content .wp-block-heading:is(h4) {
  font-size: 1.08em;
  margin: 1.35em 0 .45em;
  color: #1f2937;
  letter-spacing: -.01em;
}

.entry-content h5,
.entry-content .wp-block-heading:is(h5),
.entry-content h6,
.entry-content .wp-block-heading:is(h6) {
  font-size: .98em;
  margin: 1.2em 0 .4em;
  color: #374151;
  letter-spacing: -.005em;
  text-transform: none;
}

/* Секционные заголовки сайта — единый акцент */
.section-block__title,
.page-title,
.related-posts__header,
.comments-area .comments-title,
.comments-area .comment-reply-title,
.widget .widget-title,
.widget-title {
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.25;
  color: #111827;
  position: relative;
}

.section-block__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 32px;
  margin-bottom: 28px;
}

.section-block__title {
  flex: 0 1 auto;
  font-size: 1.55em;
  margin: 0;
  padding-bottom: 10px;
  min-width: 0;
}

.section-block__title a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}

.section-block__title a:hover,
.section-block__title a:focus {
  color: #f27600;
}

.section-block__title:after,
.page-header .page-title:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  background: #f27600;
  border-radius: 2px;
}

.page-header .page-title {
  display: inline-block;
  padding-bottom: 10px;
  margin-bottom: 0;
}

/* ---------- Intro рубрики ---------- */
.page-header--category {
  margin: 0 0 1.75em;
  padding: 0 0 1.5em;
  border-bottom: 1px solid rgba(15, 17, 21, .08);
}

.page-header--category .page-title {
  margin: 0 0 .35em;
  font-size: clamp(1.65em, 2.4vw, 2.05em);
  line-height: 1.2;
}

.archive-count {
  margin: 0 0 1em;
  color: #6b7280;
  font-size: .82em;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.page-header--category .child-categories {
  margin: 0 0 1.15em;
}

.page-header--category .child-categories ul li a {
  gap: 8px;
  font-size: .9em;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.child-categories__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35em;
  padding: 0 .35em;
  border-radius: 999px;
  background: rgba(15, 17, 21, .08);
  color: #4b5563;
  font-size: .78em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.page-header--category .taxonomy-description--lead {
  margin: 0;
  max-width: 42em;
  color: #4b5563;
  font-size: .98em;
  line-height: 1.6;
}

.page-header--category .taxonomy-description--lead p {
  margin: 0 0 .75em;
}

.page-header--category .taxonomy-description--lead p:last-child {
  margin-bottom: 0;
}

html[data-theme="dark"] .page-header--category {
  border-bottom-color: rgba(255, 255, 255, .1);
}

html[data-theme="dark"] .archive-count {
  color: #9ca3af;
}

html[data-theme="dark"] .child-categories__count {
  background: rgba(255, 255, 255, .12);
  color: #d1d5db;
}

html[data-theme="dark"] .page-header--category .taxonomy-description--lead {
  color: #c4c9d2;
}

@media (max-width: 767px) {
  .page-header--category {
    margin-bottom: 1.35em;
    padding-bottom: 1.2em;
  }

  .page-header--category .page-title {
    font-size: 1.55em;
  }

  .page-header--category .taxonomy-description--lead {
    font-size: .94em;
    padding-right: 48px;
  }
}

/* Подразделы на главной (Docker, Proxmox…) */
.section-posts__categories {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0 0 2px;
  font-size: .9em;
}

.section-posts__categories-title {
  margin: 0 0 8px;
  padding: 0;
  color: #9ca3af;
  font-size: .65em;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 1;
}

.section-posts__categories ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.section-posts__categories ul li {
  margin: 0 !important;
}

.section-posts__categories ul li a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid rgba(15, 17, 21, .12);
  border-radius: 999px;
  background: rgba(15, 17, 21, .04);
  color: #1f2937;
  font-size: .9em;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.section-posts__categories ul li a:hover,
.section-posts__categories ul li a:focus {
  background: rgba(242, 118, 0, .1);
  border-color: rgba(242, 118, 0, .4);
  color: #c45f00;
  outline: none;
}

/* Подкатегории в архивах */
.child-categories {
  margin: 0 0 1.25em;
}

.child-categories ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.child-categories ul li {
  margin: 0;
}

.child-categories ul li a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid rgba(15, 17, 21, .12);
  border-radius: 999px;
  background: rgba(15, 17, 21, .04);
  color: #1f2937;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.child-categories ul li a:hover,
.child-categories ul li a:focus {
  background: rgba(242, 118, 0, .1);
  border-color: rgba(242, 118, 0, .4);
  color: #c45f00;
}

.widget .widget-title,
.widget-title {
  font-size: 1.05em;
  margin: 0 0 .85em;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 17, 21, .1);
}

.widget .widget-title:after,
.widget-title:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 32px;
  height: 2px;
  background: #f27600;
  border-radius: 2px;
}

.entry-content .table-of-contents__header {
  font-weight: 700;
  letter-spacing: -.01em;
  color: #111827;
}

/* Карточки на главной — заголовки постов */
.post-card__title {
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
}

.post-card__title a {
  text-decoration: none;
  transition: color .15s ease;
}

@media (max-width: 991px) {
  .section-block__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .section-block__title {
    margin-right: 0;
  }
}

@media (max-width: 991px) {
  .entry-title {
    font-size: 1.42em;
    line-height: 1.22;
    letter-spacing: -.02em;
  }
}

@media (max-width: 767px) {
  .entry-title {
    font-size: 1.28em;
    line-height: 1.26;
    letter-spacing: -.016em;
    margin: .4em 0 .6em;
  }

  .entry-content h2,
  .entry-content .wp-block-heading:is(h2) {
    font-size: 1.28em;
    margin-top: 1.55em;
  }

  .entry-content h3,
  .entry-content .wp-block-heading:is(h3) {
    font-size: 1.12em;
    padding-left: 10px;
  }

  .section-block__title,
  .related-posts__header,
  .comments-area .comments-title,
  .comments-area .comment-reply-title {
    font-size: 1.28em;
  }

  .section-posts__categories ul li a,
  .child-categories ul li a {
    padding: 7px 14px;
  }
}

html[data-theme="dark"] .entry-title,
html[data-theme="dark"] .entry-title a {
  color: #f8fafc;
}

html[data-theme="dark"] .entry-content h1,
html[data-theme="dark"] .entry-content h2,
html[data-theme="dark"] .entry-content h3,
html[data-theme="dark"] .entry-content h4,
html[data-theme="dark"] .entry-content h5,
html[data-theme="dark"] .entry-content h6,
html[data-theme="dark"] .entry-content .wp-block-heading {
  color: #f3f4f6;
}

html[data-theme="dark"] .entry-content h2,
html[data-theme="dark"] .entry-content .wp-block-heading:is(h2) {
  border-bottom-color: rgba(255, 255, 255, .1);
}

html[data-theme="dark"] .entry-content h4,
html[data-theme="dark"] .entry-content .wp-block-heading:is(h4) {
  color: #e5e7eb;
}

html[data-theme="dark"] .entry-content h5,
html[data-theme="dark"] .entry-content h6,
html[data-theme="dark"] .entry-content .wp-block-heading:is(h5),
html[data-theme="dark"] .entry-content .wp-block-heading:is(h6) {
  color: #d1d5db;
}

html[data-theme="dark"] .section-block__title,
html[data-theme="dark"] .page-header .page-title,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .related-posts__header,
html[data-theme="dark"] .comments-area .comments-title,
html[data-theme="dark"] .comments-area .comment-reply-title,
html[data-theme="dark"] .widget .widget-title,
html[data-theme="dark"] .widget-title {
  color: #f3f4f6;
}

html[data-theme="dark"] .section-block__title a {
  color: #f3f4f6;
}

html[data-theme="dark"] .section-block__title a:hover,
html[data-theme="dark"] .section-block__title a:focus {
  color: #fb923c;
}

html[data-theme="dark"] .section-posts__categories-title {
  color: #6b7280;
}

html[data-theme="dark"] .section-posts__categories ul li a,
html[data-theme="dark"] .child-categories ul li a {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  color: #f3f4f6;
}

html[data-theme="dark"] .section-posts__categories ul li a:hover,
html[data-theme="dark"] .section-posts__categories ul li a:focus,
html[data-theme="dark"] .child-categories ul li a:hover,
html[data-theme="dark"] .child-categories ul li a:focus {
  background: rgba(242, 118, 0, .16);
  border-color: rgba(251, 146, 60, .55);
  color: #fb923c;
}

html[data-theme="dark"] .widget .widget-title,
html[data-theme="dark"] .widget-title {
  border-bottom-color: rgba(255, 255, 255, .1);
}

html[data-theme="dark"] .entry-content .table-of-contents__header {
  color: #f3f4f6;
}

/* --- TOC в сайдбаре: один заголовок, без «коробки» --- */
.widget_wpshop_widget_table_of_contents {
  background: transparent;
  border: none;
  padding: 0;
}

.widget_wpshop_widget_table_of_contents .widget-header {
  margin-bottom: 12px;
  padding-bottom: 8px;
  font-size: .95em;
  font-weight: 600;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(15, 17, 21, .1);
}

/* Дубль «Содержание» внутри TOC — скрываем; список всегда открыт */
.widget_wpshop_widget_table_of_contents .table-of-contents__header {
  display: none;
}

.widget_wpshop_widget_table_of_contents .table-of-contents {
  background: transparent;
  border: none;
  margin: 0;
  padding: 0;
}

.widget_wpshop_widget_table_of_contents .table-of-contents__list,
.widget_wpshop_widget_table_of_contents .table-of-contents.open .table-of-contents__list {
  display: block;
}

.widget_wpshop_widget_table_of_contents .table-of-contents ol {
  margin: 0;
  padding: 0;
}

.widget_wpshop_widget_table_of_contents .table-of-contents ol .level-1 {
  margin-top: .35em;
  margin-bottom: .15em;
}

.widget_wpshop_widget_table_of_contents .table-of-contents ol .level-2 {
  margin-left: 1rem;
  font-size: .9em;
}

.widget_wpshop_widget_table_of_contents .table-of-contents ol li a {
  color: #4b5563;
  text-decoration: none;
  line-height: 1.4;
}

.widget_wpshop_widget_table_of_contents .table-of-contents ol li a:hover,
.widget_wpshop_widget_table_of_contents .table-of-contents ol li a:focus {
  color: #f27600;
}

html[data-theme="dark"] .widget_wpshop_widget_table_of_contents {
  background: transparent;
  border: none;
}

html[data-theme="dark"] .widget_wpshop_widget_table_of_contents .widget-header {
  color: #e5e7eb;
  border-bottom-color: rgba(255, 255, 255, .1);
}

html[data-theme="dark"] .widget_wpshop_widget_table_of_contents .table-of-contents ol li a {
  color: #c4c9d2;
}

html[data-theme="dark"] .widget_wpshop_widget_table_of_contents .table-of-contents ol li a:hover,
html[data-theme="dark"] .widget_wpshop_widget_table_of_contents .table-of-contents ol li a:focus {
  color: #fb923c;
}

/* Одно содержание: сайдбар на десктопе, в тексте на мобильном */
@media (min-width: 992px) {
  body.sidebar-right:has(.widget_wpshop_widget_table_of_contents) .entry-content > .table-of-contents,
  body.sidebar-left:has(.widget_wpshop_widget_table_of_contents) .entry-content > .table-of-contents {
    display: none;
  }
}

@media (max-width: 991px) {
  .widget_wpshop_widget_table_of_contents {
    display: none !important;
  }
}

/* ---------- Контент статьи (.entry-content) ---------- */
html[data-theme="dark"] .entry-content {
  color: #d1d5db;
}
 
html[data-theme="dark"] .entry-content .wp-block-heading {
  color: #f3f4f6;
}
 
html[data-theme="dark"] .entry-content .wp-block-paragraph a,
html[data-theme="dark"] .entry-content a {
  color: #fb923c;
}
 
html[data-theme="dark"] .entry-content a:hover,
html[data-theme="dark"] .entry-content a:focus {
  color: #fdba74;
}
 
html[data-theme="dark"] .entry-content .wp-block-list {
  color: #d1d5db;
}
 
/* ---------- Блоки кода (pre.wp-block-code / Prism line-numbers) ---------- */
.kiberlis-code {
  margin: 1.5em 0;
  border: 1px solid rgba(15, 17, 21, .1);
  border-radius: 12px;
  background: #f7f8fa;
  box-shadow: 0 1px 2px rgba(15, 17, 21, .03);
  overflow: hidden;
}

.kiberlis-code__bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(15, 17, 21, .08);
  background: rgba(255, 255, 255, .65);
}

.entry-content .kiberlis-code > pre,
.entry-content .kiberlis-code > pre.wp-block-code,
.entry-content pre.wp-block-code {
  margin: 0;
  padding: 1em 1.15em;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #1f2937;
  font-size: .9em;
  line-height: 1.55;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prism line-numbers: номера внутри карточки, не за краем */
.entry-content pre.line-numbers {
  position: relative;
  padding-left: 4.1em !important;
  overflow-x: auto;
}

.entry-content pre.line-numbers > code {
  position: static !important;
  display: block;
  overflow: visible;
  background: transparent;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.entry-content .line-numbers .line-numbers-rows {
  position: absolute;
  left: 0 !important;
  top: 1em;
  width: 3.6em;
  margin: 0;
  border-right: 1px solid rgba(15, 17, 21, .1);
  letter-spacing: normal;
  background: transparent;
  box-sizing: border-box;
  padding-left: 0.35em;
}

.entry-content .line-numbers-rows > span:before {
  color: #9ca3af;
  padding-right: .65em;
  font-size: .85em;
}

.kiberlis-code__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(15, 17, 21, .1);
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.kiberlis-code__copy:hover,
.kiberlis-code__copy:focus-visible {
  color: #f27600;
  border-color: rgba(242, 118, 0, .45);
  background: #fff7ed;
  outline: none;
}

.kiberlis-code__icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.kiberlis-code__label {
  color: inherit;
  text-decoration: none;
}

.kiberlis-code__icon svg {
  width: 14px;
  height: 14px;
}

.kiberlis-code__icon--check {
  display: none;
}

.kiberlis-code__copy.is-copied {
  color: #16a34a;
  border-color: rgba(22, 163, 74, .35);
  background: #f0fdf4;
}

.kiberlis-code__copy.is-copied .kiberlis-code__icon:not(.kiberlis-code__icon--check) {
  display: none;
}

.kiberlis-code__copy.is-copied .kiberlis-code__icon--check {
  display: inline-flex;
}

@media (max-width: 767px) {
  .kiberlis-code {
    border-radius: 10px;
  }

  .kiberlis-code__bar {
    padding: 8px;
  }

  .kiberlis-code__copy {
    min-height: 34px;
    padding: 7px 11px;
    touch-action: manipulation;
  }

  .entry-content pre.line-numbers {
    padding-left: 3.4em !important;
  }

  .entry-content .line-numbers .line-numbers-rows {
    width: 3em;
    padding-left: 0.25em;
  }
}

/* Тёмная тема — код */
html[data-theme="dark"] .kiberlis-code {
  background: #14171c;
  border-color: #2d323b;
  box-shadow: none;
}

html[data-theme="dark"] .kiberlis-code__bar {
  background: rgba(24, 27, 32, .85);
  border-bottom-color: #2d323b;
}

html[data-theme="dark"] .entry-content .kiberlis-code > pre,
html[data-theme="dark"] .entry-content .kiberlis-code > pre.wp-block-code,
html[data-theme="dark"] .entry-content pre.wp-block-code {
  background: transparent;
  border: none;
  color: #d1d5db;
}

html[data-theme="dark"] .entry-content pre.wp-block-code code {
  color: #d1d5db;
  background: transparent;
}

html[data-theme="dark"] .entry-content .line-numbers .line-numbers-rows {
  border-right-color: #2d323b;
}

html[data-theme="dark"] .entry-content .line-numbers-rows > span:before {
  color: #6b7280;
}

html[data-theme="dark"] .kiberlis-code__copy {
  background: #181b20;
  border-color: #2d323b;
  color: #9ca3af;
}

html[data-theme="dark"] .kiberlis-code__copy:hover,
html[data-theme="dark"] .kiberlis-code__copy:focus-visible {
  color: #f27600;
  border-color: rgba(242, 118, 0, .5);
  background: #1f232b;
}

html[data-theme="dark"] .kiberlis-code__copy.is-copied {
  color: #4ade80;
  border-color: rgba(74, 222, 128, .35);
  background: rgba(22, 163, 74, .12);
}
 
/* Подсветка синтаксиса Prism внутри блоков кода */
html[data-theme="dark"] .entry-content .token.comment { color: #6b7280; }
html[data-theme="dark"] .entry-content .token.function,
html[data-theme="dark"] .entry-content .token.builtin.class-name { color: #fdba74; }
html[data-theme="dark"] .entry-content .token.key.atrule { color: #f27600; }
html[data-theme="dark"] .entry-content .token.string { color: #93c5a3; }
html[data-theme="dark"] .entry-content .token.boolean.important,
html[data-theme="dark"] .entry-content .token.number { color: #fb923c; }
html[data-theme="dark"] .entry-content .token.operator,
html[data-theme="dark"] .entry-content .token.punctuation { color: #9ca3af; }
 
/* ---------- Футер (#colophon) — лаконичный, светлая + тёмная ---------- */
#colophon.site-footer,
.site-footer--style-gray {
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: .82em;
  letter-spacing: .01em;
  line-height: 1.55;
  background-color: #1c1e24;
  color: #a8aeb8;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

#colophon.site-footer a,
#colophon.site-footer .pseudo-link,
.site-footer--style-gray a,
.site-footer--style-gray .pseudo-link {
  color: #d1d5db;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

#colophon.site-footer a:hover,
#colophon.site-footer .pseudo-link:hover,
.site-footer--style-gray a:hover,
.site-footer--style-gray .pseudo-link:hover {
  color: #f27600;
  border-bottom-color: rgba(242, 118, 0, .35);
  text-decoration: none;
}

.footer-info {
  color: #a8aeb8;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

/* ---------- RSS подписка ---------- */
.kiberlis-rss {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kiberlis-rss__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f27600;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.3;
  border-bottom: none !important;
}

.kiberlis-rss__link:hover,
.kiberlis-rss__link:focus {
  color: #ff8a1a;
  text-decoration: none;
}

.kiberlis-rss__icon {
  flex: 0 0 auto;
  display: block;
}

.kiberlis-rss__hint {
  margin: 0;
  font-size: .85em;
  line-height: 1.45;
  color: #6b7280;
  font-weight: 400;
}

.kiberlis-rss__also {
  margin: 0;
  font-size: .85em;
  line-height: 1.4;
}

.kiberlis-rss--post .kiberlis-rss__other {
  color: #6b7280;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid rgba(107, 114, 128, .35) !important;
}

.kiberlis-rss--post .kiberlis-rss__other:hover,
.kiberlis-rss--post .kiberlis-rss__other:focus {
  color: #f27600;
  border-bottom-color: rgba(242, 118, 0, .45) !important;
}

.kiberlis-rss--post {
  margin: 28px 0 8px;
  padding: 14px 16px;
  border: 1px solid rgba(242, 118, 0, .22);
  border-radius: 12px;
  background: rgba(242, 118, 0, .06);
  gap: 8px;
  max-width: 36em;
}

.kiberlis-rss--footer {
  margin: 0;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}

.kiberlis-rss--footer .kiberlis-rss__link {
  color: #d1d5db;
  font-weight: 550;
  font-size: 1em;
}

.kiberlis-rss--footer .kiberlis-rss__link:hover,
.kiberlis-rss--footer .kiberlis-rss__link:focus {
  color: #f27600;
}

.kiberlis-rss--footer .kiberlis-rss__sep {
  color: #6b7280;
  user-select: none;
}

.kiberlis-rss--footer .kiberlis-rss__other {
  color: #9ca3af;
  font-size: .9em;
  font-weight: 500;
  text-decoration: none;
  border-bottom: none !important;
  letter-spacing: .02em;
}

.kiberlis-rss--footer .kiberlis-rss__other:hover,
.kiberlis-rss--footer .kiberlis-rss__other:focus {
  color: #f27600;
  text-decoration: none;
}

html[data-theme="dark"] .kiberlis-rss--post {
  background: rgba(242, 118, 0, .1);
  border-color: rgba(242, 118, 0, .28);
}

html[data-theme="dark"] .kiberlis-rss__hint,
html[data-theme="dark"] .kiberlis-rss--post .kiberlis-rss__other {
  color: #9ca3af;
}

html[data-theme="dark"] .kiberlis-rss--post .kiberlis-rss__other {
  border-bottom-color: rgba(156, 163, 175, .35) !important;
}

html[data-theme="light"] .kiberlis-rss--post,
html:not([data-theme]) .kiberlis-rss--post {
  background: rgba(242, 118, 0, .07);
}

html[data-theme="light"] .kiberlis-rss--footer .kiberlis-rss__link,
html:not([data-theme]) .kiberlis-rss--footer .kiberlis-rss__link {
  color: #d1d5db;
}

.footer-partner {
  margin-top: .35em;
  font-size: .95em;
  color: #7d8490;
}

html[data-theme="dark"] #colophon.site-footer,
html[data-theme="dark"] .site-footer--style-gray {
  background-color: #0f1115;
  color: #9ca3af;
  border-top-color: rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .footer-info {
  color: #9ca3af;
}

html[data-theme="dark"] .footer-partner {
  color: #6b7280;
}

html[data-theme="dark"] #colophon.site-footer a,
html[data-theme="dark"] #colophon.site-footer .pseudo-link,
html[data-theme="dark"] .footer-partner .pseudo-link {
  color: #c4c9d2;
}

html[data-theme="dark"] #colophon.site-footer a:hover,
html[data-theme="dark"] #colophon.site-footer .pseudo-link:hover,
html[data-theme="dark"] .footer-partner .pseudo-link:hover {
  color: #fb923c;
}

/* ---------- Основная область (.site-content — у Reboot белый фон) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] .site-content,
html[data-theme="dark"] .site-content-inner {
  background-color: #0f1115;
}

html[data-theme="dark"] .entry-title,
html[data-theme="dark"] .entry-title a {
  color: #f3f4f6;
}

html[data-theme="dark"] .entry-meta {
  color: #e5e7eb;
}

html[data-theme="dark"] .entry-label {
  color: #9ca3af;
}

html[data-theme="dark"] .entry-author,
html[data-theme="dark"] .entry-date,
html[data-theme="dark"] .entry-time,
html[data-theme="dark"] .entry-views,
html[data-theme="dark"] .entry-comments,
html[data-theme="dark"] .entry-meta time,
html[data-theme="dark"] .entry-meta a {
  color: #e5e7eb;
}

html[data-theme="dark"] .entry-meta a:hover,
html[data-theme="dark"] .entry-meta a:focus {
  color: #f27600;
}

html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .breadcrumb span {
  color: #9ca3af;
}

html[data-theme="dark"] .breadcrumb a:hover {
  color: #f27600;
}

/* ---------- Поиск: компактный оверлей ---------- */
.search-screen-overlay {
  background: rgba(15, 17, 21, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.search-screen {
  top: max(12px, 6vh);
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(520px, calc(100% - 28px));
  max-width: calc(100vw - 28px);
  max-height: none;
  box-sizing: border-box;
  padding: 12px 52px 12px 12px !important;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 17, 21, .08);
  box-shadow:
    0 1px 2px rgba(15, 17, 21, .04),
    0 18px 48px rgba(15, 17, 21, .16);
  /* Тема Reboot ставит display:block инлайном — не опираемся на flex */
  -webkit-transform: translateX(-50%) translateY(-10px) translateZ(0);
  transform: translateX(-50%) translateY(-10px) translateZ(0);
}

.search-screen.open {
  -webkit-transform: translateX(-50%) translateY(0) translateZ(0);
  transform: translateX(-50%) translateY(0) translateZ(0);
}

.search-screen__close {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #9ca3af;
  box-shadow: none;
  cursor: pointer;
  display: -webkit-inline-flex;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  -webkit-appearance: none;
  appearance: none;
  transition: color .15s ease, background-color .15s ease;
}

.search-screen__close:hover,
.search-screen__close:focus-visible {
  color: #111827;
  background: rgba(15, 17, 21, .06);
  outline: none;
}

.search-screen__close svg {
  width: 16px;
  height: 16px;
  display: block;
}

.search-screen .search-form {
  position: relative;
  max-width: none;
  margin: 0;
  width: 100%;
  font-size: 1rem !important;
}

.search-screen .search-form > label {
  margin: 0;
}

.search-screen .search-form .search-field {
  font-family: inherit !important;
  font-weight: 500 !important;
  font-size: 1rem !important;
  line-height: 1.35 !important;
  text-align: left !important;
  border: 1px solid rgba(15, 17, 21, .12) !important;
  border-radius: 12px !important;
  background: #f3f4f6;
  color: #111827;
  min-height: 48px;
  padding: 12px 52px 12px 16px !important;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.search-screen .search-form .search-field:focus {
  border-color: #f27600 !important;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(242, 118, 0, .18);
}

.search-screen .search-form .search-field::placeholder {
  color: #9ca3af;
  font-weight: 400;
  opacity: 1;
}

.search-screen .search-form .search-submit {
  top: 50%;
  right: 6px;
  bottom: auto;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  display: -webkit-inline-flex;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-screen .search-form .search-submit:hover,
.search-screen .search-form .search-submit:focus {
  background: rgba(242, 118, 0, .1);
  outline: none;
}

.search-screen .search-form .search-submit:before {
  content: "" !important;
  position: static !important;
  top: auto !important;
  display: block;
  width: 18px;
  height: 18px;
  background-color: #f27600;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  color: transparent;
  font-size: 0;
}

@media (max-width: 767px) {
  .search-screen {
    top: 12px;
    width: calc(100% - 24px);
    max-width: calc(100vw - 24px);
    padding: 10px 48px 10px 10px !important;
    border-radius: 14px;
  }

  .search-screen__close {
    right: 6px;
    width: 36px;
    height: 36px;
  }

  .search-screen .search-form .search-field {
    min-height: 46px;
    font-size: .95rem !important;
  }
}

html[data-theme="dark"] .search-screen {
  background-color: #181b20;
  border-color: #2d323b;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, .25),
    0 18px 48px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] .search-screen .search-field {
  background-color: #0f1115;
  border-color: #2d323b !important;
  color: #f3f4f6;
}

html[data-theme="dark"] .search-screen .search-field:focus {
  background-color: #0f1115;
  border-color: #f27600 !important;
  box-shadow: 0 0 0 3px rgba(242, 118, 0, .22);
}

html[data-theme="dark"] .search-screen .search-field::placeholder {
  color: #6b7280;
}

html[data-theme="dark"] .search-screen-overlay {
  background-color: rgba(0, 0, 0, .55);
}

html[data-theme="dark"] .search-screen__close {
  background: transparent;
  border: none;
  color: #9ca3af;
  box-shadow: none;
}

html[data-theme="dark"] .search-screen__close:hover,
html[data-theme="dark"] .search-screen__close:focus-visible {
  color: #f3f4f6;
  background: rgba(255, 255, 255, .06);
}

/* ---------- Формы / комментарии ---------- */
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="search"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color: #181b20;
  border-color: #3d4450;
  color: #f3f4f6;
}

/* Placeholder в тёмной теме: тема Reboot даёт rgba(17,17,17,.5) — нечитаемо */
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}

html[data-theme="dark"] input::-webkit-input-placeholder,
html[data-theme="dark"] textarea::-webkit-input-placeholder {
  color: #9ca3af;
  opacity: 1;
}

html[data-theme="dark"] input::-moz-placeholder,
html[data-theme="dark"] textarea::-moz-placeholder {
  color: #9ca3af;
  opacity: 1;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  background-color: #181b20;
  color: #f3f4f6;
  border-color: #f27600;
  outline: none;
}

/* ---------- Комментарии ---------- */
#comments.comments-area,
.comments-area {
  padding-top: 36px;
  margin-top: 12px;
  border-top: 1px solid rgba(15, 17, 21, .08);
}

.comments-area .comment-reply-title,
.comments-area .comments-title {
  text-align: left;
  font-size: 1.35em;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 1.1em;
  padding-bottom: 12px;
  letter-spacing: -.01em;
  color: #111827;
  position: relative;
}

.comments-area .comment-reply-title:after,
.comments-area .comments-title:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  background: #f27600;
  border-radius: 2px;
}

.comments-area .comment-reply-title small {
  display: inline-block;
  margin-left: .5em;
  font-size: .7em;
  font-weight: 600;
}

.comments-area .comment-reply-title small a {
  color: #f27600;
  text-decoration: none;
}

.comments-area .comment-reply-title small a:hover {
  text-decoration: underline;
}

/* Форма */
.comments-area .comment-respond {
  margin-bottom: 2em;
  padding: 18px;
  background: #f7f8fa;
  border: 1px solid rgba(15, 17, 21, .08);
  border-radius: 12px;
}

.comments-area .comment-form > p {
  margin: 0 0 12px;
}

.comments-area .comment-form input[type="text"],
.comments-area .comment-form input[type="email"],
.comments-area .comment-form input[type="url"],
.comments-area .comment-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(15, 17, 21, .12);
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font-size: .95em;
  line-height: 1.4;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.comments-area .comment-form input[type="text"]:focus,
.comments-area .comment-form input[type="email"]:focus,
.comments-area .comment-form input[type="url"]:focus,
.comments-area .comment-form textarea:focus {
  border-color: #f27600;
  outline: none;
  box-shadow: 0 0 0 3px rgba(242, 118, 0, .16);
}

.comments-area .comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comments-area .comment-form-author,
.comments-area .comment-form-email,
.comments-area .comment-form-url {
  display: inline-block;
  width: 100%;
  vertical-align: top;
}

@media (min-width: 640px) {
  .comments-area .comment-form-author,
  .comments-area .comment-form-email {
    width: calc(50% - 6px);
  }

  .comments-area .comment-form-author {
    margin-right: 12px;
  }
}

.comments-area .comment-form-cookies-consent {
  margin-top: 4px;
  margin-bottom: 14px;
  color: #6b7280;
  font-size: .82em;
  gap: 8px;
}

.comments-area .comment-form-cookies-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  flex-shrink: 0;
  accent-color: #f27600;
  cursor: pointer;
}

.comments-area .comment-form-cookies-consent label {
  cursor: pointer;
  color: inherit;
}

.comments-area .logged-in-as,
.comments-area .comment-notes,
.comments-area .must-log-in,
.comments-area .comment-notes-after {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: .86em;
  line-height: 1.45;
}

.comments-area .logged-in-as a,
.comments-area .must-log-in a {
  color: #f27600;
  text-decoration: none;
}

.comments-area .logged-in-as a:hover,
.comments-area .must-log-in a:hover {
  text-decoration: underline;
}

.comments-area .comment-respond .form-submit {
  margin: 0;
}

.comments-area .comment-respond .form-submit input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .7rem 1.35rem;
  border: none;
  border-radius: 10px;
  background: #f27600;
  color: #fff;
  font-weight: 600;
  font-size: .95em;
  box-shadow: none;
  transform: none;
  transition: background-color .15s ease, transform .15s ease;
}

.comments-area .comment-respond .form-submit input:hover,
.comments-area .comment-respond .form-submit input:focus {
  background: #e06c00;
  box-shadow: none;
  transform: none;
  outline: none;
}

/* Список комментариев */
.comments-area .comment-list {
  margin-top: 8px;
}

.comments-area .comment-list > .comment {
  margin-bottom: 12px;
}

.comments-area .comment-list .comment-body {
  margin-bottom: 0;
  padding: 14px 14px 14px 72px;
  min-height: 64px;
  background: #fff;
  border: 1px solid rgba(15, 17, 21, .08);
  border-radius: 12px;
}

.comments-area .comment-list .comment-avatar {
  top: 14px;
  left: 14px;
  width: 44px;
}

.comments-area .comment-list .comment-avatar img {
  border-radius: 50%;
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
}

.comments-area .comment-list .comment-author {
  color: #111827;
  font-weight: 600;
}

.comments-area .comment-list .comment-author a {
  color: inherit;
  text-decoration: none;
}

.comments-area .comment-list .comment-author a:hover {
  color: #f27600;
}

.comments-area .comment-list .bypostauthor > .comment-body .comment-author:after {
  color: #f27600;
}

.comments-area .comment-list .comment-meta {
  margin-bottom: 8px;
}

.comments-area .comment-list .comment-metadata,
.comments-area .comment-list .comment-metadata a {
  color: #9ca3af;
  font-size: .82em;
  text-decoration: none;
}

.comments-area .comment-list .comment-metadata a:hover {
  color: #f27600;
}

.comments-area .comment-list .comment-content {
  color: #374151;
  font-size: .95em;
  line-height: 1.55;
}

.comments-area .comment-reply-link {
  opacity: .55;
  color: #f27600;
  font-weight: 600;
  text-decoration: none;
}

.comments-area .comment-list .comment-body:hover .comment-reply-link {
  opacity: 1;
}

.comments-area .comment-reply-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Тред: выделяем вопрос (родитель), ответы спокойнее */
.comments-area .comment-list > .comment:has(> .children) {
  background: transparent;
  border: 1px solid rgba(15, 17, 21, .08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}

.comments-area .comment-list > .comment:has(> .children) > .comment-body {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(15, 17, 21, .06);
  border-left: 3px solid rgba(242, 118, 0, .55);
  background: rgba(242, 118, 0, .04);
  box-shadow: none;
}

.comments-area .comment-list > .comment:has(> .children) > .comment-body .comment-meta:before {
  content: "Вопрос";
  display: inline-block;
  margin-right: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(242, 118, 0, .35);
  background: transparent;
  color: #c45f00;
  font-size: .66em;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: 1px;
}

.comments-area .comment-list .children {
  margin: 0;
  padding: 10px 12px 12px;
  list-style: none;
  position: relative;
  background: rgba(15, 17, 21, .03);
  border: none;
  border-radius: 0;
}

.comments-area .comment-list .children:before {
  content: "Ответы";
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 17, 21, .08);
  color: #6b7280;
  font-size: .68em;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.comments-area .comment-list .children > .comment {
  margin-bottom: 8px;
  position: relative;
  padding-left: 14px;
}

.comments-area .comment-list .children > .comment:last-child {
  margin-bottom: 0;
}

/* L-ветка к ответу — нейтральная */
.comments-area .comment-list .children > .comment:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  bottom: calc(100% - 28px);
  width: 12px;
  border-left: 2px solid rgba(15, 17, 21, .14);
  border-bottom: 2px solid rgba(15, 17, 21, .14);
  border-bottom-left-radius: 8px;
}

.comments-area .comment-list .children .comment-body {
  padding: 12px 14px 12px 56px;
  background: #fff;
  border: 1px solid rgba(15, 17, 21, .08);
  border-left: 1px solid rgba(15, 17, 21, .08);
  box-shadow: none;
}

.comments-area .comment-list .children .comment-meta:before {
  content: "↳";
  display: inline-block;
  margin-right: 5px;
  color: #9ca3af;
  font-weight: 700;
  font-size: 1.05em;
  line-height: 1;
  vertical-align: -1px;
}

.comments-area .comment-list .children .comment-avatar {
  width: 32px;
  top: 12px;
  left: 12px;
}

.comments-area .comment-list .children .comment-avatar img {
  width: 32px;
  height: 32px;
  box-shadow: none;
}

.comments-area .comment-list .children .children {
  margin: 8px 0 0;
  padding: 10px 8px 8px 12px;
  border: 1px dashed rgba(15, 17, 21, .12);
  border-radius: 10px;
  background: rgba(15, 17, 21, .02);
}

.comments-area .comment-list .children .children:before {
  content: "Вложенный ответ";
  background: rgba(15, 17, 21, .1);
  color: #6b7280;
}

@media (max-width: 767px) {
  .comments-area .comment-respond {
    padding: 14px;
  }

  .comments-area .comment-list .comment-body {
    padding: 12px 12px 12px 58px;
  }

  .comments-area .comment-list .comment-avatar {
    width: 36px;
    top: 12px;
    left: 12px;
  }

  .comments-area .comment-list .comment-avatar img {
    width: 36px;
    height: 36px;
  }

  .comments-area .comment-list .children {
    padding: 10px 8px 10px;
  }

  .comments-area .comment-list .children > .comment {
    padding-left: 12px;
  }

  .comments-area .comment-list .children > .comment:before {
    width: 8px;
    left: 1px;
    bottom: calc(100% - 24px);
  }

  .comments-area .comment-list .children .comment-body {
    padding-left: 50px;
    padding-right: 12px;
  }
}

/* Тёмная тема — комментарии */
html[data-theme="dark"] .comments-area {
  border-top-color: rgba(255, 255, 255, .08);
  color: #d1d5db;
}

html[data-theme="dark"] .comments-area .comment-reply-title,
html[data-theme="dark"] .comments-area .comments-title {
  color: #f3f4f6;
}

html[data-theme="dark"] .comments-area .comment-respond {
  background: #181b20;
  border-color: #2d323b;
}

html[data-theme="dark"] .comments-area .comment-form input[type="text"],
html[data-theme="dark"] .comments-area .comment-form input[type="email"],
html[data-theme="dark"] .comments-area .comment-form input[type="url"],
html[data-theme="dark"] .comments-area .comment-form textarea {
  background: #0f1115;
  border-color: #2d323b;
  color: #f3f4f6;
}

html[data-theme="dark"] .comments-area .comment-form input[type="text"]:focus,
html[data-theme="dark"] .comments-area .comment-form input[type="email"]:focus,
html[data-theme="dark"] .comments-area .comment-form input[type="url"]:focus,
html[data-theme="dark"] .comments-area .comment-form textarea:focus {
  border-color: #f27600;
  background: #0f1115;
  box-shadow: 0 0 0 3px rgba(242, 118, 0, .2);
}

html[data-theme="dark"] .comments-area .comment-form-cookies-consent,
html[data-theme="dark"] .comments-area .comment-form-cookies-consent label {
  color: #9ca3af;
}

html[data-theme="dark"] .comments-area .logged-in-as,
html[data-theme="dark"] .comments-area .comment-notes,
html[data-theme="dark"] .comments-area .must-log-in,
html[data-theme="dark"] .comments-area .comment-notes-after {
  color: #9ca3af;
}

html[data-theme="dark"] .comments-area .logged-in-as a,
html[data-theme="dark"] .comments-area .must-log-in a {
  color: #fb923c;
}

html[data-theme="dark"] .comments-area .logged-in-as a:hover,
html[data-theme="dark"] .comments-area .must-log-in a:hover {
  color: #fdba74;
}

/* Автозаполнение (сохранённые имя/email) — не ломать тёмную тему */
html[data-theme="dark"] .comments-area .comment-form input:-webkit-autofill,
html[data-theme="dark"] .comments-area .comment-form input:-webkit-autofill:hover,
html[data-theme="dark"] .comments-area .comment-form input:-webkit-autofill:focus,
html[data-theme="dark"] .comments-area .comment-form textarea:-webkit-autofill,
html[data-theme="dark"] .comments-area .comment-form textarea:-webkit-autofill:hover,
html[data-theme="dark"] .comments-area .comment-form textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #f3f4f6;
  caret-color: #f3f4f6;
  box-shadow: 0 0 0 1000px #0f1115 inset;
  transition: background-color 99999s ease-out;
  border-color: #2d323b;
}

html[data-theme="dark"] .comments-area .comment-list > .comment:has(> .children) {
  background: transparent;
  border-color: rgba(255, 255, 255, .08);
  box-shadow: none;
}

html[data-theme="dark"] .comments-area .comment-list > .comment:has(> .children) > .comment-body {
  background: rgba(242, 118, 0, .06);
  border-bottom-color: rgba(255, 255, 255, .06);
  border-left-color: rgba(242, 118, 0, .55);
}

html[data-theme="dark"] .comments-area .comment-list > .comment:has(> .children) > .comment-body .comment-meta:before {
  background: transparent;
  border-color: rgba(251, 146, 60, .35);
  color: #fb923c;
}

html[data-theme="dark"] .comments-area .comment-list .children {
  background: rgba(255, 255, 255, .03);
}

html[data-theme="dark"] .comments-area .comment-list .children:before {
  background: rgba(255, 255, 255, .08);
  color: #9ca3af;
}

html[data-theme="dark"] .comments-area .comment-list .children > .comment:before {
  border-color: rgba(255, 255, 255, .16);
}

html[data-theme="dark"] .comments-area .comment-list .children .comment-body {
  background: #181b20;
  border-color: #2d323b;
  border-left-color: #2d323b;
  box-shadow: none;
}

html[data-theme="dark"] .comments-area .comment-list .children .comment-meta:before {
  color: #6b7280;
}

html[data-theme="dark"] .comments-area .comment-list .children .comment-avatar img {
  box-shadow: none;
}

html[data-theme="dark"] .comments-area .comment-list .children .children {
  background: rgba(255, 255, 255, .02);
  border-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .comments-area .comment-list .children .children:before {
  background: rgba(255, 255, 255, .08);
  color: #9ca3af;
}

html[data-theme="dark"] .comments-area .comment-list .comment-body {
  background: #181b20;
  border-color: #2d323b;
}

html[data-theme="dark"] .comments-area .comment-list .comment-author,
html[data-theme="dark"] .comments-area .comment-list .comment-author a {
  color: #f3f4f6;
}

html[data-theme="dark"] .comments-area .comment-list .comment-author a:hover {
  color: #fb923c;
}

html[data-theme="dark"] .comments-area .comment-list .comment-metadata,
html[data-theme="dark"] .comments-area .comment-list .comment-metadata a {
  color: #6b7280;
}

html[data-theme="dark"] .comments-area .comment-list .comment-metadata a:hover {
  color: #fb923c;
}

html[data-theme="dark"] .comments-area .comment-list .comment-content {
  color: #d1d5db;
}

html[data-theme="dark"] .comments-area .comment-reply-link {
  color: #fb923c;
}

/* ---------- Похожие / рейтинг / спойлер ---------- */

/* Похожие статьи — современная сетка карточек */
#related-posts.related-posts,
.related-posts {
  padding: 40px 0 48px;
  margin-top: 8px;
  border-top: 1px solid rgba(15, 17, 21, .08);
}

.related-posts__header {
  text-align: left;
  font-size: 1.35em;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 1.15em;
  padding-bottom: 12px;
  letter-spacing: -.01em;
  color: #111827;
  position: relative;
}

.related-posts__header:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  background: #f27600;
  border-radius: 2px;
}

.related-posts .post-cards--vertical {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-left: 0;
  margin-right: 0;
  justify-content: stretch;
}

.related-posts .post-card--related {
  display: flex;
  flex-direction: column;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0;
  background: #fff;
  border: 1px solid rgba(15, 17, 21, .08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 17, 21, .03);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.related-posts .post-card--related:hover {
  border-color: rgba(242, 118, 0, .4);
  box-shadow: 0 12px 28px rgba(15, 17, 21, .08);
  transform: translateY(-2px);
}

.related-posts .post-card--related .post-card__thumbnail {
  position: relative;
  margin: 0 0 0;
  flex: 0 0 auto;
  max-width: none;
  width: 100%;
  /* Обложки на сайте ~870×400 — шире 16:9, иначе обрезаются по бокам */
  aspect-ratio: 870 / 400;
  overflow: hidden;
  background: #f4f5f7;
  box-shadow: 0 0 0 1px rgba(15, 17, 21, .12);
}

.related-posts .post-card--related .post-card__thumbnail a {
  display: block;
  height: 100%;
}

.related-posts .post-card--related .post-card__thumbnail picture {
  display: block;
  width: 100%;
  height: 100%;
}

.related-posts .post-card--related .post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform .35s ease;
}

.related-posts .post-card--related:hover .post-card__thumbnail img {
  transform: scale(1.04);
}

/* Убираем фиолетовый оверлей темы */
.related-posts .post-card--related .post-card__thumbnail a:before {
  display: none !important;
}

.related-posts .post-card--related .post-card__title,
.related-posts .post-card--related .post-card__description,
.related-posts .post-card--related .post-card__meta {
  padding-left: 14px;
  padding-right: 14px;
}

.related-posts .post-card--related .post-card__title {
  margin: 12px 0 6px;
  font-size: .98em !important;
  line-height: 1.35 !important;
  font-weight: 600;
}

.related-posts .post-card--related .post-card__title a {
  color: #111827;
  text-decoration: none;
}

.related-posts .post-card--related .post-card__title a:hover {
  color: #f27600;
}

.related-posts .post-card--related .post-card__description {
  margin-bottom: 10px;
  font-size: .875em;
  line-height: 1.45;
  color: #6b7280;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-posts .post-card--related .post-card__meta {
  margin-top: auto;
  margin-bottom: 12px;
  font-size: .78em;
  color: #9ca3af;
}

.related-posts .post-card--related .post-card__comments,
.related-posts .post-card--related .post-card__views {
  color: inherit;
}

.related-posts .post-card--related.post-card--thumbnail-no {
  border: 1px solid rgba(15, 17, 21, .08);
  padding: 16px 14px;
  text-align: left;
  justify-content: flex-start;
  align-items: stretch;
}

.related-posts .post-card--related.post-card--thumbnail-no:hover {
  border-color: rgba(242, 118, 0, .4);
}

.related-posts .post-card--related.post-card--thumbnail-no .post-card__title,
.related-posts .post-card--related.post-card--thumbnail-no .post-card__description,
.related-posts .post-card--related.post-card--thumbnail-no .post-card__meta {
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 767px) {
  #related-posts.related-posts,
  .related-posts {
    padding: 28px 0 36px;
  }

  .related-posts__header {
    font-size: 1.2em;
    margin-bottom: 1em;
  }

  .related-posts .post-cards--vertical {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .related-posts .post-cards--vertical {
    grid-template-columns: repeat(2, 1fr);
  }
}

html[data-theme="dark"] .related-posts {
  border-top-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] #comments.comments-area,
html[data-theme="dark"] .comments-area {
  border-top-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .related-posts__header,
html[data-theme="dark"] .rating-box__header {
  color: #f3f4f6;
}

html[data-theme="dark"] .related-posts .post-card--related {
  background: #181b20;
  border-color: #2d323b;
  box-shadow: none;
}

html[data-theme="dark"] .related-posts .post-card--related:hover {
  border-color: rgba(242, 118, 0, .45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .related-posts .post-card--related .post-card__thumbnail {
  background: #0f1115;
}

html[data-theme="dark"] .related-posts .post-card--related .post-card__title a {
  color: #f3f4f6;
}

html[data-theme="dark"] .related-posts .post-card--related .post-card__title a:hover {
  color: #fb923c;
}

html[data-theme="dark"] .related-posts .post-card--related .post-card__description {
  color: #9ca3af;
}

html[data-theme="dark"] .related-posts .post-card--related .post-card__meta,
html[data-theme="dark"] .related-posts .post-card--related .post-card__comments,
html[data-theme="dark"] .related-posts .post-card--related .post-card__views {
  color: #6b7280;
}

html[data-theme="dark"] .related-posts .post-card--related.post-card--thumbnail-no {
  border-color: #2d323b;
}

/* Рейтинг: как в светлой теме — без отдельного фона/рамки */
html[data-theme="dark"] .rating-box {
  background-color: transparent;
  border: none;
}

/* Шаринг: лаконичные кнопки-иконки (светлая + тёмная) */
.entry-social .social-buttons {
  gap: 8px;
}

.entry-social .social-button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  background: rgba(15, 17, 21, .05);
}

.entry-social .social-button:before {
  width: 1.35em;
  font-size: 1.05em;
}

.entry-social .social-button:hover {
  background: rgba(15, 17, 21, .09);
  box-shadow: none;
}

html[data-theme="dark"] .entry-social .social-button {
  background: rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .entry-social .social-button:hover {
  background: rgba(255, 255, 255, .11);
  box-shadow: none;
}

html[data-theme="dark"] .spoiler-box {
  background-color: #181b20;
  border-left-color: #f27600;
}

html[data-theme="dark"] .spoiler-box__title,
html[data-theme="dark"] .spoiler-box__body {
  color: #d1d5db;
  background-color: #181b20;
}

/* SEO-описание рубрики внизу архива: тише основного текста */
.site-main > .taxonomy-description,
.site-main > .taxonomy-description--seo {
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  padding: 1.25em 0 0;
  border: 0;
  border-top: 1px solid rgba(15, 17, 21, .08);
  color: #6b7280;
  font-size: .86em;
  line-height: 1.55;
}

.site-main > .taxonomy-description p,
.site-main > .taxonomy-description--seo p {
  margin: 0 0 .7em;
}

.site-main > .taxonomy-description p:last-child,
.site-main > .taxonomy-description--seo p:last-child {
  margin-bottom: 0;
}

html[data-theme="dark"] .site-main > .taxonomy-description,
html[data-theme="dark"] .site-main > .taxonomy-description--seo {
  border-top-color: rgba(255, 255, 255, .1);
  color: #9ca3af;
}

@media (max-width: 767px) {
  .site-main > .taxonomy-description,
  .site-main > .taxonomy-description--seo {
    margin-top: 1.35em;
    padding-top: 1.1em;
    padding-right: 48px;
  }

  #colophon .site-footer-inner {
    padding-right: 68px;
  }
}

/* ---------- Цитаты и wp-embed (светлая тема) ---------- */
.entry-content blockquote:not(.wpremark),
.home-text blockquote:not(.wpremark),
.taxonomy-description blockquote:not(.wpremark) {
  background: #f7f8fa;
  border-left: 3px solid #f27600 !important;
  border-radius: 0 10px 10px 0;
  color: #374151;
  box-shadow: none;
}

.entry-content blockquote.wp-embedded-content {
  position: relative;
  margin: 1.5em 0;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid rgba(15, 17, 21, .1);
  border-left: 3px solid #f27600 !important;
  border-radius: 10px;
  box-shadow:
    0 1px 2px rgba(15, 17, 21, .04),
    0 8px 24px rgba(15, 17, 21, .04);
  color: #374151;
}

.entry-content blockquote.wp-embedded-content a {
  color: #111827;
  font-weight: 600;
  text-decoration: none;
}

.entry-content blockquote.wp-embedded-content a:hover,
.entry-content blockquote.wp-embedded-content a:focus {
  color: #f27600;
}

html[data-theme="dark"] .entry-content blockquote,
html[data-theme="dark"] .entry-content blockquote:not(.wpremark) {
  color: #d1d5db;
  background-color: #181b20;
  border-color: #2d323b;
  border-left-color: #f27600 !important;
}

/* Встроенные карточки других статей (wp-embed fallback до загрузки iframe) */
html[data-theme="dark"] .entry-content .wp-block-embed {
  color: #d1d5db;
}

html[data-theme="dark"] .entry-content blockquote.wp-embedded-content {
  background-color: #181b20;
  border: 1px solid #2d323b;
  border-left: 3px solid #f27600 !important;
  border-radius: 10px;
  box-shadow: none;
  color: #d1d5db;
}

html[data-theme="dark"] .entry-content blockquote.wp-embedded-content a {
  color: #f3f4f6;
  text-decoration: none;
}

html[data-theme="dark"] .entry-content blockquote.wp-embedded-content a:hover,
html[data-theme="dark"] .entry-content blockquote.wp-embedded-content a:focus {
  color: #f27600;
}

html[data-theme="dark"] .entry-content code {
  background-color: #181b20;
  color: #fb923c;
}

html[data-theme="dark"] .entry-content hr {
  border-color: #2d323b;
}

/* ---------- Пагинация / scrolltop ---------- */
html[data-theme="dark"] .pagination .nav-links .page-numbers {
  color: #d1d5db;
}

html[data-theme="dark"] .pagination .nav-links .page-numbers.current {
  color: #f27600;
}

/* Кнопка «наверх»: иконка в background — без смещения ::before */
.scrolltop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  padding: 0;
  line-height: 0;
  right: 24px;
  bottom: 24px;
  border-radius: 50%;
  border: 1px solid rgba(15, 17, 21, .08);
  background-color: #fff;
  /* viewBox 24x24, шеврон с центром bbox в (12,12) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 15.5L12 9.5L18 15.5' stroke='%23f27600' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: 18px 18px;
  box-shadow: 0 2px 10px rgba(15, 17, 21, .08);
  opacity: .88;
}

.scrolltop:before {
  content: none !important;
  display: none !important;
}

.scrolltop:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(15, 17, 21, .12);
}

html[data-theme="dark"] .scrolltop {
  background-color: #1a1d24;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 15.5L12 9.5L18 15.5' stroke='%23fb923c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: 18px 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .scrolltop:hover {
  background-color: #22262f;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .45);
}

/* ---------- Виджеты сайдбара ---------- */
html[data-theme="dark"] .widget-area .widget {
  color: #d1d5db;
}

html[data-theme="dark"] .widget-area a {
  color: #d1d5db;
}

html[data-theme="dark"] .widget-area a:hover {
  color: #fb923c;
}

/* ---------- Изображения и галереи в статьях ---------- */
.entry-content .wp-block-image,
.entry-content .wp-block-gallery .wp-block-image {
  margin: 1.25em 0;
}

.entry-content .wp-block-image img,
.entry-content .wp-block-gallery .wp-block-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(68vh, 540px);
  margin-left: auto;
  margin-right: auto;
  border-radius: 10px;
  background: rgba(15, 17, 21, .04);
}

.entry-content .wp-block-image a.kiberlis-zoomable,
.entry-content .wp-block-gallery .wp-block-image a.kiberlis-zoomable {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  border-radius: 10px;
  cursor: zoom-in;
  outline: none;
  box-shadow: 0 0 0 1px rgba(15, 17, 21, .08);
  transition: box-shadow .18s ease, transform .18s ease;
}

.entry-content .wp-block-image a.kiberlis-zoomable:hover,
.entry-content .wp-block-image a.kiberlis-zoomable:focus-visible,
.entry-content .wp-block-gallery .wp-block-image a.kiberlis-zoomable:hover,
.entry-content .wp-block-gallery .wp-block-image a.kiberlis-zoomable:focus-visible {
  box-shadow: 0 0 0 2px rgba(242, 118, 0, .55), 0 8px 24px rgba(15, 17, 21, .12);
}

.entry-content .wp-block-image a.kiberlis-zoomable img,
.entry-content .wp-block-gallery .wp-block-image a.kiberlis-zoomable img {
  transition: transform .25s ease;
}

.entry-content .wp-block-image a.kiberlis-zoomable:hover img,
.entry-content .wp-block-gallery .wp-block-image a.kiberlis-zoomable:hover img {
  transform: scale(1.015);
}

.kiberlis-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 17, 21, .72);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  transform: translateY(4px);
}

.kiberlis-zoom-hint svg {
  width: 16px;
  height: 16px;
}

.entry-content a.kiberlis-zoomable:hover .kiberlis-zoom-hint,
.entry-content a.kiberlis-zoomable:focus-visible .kiberlis-zoom-hint {
  opacity: 1;
  transform: none;
}

/* Обложка статьи — тот же зум/лайтбокс */
.entry-image a.kiberlis-zoomable {
  position: relative;
  display: block;
  cursor: zoom-in;
  outline: none;
}

.entry-image a.kiberlis-zoomable .kiberlis-zoom-hint {
  z-index: 3;
}

.entry-image a.kiberlis-zoomable:hover .kiberlis-zoom-hint,
.entry-image a.kiberlis-zoomable:focus-visible .kiberlis-zoom-hint {
  opacity: 1;
  transform: none;
}

@media (max-width: 767px), (hover: none) {
  .entry-image a.kiberlis-zoomable {
    cursor: default;
    pointer-events: none;
  }

  .entry-image a.kiberlis-zoomable .kiberlis-zoom-hint {
    display: none;
  }

  /* Ссылка рубрики на обложке остаётся кликабельной */
  .entry-image .post-card__category,
  .entry-image .post-card__category a {
    pointer-events: auto;
  }
}

/* Галерея: ровная сетка, вертикальные скриншоты не растягивают ряд */
.entry-content .wp-block-gallery {
  --kiberlis-gallery-gap: 12px;
  gap: var(--kiberlis-gallery-gap) !important;
  margin: 1.35em 0;
}

.entry-content .wp-block-gallery.has-nested-images {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  align-items: start;
  justify-items: stretch;
}

.entry-content .wp-block-gallery.has-nested-images.columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry-content .wp-block-gallery.has-nested-images.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entry-content .wp-block-gallery.has-nested-images.columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.entry-content .wp-block-gallery.has-nested-images > .wp-block-image {
  width: auto !important;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.entry-content .wp-block-gallery.is-cropped .wp-block-image:not(#individual-image) {
  aspect-ratio: auto !important;
  height: auto !important;
  align-self: start;
}

.entry-content .wp-block-gallery.is-cropped .wp-block-image:not(#individual-image) > a,
.entry-content .wp-block-gallery.is-cropped .wp-block-image:not(#individual-image) > a.kiberlis-zoomable {
  display: block;
  flex: 0 0 auto !important;
  width: fit-content;
  max-width: 100%;
  height: auto !important;
  margin-left: auto;
  margin-right: auto;
}

.entry-content .wp-block-gallery.is-cropped .wp-block-image:not(#individual-image) img {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: min(68vh, 540px) !important;
  object-fit: contain !important;
  object-position: center top !important;
  background: transparent;
}

.entry-content .wp-block-gallery .wp-block-image figcaption,
.entry-content .wp-block-image figcaption {
  margin-top: .55em;
  color: #6b7280;
  font-size: .86em;
  text-align: center;
}

@media (max-width: 767px) {
  .entry-content .wp-block-gallery.has-nested-images,
  .entry-content .wp-block-gallery.has-nested-images.columns-default,
  .entry-content .wp-block-gallery.has-nested-images.columns-2,
  .entry-content .wp-block-gallery.has-nested-images.columns-3,
  .entry-content .wp-block-gallery.has-nested-images.columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px !important;
  }

  .entry-content .wp-block-gallery.has-nested-images > .wp-block-image {
    width: auto !important;
    max-width: 100%;
  }

  .entry-content .wp-block-gallery.is-cropped .wp-block-image:not(#individual-image) {
    aspect-ratio: auto !important;
    min-height: 0;
  }

  .entry-content .wp-block-image img,
  .entry-content .wp-block-gallery .wp-block-image img,
  .entry-content .wp-block-gallery.is-cropped .wp-block-image:not(#individual-image) img {
    height: auto !important;
    max-height: min(58vh, 460px) !important;
    object-fit: contain !important;
  }

  /* На тач-устройствах иконка зума всегда слегка видна */
  .kiberlis-zoom-hint {
    opacity: .85;
    transform: none;
    width: 38px;
    height: 38px;
    background: rgba(15, 17, 21, .78);
  }

  .kiberlis-zoom-hint svg {
    width: 18px;
    height: 18px;
  }
}

html[data-theme="dark"] .entry-content .wp-block-image img,
html[data-theme="dark"] .entry-content .wp-block-gallery .wp-block-image img {
  background: #12151a;
}

html[data-theme="dark"] .entry-content .wp-block-image a.kiberlis-zoomable,
html[data-theme="dark"] .entry-content .wp-block-gallery .wp-block-image a.kiberlis-zoomable {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .entry-content .wp-block-image a.kiberlis-zoomable:hover,
html[data-theme="dark"] .entry-content .wp-block-image a.kiberlis-zoomable:focus-visible,
html[data-theme="dark"] .entry-content .wp-block-gallery .wp-block-image a.kiberlis-zoomable:hover,
html[data-theme="dark"] .entry-content .wp-block-gallery .wp-block-image a.kiberlis-zoomable:focus-visible {
  box-shadow: 0 0 0 2px rgba(242, 118, 0, .55), 0 10px 28px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .entry-content .wp-block-gallery.is-cropped .wp-block-image:not(#individual-image) img {
  background: transparent;
}

html[data-theme="dark"] .entry-content .wp-block-gallery .wp-block-image figcaption,
html[data-theme="dark"] .entry-content .wp-block-image figcaption {
  color: #9ca3af;
}

/* ---------- Лайтбокс с зумом ---------- */
body.kiberlis-lightbox-open {
  overflow: hidden;
}

.kiberlis-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.kiberlis-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.kiberlis-lightbox[hidden] {
  display: none !important;
}

.kiberlis-lightbox.is-open[hidden] {
  display: flex !important;
}

.kiberlis-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, .92);
  cursor: zoom-out;
}

.kiberlis-lightbox__chrome {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.kiberlis-lightbox__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  flex: 0 0 auto;
}

.kiberlis-lightbox__counter,
.kiberlis-lightbox__scale {
  color: rgba(255, 255, 255, .78);
  font-size: .9em;
  font-weight: 600;
  letter-spacing: .02em;
}

.kiberlis-lightbox__scale {
  color: #fb923c;
}

.kiberlis-lightbox__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.kiberlis-lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 0 none;
  border-radius: 4px;
  background-color: #2a303a;
  background-image: none;
  color: #f9fafb;
  font-size: 0;
  line-height: 0;
  text-shadow: none;
  box-shadow: none;
  filter: none;
  transform: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.kiberlis-lightbox__btn svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.kiberlis-lightbox__btn:hover,
.kiberlis-lightbox__btn:active {
  background-color: #f27600;
  background-image: none;
  border: 0 none;
  color: #fff;
  box-shadow: none;
  filter: none;
  transform: none;
  outline: none;
}

.kiberlis-lightbox__btn:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

.kiberlis-lightbox__btn:focus-visible,
.kiberlis-lightbox button.kiberlis-lightbox__btn:focus-visible {
  background-color: #3a4250;
  outline: 2px solid #f27600;
  outline-offset: 2px;
}

.kiberlis-lightbox__btn--close {
  font-size: 0;
}

.kiberlis-lightbox__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-out;
  user-select: none;
}

.kiberlis-lightbox.is-zoomed .kiberlis-lightbox__stage {
  cursor: zoom-out;
}

.kiberlis-lightbox__stage.is-dragging {
  cursor: grabbing;
}

.kiberlis-lightbox__img {
  max-width: min(96vw, 1400px);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .45);
  pointer-events: auto;
  cursor: zoom-in;
}

.kiberlis-lightbox.is-zoomed .kiberlis-lightbox__img {
  cursor: zoom-out;
}

.kiberlis-lightbox.is-zoomed .kiberlis-lightbox__stage.is-dragging .kiberlis-lightbox__img {
  cursor: grabbing;
}

.kiberlis-lightbox__hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 16px 16px;
  text-align: center;
  color: rgba(255, 255, 255, .55);
  font-size: .82em;
}

.kiberlis-lightbox__nav {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px;
  height: 64px;
  margin-top: auto;
  margin-bottom: auto;
  padding: 0;
  border: 0 none;
  border-radius: 6px;
  background-color: #2a303a;
  background-image: none;
  color: #f9fafb;
  font-size: 0;
  line-height: 0;
  text-shadow: none;
  box-shadow: none;
  filter: none;
  transform: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.kiberlis-lightbox__nav svg {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
}

.kiberlis-lightbox__nav--prev svg {
  transform: translateX(1px);
}

.kiberlis-lightbox__nav--next svg {
  transform: translateX(-1px);
}

.kiberlis-lightbox__nav:hover,
.kiberlis-lightbox__nav:active {
  background-color: #f27600;
  background-image: none;
  border: 0 none;
  color: #fff;
  outline: none;
  box-shadow: none;
  filter: none;
  transform: none;
}

.kiberlis-lightbox__nav:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

.kiberlis-lightbox__nav:focus-visible,
.kiberlis-lightbox button.kiberlis-lightbox__nav:focus-visible {
  background-color: #3a4250;
  outline: 2px solid #f27600;
  outline-offset: 2px;
}

.kiberlis-lightbox__nav--prev {
  left: 12px;
}

.kiberlis-lightbox__nav--next {
  right: 12px;
}

@media (max-width: 767px) {
  .kiberlis-lightbox__top {
    padding: 10px;
  }

  .kiberlis-lightbox__btn {
    width: 44px;
    height: 44px;
  }

  .kiberlis-lightbox__img {
    max-width: 100vw;
    max-height: calc(100vh - 130px);
    border-radius: 0;
  }

  .kiberlis-lightbox__nav {
    width: 40px;
    height: 52px;
  }

  .kiberlis-lightbox__nav svg {
    width: 20px;
    height: 20px;
  }

  .kiberlis-lightbox__nav--prev {
    left: 6px;
  }

  .kiberlis-lightbox__nav--next {
    right: 6px;
  }

  .kiberlis-lightbox__hint {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    font-size: .78em;
  }
}

/* Пустые секции конструктора (после дедупа) не показываем */
.section-posts:not(:has(.post-card)) {
  display: none;
}

/* ---------- AlfaHost sidebar banner (theme-aware) ---------- */
.kiberlis-alfahost-banner {
  margin: 0;
}

.widget_kiberlis_alfahost,
.widget_media_image:has(.kiberlis-alfahost-banner) {
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  border-radius: 0 !important;
}

.widget_kiberlis_alfahost .kiberlis-alfahost-banner,
.widget_media_image .kiberlis-alfahost-banner {
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

.widget_media_image:has(.kiberlis-alfahost-banner) a:after {
  display: none !important;
}

.widget_kiberlis_alfahost img,
.widget_media_image:has(.kiberlis-alfahost-banner) img {
  filter: none !important;
}

/* Не наследовать dark-правила media_image (display:block; line-height:0) */
.widget_kiberlis_alfahost .kiberlis-alfahost,
.widget_media_image .kiberlis-alfahost,
html[data-theme="dark"] .widget_kiberlis_alfahost .kiberlis-alfahost,
html[data-theme="dark"] .widget_media_image .kiberlis-alfahost {
  display: flex !important;
  flex-direction: column !important;
  line-height: normal !important;
}

.kiberlis-alfahost {
  --ah-bg: linear-gradient(165deg, #fffaf5 0%, #fff4ea 48%, #ffefe0 100%);
  --ah-border: rgba(242, 118, 0, .18);
  --ah-shadow: 0 10px 28px rgba(242, 118, 0, .1), 0 1px 2px rgba(15, 17, 21, .04);
  --ah-title: #0f172a;
  --ah-text: #64748b;
  --ah-chip-bg: rgba(242, 118, 0, .08);
  --ah-chip-border: rgba(242, 118, 0, .18);
  --ah-chip-color: #9a4a00;
  --ah-foot: #94a3b8;
  --ah-glow: radial-gradient(ellipse at 20% 0%, rgba(242, 118, 0, .18), transparent 55%),
             radial-gradient(ellipse at 100% 80%, rgba(255, 154, 61, .14), transparent 50%);
  --ah-cta: linear-gradient(135deg, #f27600 0%, #ff9a3d 100%);

  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px 22px;
  border-radius: 16px;
  border: 1px solid var(--ah-border);
  background: var(--ah-bg);
  box-shadow: var(--ah-shadow);
  text-decoration: none !important;
  color: inherit;
  overflow: visible;
  isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.kiberlis-alfahost:hover,
.kiberlis-alfahost:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(242, 118, 0, .16),
    0 2px 6px rgba(15, 17, 21, .06);
  border-color: rgba(242, 118, 0, .36);
  text-decoration: none !important;
}

.kiberlis-alfahost__glow {
  position: absolute;
  inset: 0;
  background: var(--ah-glow);
  pointer-events: none;
  z-index: -1;
}

.kiberlis-alfahost__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.kiberlis-alfahost__mark-wrap {
  position: relative;
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.kiberlis-alfahost__mark {
  display: block;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-sizing: border-box;
  object-fit: contain;
}

.kiberlis-alfahost__mark--light {
  display: block;
}

.kiberlis-alfahost__mark--dark {
  display: none;
}

.kiberlis-alfahost__name {
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ah-title);
  line-height: 1.1;
}

.kiberlis-alfahost__title {
  display: block;
  font-size: 1.35em;
  font-weight: 750;
  letter-spacing: -.03em;
  line-height: 1.18;
  color: var(--ah-title);
}

.kiberlis-alfahost__text {
  display: block;
  font-size: .92em;
  line-height: 1.45;
  color: var(--ah-text);
}

.kiberlis-alfahost__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kiberlis-alfahost__chips > span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--ah-chip-bg);
  border: 1px solid var(--ah-chip-border);
  color: var(--ah-chip-color);
  font-size: .72em;
  font-weight: 650;
  letter-spacing: .02em;
  line-height: 1;
}

.kiberlis-alfahost__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  margin-bottom: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ah-cta);
  color: #fff !important;
  font-size: .95em;
  font-weight: 700;
  letter-spacing: -.01em;
  /* Тень только вверх/вбок — не наезжает на подпись снизу */
  box-shadow: 0 4px 14px rgba(242, 118, 0, .28);
  transition: filter .2s ease, box-shadow .2s ease;
  flex-shrink: 0;
}

.kiberlis-alfahost:hover .kiberlis-alfahost__cta,
.kiberlis-alfahost:focus-visible .kiberlis-alfahost__cta {
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(242, 118, 0, .36);
}

.kiberlis-alfahost__cta svg {
  flex: 0 0 auto;
}

.kiberlis-alfahost__foot {
  display: block;
  position: relative;
  z-index: 1;
  margin-top: 2px;
  padding-top: 2px;
  text-align: center;
  font-size: .75em;
  line-height: 1.35;
  letter-spacing: .02em;
  color: var(--ah-foot);
  flex-shrink: 0;
}

html[data-theme="dark"] .kiberlis-alfahost {
  --ah-bg: linear-gradient(165deg, #1a1410 0%, #15120e 45%, #120e0a 100%);
  --ah-border: rgba(242, 118, 0, .22);
  --ah-shadow: 0 12px 32px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  --ah-title: #f3f4f6;
  --ah-text: #c4c9d4;
  --ah-chip-bg: rgba(242, 118, 0, .14);
  --ah-chip-border: rgba(242, 118, 0, .28);
  --ah-chip-color: #fdba74;
  --ah-foot: #9ca3af;
  --ah-glow: radial-gradient(ellipse at 15% 0%, rgba(242, 118, 0, .28), transparent 55%),
             radial-gradient(ellipse at 100% 85%, rgba(255, 154, 61, .16), transparent 48%);
}

html[data-theme="dark"] .kiberlis-alfahost__mark--light {
  display: none !important;
}

html[data-theme="dark"] .kiberlis-alfahost__mark--dark {
  display: block !important;
}

html[data-theme="dark"] .kiberlis-alfahost:hover,
html[data-theme="dark"] .kiberlis-alfahost:focus-visible {
  border-color: rgba(242, 118, 0, .42);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(242, 118, 0, .22),
    inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* Мобильные слоты AlfaHost: скрыты на десктопе, видны ≤991px */
.kiberlis-alfahost-mobile-slot {
  display: none;
  margin: 20px 0 28px;
}

@media (max-width: 991px) {
  .kiberlis-alfahost {
    padding: 18px 16px 16px;
    gap: 12px;
  }

  .kiberlis-alfahost__title {
    font-size: 1.22em;
  }

  /* Сайдбарный баннер на мобиле прячем — есть слоты в контенте */
  .widget_kiberlis_alfahost {
    display: none !important;
  }

  .kiberlis-alfahost-mobile-slot {
    display: block;
  }

  .kiberlis-alfahost-mobile-slot--home {
    margin: 8px 0 28px;
  }

  .kiberlis-alfahost-mobile-slot--single {
    margin: 0 0 24px;
  }
}

/* ---------- Прогресс чтения ---------- */
.kiberlis-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  background: transparent;
}

.kiberlis-reading-progress.is-visible,
.kiberlis-reading-progress.is-done {
  opacity: 1;
}

.kiberlis-reading-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #f27600, #ff8a1a);
  will-change: transform;
}

html[data-theme="dark"] .kiberlis-reading-progress__fill {
  background: linear-gradient(90deg, #f27600, #ff9a3d);
}

/* ---------- Акцент: единый #f27600 ---------- */
:root {
  --kiberlis-accent: #f27600;
}

.scrolltop:before,
::selection,
::-moz-selection,
.card-slider__category,
.btn,
.btn-primary,
.comment-respond .form-submit input,
.page-separator,
.star-rating-item.hover,
.post-card__category,
.post-card--small .post-card__category,
.entry-image .post-card__category a,
.entry-image--wide .entry-image__body .post-card__category a {
  background-color: #f27600 !important;
}

/* Фиолетовые оверлеи/бордеры Reboot (#4d3bfe) → акцент */
.post-card__thumbnail a::before,
.post-card--grid .post-card__thumbnail::before,
.top-menu > ul > li > a::before,
.top-menu > ul > li > span::before,
.page-links > span:not(.dots):not(.current)::before,
.widget ul li span::before,
.spoiler-box,
.entry-content blockquote:not(.wpremark),
.home-text blockquote:not(.wpremark) {
  border-color: #f27600;
}

.spoiler-box {
  border-left-color: #f27600 !important;
}

.entry-content blockquote:not(.wpremark),
.home-text blockquote:not(.wpremark) {
  border-left-color: #f27600 !important;
}

.post-card__thumbnail a::before,
.post-card--grid .post-card__thumbnail::before,
.post-card--standard::after,
.page-links > span:not(.dots):not(.current)::before {
  background-color: #f27600 !important;
  background: #f27600 !important;
}

input:focus,
textarea:focus,
select:focus,
.input:focus {
  border-color: #f27600 !important;
}

.search-screen .search-form .search-field,
.search-screen .search-form .search-field:focus {
  border-bottom-color: #f27600 !important;
}

.entry-content ol:not([class]) > li::before,
.entry-content ol.wp-block-list > li::before,
.entry-content ul:not([class]) > li::before {
  border-color: #f27600;
  color: #f27600;
}

/* Reboot style.min.css хардкодит дефолт #4d3bfe (фиолетовый) на a:hover и иконки.
   Кастомайзер пишет #f27600, но в AO-бандле пурпурный ещё живёт — добиваем !important. */
a:hover,
a:focus,
a:active,
.pseudo-link:hover,
.pseudo-link:focus,
.pseudo-link:active,
.spanlink:hover,
.entry-content a:hover,
.entry-content a:focus,
.entry-content a:active,
.site-title a:hover,
.top-menu ul li > a:hover,
.top-menu ul li > span:hover,
.main-navigation ul li a:hover,
.main-navigation ul li span:hover,
.footer-navigation ul li a:hover,
.footer-navigation ul li span:hover,
.comment-reply-link:hover,
.child-categories ul li a:hover,
.search-icon:hover,
.breadcrumb a:hover,
.scrolltop::before,
.post-card__author::before,
.post-card__comments::before,
.post-card__date::before,
.post-card__like::before,
.post-card__views::before,
.entry-author::before,
.entry-date::before,
.entry-time::before,
.entry-views::before,
.entry-comments::before,
.search-form .search-submit:hover::before,
.search-form .search-submit:focus::before,
.search-screen .search-form .search-submit::before,
.star-rating-item.hover {
  color: #f27600 !important;
}

/* Иконки меты: принудительно шрифт темы (не системные emoji).
   На en.* без same-origin CSS шрифт не подхватывался → цветные emoji. */
.post-card__author::before,
.post-card__comments::before,
.post-card__date::before,
.post-card__like::before,
.post-card__views::before,
.entry-author::before,
.entry-date::before,
.entry-time::before,
.entry-views::before,
.entry-comments::before {
  font-family: wpshop-core !important;
  font-style: normal !important;
  font-weight: normal !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  speak: none;
}

.child-categories ul li a:hover,
.post-box--no-thumb a:hover,
.is-show-thumbnails-true .post-card--vertical.post-card--thumbnail-no:hover,
.post-card--related.post-card--thumbnail-no:hover {
  border-color: #f27600 !important;
}

.search-screen .search-form .search-field:focus {
  border-bottom-color: #f27600 !important;
}

.top-menu > ul > li > a::before,
.top-menu > ul > li > span::before {
  background: #f27600 !important;
}

/* Clearfy pseudo-links */
.pseudo-clearfy-link {
  color: #f27600 !important;
}

.pseudo-clearfy-link:hover,
.pseudo-clearfy-link:focus {
  color: #ff8a1a !important;
}

html[data-theme="dark"] .pseudo-clearfy-link {
  color: #f27600 !important;
}

html[data-theme="dark"] .pseudo-clearfy-link:hover,
html[data-theme="dark"] .pseudo-clearfy-link:focus {
  color: #ff9a3d !important;
}

/* Кнопки: белый текст на цветном фоне не перекрашивать в оранжевый */
a.btn:hover,
a.btn:focus,
a.btn:active,
.btn:hover,
.btn:focus,
.btn:active,
.pseudo-link.btn:hover,
.pseudo-link.btn:focus,
.pseudo-link.btn:active,
.comment-respond .form-submit input:hover,
.comment-respond .form-submit input:focus,
.page-links a:hover,
.nav-links a:hover {
  color: #fff !important;
}

.kiberlis-alfahost:hover,
.kiberlis-alfahost:focus,
.kiberlis-alfahost:active {
  color: inherit !important;
}

.kiberlis-alfahost__cta,
.kiberlis-alfahost:hover .kiberlis-alfahost__cta,
.kiberlis-alfahost:focus .kiberlis-alfahost__cta {
  color: #fff !important;
}

/* Кнопки гамбургера / поиска — сброс нативных стилей */
button.humburger,
button.search-icon {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  line-height: 0;
}

button.humburger:focus:not(:focus-visible),
button.search-icon:focus:not(:focus-visible) {
  outline: none;
}

button.humburger:focus-visible,
button.search-icon:focus-visible {
  outline: 2px solid #f27600;
  outline-offset: 2px;
}
