/*
Theme Name: Reboot Child
Template: reboot
Description: Оформление ТехноГарант по дизайн-системе 7 сентября 2026 (Claude Design). Родительская Reboot даёт ядро, хлебные крошки, похожие записи и комментарии; всё видимое — здесь.
Version: 1.0
*/

/* ============================== токены ============================== */
:root {
  --c-bg: #FFFFFF; --c-surface: #F5F4F1; --c-border: #E2DFDA; --c-border-strong: #C9C5BE;
  --c-text: #1B1A18; --c-text-2: #5F5B56; --c-text-3: #77726C;
  --c-accent: #C2410C; --c-accent-hover: #9A3412; --c-accent-soft: #FBEDE6;
  --c-plus: #3F7F5A; --c-minus: #B0413E; --c-focus: #C2410C;
  /* Подзаголовки в таблице рейтинга: нежно-бирюзовый с тёмно-бирюзовым
     текстом — по слову владельца 8 сентября 2026 (лососевый и серый не зашли). */
  --c-surface-2: #E1F3F1; --c-surface-2-text: #0F4F4A;
  /* Подложки плюсов и минусов — два скруглённых блока, зелёный и красный (8 сентября 2026). */
  --c-plus-soft: #E9F5EC; --c-minus-soft: #FBECEA;
  /* Кнопки в Яндекс Маркет — фирменный жёлтый, по слову владельца 8 сентября 2026. */
  --c-market: #FFCC00; --c-market-hover: #F5C000; --c-market-text: #1B1A18;
  --f-head: "Golos Text", "Onest", "Manrope", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Inter", system-ui, sans-serif;
  --t-h1: 700 36px/1.2 var(--f-head); --t-h2: 600 28px/1.25 var(--f-head);
  --t-h3: 600 22px/1.3 var(--f-head); --t-h4: 600 18px/1.35 var(--f-head);
  --t-lead: 400 20px/1.5 var(--f-body); --t-body: 400 18px/1.6 var(--f-body);
  --t-body-s: 400 16px/1.5 var(--f-body); --t-ui: 400 15px/1.45 var(--f-body);
  --t-caption: 400 14px/1.45 var(--f-body); --t-label: 500 13px/1.4 var(--f-body);
  --t-fine: 400 12px/1.4 var(--f-body);
  --s-1: 4px; --s-2: 8px; --s-3: 16px; --s-4: 24px; --s-5: 32px; --s-6: 48px; --s-7: 64px;
  --r-0: 0; --r-1: 4px; --r-2: 6px;
  --sh-1: 0 1px 2px rgba(27,26,24,.08); --sh-2: 0 4px 12px rgba(27,26,24,.12);
  --container: 1200px; --page-pad: 40px; --gutter: 24px; --article-col: 700px;
  --photo: 180px; --control-h: 44px; --header-h: 64px;
  /* Карточки (блок модели, ячейки таблицы): в светлой теме белые, в тёмной чуть светлее фона. */
  --c-card: #FFFFFF;
  color-scheme: light;
}
/* Тёмная тема: цвета взяты у vc.ru (8 сентября 2026): фон #161617, карточки #232324,
   линии #353436, текст #C9CCCF и #969C9D, зелёный #33A03E/#263629, красный #D6333E/#463536.
   Первый выбор — системный (prefers-color-scheme), потом — переключатель в шапке. */
