/* ПензаСМИ — тема сайта (модернизация 2026). Единственный файл стилей публичной части (+ шрифты в fonts.css).
   Этап 1: токены, шрифт, контейнер, шапка, меню, мобильная панель, подвал, рекламные места.
   Этап 2: карточки материалов и главная. Этап 3: разделы, галереи, поиск. Этап 4: статья, фотогалерея, страница ошибки.
   Адреса файлов в шаблонах — с версией по времени изменения (Asset::url), браузер берёт новую версию сам. */

:root {
    --font: "Golos Text", "Golos Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --brand: #de2826;
    --brand-dark: #b71d1b;
    --brand-soft: #fdeceb;

    --text: #1f2328;
    --text-2: #474e58;
    --muted: #68707b;          /* 4,9:1 на белом — подписи, время, рубрики */
    --bg: #f3f5f8;
    --surface: #ffffff;
    --line: #e3e7ec;
    --field: #eef1f5;

    --footer-bg: #1d2025;
    --footer-text: #d2d6dc;
    --footer-muted: #9ba3ae;   /* 6,9:1 на фоне подвала */

    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 10px rgba(16, 24, 40, .06);

    --container: 1260px;
    --gutter: clamp(16px, 3vw, 32px);
    --header-h: 76px;
    --nav-h: 50px;
}

/* Базовый сброс (вместо старых style.css и add.css — удалены на этапе очистки) */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    vertical-align: bottom;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
    font-family: var(--font);
    line-height: 1.4;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.content_wrapper {
    padding-top: 20px;
    background: var(--bg);
}

.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
    box-sizing: border-box;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Слайдеры: контейнер по ширине блока (было встроенным стилем в <head>) */
.swiper-container {
    width: 100%;
    height: 100%;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 200;
    width: auto;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: #fff;
    font: 600 15px/1 var(--font);
}

.skip-link:focus {
    top: 12px;
}

/* ---------------------------------------------------------------- Кнопки-иконки */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.icon-button:hover {
    background: var(--field);
}

/* ---------------------------------------------------------------- Шапка */
.site-header {
    display: block;
    margin: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 50;
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-h);
}

.site-header a,
.site-nav a,
.site-drawer a,
.site-footer a {
    width: auto;
}

.site-header a:hover,
.site-nav a:hover,
.site-drawer a:hover,
.site-footer a:hover {
    opacity: 1;
}

.site-header__logo {
    display: block;
    flex: none;
}

.site-header__logo img {
    display: block;
    height: 50px;
    width: auto;
}

.site-header__actions {
    display: none;
    margin-left: auto;
    gap: 2px;
}

/* Поиск */
.site-search {
    position: relative;
    flex: 0 1 360px;
    margin: 0 0 0 auto;
}

.site-search__input {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 46px 0 18px;
    border: 1px solid transparent;
    border-radius: 21px;
    background: var(--field);
    color: var(--text);
    font: 400 15px/1 var(--font);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.site-search__input::placeholder {
    color: var(--muted);
}

.site-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.site-search__input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(222, 40, 38, .14);
}

.site-search__button {
    position: absolute;
    top: 3px;
    right: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.site-search__button:hover {
    color: var(--brand);
}

/* Соцсети */
.site-social,
.site-drawer__foot,
.site-footer__social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-social {
    flex: none;
}

/* Соцсети: знак в круге. Спокойный цвет, при наведении — фирменный цвет соцсети */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--field);
    color: var(--text-2);
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.social-link svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* Общие правила ссылок шапки и подвала (.site-footer a — display: inline) не должны менять размер кнопок */
.site-header .social-link,
.site-drawer .social-link,
.site-footer .social-link,
.share .social-link {
    display: inline-flex;
    width: 38px;
    height: 38px;
    margin: 0;
}

.share .share__link {
    width: 34px;
    height: 34px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
}

.social-link:hover,
.social-link:focus-visible {
    color: #fff;
    transform: translateY(-1px);
}

.social-link.social-link--vk:hover,
.social-link.social-link--vk:focus-visible {
    background: #0077ff;
}

.social-link.social-link--ok:hover,
.social-link.social-link--ok:focus-visible {
    background: #ee8208;
}

.social-link.social-link--dzen:hover,
.social-link.social-link--dzen:focus-visible {
    background: #000;
}

.social-link.social-link--telegram:hover,
.social-link.social-link--telegram:focus-visible {
    background: #229ed9;
}

/* ---------------------------------------------------------------- Меню разделов (закрепляется при прокрутке) */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 45;
    background: var(--brand);
    transition: box-shadow .2s ease;
}

.site-nav.is-stuck {
    box-shadow: 0 2px 12px rgba(16, 24, 40, .18);
}

.site-nav__list {
    display: flex;
    align-items: stretch;
    height: var(--nav-h);
    margin: 0 0 0 -14px;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav__list::-webkit-scrollbar {
    display: none;
}

.site-nav__list li {
    flex: none;
}

.site-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    color: #fff;
    font: 500 16px/1 var(--font);
    white-space: nowrap;
    text-decoration: none;
}

.site-nav__link:hover {
    background: rgba(0, 0, 0, .1);
}

.site-nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #fff;
}

/* ---------------------------------------------------------------- Мобильная панель меню */
.site-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
}

.site-drawer[hidden] {
    display: none;
}

.site-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 22, .5);
    animation: drawer-fade .2s ease-out;
}

.site-drawer__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(380px, 100%);
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    box-shadow: -8px 0 32px rgba(16, 24, 40, .2);
    animation: drawer-in .22s ease-out;
}

