/* ===================================================================
   Оформление сайта. Цвета — переменные ниже; основной цвет (--accent)
   и цвет подписей (--meta-dark) задаются в админке.
   =================================================================== */

/* ----- Тёмная тема (по умолчанию) ----- */
:root {
  --accent: #e5484d;
  --meta-dark: #f3d36b;
  --bg: #0a0a0b;
  --header: #1c1c1f;
  --panel: #151516;
  --surface: #202023;
  --surface-2: #0f0f10;
  --text: #ffffff;
  --text-2: #dbdbdb;
  --muted: #9a9aa2;
  --line: #2c2c31;
  --link: #7bc1ff;
  --meta: var(--meta-dark);
  --footer: #1f1e25;
  --font: Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol";
  --radius: 12px;
  color-scheme: dark;
}
/* ----- Светлая тема ----- */
[data-theme="light"] {
  --bg: #eceef2;
  --header: #ffffff;
  --panel: #ffffff;
  --surface: #f2f3f6;
  --surface-2: #f6f7f9;
  --text: #16171a;
  --text-2: #2e3036;
  --muted: #6b6f78;
  --line: #e1e3e8;
  --link: #1d6fd6;
  --meta: #7a7f8a;
  --footer: #1f1e25;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* ----- Кнопки ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border: 2px solid var(--accent); border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; transition: filter .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--small { padding: 7px 14px; font-size: 14px; }

/* ===== Шапка ===== */
.header { position: sticky; top: 0; z-index: 30; background: var(--header); box-shadow: 0 1px 0 var(--line); }
.header__in { max-width: 1304px; margin: 0 auto; padding: 0 32px; height: 72px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo img { max-height: 44px; width: auto; }
.logo__mark {
  display: grid; place-items: center; min-width: 44px; height: 40px; padding: 0 6px; border-radius: 6px;
  background: #111; color: #fff; font-weight: 900; font-size: 18px; letter-spacing: -.02em;
  box-shadow: inset 0 -4px 0 var(--accent);
}
.logo__name { font-weight: 800; font-size: 19px; }

.nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav__link { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; font-weight: 700; font-size: 15px; color: var(--muted); border-radius: 8px; transition: color .15s; white-space: nowrap; }
.nav__link:hover, .nav__link.on, .nav__drop.on > .nav__link { color: var(--text); }
.nav__drop { position: relative; }
.nav__menu {
  position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px; display: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.nav__menu a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text-2); font-size: 15px; }
.nav__menu a:hover { background: var(--accent); color: #fff; }
.nav__drop:hover .nav__menu, .nav__drop:focus-within .nav__menu { display: block; }

.header__tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tool { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.tool:hover { color: var(--text); background: var(--surface); }
[data-theme="dark"] .tool__light, [data-theme="light"] .tool__dark { display: none; }
.burger { display: none; }
.age { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 5px; border: 2px solid var(--muted); border-radius: 6px; font-size: 12px; font-weight: 800; color: var(--muted); }

.hsearch { max-width: 1304px; margin: 0 auto; padding: 0 32px 14px; display: flex; gap: 10px; }
.hsearch[hidden] { display: none; }
.hsearch input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: 16px var(--font); outline: none; }
.hsearch input:focus { border-color: var(--accent); }

/* ===== Основная область: тёмная «панель» со скруглением ===== */
.wrap { max-width: 1304px; margin: 0 auto; padding: 8px 32px 40px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 24px 40px 40px; }
.panel--narrow { max-width: 900px; margin: 0 auto; }

/* ===== Сетка карточек ===== */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.block { padding: 8px 0 24px; }
.block + .block { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 12px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.block__title { font-size: 28px; font-weight: 700; }
.block__title a:hover { color: var(--accent); }
.block__all, .more { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 15px; }
.block__all:hover, .more:hover { color: var(--accent); }
.more { margin-top: 24px; }

.card { display: flex; flex-direction: column; min-width: 0; }
.card__link { display: block; }
.card__img { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card__img img { transform: scale(1.04); }
.card__tag {
  position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px);
  padding: 6px 8px; border-radius: 6px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; line-height: 1.2; text-transform: uppercase; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__title { display: block; margin-top: 14px; font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--text); }
.card__link:hover .card__title { color: var(--accent); }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 14px; color: var(--meta); }
.card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.card__meta svg { opacity: .8; }
.card--small .card__title { font-size: 16px; margin-top: 10px; }
.cover-empty {
  display: grid; place-items: center; width: 100%; height: 100%; padding: 12px; text-align: center;
  background: radial-gradient(circle at 30% 20%, var(--accent), #1a1a1d 75%);
  color: #fff; font-weight: 900; font-size: 22px; text-transform: uppercase; letter-spacing: .03em;
}

/* ===== Списки: рубрика, теги, поиск ===== */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--text); }
.crumbs > *:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--muted); }
.list-title { font-size: 30px; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; margin-bottom: 10px; }
.list-desc { color: var(--text-2); max-width: 760px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 26px; }
.chips a { padding: 7px 14px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 600; }
.chips a:hover, .chips a.on { background: var(--accent); color: #fff; }
.list-title + .grid3, .list-desc + .grid3 { margin-top: 24px; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 40px; }
.pager a, .pager span { min-width: 42px; padding: 9px 13px; border-radius: 8px; text-align: center; background: var(--surface); font-weight: 600; }
.pager a:hover { background: var(--accent); color: #fff; }
.pager .on { background: var(--accent); color: #fff; }
.pager .gap { background: none; }

/* ===== Материал ===== */
.post-page { padding-top: 22px; }
.post-head { margin-bottom: 20px; }
/* Кнопки «поделиться» стоят в поле слева от текста и не отнимают у него место. */
.post-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding-top: 30px; }
/* Кнопки стоят на сером фоне слева от белой панели; на узких экранах места там нет — они переезжают в блок оценки. */
.post-rail { display: none; position: absolute; left: -88px; top: 30px; bottom: 0; width: 36px; }
@media (min-width: 1400px) { .post-rail { display: block; } .post-share-inline:not(.is-always) { display: none !important; } }
.post-rail__in { position: sticky; top: 100px; display: grid; gap: 10px; }
.post-share-inline { display: flex; align-items: center; gap: 10px; }
.post { min-width: 0; max-width: 860px; }
.post__title { font-size: 30px; font-weight: 700; line-height: 1.35; margin-bottom: 14px; }
.post__subtitle { color: var(--text-2); font-size: 17px; margin-bottom: 18px; }
.post__info { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 6px 0 24px; }
.post__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.post__meta span { display: inline-flex; align-items: center; gap: 6px; }
.post__author { color: var(--meta); font-weight: 600; }
.post__cover { display: block; width: 100%; max-height: 600px; object-fit: cover; border-radius: 16px; margin: 0; }
.share { display: flex; gap: 8px; }
.share__btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 0; cursor: pointer; background: var(--surface); color: var(--text-2); transition: background .15s, color .15s; }
.share__btn:hover { color: #fff; background: var(--accent); }
.share__vk:hover { background: #0077ff; }
.share__tg:hover { background: #229ed9; }

.toc { background: var(--surface); padding: 20px 24px; margin: 8px 0 28px; border-radius: 4px; }
.toc summary { display: flex; gap: 12px; align-items: baseline; cursor: pointer; list-style: none; font-size: 18px; }
.toc summary::-webkit-details-marker { display: none; }
.toc__show, .toc__hide { color: var(--link); font-size: 15px; }
.toc[open] .toc__show, .toc:not([open]) .toc__hide { display: none; }
.toc ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.toc a { color: var(--link); }
.toc a:hover { text-decoration: underline; }
.toc .toc__l3 { margin-left: 18px; list-style: circle; }

/* Текст статьи */
.content { font-size: 18px; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }
.content p { margin: 0 0 24px; }
.content h1 { font-size: 28px; font-weight: 800; line-height: 1.25; color: var(--text); margin: 44px 0 20px; }
.content h2 { font-size: 24px; font-weight: 700; color: var(--text); margin: 40px 0 20px; }
.content h3 { font-size: 21px; font-weight: 700; color: var(--text); margin: 32px 0 16px; }
.content h4 { font-size: 18px; font-weight: 700; color: var(--text); margin: 28px 0 12px; }
.content a { color: var(--link); }
.content a:hover { text-decoration: underline; }
.content b, .content strong { color: var(--text); }
.content ul, .content ol { margin: 0 0 24px; padding-left: 24px; }
.content li { margin-bottom: 10px; }
.content li::marker { color: var(--accent); }
.content img { height: auto; border-radius: 8px; margin: 8px auto 20px; }
.content figure { margin: 0 0 24px; }
.content figcaption { margin-top: -10px; font-size: 14px; color: var(--muted); text-align: center; }
.content hr { border: 0; height: 1px; background: var(--line); margin: 36px 0; }
.content blockquote { margin: 24px 0; padding: 16px 20px; background: var(--surface-2); border-left: 6px solid var(--accent); border-radius: 10px; font-size: 17px; color: var(--text-2); }
.content blockquote p:last-child { margin: 0; }
.content table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 16px; display: block; overflow-x: auto; }
.content tbody, .content thead { display: table; width: 100%; border-collapse: collapse; }
.content td, .content th { padding: 10px 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 4%, transparent); text-align: left; vertical-align: top; }
.content tr:first-child td, .content th { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.content td p { margin: 0; }
.content td img { margin: 0 auto; max-width: 120px; }
/* Блоки «Совет», «Важно», «Внимание» */
.content .note { position: relative; margin: 24px 0; padding: 16px 20px 16px 56px; border-radius: 10px; background: var(--surface); border-left: 6px solid #2f9e6a; }
.content .note p:last-child { margin: 0; }
.content .note::before { content: "✓"; position: absolute; left: 18px; top: 15px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #2f9e6a; color: #fff; font-size: 14px; font-weight: 800; }
.content .note--info { border-left-color: #3b82f6; }
.content .note--info::before { content: "i"; background: #3b82f6; }
.content .note--warn { border-left-color: #f59e0b; }
.content .note--warn::before { content: "!"; background: #f59e0b; }
/* Плюсы и минусы */
.content .proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.content .pros, .content .cons { padding: 16px 20px; border-radius: 10px; background: var(--surface); border-top: 4px solid #2f9e6a; }
.content .cons { border-top-color: var(--accent); }
.content .pros ul, .content .cons ul { margin: 0; }
.content .pros li::marker { content: "+  "; color: #2f9e6a; font-weight: 800; }
.content .cons li::marker { content: "−  "; color: var(--accent); font-weight: 800; }
.content .pros > p, .content .cons > p { margin-bottom: 10px; }
/* Элементы, которые даёт редактор */
.content blockquote cite { display: block; margin-top: 8px; font-size: 15px; font-style: normal; color: var(--muted); }
.content blockquote cite::before { content: "— "; }
.content thead th { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); font-weight: 700; }
.content thead + tbody tr:first-child td { background: color-mix(in srgb, var(--text) 4%, transparent); color: inherit; }
.content mark { background: color-mix(in srgb, #ffd84d 55%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
.content ul.checklist { list-style: none; padding-left: 4px; }
.content ul.checklist li { position: relative; padding-left: 32px; }
.content ul.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border: 2px solid var(--muted); border-radius: 6px; box-sizing: border-box; }
.content ul.checklist li.is-checked::before { content: "\2713"; border-color: #2f9e6a; background: #2f9e6a; color: #fff; font-size: 13px; font-weight: 800; line-height: 16px; text-align: center; }
.content figure .embed { margin-bottom: 8px; }
.content .proscons > div:only-child { grid-column: 1 / -1; }
.content .ta-center { text-align: center; }
.content .ta-right { text-align: right; }
.content .ta-justify { text-align: justify; }
/* Видео и посты: загружаются по клику */
.embed { aspect-ratio: 16 / 9; margin: 0 0 24px; border-radius: 10px; overflow: hidden; background: #000; }
.embed iframe { width: 100%; height: 100%; border: 0; }
.embed__play { width: 100%; height: 100%; display: grid; place-content: center; gap: 8px; border: 0; cursor: pointer; background: radial-gradient(circle, #2a2a30, #000); color: #fff; font-size: 22px; font-weight: 700; }
.embed__play small { font-size: 13px; font-weight: 400; color: #aab; }
.embed__play:hover { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, #000), #000); }
.embed--post, .embed--steam { aspect-ratio: auto; max-width: 550px; margin-left: auto; margin-right: auto; background: var(--surface); }
.embed--post .embed__play, .embed--steam .embed__play { min-height: 120px; padding: 20px; font-size: 18px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; }
.embed--post .embed__play small, .embed--steam .embed__play small { color: var(--muted); }
.embed--post .embed__play:hover, .embed--steam .embed__play:hover { background: var(--surface-2); }
.embed--post.is-loaded { background: transparent; }
.embed--post iframe { height: 560px; display: block; color-scheme: normal; }
.embed--steam { max-width: 646px; }
.embed--steam iframe { height: 190px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.tags a { padding: 6px 12px; border-radius: 999px; background: var(--surface); font-size: 14px; color: var(--text-2); }
.tags a:hover { background: var(--accent); color: #fff; }
.recs { margin-top: 32px; }
.recs__title, .aside__title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* Правая колонка «Свежее» */
.post-aside { min-width: 0; }
.aside-sticky { display: flex; flex-direction: column; gap: 22px; height: 100%; }
.aside-follow { flex: 1 1 auto; min-height: 0; }
.aside-follow__in { position: sticky; top: 84px; }
.aside-follow__in .ad { margin: 0; }
.fresh { display: grid; gap: 10px; }
.fresh__img { display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface); }
.fresh__img img { width: 100%; height: 100%; object-fit: cover; }
.fresh__img .cover-empty { font-size: 16px; }
.fresh__title { font-size: 17px; line-height: 1.45; color: var(--text); }
.fresh:hover .fresh__title { color: var(--accent); }

/* Документы */
.doc { font-size: 16px; }
.doc h2 { font-size: 21px; }

/* ===== Форма обратной связи ===== */
.form-card { padding: 28px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); margin: 20px 0 28px; }
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form input, .form textarea, .search404 input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  font: 16px var(--font); color: var(--text); background: var(--surface);
}
.form input:focus, .form textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text-2); }
.form .check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.form .check a, .success a { color: var(--link); }
.form .btn { justify-self: start; }
.error { color: #ff6b6b; font-size: 13px; font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { text-align: center; padding: 16px 0; }
.success h2 { margin-bottom: 10px; }
.contacts { list-style: none; padding: 0; margin: 0; }
.contacts li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.contacts span { display: block; font-size: 13px; color: var(--muted); }
.big404 { font-size: 96px; font-weight: 900; color: var(--accent); margin: 10px 0 0; line-height: 1; }
.search404 { display: flex; gap: 10px; max-width: 480px; margin: 24px auto; }

/* ===== Подвал ===== */
.footer { background: var(--footer); color: #b7b8c2; margin-top: 8px; font-size: 14px; }
.footer a { color: #e7e7ee; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__in { max-width: 1304px; margin: 0 auto; padding: 36px 32px; display: grid; grid-template-columns: var(--fcols, 1.6fr 1fr 1fr); gap: 32px; }
.footer .logo__name { color: #fff; }
.footer__about p { margin: 14px 0; max-width: 420px; }
.footer__title { font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.socials { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer__legal { border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #8e8f9a; }
.footer__in--legal { grid-template-columns: auto 1fr; padding-top: 18px; padding-bottom: 22px; align-items: start; }
.footer__in--legal p { margin: 0 0 6px; }
.footer .age { border-color: #8e8f9a; color: #8e8f9a; }

/* ===== Баннер cookie ===== */
.cookie {
  width: min(520px, calc(100vw - 32px));
  padding: 16px 18px; border-radius: 12px; background: var(--surface); color: var(--text); border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0,0,0,.4); font-size: 14px;
}
.cookie[hidden] { display: none; }
.cookie p { margin-bottom: 12px; }
.cookie a { color: var(--link); }
.cookie__btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Адаптив ===== */
@media (max-width: 1180px) {
  .post-layout { grid-template-columns: 1fr; }
  .post { max-width: none; }
  .post-aside { display: none; }
  .nav__link { padding: 10px 8px; }
}
@media (max-width: 960px) {
  .header__in { padding: 0 16px; height: 62px; gap: 12px; }
  .burger { display: grid; }
  .nav {
    display: none; position: fixed; top: 62px; left: 0; right: 0; bottom: 0; z-index: 40;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 12px 16px 40px;
    background: var(--header); overflow-y: auto;
  }
  .header.is-open .nav { display: flex; }
  .nav__link { padding: 14px 4px; font-size: 17px; color: var(--text); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link svg { display: none; }
  .nav__menu { position: static; display: block; min-width: 0; padding: 4px 0 8px 14px; background: none; border: 0; box-shadow: none; }
  .hsearch { padding: 0 16px 12px; }
  .wrap { padding: 8px 10px 24px; }
  .panel { padding: 18px 16px 28px; }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .footer__in { grid-template-columns: 1fr 1fr; padding: 28px 16px; }
  .footer__about { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .grid3 { grid-template-columns: 1fr; }
  .block__title { font-size: 23px; }
  .list-title { font-size: 24px; }
  .post__title { font-size: 24px; }
  .content { font-size: 17px; }
  .content .proscons { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .form-card { padding: 18px; }
  .age { display: none; }
  .footer__in { grid-template-columns: 1fr; }
  .footer__in--legal { grid-template-columns: 1fr; }
}

/* Полоса предпросмотра (видна только в админке) */
.preview-bar { position: sticky; top: 72px; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px; padding: 10px 16px; background: #f59e0b; color: #1b1300; font-size: 15px; }

/* ----- Оценка статьи ----- */
.rate { margin: 32px 0 8px; padding: 22px 26px; display: flex; align-items: center; flex-wrap: wrap; gap: 18px 26px; border-radius: 18px;
  background: linear-gradient(135deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); }
.rate__score { display: grid; justify-items: center; min-width: 86px; padding-right: 26px; border-right: 1px solid var(--line); }
.rate__score b { font-size: 44px; line-height: 1; font-weight: 800; color: #f5b301; }
.rate__score span { font-size: 13px; color: var(--muted); margin-top: 4px; }
.rate__main { flex: 1; min-width: 220px; display: grid; gap: 8px; }
.rate__title { font-size: 18px; font-weight: 700; }
.rate__stars { display: flex; gap: 4px; margin-left: -4px; }
.rate__star { border: 0; background: none; padding: 2px; line-height: 0; cursor: pointer; color: var(--muted); transition: transform .12s, color .12s; }
.rate__star svg { fill: transparent; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; transition: fill .12s; }
.rate__star.is-on { color: #f5b301; }
.rate__star.is-on svg { fill: #f5b301; }
.rate__star:hover { transform: scale(1.14) rotate(-6deg); }
.rate__star:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.rate.is-busy .rate__star { pointer-events: none; opacity: .6; }
.rate.is-done { border-color: color-mix(in srgb, #f5b301 45%, var(--line)); }
.rate__info { font-size: 14px; color: var(--muted); min-height: 1.4em; }
@media (max-width: 600px) {
  .rate__score { border-right: 0; padding-right: 0; flex-direction: row; display: flex; gap: 8px; align-items: baseline; }
}

/* ----- Статья: правая колонка ----- */
.side-title { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; border-left: 4px solid var(--accent); padding-left: 10px; margin: 0 0 18px; }
.fresh-list { display: grid; gap: 22px; }
.subs { display: grid; gap: 14px; }
.subs__item { display: flex; align-items: center; gap: 14px; }
.subs__icon { flex: none; width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.subs__icon b { font-size: 15px; letter-spacing: .02em; }
.subs__text { display: grid; gap: 6px; font-size: 15px; color: var(--text-2); }
.subs__btn { display: inline-block; justify-self: start; padding: 7px 16px; border-radius: 4px; background: var(--text); color: var(--panel); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.subs__item:hover .subs__btn { background: var(--accent); color: #fff; }

/* ----- Рекламные блоки ----- */
.ad { margin: 18px 0; text-align: center; overflow: hidden; max-width: 100%; }
.ad__label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad--mobile { display: none; }
.ad-cell { grid-column: 1 / -1; }
.ad-wrap .ad { margin: 12px 0; }
.aside-sticky .ad { margin: 0 0 18px; }
@media (max-width: 800px) {
  .ad--mobile { display: block; }
  .ad--desktop { display: none; }
}

/* ----- Уведомление внизу экрана ----- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; background: var(--text); color: var(--panel); font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.share__btn.is-done { background: #2f9e6a; color: #fff; }

/* ----- Кнопки «поделиться»: яркие, видны на любом фоне ----- */
.share__btn { color: #fff; background: #4b5563; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.share__vk { background: #0077ff; }
.share__tg { background: #229ed9; }
.share__btn:hover { filter: brightness(1.12); color: #fff; transform: translateY(-1px); }
.share__vk:hover { background: #0077ff; }
.share__tg:hover { background: #229ed9; }
.share__btn:not(.share__vk):not(.share__tg):hover { background: var(--accent); filter: none; }
.share__btn { transition: filter .15s, transform .15s, background .15s; }

/* ----- Содержание: блок в статье, кнопка слева и боковое меню ----- */
.toc { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; margin: 4px 0 26px; border-radius: 12px; background: var(--surface); }
.toc__title { font-size: 17px; font-weight: 700; }
.toc__btn { padding: 8px 16px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: 700 13px var(--font); cursor: pointer; letter-spacing: .02em; }
.toc__btn:hover { filter: brightness(1.1); }

.toc-fab { position: fixed; left: 0; top: 50%; z-index: 90; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center;
  border: 0; border-radius: 0 12px 12px 0; background: var(--accent); color: #fff; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); transition: width .15s, filter .15s; }
.toc-fab:hover { width: 52px; filter: brightness(1.1); }
.toc-overlay { position: fixed; inset: 0; z-index: 140; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s; }
.toc-overlay.is-on { opacity: 1; }
.toc-overlay[hidden] { display: none; }
.toc-drawer { position: fixed; left: 0; top: 0; bottom: 0; z-index: 150; width: min(380px, 88vw); display: flex; flex-direction: column;
  background: var(--panel); color: var(--text); box-shadow: 8px 0 40px rgba(0, 0, 0, .35); transform: translateX(-102%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
.toc-drawer.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
.toc-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); font-size: 19px; }
.toc-drawer__close { width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--surface); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }
.toc-drawer__close:hover { background: var(--accent); color: #fff; }
.toc-drawer nav { overflow-y: auto; padding: 10px 12px 28px; }
.toc-list { list-style: none; margin: 0; padding: 0; counter-reset: h2; }
.toc-list li { margin: 2px 0; }
.toc-list a { position: relative; display: block; padding: 10px 12px 10px 14px; border-radius: 10px; border-left: 3px solid transparent; font-size: 15px; line-height: 1.4; color: var(--text-2); }
.toc-list a:hover { background: var(--surface); color: var(--text); }
.toc-list a.is-active { background: var(--surface); border-left-color: var(--accent); color: var(--text); font-weight: 600; }
.toc-list__l2 { counter-increment: h2; counter-reset: h3; }
.toc-list__l2 > a::before { content: counter(h2) ". "; color: var(--accent); font-weight: 700; }
.toc-list__l3 { counter-increment: h3; margin-left: 22px; }
.toc-list__l3 > a { font-size: 14px; color: var(--muted); }
.toc-list__l3 > a::before { content: counter(h2) "." counter(h3) " "; color: var(--muted); }
@media (max-width: 800px) { .toc-fab { width: 38px; height: 38px; margin-top: -19px; } }
@media (prefers-reduced-motion: reduce) { .toc-drawer, .toc-overlay, .toc-fab { transition: none; } }

.content h2[id], .content h3[id] { scroll-margin-top: 90px; }

/* ----- Полоска прокрутки статьи ----- */
.read-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 200; height: 4px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #ffb347)); transform-origin: 0 50%; transform: scaleX(0); border-radius: 0 3px 3px 0; box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); }

/* ----- Подсказки в поиске ----- */
.hsearch { position: relative; }
.hsearch__list { position: absolute; left: 32px; right: 32px; top: calc(100% - 4px); z-index: 60; margin: 0; padding: 6px; list-style: none;
  max-width: 760px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.hsearch__list[hidden] { display: none; }
.hsearch__list a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; color: var(--text); }
.hsearch__list a:hover, .hsearch__list a.is-sel { background: var(--surface); }
.hsearch__list img { flex: none; width: 64px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--surface); }
.hsearch__t { display: grid; gap: 2px; font-size: 15px; line-height: 1.3; }
.hsearch__t small { color: var(--muted); font-size: 12px; }
@media (max-width: 800px) { .hsearch__list { left: 16px; right: 16px; } }

/* ----- «Сообщить об ошибке» ----- */
.errbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 26px 0 0; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.errbar kbd { padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); font: 600 12px var(--font); color: var(--text-2); }
.errbar button { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.errbar button:hover { border-color: var(--accent); color: var(--accent); }
.reportbox { width: min(520px, 92vw); padding: 0; border: 0; border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.reportbox::backdrop { background: rgba(0, 0, 0, .6); }
.reportbox form { display: grid; gap: 14px; padding: 22px; }
.reportbox__head { display: flex; align-items: center; justify-content: space-between; font-size: 19px; }
.reportbox__x { width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--surface); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }
.reportbox label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.reportbox textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: 15px/1.45 var(--font); resize: vertical; box-sizing: border-box; }
.reportbox textarea:focus { outline: 0; border-color: var(--accent); }
.reportbox__msg { min-height: 1.3em; margin: 0; font-size: 14px; color: var(--muted); }
.reportbox__msg.is-error { color: #ef4444; }
.reportbox__btns { display: flex; gap: 10px; }
.reportbox__send { padding: 10px 20px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 700 15px var(--font); cursor: pointer; }
.reportbox__send:disabled { opacity: .6; cursor: default; }
.reportbox__cancel { padding: 10px 18px; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--text); font: 600 15px var(--font); cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ----- Оформление текста статьи ----- */
.content .c-red { color: #ef4444; } .content .c-orange { color: #f59e0b; } .content .c-green { color: #22c55e; } .content .c-blue { color: #3b82f6; }
.content .c-purple { color: #a855f7; } .content .c-pink { color: #ec4899; } .content .c-gray { color: #9ca3af; }
.content .fs-14 { font-size: 14px; } .content .fs-22 { font-size: 22px; } .content .fs-28 { font-size: 28px; line-height: 1.3; } .content .fs-36 { font-size: 36px; line-height: 1.25; }
.content .ff-serif { font-family: Georgia, "Times New Roman", serif; }
.content .ff-mono { font-family: ui-monospace, Consolas, "Courier New", monospace; }
.content .ff-hand { font-family: "Segoe Script", "Comic Sans MS", "Bradley Hand", cursive; }
.content .ind-1 { padding-left: 32px; } .content .ind-2 { padding-left: 64px; } .content .ind-3 { padding-left: 96px; } .content .ind-4 { padding-left: 128px; }
.content pre { margin: 0 0 18px; padding: 14px 16px; border-radius: 10px; background: #0f172a; color: #e2e8f0; overflow-x: auto; font: 14px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.content code { padding: 2px 6px; border-radius: 6px; background: var(--surface); font: .9em ui-monospace, Consolas, monospace; }
.content pre code { padding: 0; background: none; color: inherit; }
.content .spoiler { margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.content .spoiler__title { position: relative; padding: 14px 18px 14px 46px; background: var(--surface); font-weight: 700; cursor: pointer; user-select: none; }
.content .spoiler__title::before { content: ""; position: absolute; left: 20px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border: solid var(--text-2); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s; }
.content .spoiler.is-open .spoiler__title::before { transform: rotate(45deg); margin-top: -8px; }
.content .spoiler__title:hover { background: var(--surface-2); }
.content .spoiler__body { display: none; padding: 16px 18px 2px; }
.content .spoiler.is-open .spoiler__body { display: block; }
.content .spoiler-inline { padding: 0 4px; border-radius: 4px; background: var(--text-2); color: transparent; cursor: pointer; transition: background .2s, color .2s; }
.content .spoiler-inline.is-open { background: var(--surface); color: inherit; }
.content .spoiler-inline a { color: inherit; }
.content .c-yellow { color: #facc15; }
.content .c-lime { color: #84cc16; }
.content .c-teal { color: #14b8a6; }
.content .c-cyan { color: #06b6d4; }
.content .c-indigo { color: #6366f1; }
.content .c-rose { color: #f43f5e; }
.content .c-brown { color: #b45309; }
.content .c-slate { color: #64748b; }
/* Спойлер устойчив к «лишним» блокам: всё, кроме заголовка, скрыто, пока спойлер закрыт */
.content .spoiler:not(.is-open) > :not(.spoiler__title) { display: none; }
.content .spoiler.is-open > :not(.spoiler__title) { display: block; }
.content .spoiler > .spoiler__body, .content .spoiler > :not(.spoiler__title) { padding: 16px 18px 2px; }
.content .spoiler__title ~ .spoiler__title { padding: 14px 18px 14px 46px; }
/* Копирование кода */
.content pre { position: relative; padding-right: 96px; }
.codecopy { position: absolute; top: 8px; right: 8px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px;
  background: rgba(255, 255, 255, .08); color: #e2e8f0; font: 600 12px var(--font); cursor: pointer; transition: background .15s; }
.codecopy:hover { background: rgba(255, 255, 255, .18); }
.codecopy.is-done { background: #2f9e6a; border-color: #2f9e6a; color: #fff; }
.content pre { padding-right: 58px; }
.codecopy { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; line-height: 0; }
.content code { cursor: pointer; transition: background .15s, color .15s; }
.content pre code { cursor: text; }
.content code:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.content pre code:hover { background: none; }
.content code.is-done { background: #2f9e6a; color: #fff; }

/* ----- Голосование ----- */
.content .poll { margin: 22px 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.poll__q { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.poll__opt { display: block; width: 100%; margin: 0 0 8px; padding: 12px 16px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: 600 15px var(--font); cursor: pointer; transition: border-color .15s, transform .1s; }
.poll__opt:hover { border-color: var(--accent); transform: translateX(2px); }
.poll__res { position: relative; margin: 0 0 8px; padding: 11px 14px; border-radius: 10px; background: var(--panel); overflow: hidden; display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.poll__res i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 28%, transparent); }
.poll__res span, .poll__res b { position: relative; }
.poll__res.is-mine { outline: 2px solid var(--accent); }
.poll__foot { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ----- Галерея и просмотр картинок ----- */
.content .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 22px 0; }
.content .gallery figure { margin: 0; }
.content .gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; cursor: zoom-in; transition: transform .15s; }
.content .gallery img:hover { transform: scale(1.02); }
.content .gallery figcaption { margin-top: 4px; font-size: 13px; color: var(--muted); }
.content img { cursor: zoom-in; }
.content a img { cursor: pointer; }
.lightbox { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, .9); }
.lightbox.is-on { display: flex; }
.lightbox img { max-width: 94vw; max-height: 84vh; border-radius: 8px; box-shadow: 0 10px 50px rgba(0, 0, 0, .6); }
.lightbox__cap { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #e5e7eb; font-size: 15px; padding: 0 60px; }
.lightbox button { position: absolute; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .28); }
.lightbox__x { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; margin-top: -23px; }
.lightbox__next { right: 16px; top: 50%; margin-top: -23px; }
.post__author a { color: inherit; }
.post__author a:hover { text-decoration: underline; }

/* ----- Картинки: положение и размер ----- */
.content figure.img-left, .content figure.img-right { width: 50%; }
.content figure.img-left { float: left; margin: 6px 26px 14px 0; }
.content figure.img-right { float: right; margin: 6px 0 14px 26px; }
.content figure.img-w75 { width: 75%; }
.content figure.img-w50 { width: 50%; }
.content figure.img-w33 { width: 33%; }
.content figure.img-w75:not(.img-left):not(.img-right), .content figure.img-w50:not(.img-left):not(.img-right), .content figure.img-w33:not(.img-left):not(.img-right) { margin-left: auto; margin-right: auto; }
.content h1, .content h2, .content h3, .content h4, .content hr, .content .gallery, .content .poll, .content .embed, .content .spoiler, .content table, .content pre { clear: both; }
.content::after { content: ""; display: block; clear: both; }
@media (max-width: 700px) {
  .content figure.img-left, .content figure.img-right { float: none; width: 100%; margin: 0 0 24px; }
  .content figure.img-w75, .content figure.img-w50, .content figure.img-w33 { width: 100%; }
}
.post-foot-meta { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }

.lightbox img { max-width: 94vw; max-height: 84vh; touch-action: none; user-select: none; transition: transform .1s ease-out; will-change: transform; }
.lightbox__tools { position: absolute; top: 16px; right: 16px; display: flex; align-items: center; gap: 10px; }
.lightbox__tools button { position: static; width: 44px; height: 44px; font-size: 26px; }
.lightbox__pct { min-width: 52px; text-align: center; color: #e5e7eb; font-size: 14px; font-weight: 600; }
.lightbox__x { top: auto; right: auto; }

/* ----- Бесконечная прокрутка ----- */
.infinite { margin: 28px 0 8px; text-align: center; color: var(--muted); font-size: 15px; min-height: 24px; }
.infinite__btn { display: inline-block; padding: 10px 22px; border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 600; }
.infinite__btn:hover { background: var(--accent); color: #fff; }

/* ----- Карусель ----- */
.content .carousel { position: relative; margin: 22px 0; }
.content .gallery--carousel { display: flex; gap: 12px; margin: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 6px; }
.content .gallery--carousel figure { flex: 0 0 min(100%, 760px); scroll-snap-align: center; }
.content .gallery--carousel img { aspect-ratio: 16 / 9; }
.carousel__btn { position: absolute; top: 50%; z-index: 2; width: 46px; height: 46px; margin-top: -30px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; transition: background .15s; }
.carousel__btn:hover { background: var(--accent); }
.carousel__btn--prev { left: 10px; }
.carousel__btn--next { right: 10px; }
.pager[hidden] { display: none; }
.content .gallery > figure:only-child { grid-column: 1 / -1; }
.content .gallery > figure:only-child img { aspect-ratio: auto; max-height: 560px; object-fit: contain; }
/* Карусель: каждая картинка по центру кадра */
.content .gallery--carousel figure { flex: 0 0 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; scroll-snap-align: center; }
.content .gallery--carousel img { width: auto; max-width: 100%; height: auto; max-height: 560px; aspect-ratio: auto; object-fit: contain; margin: 0 auto; }
.content .gallery--carousel figcaption { text-align: center; }

/* Сетка: каждая картинка целиком, по центру своей ячейки */
.content .gallery:not(.gallery--carousel) figure { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.content .gallery:not(.gallery--carousel) img { height: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface); margin: 0 auto; }
.content .gallery:not(.gallery--carousel) figcaption { text-align: center; }
.content .gallery > figure:only-child img { height: auto; background: none; }

/* Сетка: 2–3 картинки растягиваются на всю ширину статьи */
.content .gallery:not(.gallery--carousel) { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.content .gallery:not(.gallery--carousel) figure { min-width: 0; }
.content .gallery:not(.gallery--carousel) img { width: 100%; }

/* ----- Кнопка «наверх» ----- */
.totop { display: grid; place-items: center; width: 46px; height: 46px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--text); cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); transition: background .15s, color .15s, transform .15s; }
.totop[hidden] { display: none; }
.totop:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }

/* ----- «Следующая статья» ----- */
.nextcard { position: relative; width: min(380px, calc(100vw - 32px)); padding: 16px 18px 14px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--text);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .3); opacity: 0; transform: translateY(20px); transition: opacity .25s, transform .25s; }
.nextcard[hidden] { display: none; }
.nextcard.is-in { opacity: 1; transform: none; }
.nextcard__x { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.nextcard__x:hover { background: var(--surface); color: var(--text); }
.nextcard__top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-right: 30px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.nextcard__label { display: inline-flex; align-items: center; gap: 6px; color: var(--link); }
.nextcard__cat { color: var(--muted); font-weight: 600; }
.nextcard__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 8px 0 10px; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--text); }
.nextcard__title:hover { color: var(--accent); }
.nextcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.nextcard__time { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.nextcard__go { color: var(--link); font-weight: 700; }
.nextcard__go:hover { text-decoration: underline; }
@media (max-width: 600px) { .totop { width: 42px; height: 42px; } }
@media (prefers-reduced-motion: reduce) { .nextcard { transition: none; } }

/* «Следующая статья» и «наверх»: цвета сайта (основной цвет из настроек) */
.nextcard { border-top: 3px solid var(--accent); }
.nextcard__label, .nextcard__go { color: var(--accent); }
.nextcard__title:hover { color: var(--accent); }
.totop { color: var(--accent); }

/* ----- Выпадающее меню: «Все материалы» ----- */
.nav__menu a.nav__all { margin-bottom: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; font-weight: 700; color: var(--text); }

/* ----- Источник под статьёй ----- */
.post-source { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.post-source a { color: var(--link); }

/* ----- Уведомления сайта ----- */
.notice { --nc: #2563eb; }
.notice--success { --nc: #16a34a; }
.notice--warning { --nc: #d97706; }
.notice--promo { --nc: var(--accent); }
.notice[hidden] { display: none; }
.notice__x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.notice__x:hover { background: rgba(127, 127, 127, .2); color: var(--text); }
.notice__btn { display: inline-block; padding: 8px 14px; border-radius: 8px; background: var(--nc); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.notice__btn:hover { filter: brightness(1.1); }

.notice--bar { position: relative; z-index: 31; background: var(--nc); color: #fff; }
.notice--bar .notice__in { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; max-width: 1304px; margin: 0 auto; padding: 10px 56px 10px 32px; text-align: center; font-size: 15px; }
.notice--bar .notice__btn { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.notice--bar .notice__x { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #fff; }
.notice--bar .notice__x:hover { background: rgba(255, 255, 255, .2); color: #fff; }

.notice--corner { position: relative; width: min(380px, calc(100vw - 32px)); background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-left: 5px solid var(--nc); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }
.notice--corner .notice__in { position: relative; padding: 14px 42px 14px 16px; font-size: 15px; line-height: 1.45; }
.notice--corner .notice__btn { margin-top: 10px; }
.notice--corner .notice__x { position: absolute; top: 8px; right: 8px; }

.notice--center { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .55); }
.notice--center .notice__in { position: relative; width: min(460px, 100%); padding: 28px 26px 24px; border-radius: 16px; border-top: 5px solid var(--nc);
  background: var(--panel); color: var(--text); text-align: center; font-size: 16px; line-height: 1.5; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.notice--center .notice__btn { margin-top: 16px; }
.notice--center .notice__x { position: absolute; top: 8px; right: 8px; }
@media (max-width: 600px) { .notice--bar .notice__in { padding: 10px 44px 10px 14px; font-size: 14px; } }


/* ----- Выпадающее меню рубрики: только подрубрики, как в журналах ----- */
.nav__menu { min-width: 250px; max-height: min(70vh, 480px); overflow-y: auto; padding: 8px; }
.nav__menu a { padding: 11px 14px; font-weight: 700; font-size: 15px; color: var(--text); }
.nav__menu a:hover { background: transparent; color: var(--accent); }
@media (max-width: 960px) { .nav__menu { max-height: none; min-width: 0; } .nav__menu a { padding: 10px 4px; font-weight: 600; } }

/* ----- Предыдущая / следующая статья ----- */
.postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.postnav__item { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s, transform .15s; }
.postnav__item:hover { border-color: var(--accent); transform: translateY(-1px); }
.postnav__item--next { text-align: right; }
.postnav__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.postnav__title { font-weight: 700; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.postnav__cat { font-size: 13px; color: var(--muted); }
@media (max-width: 600px) { .postnav { grid-template-columns: 1fr; } .postnav__item--next { text-align: left; } }

/* ----- Архив и теги ----- */
.archive-year { margin: 26px 0 8px; }
.archive-year h2 { font-size: 22px; margin-bottom: 12px; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.archive-item { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s; }
.archive-item:hover { border-color: var(--accent); }
.archive-item b { font-size: 17px; color: var(--text); }
.archive-item span { font-size: 14px; color: var(--muted); }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 18px; }
.tagcloud__item { padding: 6px 14px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-weight: 600; transition: background .15s, color .15s; }
.tagcloud__item:hover { background: var(--accent); color: #fff; }
.tagcloud__item sup { margin-left: 4px; font-size: 11px; opacity: .65; }
.tagcloud__item--2 { font-size: 17px; }
.tagcloud__item--3 { font-size: 19px; }
.tagcloud__item--4 { font-size: 22px; }

/* ----- Оценка: сколько человек проголосовало и как ----- */
.rate__dist { display: grid; gap: 5px; margin-top: 12px; max-width: 360px; }
.rate__dist:empty { display: none; }
.rate__row { display: grid; grid-template-columns: 38px 1fr 28px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rate__bar { height: 8px; border-radius: 99px; background: rgba(127, 127, 127, .25); overflow: hidden; }
.rate__bar i { display: block; height: 100%; border-radius: 99px; background: #f5b301; }
.rate__num { text-align: right; font-variant-numeric: tabular-nums; }
.rate__row.is-mine .rate__lab { color: var(--text); font-weight: 700; }


/* ===== Плавающие элементы: cookie, уведомления, «следующая статья», «наверх» ===== */
/* Сложены в «док» у края экрана и стоят друг над другом — ничего не перекрывает друг друга. Расставляет скрипт. */
.dock { position: fixed; z-index: 90; bottom: 0; display: flex; flex-direction: column-reverse; gap: 12px; padding: 16px; max-width: 100vw; pointer-events: none; }
.dock > * { pointer-events: auto; }
.dock--bl { left: 0; align-items: flex-start; }
.dock--br { right: 0; align-items: flex-end; }
.dock--bc { left: 50%; transform: translateX(-50%); align-items: center; width: min(560px, 100vw); }
.dock--bar { left: 0; right: 0; padding: 0; gap: 0; align-items: stretch; }
.dock--bc > .cookie, .dock--bc > .notice--corner, .dock--bc > .nextcard { width: 100%; }
.dock .cookie, .dock .notice--corner { box-shadow: 0 10px 34px rgba(0, 0, 0, .35); }
.dock .totop { align-self: flex-start; }
.dock--br .totop, .dock--bc .totop { align-self: flex-start; }
/* Место под плавающие элементы резервируется внутри подвала, чтобы под ним не было светлой полосы */
.footer { padding-bottom: var(--dock-h, 0px); }
@media (max-width: 600px) {
  .dock { left: 0 !important; right: 0 !important; transform: none !important; width: auto !important; padding: 12px; align-items: stretch; }
  .dock > .cookie, .dock > .notice--corner, .dock > .nextcard { width: 100%; }
  .dock .totop { align-self: flex-start; }
}

/* Уведомление о cookie «полосой» во всю ширину */
.cookie--bar { width: 100%; border-radius: 0; border-width: 1px 0 0; padding: 14px 20px; }
.dock--bar .cookie--bar { display: flex; align-items: center; justify-content: center; gap: 12px 24px; flex-wrap: wrap; }
.dock--bar .cookie--bar[hidden] { display: none; }
.dock--bar .cookie--bar p { margin: 0; }

/* Значок в уведомлении */
.notice__icon { font-size: 20px; line-height: 1; flex: none; }
.notice--corner .notice__in { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; }
.notice--corner .notice__text { flex: 1 1 200px; min-width: 0; }
.notice--corner .notice__btn { margin-top: 0; }
.notice--center .notice__icon { display: block; margin-bottom: 8px; font-size: 32px; }
.notice--bar .notice__icon { margin-right: -4px; }

/* Логотип: светлый вариант для тёмной темы и подвала */
.logo__img--dark { display: none; }
[data-theme="dark"] .logo__img--light { display: none; }
[data-theme="dark"] .logo__img--dark { display: block; }
.footer .logo__img--light { display: none; }
.footer .logo__img--dark { display: block; }
[data-theme="dark"] .logo__img--plate, .footer .logo__img--plate { box-sizing: content-box; padding: 5px 9px; border-radius: 10px; background: #fff; }
[data-theme="dark"] .logo__img--invert, .footer .logo__img--invert { filter: invert(1) hue-rotate(180deg); }

/* Правый блок шапки (возраст, тема, поиск): всё по одной линии, одинаковые отступы */
.header__tools { align-items: center; gap: 8px; height: 40px; }
.header__tools > * { flex: none; }
.header__tools .age { box-sizing: border-box; height: 28px; min-width: 38px; padding: 0 6px; margin: 0; line-height: 1; display: inline-flex; align-items: center; justify-content: center; align-self: center; }
.header__tools .tool { box-sizing: border-box; padding: 0; line-height: 0; align-self: center; }
.header__tools .tool svg { display: block; margin: 0; }
.tool__dark, .tool__light { display: grid; place-items: center; line-height: 0; }

/* Подпись автора и колонка «о материале» показываются только в отдельных видах страницы статьи (layouts.css) */
.post-info, .post-byline { display: none; }

/* Имя автора в карточке — ссылка на страницу автора */
.card__author { color: inherit; text-decoration: none; transition: color .15s; }
.card__author:hover { color: var(--accent); text-decoration: underline; }

/* ===== Читателю: печать, «обновлено», «ещё в рубрике» ===== */
.post__upd { color: var(--muted); }
@media (hover: none), (max-width: 800px) { .errbar span { display: none; } }


/* Меню шапки: пункт «Ещё» для рубрик, которые не поместились */
.nav .nav-hidden { display: none !important; }
.nav__more .nav__menu { left: auto; right: 0; min-width: 220px; }
.nav__more.open .nav__menu { display: block; }

/* Меню шапки может сужаться (иначе оно раздвигает шапку и выталкивает кнопки за экран) */
.nav { min-width: 0; }

/* Много рубрик: в подвале список в две колонки, в меню на телефоне — тоже */
.footer__links--cols { column-count: 2; column-gap: 24px; }
.footer__links--cols li { break-inside: avoid; }
@media (max-width: 960px) {
  .header.is-open .nav { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; align-content: start; }
  .header.is-open .nav .nav__drop { grid-column: 1 / -1; }
  .header.is-open .nav .nav__link { font-size: 15px; padding: 12px 4px; }
}

/* Блок «Об авторе» под оценкой */
.authorbox { display: flex; gap: 18px; align-items: flex-start; margin: 26px 0 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.authorbox__ava { flex: none; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: var(--accent); display: grid; place-items: center; }
.authorbox__ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.authorbox__ava span { color: #fff; font-weight: 800; font-size: 34px; }
.authorbox__body { min-width: 0; display: grid; gap: 4px; }
.authorbox__label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.authorbox__name { font-size: 20px; font-weight: 800; color: var(--text); text-decoration: none; }
.authorbox__name:hover { color: var(--accent); }
.authorbox__bio { margin: 2px 0 4px; color: var(--text-2); font-size: 15.5px; line-height: 1.55; }
.authorbox__more { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; }
.authorbox__more:hover { text-decoration: underline; }
@media (max-width: 560px) { .authorbox { flex-direction: column; align-items: flex-start; padding: 18px; } .authorbox__ava { width: 68px; height: 68px; } }

/* ===== Блоки под статьёй: оценка, об авторе, соседние статьи (второе оформление) ===== */
.rate { position: relative; margin: 36px 0 18px; padding: 24px 28px; gap: 20px 28px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(120% 140% at 0 0, color-mix(in srgb, #f5b301 10%, var(--surface)) 0, var(--surface) 55%, var(--surface-2) 100%); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 8px 24px -16px rgba(0,0,0,.35); }
.rate__score { flex: none; width: 84px; height: 84px; min-width: 0; padding: 0; border: 2px solid color-mix(in srgb, #f5b301 55%, transparent); border-radius: 50%;
  display: grid; align-content: center; justify-items: center; background: color-mix(in srgb, #f5b301 12%, transparent); }
.rate__score b { font-size: 30px; }
.rate__score span { font-size: 11px; margin-top: 2px; text-transform: uppercase; letter-spacing: .06em; }
.rate__title { font-size: 19px; }
.rate__stars { gap: 6px; }
.rate__star svg { width: 34px; height: 34px; }
.rate__star.is-on svg, .rate__stars:hover .rate__star svg { filter: drop-shadow(0 2px 6px rgba(245,179,1,.35)); }
.rate__stars:hover .rate__star { color: #f5b301; }
.rate__stars .rate__star:hover ~ .rate__star { color: var(--muted); }
.rate__stars:hover .rate__star svg { fill: #f5b301; }
.rate__stars .rate__star:hover ~ .rate__star svg { fill: transparent; }
.rate .post-share-inline { margin-left: auto; padding-left: 24px; border-left: 1px solid var(--line); align-self: stretch; align-items: center; }
@media (max-width: 700px) {
  .rate { padding: 20px 18px; }
  .rate__score { width: 68px; height: 68px; border-right: 2px solid color-mix(in srgb, #f5b301 55%, transparent); padding: 0; display: grid; gap: 0; }
  .rate__score b { font-size: 24px; }
  .rate .post-share-inline { margin-left: 0; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); flex-basis: 100%; }
}

.authorbox { position: relative; gap: 20px; align-items: center; margin: 0 0 18px; padding: 24px 28px 24px 30px; border-radius: 20px; border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(135deg, var(--surface), var(--surface-2)); box-shadow: 0 8px 24px -16px rgba(0,0,0,.35); }
.authorbox::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.authorbox__ava { width: 92px; height: 92px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px color-mix(in srgb, var(--accent) 55%, transparent); }
.authorbox__body { gap: 6px; }
.authorbox__label { display: inline-block; justify-self: start; padding: 3px 10px; border-radius: 99px; font-size: 11px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.authorbox__name { font-size: 22px; line-height: 1.2; }
.authorbox__bio { margin: 0; font-size: 15.5px; }
.authorbox__more { justify-self: start; margin-top: 6px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: border-color .15s, color .15s; }
.authorbox__more b { margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; }
.authorbox__more:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
@media (max-width: 600px) { .authorbox { flex-direction: column; align-items: flex-start; padding: 22px 20px 22px 24px; } .authorbox__ava { width: 76px; height: 76px; } }

.postnav { gap: 16px; margin: 0 0 28px; }
.postnav__item { position: relative; gap: 6px; padding: 18px 20px 18px 64px; border-radius: 16px; background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.postnav__item::before { content: "←"; position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 800; transition: background .15s, color .15s; }
.postnav__item--next { text-align: right; padding: 18px 64px 18px 20px; }
.postnav__item--next::before { content: "→"; left: auto; right: 18px; }
.postnav__item:hover::before { background: var(--accent); color: #fff; }
.postnav__label { color: var(--muted); font-size: 11.5px; }
.postnav__title { font-size: 16px; }
@media (max-width: 600px) { .postnav__item--next { text-align: left; padding: 18px 20px 18px 64px; } .postnav__item--next::before { content: "→"; left: 18px; right: auto; } }

/* Шапка на телефоне: длинное название сайта сжимается, кнопки (тема, поиск, меню) всегда остаются на экране */
@media (max-width: 960px) {
  .header__in > .logo { flex: 0 1 auto; min-width: 0; }
  .logo__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header__tools { flex: none; gap: 2px; }
}
@media (max-width: 480px) {
  .header__in { gap: 8px; }
  .logo__name { font-size: 17px; }
  .header__tools .age { display: none; }
}
.share__ok { background: #ee8208; }
.share__wa { background: #25d366; }
.share__ok:hover { background: #ee8208; }
.share__wa:hover { background: #25d366; }
.share__btn b { font-size: 12px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.post-share-top { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

/* ----- Поиск в шапке: строка всегда видна (настройка «Где показывать поиск») ----- */
@media (min-width: 961px) {
  html[data-search-in] [data-search-toggle] { display: none; }
  html[data-search-in] .header__in > .hsearch, html[data-search-in] .header__in > .hsearch[hidden] { display: flex; position: relative; flex: none; width: 250px; max-width: none; margin: 0 0 0 auto; padding: 0; }
  html[data-search-in] .header__in > .hsearch .btn { display: none; }
  html[data-search-in] .header__in > .hsearch input { padding: 8px 14px; border-radius: 999px; font-size: 14px; }
  html[data-search-in] .header__in > .hsearch .hsearch__list { left: 0; right: auto; width: 360px; max-width: calc(100vw - 32px); }
  html[data-search-in] .header__in > .hsearch + .header__tools { margin-left: 8px; }
}
/* На телефоне строка поиска открывается значком и выезжает под шапкой */
@media (max-width: 960px) {
  html[data-search-in] .header__in > .hsearch { position: absolute; left: 0; right: 0; top: 100%; z-index: 35; max-width: none; margin: 0; padding: 10px 16px 12px; background: var(--header); box-shadow: 0 6px 14px rgba(0, 0, 0, .18); }
  html[data-search-in] .header__in > .hsearch[hidden] { display: none; }
  html[data-search-in] .header__in > .hsearch .hsearch__list { left: 16px; right: 16px; }
}

/* ----- Варианты блока оценки (настройка «Блок оценки статьи») ----- */
.rate--line { padding: 14px 20px; gap: 10px 20px; border-radius: 14px; background: var(--surface); box-shadow: none; }
.rate--line .rate__score { display: none; }
.rate--line .rate__main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.rate--line .rate__title { font-size: 16px; }
.rate--line .rate__star svg { width: 26px; height: 26px; }
.rate--line .rate__info { min-height: 0; font-size: 13.5px; }
.rate--line .post-share-inline { border-left: 0; padding-left: 0; }

.rate--stars { padding: 12px 0; gap: 8px 20px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.rate--stars .rate__score { display: none; }
.rate--stars .rate__title { font-size: 15px; font-weight: 600; color: var(--text-2); }
.rate--stars .rate__star svg { width: 28px; height: 28px; }
.rate--stars .rate__info { min-height: 0; font-size: 13px; }
.rate--stars .post-share-inline { border-left: 0; padding-left: 0; }

.rate--center { flex-direction: column; text-align: center; gap: 14px; padding: 28px 24px; }
.rate--center .rate__score { width: 96px; height: 96px; border-right: 2px solid color-mix(in srgb, #f5b301 55%, transparent); padding: 0; }
.rate--center .rate__score b { font-size: 36px; }
.rate--center .rate__main { justify-items: center; min-width: 0; width: 100%; }
.rate--center .rate__stars { justify-content: center; margin-left: 0; }
.rate--center .post-share-inline { margin: 0; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); width: 100%; justify-content: center; align-self: auto; }
.post-share-solo { margin: 24px 0 8px; }
@media (max-width: 700px) {
  .rate--line .rate__score, .rate--stars .rate__score { display: none; }
  .rate--center .rate__score { width: 84px; height: 84px; display: grid; }
}

/* ----- Шаблон статьи «Рецепт» ----- */
.rc { margin: 28px 0 8px; display: grid; gap: 30px; }
.rc-h { margin: 0 0 14px; font-size: 22px; font-weight: 800; color: var(--text); }
.rc-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.rc-fact { display: grid; gap: 2px; min-width: 120px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rc-fact span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rc-fact b { font-size: 16px; color: var(--text); }
.rc-ing { max-width: 560px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.rc-ing__list { list-style: none; margin: 0; padding: 0; }
.rc-ing__list li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.rc-ing__n { flex: 1; min-width: 0; display: grid; }
.rc-ing__n b { font-weight: 700; }
.rc-ing__n small { color: var(--muted); font-size: 13px; }
.rc-ing__q { flex: none; text-align: right; color: var(--text-2); white-space: nowrap; }
.rc-serv { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.rc-serv__t { flex: 1; font-weight: 700; }
.rc-serv__b { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.rc-serv__b:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.rc-serv__b:disabled { opacity: .4; cursor: default; }
.rc-serv__n { min-width: 32px; text-align: center; font-weight: 800; font-size: 20px; color: var(--accent); }
.rc-nut__row { display: flex; flex-wrap: wrap; gap: 22px; }
.rc-ring { display: grid; justify-items: center; gap: 8px; }
.rc-ring__n { display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; text-align: center; font-size: 12px; line-height: 1.15;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 80%), conic-gradient(var(--accent) calc(var(--p) * 1%), color-mix(in srgb, var(--accent) 16%, transparent) 0); }
.rc-ring__n b { display: block; font-size: 19px; }
.rc-ring__l { font-size: 13px; color: var(--muted); }
.rc-nut__note { margin: 10px 0 0; font-size: 13px; font-style: italic; color: var(--muted); }
.rc-steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.rc-step { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 20px; row-gap: 8px; align-items: start; }
.rc-step__no { grid-column: 1 / -1; font-size: 20px; font-weight: 800; color: var(--accent); }
.rc-step__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: var(--surface); }
.rc-step__t p { margin: 0 0 8px; line-height: 1.6; }
.rc-step--noimg { grid-template-columns: minmax(0, 1fr); }
.rc-tip { padding: 18px 22px; border-left: 5px solid var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.rc-tip p { margin: 0 0 8px; line-height: 1.6; }
.rc-tip p:last-child { margin-bottom: 0; }
@media (max-width: 700px) { .rc-step { grid-template-columns: minmax(0, 1fr); } .rc-ing { padding: 16px; } }

/* ----- Рецепт: свойства-ссылки, кольца КБЖУ, частые вопросы ----- */
.rc-fact--prop b { font-weight: 600; font-size: 15px; line-height: 1.4; }
.rc-fact--prop a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.rc-fact--prop a:hover { text-decoration-color: var(--accent); }
.rc-sep { margin: 0 5px; color: var(--muted); font-weight: 400; }

.rc-nut { padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.rc-nut__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rc-ring { --c: var(--accent); display: grid; justify-items: center; gap: 10px; }
.rc-ring--p { --c: #34a36a; }
.rc-ring--f { --c: #e29a26; }
.rc-ring--c { --c: #3b82d6; }
.rc-ring__n { position: relative; display: grid; place-content: center; justify-items: center; gap: 1px; width: 96px; height: 96px; text-align: center; }
.rc-ring__n::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), color-mix(in srgb, var(--c) 16%, transparent) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px)); mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px)); }
.rc-ring__n b, .rc-ring__n i { position: relative; }
.rc-ring__n b { font-size: 24px; font-weight: 800; line-height: 1; color: var(--text); }
.rc-ring__n i { font-style: normal; font-size: 12px; color: var(--muted); }
.rc-ring__l { font-size: 13px; font-weight: 600; color: var(--text-2); }
.rc-nut__note { margin: 14px 0 0; font-size: 13px; color: var(--muted); font-style: normal; }
@media (max-width: 520px) { .rc-nut__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; } }

.rc-faq__list.content { margin: 0; }
.rc-faq .spoiler { margin: 0 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.rc-faq .spoiler:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.rc-faq .spoiler.is-open { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .35); }
.rc-faq .spoiler__title { padding: 16px 52px 16px 20px; background: none; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--text); }
.rc-faq .spoiler__title::before { left: auto; right: 22px; width: 9px; height: 9px; margin-top: -7px; border-color: var(--accent); }
.rc-faq .spoiler.is-open .spoiler__title::before { margin-top: -3px; transform: rotate(-135deg); }
.rc-faq .spoiler__body { padding: 0 20px 14px; color: var(--text-2); line-height: 1.65; }
.rc-faq .spoiler__body p { margin: 0 0 8px; }

/* Строка поиска под шапкой: небольшой отступ сверху, чтобы не прилипала к меню */
.header > .hsearch { padding-top: 12px; }
@media (max-width: 960px) { .header > .hsearch { padding-top: 10px; } }

/* ----- Подвал: настройки «Подвал сайта» ----- */
.footer__in--legal.footer__in--noage { grid-template-columns: 1fr; }
.footer__in--legal.footer__in--btn { grid-template-columns: auto 1fr auto; align-items: center; }
.footer__in--legal.footer__in--noage.footer__in--btn { grid-template-columns: 1fr auto; }
.footer__contact { white-space: nowrap; color: #fff !important; text-decoration: none !important; }
@media (max-width: 960px) { .footer__in--legal.footer__in--btn, .footer__in--legal.footer__in--noage.footer__in--btn { grid-template-columns: 1fr; } .footer__contact { justify-self: start; } }
.footer--light { background: var(--surface); color: var(--text-2); border-top: 1px solid var(--line); }
.footer--light a { color: var(--text); }
.footer--light a:hover { color: var(--accent); }
.footer--light .logo__name, .footer--light .footer__title { color: var(--text); }
.footer--light .footer__legal { border-top-color: var(--line); color: var(--muted); }
.footer--light .age { border-color: var(--muted); color: var(--muted); }
.footer--accent { background: var(--accent); color: rgba(255, 255, 255, .88); }
.footer--accent a, .footer--accent .logo__name, .footer--accent .footer__title { color: #fff; }
.footer--accent .footer__legal { border-top-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .8); }
.footer--accent .age { border-color: rgba(255, 255, 255, .7); color: rgba(255, 255, 255, .85); }
.footer--accent .footer__contact { background: #fff; color: var(--accent) !important; }

/* ----- Страница автора ----- */
.authorhero { display: flex; gap: 28px; align-items: center; margin: 4px 0 30px; padding: 28px 32px; border: 1px solid var(--line); border-radius: 22px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--surface), var(--surface-2)); box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .45); }
.authorhero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); }
.authorhero__ava { flex: none; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--accent) 55%, transparent); }
.authorhero__ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.authorhero__ava span { color: #fff; font-weight: 800; font-size: 54px; }
.authorhero__body { min-width: 0; display: grid; gap: 8px; justify-items: start; }
.authorhero__label { padding: 3px 12px; border-radius: 99px; font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.authorhero__name { margin: 0; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; }
.authorhero__bio p { margin: 0 0 8px; max-width: 720px; font-size: 16.5px; line-height: 1.65; color: var(--text-2); }
.authorhero__stats { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; margin: 4px 0 0; padding: 0; }
.authorhero__stats li { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; color: var(--muted); }
.authorhero__stats b { color: var(--text); }
@media (max-width: 700px) { .authorhero { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 20px 22px 26px; } .authorhero__ava { width: 104px; height: 104px; } .authorhero__ava span { font-size: 42px; } }

/* ----- Шаблон статьи «Автомобиль» ----- */
.car { margin: 26px 0 8px; display: grid; gap: 28px; }
.car-h { margin: 0 0 14px; font-size: 22px; font-weight: 800; }
.car-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.car-fact { display: grid; gap: 2px; min-width: 130px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.car-fact span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.car-fact b { font-size: 16px; color: var(--text); }
.car-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.car-scroll:focus-visible { outline: 2px solid var(--accent); }
.car-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.car-table th, .car-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.car-table thead th { position: sticky; top: 0; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: var(--text); }
.car-table tbody th { font-weight: 700; color: var(--text); white-space: normal; min-width: 190px; position: sticky; left: 0; background: var(--surface); }
.car-table tbody tr:last-child th, .car-table tbody tr:last-child td { border-bottom: 0; }
.car-table tbody tr:hover td, .car-table tbody tr:hover th { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.car-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.car-group { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.car-group__t { margin: 0 0 8px; font-size: 16px; font-weight: 800; color: var(--accent); }
.car-group__l { margin: 0; }
.car-group__l > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.car-group__l > div:last-child { border-bottom: 0; }
.car-group__l dt { color: var(--text-2); }
.car-group__l dd { margin: 0; font-weight: 700; text-align: right; }
@media (max-width: 800px) { .car-groups { grid-template-columns: 1fr; } .car-table th, .car-table td { padding: 10px 12px; } }
.card__spec { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.car, .car > *, .car-block { min-width: 0; max-width: 100%; }
.car-scroll { max-width: 100%; }

/* ----- Автокаталог ----- */
.cat-h1 { margin: 6px 0 4px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; font-weight: 800; }
.cat-h2 { margin: 26px 0 12px; font-size: 22px; font-weight: 800; }
.cat-lead { margin: 0 0 18px; color: var(--text-2); font-size: 16px; }
.cat-desc { margin: 0 0 18px; max-width: 820px; line-height: 1.65; color: var(--text-2); }
.cat-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.cat-head__img { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 8px; }
.cat-head__img img, .cat-brand__img img, .cat-row__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.cat-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-brand { display: grid; grid-template-rows: 92px auto auto; justify-items: center; align-items: center; gap: 4px; padding: 14px 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; transition: border-color .15s, transform .15s; }
.cat-brand:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-brand__img { width: 100%; height: 92px; display: grid; place-items: center; background: #fff; border-radius: 10px; padding: 10px; box-sizing: border-box; }
.cat-brand__img i { font-style: normal; font-weight: 800; font-size: 34px; color: var(--accent); }
.cat-brand b { font-size: 16px; color: var(--text); }
.cat-brand small { color: var(--muted); font-size: 12.5px; }
.cat-letters { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 22px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cat-letters a { min-width: 34px; padding: 6px 8px; text-align: center; font-weight: 800; border-radius: 8px; color: var(--text); }
.cat-letters a:hover { background: var(--accent); color: #fff; }
.cat-group { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px 14px; margin-bottom: 8px; scroll-margin-top: 90px; }
.cat-group__letter { font-size: 40px; font-weight: 900; line-height: 1; color: var(--accent); padding-top: 12px; }
.cat-list { display: grid; gap: 12px; }
.cat-row { display: grid; grid-template-columns: 120px minmax(0, 1.6fr) auto; align-items: center; gap: 16px; padding: 12px 18px 12px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s; }
.cat-row:hover { border-color: var(--accent); }
.cat-row__img { height: 80px; display: grid; place-items: center; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); }
.cat-row__img:empty { background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); }
.cat-row__img img { width: 100%; height: 100%; object-fit: cover; }
.cat-row__main { display: grid; gap: 4px; min-width: 0; }
.cat-row__main b { font-size: 18px; color: var(--text); }
.cat-row__main small { color: var(--muted); font-size: 14px; }
.cat-row__side { text-align: right; color: var(--muted); font-size: 13px; white-space: nowrap; }
.cat-row__side b { font-size: 22px; color: var(--text); }
.cat-row__side em { display: block; margin-top: 4px; font-style: normal; font-weight: 800; color: var(--accent); }
.cat-row--gen { grid-template-columns: 150px minmax(0, 1.2fr) minmax(0, 1.6fr) auto; }
.cat-row--gen .cat-row__img { height: 96px; }
.cat-row--mod { grid-template-columns: minmax(0, 1.4fr) 130px minmax(0, 3fr); padding: 14px 18px; }
.cat-row__years { color: var(--accent); font-weight: 800; }
.cat-row__spec { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.cat-row__spec span { display: grid; gap: 1px; font-weight: 700; color: var(--text); }
.cat-row__spec em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
.cat-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.cat-gallery img { height: 120px; width: auto; border-radius: 10px; display: block; }
.cat-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.cat-fact { display: grid; gap: 2px; min-width: 120px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cat-fact span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cat-fact b { font-size: 15px; }
.cat-mod { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 14px; }
.cat-mod__side, .cat-mod__main { display: grid; gap: 18px; min-width: 0; }
.cat-photos__main img { width: 100%; height: auto; border-radius: 14px; display: block; }
.cat-photos__more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.cat-photos__more img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.cat-table, .cat-qa { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.cat-table__h { margin: 0; padding: 12px 18px; font-size: 17px; font-weight: 800; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-bottom: 1px solid var(--line); }
.cat-table dl, .cat-qa dl { margin: 0; }
.cat-table dl > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.cat-table dl > div:last-child, .cat-qa dl > div:last-child { border-bottom: 0; }
.cat-table dt { color: var(--text-2); }
.cat-table dd { margin: 0; font-weight: 700; text-align: right; }
.cat-qa__name { margin: 0; padding: 12px 18px 4px; font-weight: 700; }
.cat-qa dl > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 14px; }
.cat-qa dt { color: var(--text-2); }
.cat-qa dd { margin: 0; font-weight: 700; }
@media (max-width: 900px) {
  .cat-mod { grid-template-columns: 1fr; }
  .cat-row, .cat-row--gen, .cat-row--mod { grid-template-columns: 96px minmax(0, 1fr); }
  .cat-row--mod { grid-template-columns: 1fr; gap: 6px; }
  .cat-row__side, .cat-row__spec { grid-column: 1 / -1; text-align: left; }
  .cat-group { grid-template-columns: 1fr; }
  .cat-group__letter { font-size: 28px; padding-top: 0; }
}
.cat-row--gnr { grid-template-columns: 110px minmax(0, 1.5fr) minmax(0, 1.6fr) auto; }
@media (max-width: 900px) { .cat-row--gnr { grid-template-columns: 96px minmax(0, 1fr); } }

/* Логотипы в каталоге: вписываются в рамку целиком и не вылезают за неё */
.cat-brand__img { overflow: hidden; }
.cat-brand__img img { max-width: 100%; max-height: 72px; width: auto; height: auto; object-fit: contain; }
.cat-head__img { overflow: hidden; }
.cat-head__img img { max-width: 100%; max-height: 46px; width: auto; height: auto; object-fit: contain; }