:root[data-theme="dark"] {
  --c-bg: #161617; --c-card: #1F1F20; --c-surface: #232324; --c-border: #353436; --c-border-strong: #4A4A4C;
  --c-text: #C9CCCF; --c-text-2: #969C9D; --c-text-3: #7C8284;
  --c-accent: #E4572E; --c-accent-hover: #F26A42; --c-accent-soft: #3A2318;
  --c-surface-2: #1D3634; --c-surface-2-text: #9FE3DB;
  --c-plus: #5CBF6A; --c-minus: #E0555E; --c-plus-soft: #263629; --c-minus-soft: #463536;
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 4px 12px rgba(0,0,0,.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #161617; --c-card: #1F1F20; --c-surface: #232324; --c-border: #353436; --c-border-strong: #4A4A4C;
    --c-text: #C9CCCF; --c-text-2: #969C9D; --c-text-3: #7C8284;
    --c-accent: #E4572E; --c-accent-hover: #F26A42; --c-accent-soft: #3A2318;
    --c-surface-2: #1D3634; --c-surface-2-text: #9FE3DB;
    --c-plus: #5CBF6A; --c-minus: #E0555E; --c-plus-soft: #263629; --c-minus-soft: #463536;
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 4px 12px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
@media (max-width: 767px) {
  :root {
    --t-h1: 700 28px/1.2 var(--f-head); --t-h2: 600 24px/1.25 var(--f-head);
    --t-h3: 600 20px/1.3 var(--f-head); --t-h4: 600 17px/1.35 var(--f-head);
    --t-lead: 400 18px/1.5 var(--f-body); --t-body: 400 17px/1.6 var(--f-body);
    --t-body-s: 400 15px/1.5 var(--f-body);
    --page-pad: 16px; --gutter: 16px; --photo: 160px; --header-h: 56px;
  }
}

/* ============================== база ============================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font: var(--t-body); -webkit-font-smoothing: antialiased; }
a { color: var(--c-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--c-border-strong); }
a:hover { color: var(--c-accent); }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
img, video, iframe { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { margin: 0; text-wrap: pretty; }
p { margin: 0 0 var(--s-4); }
p:empty { display: none; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 24px; }
li { margin: 0 0 var(--s-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 8px; top: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--c-bg); padding: 8px 12px; border: 1px solid var(--c-text); }
.tg-wrap { max-width: var(--container); margin: 0 auto; padding-left: var(--page-pad); padding-right: var(--page-pad); }
.tg-h1 { font: var(--t-h1); }
.tg-h2 { font: var(--t-h2); }
.tg-h3 { font: var(--t-h3); }
.tg-label { font: var(--t-label); letter-spacing: .04em; text-transform: uppercase; color: var(--c-text-2); }
.tg-caption { font: var(--t-caption); color: var(--c-text-3); }

/* кнопки */
.tg-btn, .entry-content a.button123 {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-h); padding: 0 20px; border-radius: var(--r-1);
  background: var(--c-accent); color: #FFFFFF !important; font: 600 16px/1.2 var(--f-body);
  text-decoration: none; border: 0; box-shadow: none !important; white-space: normal; text-align: center;
}
.tg-btn:hover, .entry-content a.button123:hover { background: var(--c-accent-hover); color: #FFFFFF; }
.entry-content a.button123::after, .tg-btn--ext::after { content: "↗"; font-size: 18px; line-height: 1; }
/* Ссылка в Яндекс Маркет: старые кнопки статей и новая кнопка блока модели. */
.entry-content a.button123, .tg-btn--market { background: var(--c-market); color: var(--c-market-text) !important; }
.entry-content a.button123:hover, .tg-btn--market:hover { background: var(--c-market-hover); color: var(--c-market-text) !important; }
.tg-btn--ghost { background: var(--c-bg); color: var(--c-text) !important; border: 1px solid var(--c-border-strong); font-weight: 500; }
.tg-btn--ghost:hover { background: var(--c-bg); border-color: var(--c-text); color: var(--c-text) !important; }

/* поиск */
.tg-search { display: flex; gap: 8px; width: 100%; }
.tg-search input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--c-border-strong); border-radius: var(--r-1); background: var(--c-bg); font: var(--t-ui); outline: 0; }
.tg-search input:focus { border-color: var(--c-text); box-shadow: 0 0 0 2px var(--c-accent-soft); }
.tg-search button { height: 40px; padding: 0 14px; border: 1px solid var(--c-border-strong); border-radius: var(--r-1); background: var(--c-bg); font: 500 15px/1 var(--f-body); }
.tg-search button:hover { border-color: var(--c-text); }