.site-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 8px 0 20px;
    border-bottom: 1px solid var(--line);
    flex: none;
}

.site-drawer__logo img {
    display: block;
    height: 36px;
    width: auto;
}

.site-search--drawer {
    flex: none;
    margin: 16px 20px 8px;
}

.site-drawer__nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.site-drawer__link {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 0 20px;
    border-left: 3px solid transparent;
    color: var(--text);
    font: 500 17px/1.2 var(--font);
    text-decoration: none;
}

.site-drawer__link:hover {
    background: var(--bg);
}

.site-drawer__link.is-active {
    border-left-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.site-drawer__foot {
    flex-wrap: wrap;
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid var(--line);
}

html.is-drawer-open,
html.is-drawer-open body {
    overflow: hidden;
}

@keyframes drawer-in {
    from { transform: translateX(100%); }
    to { transform: none; }
}

@keyframes drawer-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .site-drawer__panel,
    .site-drawer__backdrop {
        animation: none;
    }
}

/* ---------------------------------------------------------------- Скрыто визуально, доступно экранным чтецам */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------- Кнопки «Поделиться» (локальные ссылки) */
.share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

.share__link {
    position: relative;
    padding: 0;
    border: 0;
    cursor: pointer;
}

.share__link svg {
    width: 18px;
    height: 18px;
}

.share__link--copy:hover,
.share__link--copy.is-copied {
    background: var(--text);
    color: #fff;
}

.share__link--copy.is-copied::after {
    content: "Ссылка скопирована";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--text);
    color: #fff;
    font: 500 13px/1.2 var(--font);
    white-space: nowrap;
    pointer-events: none;
}

/* ---------------------------------------------------------------- Рекламные места */
.ad-slot {
    margin-bottom: 20px;
}

.ad-slot__link {
    display: block;
    width: 100%;
    line-height: 0;
}

.ad-slot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* У картинки баннера есть атрибуты width/height (место резервируется заранее) — пропорции сохраняет height: auto */
.ad-slot__link img {
    max-width: 100%;
    height: auto;
}

.ad-slot--mobile {
    display: none;
}

/* Вставки из файлов ads/*.php (включаются в админке, «Настройки»): разметка в файлах старая — задаём вид здесь */
.ad-slot--strip {
    padding-top: 12px;
    padding-bottom: 12px;
}

.ad-slot--strip a,
.ad-slot--split a {
    display: block;
    line-height: 0;
}

.ad-slot--strip img,
.ad-slot--split img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.ad-slot--strip img + img {
    display: none;
}

/* Картинки вставок на главной рассчитаны на ширину карточки — не растягиваем их больше исходного размера */
.ad-slot--split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 280px));
    justify-content: center;
    gap: 20px;
}

.ad-slot--split img {
    width: auto;
    max-width: 100%;
    margin-inline: auto;
}

/* ---------------------------------------------------------------- Подвал */
.site-footer {
    display: block;
    margin-top: 48px;
    background: var(--footer-bg);
    color: var(--footer-text);
    font: 400 15px/1.6 var(--font);
}

.site-footer a {
    display: inline;
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 32px 48px;
    padding-top: 44px;
    padding-bottom: 36px;
}

.site-footer__logo {
    display: inline-block;
}

.site-footer__logo img {
    display: block;
    height: 46px;
    width: auto;
}

.site-footer p {
    margin: 0 0 12px;
}

.site-footer__about > p {
    margin: 14px 0 20px;
    color: var(--footer-muted);
}

.site-footer .social-link {
    background: rgba(255, 255, 255, .08);
    color: var(--footer-text);
}