/* ============================== шапка ============================== */
.tg-header { position: sticky; top: 0; z-index: 20; background: var(--c-bg); border-bottom: 1px solid var(--c-border); }
.tg-header__in { display: flex; align-items: center; gap: 40px; height: var(--header-h); }
.tg-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-text); flex: 0 0 auto; }
.tg-logo__mark { width: 12px; height: 12px; background: var(--c-accent); border-radius: 2px; }
.tg-logo__text { font: 700 20px/1 var(--f-head); letter-spacing: -.01em; }
.tg-nav { flex: 1 1 auto; min-width: 0; }
.tg-nav__list { display: flex; gap: 24px; margin: 0; padding: 0; list-style: none; }
.tg-nav__list li { margin: 0; }
.tg-nav__list a { display: block; padding: 20px 0; font: 500 15px/1.45 var(--f-body); text-decoration: none; color: var(--c-text); white-space: nowrap; }
.tg-nav__list a:hover { color: var(--c-accent); }
.tg-nav__list .current-menu-item > a, .tg-nav__list .current-menu-ancestor > a, .tg-nav__list .current-category-ancestor > a { box-shadow: inset 0 -2px 0 var(--c-accent); }
.tg-header__search { width: 280px; flex: 0 0 auto; margin-left: auto; }
.tg-theme { width: 40px; height: 40px; border: 1px solid var(--c-border-strong); border-radius: var(--r-1); background: var(--c-bg); padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--c-text); flex: 0 0 auto; }
.tg-theme:hover { border-color: var(--c-text); }
.tg-theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tg-theme .tg-theme__moon { display: none; }
:root[data-theme="dark"] .tg-theme .tg-theme__sun { display: none; }
:root[data-theme="dark"] .tg-theme .tg-theme__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tg-theme .tg-theme__sun { display: none; }
  :root:not([data-theme="light"]) .tg-theme .tg-theme__moon { display: block; }
}
.tg-burger, .tg-search-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 0; }
.tg-burger { flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.tg-burger span { display: block; width: 20px; height: 2px; background: var(--c-text); transition: transform .15s; }
.tg-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tg-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.tg-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.tg-search-toggle { position: relative; }
.tg-search-toggle::before { content: ""; position: absolute; left: 13px; top: 11px; width: 14px; height: 14px; border: 2px solid var(--c-text); border-radius: 50%; }
.tg-search-toggle::after { content: ""; position: absolute; left: 27px; top: 26px; width: 2px; height: 9px; background: var(--c-text); transform: rotate(-45deg); }
.tg-mobile { border-top: 1px solid var(--c-border); background: var(--c-bg); padding: 16px 0 24px; max-height: calc(100vh - var(--header-h)); overflow: auto; }
.tg-mobile[hidden] { display: none; }
.tg-mobile .tg-search { margin-bottom: 16px; }
.tg-mobile__list, .tg-mobile__list ul { list-style: none; margin: 0; padding: 0; }
.tg-mobile__list > li { margin: 0; border-bottom: 1px solid var(--c-border); }
.tg-mobile__list > li > a { display: block; padding: 14px 0; font: 600 17px/1.3 var(--f-head); text-decoration: none; }
.tg-mobile__list ul { padding: 0 0 12px 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tg-mobile__list ul li { margin: 0; }
.tg-mobile__list ul a { font: var(--t-ui); color: var(--c-text-2); text-decoration: none; }
.tg-mobile__list ul ul { display: none; }
@media (max-width: 1023px) {
  .tg-header__in { gap: 8px; justify-content: space-between; }
  .tg-header__right { display: flex; align-items: center; gap: 2px; }
  .tg-theme { width: 36px; height: 36px; border: 0; }
  .tg-nav, .tg-header__search { display: none; }
  .tg-burger { display: flex; }
  .tg-search-toggle { display: block; }
  .tg-logo { position: absolute; left: 50%; transform: translateX(-50%); }
  .tg-header__in { position: relative; }
  .tg-logo__text { font-size: 18px; }
  .tg-logo__mark { width: 10px; height: 10px; }
}
@media (min-width: 1024px) { .tg-mobile { display: none !important; } }

/* ============================== подвал ============================== */
.tg-footer { margin-top: var(--s-7); border-top: 1px solid var(--c-border); background: var(--c-surface); font: var(--t-ui); }
.tg-footer__grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr); gap: 40px; padding-top: 40px; padding-bottom: 32px; }
.tg-footer__brand p { margin: 12px 0 0; color: var(--c-text-2); max-width: 420px; font: var(--t-ui); }
.tg-footer__h { font-weight: 600; margin-bottom: 8px; }
.tg-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tg-footer__list li { margin: 0; }
.tg-footer__list a { color: var(--c-text-2); text-decoration: none; }
.tg-footer__list a:hover { color: var(--c-accent); }
.tg-footer__bottom { padding-top: 20px; padding-bottom: 32px; }
.tg-footer__bottom p { margin: 0; max-width: 820px; font: 400 13px/1.5 var(--f-body); color: var(--c-text-3); }
.tg-footer__bottom-line { border-top: 1px solid var(--c-border); }
@media (max-width: 767px) {
  .tg-footer__grid { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; padding-bottom: 24px; }
  .tg-footer { margin-top: var(--s-6); }
}