.site-footer__title {
    margin: 0 0 14px;
    color: var(--footer-muted);
    font: 600 13px/1.2 var(--font);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.site-footer__nav ul {
    columns: 2;
    column-gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__nav li {
    margin: 0 0 10px;
    break-inside: avoid;
}

.site-footer__legal {
    display: grid;
    gap: 10px;
    padding-top: 0;
    padding-bottom: 28px;
    color: var(--footer-muted);
    font-size: 13px;
    line-height: 1.55;
}

.site-footer__legal p {
    margin: 0;
    max-width: 1100px;
}

/* Линия над юридическим текстом — по ширине колонок, а не всего контейнера с полями */
.site-footer__legal > p:first-child {
    max-width: none;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .09);
}

/* Ссылки в тексте подчёркнуты; при наведении подчёркивание убирается (как в cookie-баннере) */
.site-footer__legal a {
    color: var(--footer-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer__legal a:hover {
    color: #fff;
    text-decoration: none;
}

.age-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    padding: 1px 6px;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-weight: 600;
    line-height: 1.4;
}

.site-footer__counters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 31px;
    margin-top: 6px;
}

.site-footer__counters a {
    display: inline-block;
    line-height: 0;
}

/* ---------------------------------------------------------------- Ноутбуки 1024–1299: поиск в шапке уже */
@media (min-width: 1024px) and (max-width: 1299.98px) {
    .site-search {
        flex-basis: 300px;
    }
}

/* ---------------------------------------------------------------- Планшеты и телефоны (< 1024): компактная шапка */
@media (max-width: 1023.98px) {
    :root {
        --header-h: 60px;
    }

    .site-header {
        position: sticky;
        top: 0;
    }

    .site-header__inner {
        gap: 8px;
    }

    .site-header__logo img {
        height: 38px;
    }

    .site-header .site-search,
    .site-social,
    .site-nav {
        display: none;
    }

    .site-header__actions {
        display: flex;
        margin-right: -10px;
    }

    html {
        scroll-padding-top: calc(var(--header-h) + 12px);
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__about {
        grid-column: 1 / -1;
    }
}

/* ---------------------------------------------------------------- Телефоны (< 768) */
@media (max-width: 767.98px) {
    .ad-slot--desktop {
        display: none;
    }

    .ad-slot--strip img:first-child {
        display: none;
    }

    .ad-slot--strip img + img {
        display: block;
    }

    .ad-slot--mobile {
        display: block;
        margin-bottom: 12px;
    }

    .content_wrapper {
        padding-top: 12px;
    }

    .site-footer {
        margin-top: 32px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 32px;
    }
}

@media (max-width: 380px) {
    .site-header__logo img {
        height: 34px;
    }
}

/* ================================================================ Этап 2. Карточки материалов (общие для новых страниц) */

/* Время и рубрика над заголовком */
.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    margin: 0 0 6px;
    color: var(--muted);
    font: 500 13px/1.35 var(--font);
    font-variant-numeric: tabular-nums;
}

.meta time {
    white-space: nowrap;
}

.meta__rubric {
    position: relative;
    z-index: 1; /* над растянутой ссылкой карточки — рубрика кликается отдельно */
    display: inline;
    width: auto;
    color: var(--brand-dark);
    font-weight: 600;
    text-decoration: none;
}

/* Наведение: мягкая подложка (тень того же цвета расширяет её, не сдвигая текст); подчёркивание — только у ссылок в тексте */
a.meta__rubric {
    border-radius: 3px;
    transition: background-color .15s ease, box-shadow .15s ease, color .15s ease;
}

a.meta__rubric:hover {
    background: var(--brand-soft);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.feed__hour a.meta__rubric:hover {
    background: #fff;
    box-shadow: 0 0 0 4px #fff;
}

/* Карточка целиком кликабельна: ссылка заголовка растянута на всю карточку (::after) */
.card,
.story {
    position: relative;
}

.card__link {
    display: inline;
    width: auto;
    color: inherit;
    text-decoration: none;
}

.card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.card__link:hover {
    opacity: 1;
    color: var(--brand-dark);
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card__media {
    position: relative;
    flex: none;
    aspect-ratio: 16 / 10;
    background: var(--field);
    overflow: hidden;
}

.card__media img,
.hero__media img,
.culture__media img,
.opinion__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card__media img {
    transition: transform .35s ease;
}

.card:hover .card__media img {
    transform: scale(1.03);
}

.card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 18px;
}

.card__title {
    margin: 0;
    color: var(--text);
    font: 600 18px/1.3 var(--font);
}

.card__lead {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--text-2);
    font: 400 15px/1.5 var(--font);
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.story__title {
    margin: 0;
    color: var(--text);
    font: 500 16px/1.38 var(--font);
}

/* Список заголовков на белой подложке */
.headlines {
    margin: 0;
    padding: 2px 18px;
    list-style: none;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.headlines > li {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.headlines > li:first-child {
    border-top: 0;
}

/* Заголовок блока: красная черта слева, справа ссылка «Все материалы» */
.block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
}

.block-head__title,
.feed__title {
    position: relative;
    margin: 0;
    padding-left: 14px;
    color: var(--text);
    font: 700 22px/1.2 var(--font);
}

.block-head__title::before,
.feed__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .14em;
    bottom: .14em;
    width: 4px;
    border-radius: 2px;
    background: var(--brand);
}

.block-head__more,
.culture__more,
.feed__all {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    width: auto;
    color: var(--brand-dark);
    font: 500 14px/1.2 var(--font);
    white-space: nowrap;
    text-decoration: none;
}

.block-head__more svg,
.culture__more svg,
.feed__all svg {
    transition: transform .2s ease;
}

/* Наведение: цвет ярче, стрелка сдвигается вправо */
.block-head__more:hover,
.feed__all:hover {
    color: var(--brand);
}

.block-head__more:hover svg,
.culture__more:hover svg,
.feed__all:hover svg {
    transform: translateX(3px);
}

/* Кнопки */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 22px;
    font: 600 15px/1 var(--font);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.button--outline {
    border-color: var(--line);
    background: var(--surface);
    color: var(--text);
}

.button--outline:hover {
    opacity: 1;
    border-color: var(--brand);
    color: var(--brand-dark);
}

/* ================================================================ Этап 2. Главная */
.home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
}

.home__main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

.home__aside {
    min-width: 0;
}

/* Тема дня: картинка во всю карточку, текст на затемнении */
.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 380px;
    aspect-ratio: 2 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: #1d2025;
    color: #fff;
}

.hero__media {
    position: absolute;
    inset: 0;
}

.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 14, 18, .5) 0%, rgba(12, 14, 18, 0) 65%),
        linear-gradient(180deg, rgba(12, 14, 18, 0) 25%, rgba(12, 14, 18, .6) 55%, rgba(12, 14, 18, .92) 100%);
}

.hero__body {
    position: relative;
    max-width: 780px;
    padding: 28px 32px 30px;
}

.hero .meta {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, .85);
}

.hero .meta__rubric {
    padding: 4px 9px;
    border-radius: 4px;
    background: var(--brand);
    color: #fff;
}

.hero__title {
    margin: 0;
    color: #fff;
    font: 700 clamp(24px, 2.5vw, 34px)/1.18 var(--font);
    text-wrap: balance;
}

/* Наведение: фото плавно чуть увеличивается, заголовок остаётся белым */
.hero .card__link:hover {
    color: #fff;
}

.hero__media img {
    transition: transform .6s ease;
}

.hero:hover .hero__media img {
    transform: scale(1.035);
}

.hero a.meta__rubric:hover {
    background: var(--brand-dark);
    box-shadow: none;
}

.hero__lead {
    display: -webkit-box;
    max-width: 680px;
    margin: 12px 0 0;
    overflow: hidden;
    color: rgba(255, 255, 255, .86);
    font: 400 17px/1.5 var(--font);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* «Главное»: крупная карточка и список рядом */
.lead-list {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.card--lead .card__title {
    font-size: 21px;
    line-height: 1.28;
}

/* «Важно»: три карточки в ряд */
.cards {
    display: grid;
    gap: 20px;
}

.cards--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card--tile .card__title {
    font-size: 17px;
}

/* Рекламное место между блоками */
.ad-slot--inline {
    margin: 0;
}

/* Блоки рубрик: по два в ряд */
.rubrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
}

.rubric {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card--rubric {
    margin-bottom: 12px;
}

.card--rubric .card__media {
    aspect-ratio: 16 / 9;
}

.headlines--compact > li {
    padding: 12px 0;
}

.headlines--compact .story__title {
    font-size: 15px;
}

/* «Пенза — город культуры» */
.culture {
    position: relative;
    padding: 28px 28px 30px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #2b1f1c url(/assets/images/culture-bg.jpg) center / cover no-repeat;
    color: #fff;
}

.culture::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(22, 14, 12, .5) 0%, rgba(22, 14, 12, .88) 70%);
}

.culture > * {
    position: relative;
}

.culture__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.culture__title {
    margin: 0;
    color: #fff;
    font: 700 clamp(24px, 2.4vw, 32px)/1.15 var(--font);
}

.culture__more {
    color: #fff;
}

.culture__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.culture__item {
    position: relative;
    min-width: 0;
}

.culture__media {
    aspect-ratio: 4 / 3;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
}

.culture__item-title {
    margin: 0;
    color: #fff;
    font: 500 15px/1.38 var(--font);
}

/* Наведение: фото чуть увеличивается, подпись остаётся белой */
.culture .card__link:hover {
    color: #fff;
}

.culture__media img {
    transition: transform .4s ease;
}

.culture__item:hover .culture__media img {
    transform: scale(1.05);
}

/* «Мнения»: фото автора в круге и цитата */
.opinion-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.opinion {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
    padding: 18px 20px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.opinion__photo {
    flex: none;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--field);
}

.opinion__photo img {
    object-position: 50% 30%;
    transition: transform .35s ease;
}

.opinion:hover .opinion__photo img {
    transform: scale(1.06);
}

.opinion__body {
    min-width: 0;
}

.opinion__author {
    margin: 0 0 4px;
    color: var(--text);
    font: 600 15px/1.3 var(--font);
}

.opinion__quote {
    margin: 0;
    color: var(--text-2);
    font: 400 16px/1.45 var(--font);
}

.opinion__date {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font: 500 13px/1 var(--font);
}