/* «наверх» */
.tg-top { position: fixed; right: 16px; bottom: 16px; z-index: 15; width: 44px; height: 44px; border: 1px solid var(--c-border-strong); border-radius: var(--r-1); background: var(--c-bg); box-shadow: var(--sh-2); font-size: 20px; line-height: 1; }
.tg-top:hover { border-color: var(--c-text); }
.tg-top[hidden] { display: none; }

/* ============================== главная ============================== */
.tg-home { padding-top: var(--s-6); display: flex; flex-direction: column; gap: var(--s-7); }
.tg-section { display: flex; flex-direction: column; gap: var(--s-5); }
.tg-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.tg-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 40px 32px; }
.tg-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--c-text); }
.tg-card:hover { color: var(--c-accent); }
.tg-card__cover { aspect-ratio: 16/10; border: 1px solid var(--c-border); border-radius: var(--r-2); overflow: hidden; background: var(--c-surface); margin-bottom: 4px; }
.tg-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tg-card__title { font: var(--t-h4); color: inherit; }
.tg-rubrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 32px; border-top: 1px solid var(--c-border); }
.tg-rubric { display: flex; flex-direction: column; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--c-border); text-decoration: none; color: var(--c-text); }
.tg-rubric:hover { color: var(--c-accent); }
.tg-rubric__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.tg-rubric__name { font: 600 20px/1.3 var(--f-head); }
.tg-rubric__count { font: var(--t-caption); color: var(--c-text-3); }
.tg-rubric__desc { font: var(--t-ui); color: var(--c-text-2); }
@media (max-width: 1023px) { .tg-cards { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 32px 24px; } .tg-rubrics { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 767px) {
  .tg-home { padding-top: var(--s-4); gap: var(--s-6); }
  .tg-section { gap: var(--s-4); }
  .tg-cards { grid-template-columns: 1fr; gap: 32px; }
  .tg-rubrics { grid-template-columns: 1fr; gap: 0; }
  .tg-rubric { flex-direction: row; justify-content: space-between; align-items: center; min-height: 56px; padding: 12px 0; }
  .tg-rubric__desc { display: none; }
  .tg-rubric__name { font-size: 17px; }
  .tg-rubric__count::after { content: " ›"; font-size: 18px; }
}

/* ============================== рубрика и поиск ============================== */
.tg-archive { padding-top: var(--s-5); display: flex; flex-direction: column; gap: 40px; }
.tg-archive__head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.tg-archive__desc { font: var(--t-body); color: var(--c-text-2); }
.tg-archive__desc p { margin: 0; }
.tg-rows { display: flex; flex-direction: column; border-top: 1px solid var(--c-border); max-width: 900px; }
.tg-row { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 32px; padding: 24px 0; border-bottom: 1px solid var(--c-border); text-decoration: none; color: var(--c-text); }
.tg-row:hover { color: var(--c-accent); }
.tg-row__cover { aspect-ratio: 16/10; border: 1px solid var(--c-border); border-radius: var(--r-2); overflow: hidden; background: var(--c-surface); align-self: start; }
.tg-row__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tg-row__body { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.tg-row__title { font: var(--t-h3); color: inherit; }
.tg-row__desc { margin: 0; font: var(--t-ui); color: var(--c-text-2); }
@media (max-width: 767px) {
  .tg-archive { padding-top: var(--s-3); gap: 24px; }
  .tg-archive__head { gap: 12px; }
  .tg-row { grid-template-columns: 112px minmax(0,1fr); gap: 16px; padding: 16px 0; }
  .tg-row__body { gap: 6px; }
  .tg-row__title { font: 600 17px/1.35 var(--f-head); }
  .tg-row__desc { display: none; }
}

/* хлебные крошки (разметка Reboot) */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font: var(--t-caption); color: var(--c-text-3); }
.breadcrumb a { color: var(--c-text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb .breadcrumb-separator::before { content: "/"; }
.breadcrumb .breadcrumb-separator { font-size: 0; }
.breadcrumb .breadcrumb-separator::before { font-size: 14px; }

/* пагинация (разметка WordPress) */
.navigation.pagination { margin: 0; }
.navigation.pagination .screen-reader-text { display: none; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: var(--t-ui); }
.nav-links .page-numbers { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--c-border-strong); border-radius: var(--r-1); text-decoration: none; color: var(--c-text); }
.nav-links a.page-numbers:hover { border-color: var(--c-text); color: var(--c-text); }
.nav-links .page-numbers.current { background: var(--c-accent); border-color: var(--c-accent); color: #FFFFFF; font-weight: 600; }
.nav-links .page-numbers.dots { border: 0; color: var(--c-text-3); min-width: 24px; padding: 0; }

/* ============================== статья ============================== */
.tg-article-wrap { max-width: var(--article-col); margin: 0 auto; padding: var(--s-5) var(--page-pad) 0; display: flex; flex-direction: column; gap: var(--s-6); }
@media (min-width: 768px) { .tg-article-wrap { padding-left: 0; padding-right: 0; } }
.tg-article { display: flex; flex-direction: column; gap: var(--s-4); }
.tg-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font: var(--t-caption); color: var(--c-text-3); }
.tg-meta a { color: var(--c-text-2); text-decoration: none; }

.entry-content { font: var(--t-body); }
.entry-content > p:first-child { font: var(--t-lead); }
.entry-content h2 { font: var(--t-h2); margin: var(--s-6) 0 var(--s-4); }
.entry-content h3 { font: var(--t-h3); margin: var(--s-5) 0 var(--s-3); clear: both; }
.entry-content h4 { font: var(--t-h4); margin: var(--s-4) 0 var(--s-3); }
.entry-content > :first-child { margin-top: 0; }
.entry-content a { color: var(--c-text); }
.entry-content a:hover { color: var(--c-accent); }
.entry-content img { border-radius: var(--r-2); }
.entry-content img.alignright, .entry-content .alignright { float: right; max-width: var(--photo); margin: 0 0 16px 24px; border: 1px solid var(--c-border); border-radius: var(--r-2); background: #FFFFFF; }
/* Фото товаров с Маркета на белом — оставляем белую подложку и в тёмной теме. */
.tg-model__photo, .tg-card__cover img, .tg-row__cover img { background: #FFFFFF; }
.entry-content img.alignleft, .entry-content .alignleft { float: left; max-width: var(--photo); margin: 0 24px 16px 0; border: 1px solid var(--c-border); border-radius: var(--r-2); }
.entry-content img.aligncenter, .entry-content .aligncenter { display: block; margin: 0 auto var(--s-4); }
.entry-content figure { margin: 0 0 var(--s-4); }
.entry-content figcaption, .wp-caption-text { font: var(--t-caption); color: var(--c-text-3); margin-top: 8px; }
.entry-content blockquote { margin: 0 0 var(--s-4); padding: 16px 24px; background: var(--c-surface); border-radius: var(--r-2); border-left: 3px solid var(--c-accent); }
/* Таблицы рейтингов: обёртка .tg-table добавляется фильтром the_content (functions.php). */
.tg-table { margin: 0 0 var(--s-5); overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--c-border); border-radius: var(--r-2); }
.tg-table table, .entry-content table { width: 100%; min-width: 100%; margin: 0; border-collapse: collapse; font: var(--t-body-s); border: 0 !important; }
.entry-content th, .entry-content td { padding: 12px 16px; border: 0 !important; border-bottom: 1px solid var(--c-border) !important; text-align: left; vertical-align: middle; line-height: 1.45; background: var(--c-card); border-radius: 0 !important; }
.entry-content tr:last-child > td, .entry-content tr:last-child > th { border-bottom: 0 !important; }
.entry-content thead th, .entry-content thead td, .entry-content tr:first-child > th { font: 600 15px/1.4 var(--f-body); color: var(--c-text-2); background: var(--c-surface); white-space: nowrap; }
/* Старые заливки ячеек (голубые полосы прежнего оформления) — на подложку дизайна. */
.entry-content td[style*="background"], .entry-content th[style*="background"], .entry-content tr[style*="background"] > td { background: var(--c-surface) !important; color: var(--c-text) !important; }
.entry-content table td[colspan], .entry-content table td[colspan] strong { font: 600 16px/1.4 var(--f-head); color: var(--c-surface-2-text) !important; background: var(--c-surface-2) !important; white-space: normal; }
.entry-content td:first-child { text-align: center; width: 72px; color: var(--c-text-2); }
.entry-content td a:not(.button123) { font-weight: 600; text-decoration-color: var(--c-border-strong); }
.entry-content td a.button123 { min-height: 40px; padding: 0 16px; font-size: 15px; margin: 2px 8px 2px 0; }
.entry-content td a.button123::after { font-size: 16px; }
.entry-content table img { max-width: 96px; border: 0; border-radius: var(--r-1); }
@media (max-width: 767px) {
  .entry-content th, .entry-content td { padding: 10px 12px; }
  .entry-content td:first-child { width: 48px; }
  .entry-content td a.button123 { padding: 0 12px; font-size: 14px; }
  .tg-table table { min-width: 520px; }
}
.entry-content iframe { border-radius: var(--r-2); }
.entry-content [id^="marketWidget"] { margin-top: 0 !important; clear: both; }
/* Старый виджет партнёрки Маркета часто ничего не рисует — пустую рамку прячем. */
.entry-content [id^="marketWidget"]:not(:has(*)) { display: none; }
.entry-content > p > br:only-child, .entry-content > br { display: none; }
.entry-content hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--s-5) 0; }

/* оглавление: плагин TOC+ и ручной список ссылок в начале статьи */
#toc_container, .entry-content > ol:first-of-type:has(a[href^="#"]) {
  background: var(--c-surface) !important; border: 0 !important; border-radius: var(--r-2); padding: 20px 24px !important;
  margin: 0 0 var(--s-5) !important; width: 100% !important; font: var(--t-ui) !important; display: block !important;
}
#toc_container .toc_title { font: 600 18px/1.3 var(--f-head); margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
#toc_container .toc_title + ul { margin-top: 12px; }
/* Квадратные скобки вокруг «Показать» — текстовые узлы плагина; прячем нулевым кеглем. */
#toc_container span.toc_toggle { font-size: 0 !important; white-space: nowrap; flex: 0 0 auto; }
#toc_container span.toc_toggle a { font: var(--t-caption) !important; color: var(--c-text-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
#toc_container .toc_toggle a:hover { color: var(--c-accent); }
#toc_container ul, .entry-content > ol:first-of-type:has(a[href^="#"]) { list-style: none; margin: 0; padding: 0; }
#toc_container ul ul, .entry-content > ol:first-of-type:has(a[href^="#"]) ol { padding-left: 28px; margin: 2px 0 0; list-style: none; }
#toc_container li, .entry-content > ol:first-of-type:has(a[href^="#"]) li { margin: 0; }
#toc_container a, .entry-content > ol:first-of-type:has(a[href^="#"]) a { display: block; padding: 8px 8px; margin: 0 -8px; border-radius: var(--r-1); text-decoration: none; color: var(--c-text); font-weight: 500; }
#toc_container ul ul a, .entry-content > ol:first-of-type:has(a[href^="#"]) ol a { padding: 6px 8px; color: var(--c-text-2); font-weight: 400; }
#toc_container a:hover, .entry-content > ol:first-of-type:has(a[href^="#"]) a:hover { color: var(--c-accent); }
#toc_container .toc_number { color: var(--c-text-3); margin-right: 8px; }
@media (max-width: 767px) { #toc_container, .entry-content > ol:first-of-type:has(a[href^="#"]) { padding: 12px 16px !important; } }

/* плюсы и минусы (шорткод custom_pluses_and_minuses): два скруглённых блока */
.tg-pm { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 16px; margin: 0 0 var(--s-5); clear: both; }
.tg-pm__col { padding: 14px 18px 16px; border-radius: 16px; }
.tg-pm__col--plus { background: var(--c-plus-soft); }
.tg-pm__col--minus { background: var(--c-minus-soft); }
.tg-pm__h { font: 600 14px/1.4 var(--f-body); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.tg-pm__col--plus .tg-pm__h, .tg-pm__col--plus li > span:first-child { color: var(--c-plus); }
.tg-pm__col--minus .tg-pm__h, .tg-pm__col--minus li > span:first-child { color: var(--c-minus); }
/* Текст плюсов и минусов почти как основной: 15 px на фоне 18 px читался мелко (замечание владельца). */
.tg-pm ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font: 400 17px/1.5 var(--f-body); }
.tg-pm li { display: flex; gap: 8px; margin: 0; }
.tg-pm li > span:first-child { font-weight: 600; flex: 0 0 auto; }
@media (max-width: 560px) { .tg-pm { grid-template-columns: 1fr; } }

/* блок модели (новые статьи) */
.tg-model { border: 1px solid var(--c-border); border-radius: var(--r-2); background: var(--c-card); padding: 24px; display: flex; flex-direction: column; gap: 20px; margin: 0 0 var(--s-5); clear: both; }
.tg-model__head { display: flex; gap: 12px; align-items: baseline; }
/* Номер места — плашка в тон подзаголовков таблицы (замечание владельца 8 сентября 2026). */
.tg-model__rank { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--r-2); background: var(--c-surface-2); color: var(--c-surface-2-text); font: 600 18px/1 var(--f-head); flex: 0 0 auto; }
.tg-model__head { align-items: center; }
.tg-model__name { font: 600 21px/1.3 var(--f-head); margin: 0 !important; }
.tg-model__body { display: flex; flex-wrap: wrap; gap: 20px; }
.tg-model__photo { width: var(--photo); height: var(--photo); flex: 0 0 auto; border: 1px solid var(--c-border); border-radius: var(--r-2); background: #FFFFFF; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.tg-model__photo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; float: none; margin: 0; border: 0; }
.tg-model__gone { position: absolute; left: 8px; top: 8px; background: var(--c-surface); color: var(--c-text-2); font: 500 12px/1 var(--f-body); padding: 6px 8px; border-radius: var(--r-1); }
.tg-model__info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
/* Характеристики занимают всю высоту рядом с фото: строки разнесены по высоте, между ними линии. */
.tg-model__specs { margin: 0; min-height: var(--photo); display: grid; grid-template-columns: max-content minmax(0,1fr); align-content: space-between; column-gap: 16px; row-gap: 0; font: var(--t-ui); }
.tg-model__specs dt, .tg-model__specs dd { margin: 0; display: flex; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--c-border); min-height: 30px; }
.tg-model__specs dt { color: var(--c-text-2); }
.tg-model__specs dd { font-weight: 500; }
.tg-model__specs dt:nth-last-of-type(1), .tg-model__specs dd:nth-last-of-type(1) { border-bottom: 0; }
/* На телефоне характеристики уходят под фото, а длинное слово («электромеханическое»)
   в колонке max-content растягивало блок и всю страницу вбок (замер 8 сентября 2026: 487 px при 375). */