/* Лента «Новости» справа. Прокручивается со страницей; когда кончается — остаётся у края экрана (site.js задаёт top) */
.feed {
    position: sticky;
    top: calc(var(--nav-h) + 16px);
    padding: 18px 20px 20px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feed__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.feed__hour {
    position: relative;
    margin: 0 -20px;
    padding: 14px 20px 16px;
    border-left: 4px solid var(--brand);
    background: var(--brand-soft);
}

.feed__label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    color: var(--brand-dark);
    font: 700 12px/1 var(--font);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.feed__hour-title {
    margin: 0;
    color: var(--text);
    font: 600 17px/1.35 var(--font);
}

.feed__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feed__item,
.feed__ad {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.feed__hour + .feed__list > li:first-child {
    border-top: 0;
}

.feed .meta time {
    color: var(--text-2);
    font-weight: 600;
}

.feed__item .story__title {
    font-size: 15px;
    line-height: 1.4;
}

.feed__item--pinned .story__title {
    font-weight: 600;
}

.ad-slot--feed {
    margin: 0;
}

/* Баннер в ленте не растягивается больше своего размера (на планшете лента во всю ширину) */
.ad-slot--feed img {
    width: auto;
    max-width: 100%;
    margin-inline: auto;
}

.feed__more {
    display: flex;
    width: 100%;
    margin-top: 8px;
}

/* Ноутбуки: лента уже */
@media (max-width: 1299.98px) {
    .home {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 24px;
    }

    .feed {
        padding-inline: 16px;
    }

    .feed__hour {
        margin-inline: -16px;
        padding-inline: 12px 16px;
    }

    .hero__body {
        padding: 24px 26px 26px;
    }
}

/* Ноутбуки 1024–1199: основная колонка ~620 px — карточки «Важно» компактнее */
@media (min-width: 1024px) and (max-width: 1199.98px) {
    .cards--3 {
        gap: 14px;
    }

    .card--tile .card__body {
        padding: 12px 12px 14px;
    }

    .card--tile .card__title {
        font-size: 15px;
        line-height: 1.35;
    }
}

/* Планшеты и телефоны: одна колонка. Порядок: тема дня, лента, остальные блоки */
@media (max-width: 1023.98px) {
    .home {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .home__main,
    .home__aside {
        display: contents;
    }

    .home__main > * {
        order: 3;
    }

    .home .hero {
        order: 1;
    }

    .feed {
        position: static;
        order: 2;
    }

    .feed__item--extra {
        display: none;
    }

    .feed__more {
        margin-top: 4px;
    }
}

@media (max-width: 899.98px) {
    .culture__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Телефоны */
@media (max-width: 767.98px) {
    .home {
        gap: 28px;
    }

    .block-head {
        margin-bottom: 12px;
    }

    .block-head__title,
    .feed__title {
        font-size: 20px;
    }

    /* Тема дня: картинка сверху, текст под ней на тёмной подложке, во всю ширину экрана */
    .hero {
        display: block;
        min-height: 0;
        aspect-ratio: auto;
        margin-inline: calc(-1 * var(--gutter));
        border-radius: 0;
    }

    .hero__media {
        position: relative;
        aspect-ratio: 16 / 9;
    }

    .hero__media::after {
        background: linear-gradient(180deg, rgba(29, 32, 37, 0) 55%, #1d2025 100%);
    }

    .hero__body {
        padding: 4px var(--gutter) 22px;
    }

    .hero__title {
        font-size: 23px;
        line-height: 1.22;
    }

    .hero__lead {
        font-size: 16px;
    }

    .feed {
        padding: 16px 16px 18px;
    }

    .feed__hour {
        margin-inline: -16px;
        padding-inline: 12px 16px;
    }

    .lead-list,
    .rubrics,
    .opinion-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .rubrics {
        gap: 32px;
    }

    .card--lead .card__title {
        font-size: 20px;
    }

    /* «Важно»: строки с картинкой слева */
    .cards--3 {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .cards--3 .card--tile {
        flex-direction: row;
    }

    .cards--3 .card--tile .card__media {
        width: 116px;
        min-height: 92px;
        aspect-ratio: auto;
    }

    .cards--3 .card--tile .card__body {
        padding: 10px 14px 12px;
    }

    .cards--3 .card--tile .card__title {
        font-size: 16px;
        line-height: 1.32;
    }

    .culture {
        padding: 22px 16px;
    }

    .culture__head {
        flex-wrap: wrap;
        margin-bottom: 16px;
    }

    .culture__grid {
        gap: 16px 12px;
    }

    .culture__item-title {
        font-size: 14px;
    }

    .opinion {
        padding: 16px;
    }

    .opinion__photo {
        width: 64px;
        height: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .card__media img,
    .hero__media img,
    .culture__media img,
    .opinion__photo img {
        transition: none;
    }

    .card:hover .card__media img,
    .hero:hover .hero__media img,
    .culture__item:hover .culture__media img,
    .opinion:hover .opinion__photo img {
        transform: none;
    }
}

/* ================================================================ Этап 3. Внутренние страницы: разделы, галереи, поиск */

/* Заголовок страницы: «хлебные крошки», h1, подрубрики */
.page-head {
    padding: 4px 0 24px;
}

.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font: 500 14px/1.4 var(--font);
}

.crumbs li + li::before {
    content: "›";
    margin: 0 8px;
}

.crumbs a {
    display: inline;
    width: auto;
    color: var(--muted);
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--brand-dark);
}

.page-head__title {
    margin: 0;
    color: var(--text);
    font: 700 clamp(28px, 3.2vw, 40px)/1.12 var(--font);
    letter-spacing: -.01em;
}

.page-head__note {
    margin: 8px 0 0;
    color: var(--muted);
    font: 500 15px/1.4 var(--font);
}

.chips ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 2px 0 4px;
    list-style: none;
}

.chips ul::-webkit-scrollbar {
    display: none;
}

.chips li {
    flex: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    width: auto;
    height: 36px;
    padding: 0 15px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--text-2);
    font: 500 14px/1 var(--font);
    white-space: nowrap;
    text-decoration: none;
    transition: color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.chip:hover {
    opacity: 1;
    color: var(--brand-dark);
    box-shadow: inset 0 0 0 1px var(--brand);
}

.chip.is-active {
    background: var(--brand);
    color: #fff;
    box-shadow: none;
}

/* Две колонки: основная и лента справа (как на главной) */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
}

.layout__main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.layout__aside {
    min-width: 0;
}

/* Первый материал раздела: картинка слева, текст справа */
.lead-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.lead-card__media {
    min-height: 100%;
    aspect-ratio: 16 / 11;
    background: var(--field);
    overflow: hidden;
}

.lead-card__media img,
.row-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.lead-card:hover .lead-card__media img,
.row-card:hover .row-card__media img {
    transform: scale(1.03);
}

.lead-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 28px;
}

.lead-card__title {
    margin: 0;
    color: var(--text);
    font: 700 26px/1.22 var(--font);
    text-wrap: balance;
}

.lead-card__lead {
    display: -webkit-box;
    margin: 12px 0 0;
    overflow: hidden;
    color: var(--text-2);
    font: 400 16px/1.55 var(--font);
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Список строками */
.row-list {
    display: flex;
    flex-direction: column;
    padding: 4px 24px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.row-card {
    position: relative;
    display: flex;
    gap: 22px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.row-list > :first-child {
    border-top: 0;
}

.row-card__media {
    flex: none;
    width: 240px;
    aspect-ratio: 16 / 10;
    align-self: flex-start;
    border-radius: var(--radius-sm);
    background: var(--field);
    overflow: hidden;
}

/* Материал без картинки — нейтральная заглушка того же размера, чтобы строки не «прыгали» */
.row-card__media--empty {
    background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4bcc6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h13v14H6a2 2 0 0 1-2-2V5Z'/%3E%3Cpath d='M17 9h3v8a2 2 0 0 1-2 2'/%3E%3Cpath d='M7 9h7M7 12h7M7 15h4'/%3E%3C/svg%3E") center / 36px no-repeat;
}

.row-card__body {
    flex: 1;
    min-width: 0;
}

.row-card__title {
    margin: 0;
    color: var(--text);
    font: 600 19px/1.32 var(--font);
}

.row-card__lead {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--text-2);
    font: 400 15px/1.5 var(--font);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Реклама внутри списка */
.ad-slot--list {
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

/* Плитка (галереи) */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.tile-grid .card__title {
    font-size: 16px;
    line-height: 1.35;
}

.list-more {
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

.list-more[hidden] {
    display: none;
}

.list-more .button {
    min-width: 240px;
}

.list-more .button[disabled] {
    opacity: .6;
    cursor: progress;
}

.empty-note {
    margin: 0;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text-2);
    font: 400 16px/1.5 var(--font);
}

@media (max-width: 1299.98px) {
    .layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 24px;
    }
}

@media (max-width: 1199.98px) {
    .row-card__media {
        width: 200px;
    }

    .tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lead-card__title {
        font-size: 23px;
    }
}

/* Планшеты и телефоны: одна колонка, лента под списком */
@media (max-width: 1023.98px) {
    .layout {
        display: block;
    }

    .layout__aside {
        margin-top: 36px;
    }

    .tile-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .page-head {
        padding: 0 0 18px;
    }

    .crumbs ol {
        font-size: 13px;
    }

    /* Подрубрики в одну строку, прокручиваются вбок до краёв экрана */
    .chips ul {
        flex-wrap: nowrap;
        margin: 14px calc(-1 * var(--gutter)) 0;
        padding-inline: var(--gutter);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .chip {
        height: 34px;
        padding: 0 13px;
    }

    .layout__main {
        gap: 16px;
    }

    .lead-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .lead-card__media {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .lead-card__body {
        padding: 14px 16px 18px;
    }

    .lead-card__title {
        font-size: 21px;
        line-height: 1.25;
    }

    .lead-card__lead {
        font-size: 15px;
        -webkit-line-clamp: 3;
    }

    .row-list {
        padding: 0 14px;
    }

    .row-card {
        gap: 12px;
        padding: 14px 0;
    }

    .row-card__media {
        width: 112px;
        aspect-ratio: 4 / 3;
    }

    .row-card__title {
        font-size: 16px;
        line-height: 1.35;
    }

    .row-card__lead {
        display: none;
    }

    .ad-slot--list {
        padding: 14px 0;
    }

    .tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .tile-grid .card__body {
        padding: 10px 12px 14px;
    }

    .tile-grid .card__title {
        font-size: 14px;
    }

    .list-more .button {
        width: 100%;
    }
}

/* Форма поиска на странице результатов (раньше — в add.css) */
.search-page {
    padding: 18px 20px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    font: 400 15px/1.4 var(--font);
}

.search-page__row {
    display: flex;
    gap: 10px;
}

.search-page__query {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 23px;
    background: var(--field);
    color: var(--text);
    font: 400 16px/1 var(--font);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.search-page__query::placeholder {
    color: var(--muted);
}

.search-page__query:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(222, 40, 38, .14);
}

.search-page__submit {
    flex: none;
    height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 23px;
    background: var(--brand);
    color: #fff;
    font: 600 15px/1 var(--font);
    cursor: pointer;
    transition: background-color .15s ease;
}

.search-page__submit:hover {
    background: var(--brand-dark);
}

.search-page__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 22px;
    margin-top: 14px;
}

.search-page__field,
.search-page__sort {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font: 500 14px/1 var(--font);
}

.search-page__select {
    height: 38px;
    max-width: 100%;
    padding: 0 34px 0 14px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23474e58' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 13px center;
    color: var(--text);
    font: 500 14px/1 var(--font);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.search-page__select:focus {
    outline: none;
    border-color: var(--brand);
}

.search-page__sort input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

.search-page__sort label {
    display: inline-flex;
    align-items: center;
    width: auto;
    height: 38px;
    padding: 0 14px;
    border-radius: 19px;
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--text-2);
    cursor: pointer;
    transition: color .15s ease, box-shadow .15s ease;
}

.search-page__sort label:hover {
    color: var(--brand-dark);
    box-shadow: inset 0 0 0 1px var(--brand);
}

.search-page__sort input:checked + label {
    background: var(--brand);
    color: #fff;
    box-shadow: none;
}

.search-page__sort input:focus-visible + label {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Страницы результатов поиска */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pager__info {
    color: var(--muted);
    font: 500 14px/1.3 var(--font);
    text-align: center;
}

.pager__spacer {
    min-width: 1px;
}

@media (max-width: 767.98px) {
    .search-page {
        padding: 14px;
    }

    .search-page__submit {
        padding: 0 18px;
    }

    .search-page__filters {
        gap: 10px;
    }

    .search-page__field {
        width: 100%;
    }

    .search-page__field > span {
        flex: none;
        width: 60px;
    }

    .search-page__field .search-page__select {
        flex: 1;
        min-width: 0;
    }

    .search-page__sort {
        flex-wrap: wrap;
    }

    .search-page__sort > span {
        width: 100%;
    }

    .pager .button {
        padding: 0 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lead-card__media img,
    .row-card__media img {
        transition: none;
    }

    .lead-card:hover .lead-card__media img,
    .row-card:hover .row-card__media img {
        transform: none;
    }
}

/* ================================================================ Этап 4. Статья, галерея, страница ошибки */

.crumbs--article {
    padding: 2px 0 14px;
}

.crumbs--article ol {
    margin: 0;
}

/* Статья на белой подложке */
.article {
    padding: 36px 52px 40px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Старые правила для тегов header/footer (по центру, фон, отступы) здесь не нужны */
.article__head {
    display: block;
    width: auto;
    margin: 0;
    background: none;
}

.article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 16px;
    color: var(--muted);
    font: 500 14px/1.3 var(--font);
    font-variant-numeric: tabular-nums;
}

.article__rubric {
    display: inline-flex;
    align-items: center;
    width: auto;
    height: 28px;
    padding: 0 12px;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 600;
    text-decoration: none;
}

a.article__rubric:hover {
    opacity: 1;
    background: var(--brand);
    color: #fff;
}

.article__views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article__title {
    margin: 0;
    color: var(--text);
    font: 700 clamp(26px, 2.9vw, 38px)/1.18 var(--font);
    letter-spacing: -.01em;
    text-wrap: balance;
}

.article__lead {
    margin: 16px 0 0;
    color: var(--text-2);
    font: 400 20px/1.5 var(--font);
}

.article__share {
    margin-top: 20px;
}

.article__photo {
    margin: 28px 0 0;
}

.article__photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    background: var(--field);
}

.article__photo figcaption {
    margin-top: 8px;
    color: var(--muted);
    font: 400 14px/1.45 var(--font);
}

.article .pgallery {
    margin-top: 28px;
}

/* Текст статьи. Старые общие правила (a — блок во всю ширину, курсив в цитатах) здесь сбрасываются */
.article-body {
    margin-top: 28px;
    color: var(--text);
    font: 400 19px/1.65 var(--font);
    overflow-wrap: break-word;
}

.article-body > :first-child {
    margin-top: 0;
}

.article-body p {
    margin: 0 0 1em;
}

.article-body a {
    display: inline;
    width: auto;
    color: var(--brand-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.article-body a:hover {
    color: var(--brand);
    text-decoration: none;
}

.article-body b,
.article-body strong {
    font-weight: 600;
}

.article-body em,
.article-body i {
    font-style: italic;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    margin: 1.6em 0 .6em;
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
}

.article-body h2 {
    font-size: 25px;
}

.article-body h3,
.article-body h4 {
    font-size: 21px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1em;
    padding-left: 1.4em;
}

.article-body ul {
    list-style: disc;
}

.article-body ol {
    list-style: decimal;
}

.article-body li {
    margin: .35em 0;
}

.article-body li::marker {
    color: var(--brand);
}

/* Цитаты: в текстах это прямая речь («…», — сообщили в …) */
.article-body blockquote {
    margin: 1.4em 0;
    padding: 18px 22px 18px 24px;
    border-left: 4px solid var(--brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--bg);
}

.article-body blockquote p {
    max-width: none;
    margin: 0 0 .6em;
    color: var(--text);
    font: inherit;
    font-style: normal;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-body blockquote p::before {
    content: none;
}

.article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.2em 0;
    border-radius: var(--radius-sm);
}

.article-body p > img:only-child {
    margin: .2em 0;
}

.article-body figure,
.article-body .figure-image-wrapper {
    margin: 1.4em 0;
}

.article-body figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.article-body iframe,
.article-body video {
    display: block;
    max-width: 100%;
    margin: 1.4em 0;
    border: 0;
    border-radius: var(--radius-sm);
}

/* Видео (YouTube, VK, Rutube) — по ширине текста, 16:9 */
.article-body iframe[src*="youtube"],
.article-body iframe[src*="youtu.be"],
.article-body iframe[src*="vk.com/video"],
.article-body iframe[src*="vkvideo"],
.article-body iframe[src*="rutube"] {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.article-body table {
    display: block;
    max-width: 100%;
    margin: 1.4em 0;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.45;
}

.article-body th,
.article-body td {
    padding: 8px 12px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.article-body th {
    background: var(--bg);
    font-weight: 600;
}

.article-body hr {
    height: 1px;
    margin: 2em 0;
    border: 0;
    background: var(--line);
}

/* Низ статьи: автор, «Поделиться», подписка */
.article__foot {
    display: grid;
    align-items: stretch;
    gap: 14px;
    width: auto;
    margin-top: 28px;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    background: none;
}

.article__author {
    margin: 0;
    color: var(--text-2);
    font: 400 15px/1.4 var(--font);
}

.article__author b {
    color: var(--text);
    font-weight: 600;
}

.article__foot-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.article__foot-label {
    min-width: 110px;
    color: var(--muted);
    font: 600 14px/1.2 var(--font);
}

.follow-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    height: 36px;
    padding: 0 14px 0 11px;
    border-radius: 18px;
    background: var(--field);
    color: var(--text-2);
    font: 600 14px/1 var(--font);
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.follow-link svg {
    flex: none;
}

.follow-link:hover {
    opacity: 1;
    color: #fff;
}

.follow-link--dzen:hover {
    background: #000;
}

.follow-link--vk:hover {
    background: #0077ff;
}

.follow-link--ok:hover {
    background: #ee8208;
}

/* ---------------------------------------------------------------- Фотогалерея */
.pgallery {
    position: relative;
}

.pgallery__stage {
    position: relative;
    container-type: inline-size; /* стрелки — по центру фото 3:2 (подпись под фото не сдвигает их) */
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: #15171b;
}

.pgallery__track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.pgallery__track::-webkit-scrollbar {
    display: none;
}

.pgallery__track:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: -3px;
}

.pgallery__slide {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.pgallery__slide figure {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
}

.pgallery__slide img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: contain;
}

.pgallery__slide figcaption {
    padding: 10px 16px 12px;
    color: #d2d6dc;
    font: 400 14px/1.45 var(--font);
}

.pgallery__nav {
    position: absolute;
    top: calc(100cqw / 3 - 22px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: opacity .15s ease, transform .15s ease;
}

.pgallery__nav:hover {
    transform: scale(1.06);
}

.pgallery__nav[disabled] {
    opacity: 0;
    pointer-events: none;
}

.pgallery__nav--prev {
    left: 12px;
}

.pgallery__nav--next {
    right: 12px;
}

.pgallery__bar {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pgallery__count {
    padding: 6px 10px;
    border-radius: 14px;
    background: rgba(15, 18, 22, .7);
    color: #fff;
    font: 600 13px/1 var(--font);
    font-variant-numeric: tabular-nums;
}

.pgallery__full {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 18, 22, .7);
    color: #fff;
    cursor: pointer;
}

.pgallery__full[hidden] {
    display: none;
}

.pgallery__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.pgallery__thumb {
    flex: none;
    width: 92px;
    height: 62px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: var(--field);
    overflow: hidden;
    opacity: .55;
    cursor: pointer;
    transition: opacity .15s ease, box-shadow .15s ease;
}

.pgallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pgallery__thumb:hover {
    opacity: .85;
}

.pgallery__thumb.is-active {
    opacity: 1;
    box-shadow: inset 0 0 0 3px var(--brand);
}

.pgallery__thumb.is-active img {
    padding: 3px;
    border-radius: 6px;
}

/* Во весь экран */
.pgallery:fullscreen {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #000;
}

.pgallery:fullscreen .pgallery__stage {
    flex: 1;
    display: flex;
    background: #000;
}

.pgallery:fullscreen .pgallery__track {
    flex: 1;
}

.pgallery:fullscreen .pgallery__slide img {
    flex: 1;
    min-height: 0;
    aspect-ratio: auto;
}

.pgallery:fullscreen .pgallery__thumb {
    background: #222;
}

.pgallery:fullscreen .pgallery__nav {
    top: calc(50% - 22px);
}

/* Страница галереи */
.article--gallery .article__head {
    margin-bottom: 24px;
}

.gallery-source {
    margin: 20px 0 0;
    color: var(--text-2);
    font: 400 16px/1.5 var(--font);
}

.gallery-source a {
    display: inline;
    width: auto;
    color: var(--brand-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gallery-source a:hover {
    color: var(--brand);
    text-decoration: none;
}

/* ---------------------------------------------------------------- Страница ошибки (404) */
.error-page {
    padding: 48px 52px 44px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.error-page__code {
    margin: 0;
    color: var(--brand);
    font: 700 clamp(64px, 9vw, 112px)/1 var(--font);
    letter-spacing: -.03em;
}

.error-page__title {
    margin: 10px 0 0;
    color: var(--text);
    font: 700 clamp(24px, 2.6vw, 32px)/1.2 var(--font);
}

.error-page__text {
    max-width: 560px;
    margin: 12px 0 0;
    color: var(--text-2);
    font: 400 17px/1.55 var(--font);
}

.error-page .site-search {
    max-width: 520px;
    margin: 24px 0 0;
}

.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.button--primary {
    background: var(--brand);
    color: #fff;
}

.button--primary:hover {
    opacity: 1;
    background: var(--brand-dark);
}

@media (max-width: 1199.98px) {
    .article {
        padding: 30px 36px 34px;
    }

    .article-body {
        font-size: 18px;
    }
}

/* Телефоны: статья во всю ширину экрана, текст чуть мельче */
@media (max-width: 767.98px) {
    .crumbs--article {
        padding-bottom: 10px;
    }

    .article,
    .error-page {
        margin-inline: calc(-1 * var(--gutter));
        padding: 20px var(--gutter) 24px;
        border-radius: 0;
        box-shadow: none;
    }

    .article__meta {
        gap: 6px 12px;
        margin-bottom: 12px;
        font-size: 13px;
    }

    .article__title {
        font-size: 25px;
        line-height: 1.2;
    }

    .article__lead {
        margin-top: 12px;
        font-size: 18px;
        line-height: 1.5;
    }

    .article__photo,
    .article .pgallery {
        margin-inline: calc(-1 * var(--gutter));
    }

    .article__photo img,
    .article .pgallery__stage {
        border-radius: 0;
    }

    .article__photo figcaption {
        padding-inline: var(--gutter);
    }

    .article .pgallery__thumbs {
        padding-inline: var(--gutter);
    }

    .article-body {
        font-size: 17.5px;
        line-height: 1.62;
    }

    .article-body h2 {
        font-size: 22px;
    }

    .article-body h3,
    .article-body h4 {
        font-size: 19px;
    }

    .article-body blockquote {
        padding: 14px 16px 14px 18px;
    }

    .article__foot-label {
        min-width: 0;
        width: 100%;
    }

    .pgallery__nav {
        top: calc(100cqw / 3 - 19px);
        width: 38px;
        height: 38px;
    }

    .pgallery__nav--prev {
        left: 8px;
    }

    .pgallery__nav--next {
        right: 8px;
    }

    .pgallery__thumb {
        width: 72px;
        height: 50px;
    }

    .error-page__code {
        font-size: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pgallery__nav:hover {
        transform: none;
    }
}