@media (max-width: 767px) {
  .tg-model__specs { grid-template-columns: fit-content(45%) minmax(0, 1fr); min-height: 0; }
  .tg-model__specs dt, .tg-model__specs dd { overflow-wrap: anywhere; }
}
.tg-model .tg-pm { margin: 4px 0 0; }
.tg-model .tg-pm ul { font: var(--t-body-s); }
.tg-model .tg-pm__h { font-size: 13px; }
/* «Кому подойдёт» — заметный блок в тон подзаголовков таблицы. В старых
   выпусках абзац без своего класса — узнаётся по жирной подписи в начале. */
.tg-model__fit, .tg-model .tg-model__desc:has(> strong:first-child) {
  margin: 0; padding: 12px 16px 14px; background: var(--c-surface-2); border-left: 4px solid var(--c-surface-2-text);
  border-radius: 0 12px 12px 0; font: var(--t-body-s);
}
.tg-model__fit strong, .tg-model .tg-model__desc:has(> strong:first-child) > strong:first-child {
  display: block; font: 600 13px/1.4 var(--f-body); letter-spacing: .04em; text-transform: uppercase;
  color: var(--c-surface-2-text); margin-bottom: 4px;
}
.tg-model__desc { margin: 0; font: var(--t-body-s); }
.tg-model__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.tg-model__foot .tg-btn { flex: 1 1 220px; }
.tg-model__erid { flex: 1 1 220px; font: var(--t-fine); color: var(--c-text-3); }
.tg-model__swap { background: var(--c-surface); border-radius: var(--r-1); padding: 12px 16px; font: var(--t-ui); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.tg-model__swap span { color: var(--c-text-2); }
.tg-model__swap a { font-weight: 600; }
@media (max-width: 767px) { .tg-model { padding: 16px; gap: 14px; } .tg-model__body { gap: 14px; } .tg-model__desc { font: var(--t-ui); } }

/* вопросы и ответы */
.entry-content details { border-top: 1px solid var(--c-border); }
.entry-content details:last-of-type { border-bottom: 1px solid var(--c-border); }
.entry-content summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px 0; cursor: pointer; font: var(--t-h4); min-height: 44px; }
.entry-content summary::-webkit-details-marker { display: none; }
.entry-content summary::after { content: "+"; color: var(--c-text-2); font-size: 22px; font-weight: 400; line-height: 1; flex: 0 0 auto; }
.entry-content details[open] summary::after { content: "−"; }
.entry-content details p { font: var(--t-body-s); max-width: 640px; margin: 0 0 20px; }

/* похожие рейтинги (разметка Reboot) */
.related-posts { display: flex; flex-direction: column; gap: 24px; }
.related-posts__header { font: var(--t-h2); }
.related-posts .post-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.related-posts .post-card { display: flex; flex-direction: column; gap: 8px; }
.related-posts .post-card__thumbnail { aspect-ratio: 16/10; border: 1px solid var(--c-border); border-radius: var(--r-2); overflow: hidden; background: var(--c-surface); }
.related-posts .post-card__thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-posts .post-card__title { font: 600 16px/1.35 var(--f-head); }
.related-posts .post-card__title a { text-decoration: none; }
.related-posts .post-card__description, .related-posts .post-card__meta { display: none; }
@media (max-width: 767px) {
  .related-posts .post-cards { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--c-border); }
  .related-posts .post-card { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--c-border); align-items: center; }
}

/* комментарии (разметка Reboot / WordPress) */
.comments-area { display: flex; flex-direction: column; gap: 24px; font: var(--t-body-s); }
.comment-reply-title, .comments-title { font: var(--t-h3); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin: 0; padding: 16px 0; border-top: 1px solid var(--c-border); }
.comment-list .children { list-style: none; padding-left: 24px; margin: 0; }
.comment-form p { margin: 0 0 12px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--c-border-strong); border-radius: var(--r-1); background: var(--c-bg); font: var(--t-ui); }
.comment-form .submit, .comment-form input[type="submit"] { display: inline-flex; align-items: center; min-height: var(--control-h); padding: 0 20px; background: var(--c-accent); color: #FFFFFF; border: 0; border-radius: var(--r-1); font: 600 16px/1 var(--f-body); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: baseline; font: var(--t-caption); }

/* статические страницы и 404 из родительской темы */
.site-content-inner { display: block; }
.content-area { max-width: var(--article-col); margin: 0 auto; padding: var(--s-5) var(--page-pad) 0; }
.widget-area, .mobile-menu-placeholder, .search-screen, .search-screen-overlay, .scrolltop, .humburger { display: none !important; }
.article-post { display: flex; flex-direction: column; gap: var(--s-4); }
.article-post .entry-title, .page-title { font: var(--t-h1); }
.entry-meta { font: var(--t-caption); color: var(--c-text-3); }
.entry-meta .entry-label { color: var(--c-text-3); }
.rating-box, .entry-social, .author-box, .meta-source, .entry-tags { display: none; }
