/* MES ARCHITECTURE: SYSTEM CORE v2.7 (READING OPTIMIZED)
   FONTS: Manrope (Headings) + Pangea (Body/Read)
   UPDATE: Смена ролей шрифтов по запросу Давида (Manrope — заголовки, Pangea — текст)
*/

:root {
    /* Цветовая палитра */
    --c-bg: #0e0e0e;
    --c-text: #cfcfcf;
    --c-white: #ffffff;
    --c-black: #111111;
    --c-accent: #DAAD38;
    --c-mes-orange: #ff9d00;
    
    /* Шрифтовая иерархия */
    --ff-heading: "Manrope", Inter, system-ui, sans-serif; /* Структурный Manrope */
    --ff-body-read: "Pangea", "Manrope", sans-serif;       /* Плотная Pangea для чтения */
    --ff-system: "Inter", system-ui, sans-serif;          /* UI элементы */
    
    /* Геометрия */
    --grid-max-width: 1200px;
    --read-max-width: 700px;
}

/* ====== 1. ГЛОБАЛЬНЫЕ СТИЛИ ====== */
body {
    background-color: var(--c-bg) !important;
    color: var(--c-text);
    font-family: var(--ff-body-read);
    -webkit-font-smoothing: antialiased;
}

/* ====== 2. МОДУЛЬ: ПОТОКИ (EDITORIAL MODE) ====== */

/* --- А: Карточки в списке (Главная) --- */
body .t-feed .t-feed__post-title,
body .t-feed .js-feed-post-title {
    color: var(--c-white) !important;
    font-family: var(--ff-heading) !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    letter-spacing: -0.02em !important;
}

/* --- Б: Внутренняя статья (Интерфейс чтения) --- */
body .t-feed__post-popup__container,
body .t-feed__post-popup__content,
body .t-feed__post-popup__text-wrapper {
    background-color: var(--c-white) !important;
}

/* Главный заголовок статьи (Desktop) */
body .t-feed__post-popup .t-feed__post-popup__title {
    color: var(--c-black) !important;
    font-family: var(--ff-heading) !important; /* Manrope */
    font-size: 38px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    margin-bottom: 32px !important;
    letter-spacing: -0.03em !important;
}

/* Текст статьи (Pangea) */
body .t-feed__post-popup .t-redactor__text,
body .t-feed__post-popup .t-feed__post-popup__text-wrapper .t-text,
body .t-feed__post-popup .t-feed__post-popup__text-wrapper p {
    color: var(--c-black) !important;
    font-family: var(--ff-body-read) !important; /* Pangea */
    font-size: 17px !important;
    line-height: 1.55 !important;
    max-width: var(--read-max-width) !important;
    margin-bottom: 26px !important;
}

/* ВНУТРЕННИЕ ЗАГОЛОВКИ (Desktop) — Manrope */
body .t-feed__post-popup__text-wrapper h1,
body .t-feed__post-popup__text-wrapper h2,
body .t-feed__post-popup__text-wrapper h3,
body .t-feed__post-popup .t-redactor__h1, 
body .t-feed__post-popup .t-redactor__h2,
body .t-feed__post-popup .t-redactor__text h1,
body .t-feed__post-popup .t-redactor__text h2,
body .t-feed__post-popup .t-redactor__text .t-name,
body .t-feed__post-popup .t-redactor__text .t-title,
body [field="text"] h1, body [field="text"] h2 {
    color: var(--c-black) !important;
    font-family: var(--ff-heading) !important; /* Manrope */
    font-weight: 800 !important;
    font-size: 32px !important;
    line-height: 1.2 !important;
    margin-top: 64px !important;
    margin-bottom: 24px !important;
    display: block !important;
    letter-spacing: -0.02em !important;
}

/* ====== 3. ФУТЕР И UI ====== */
footer.footer, 
.f-col.brand .tag,
.t-feed__post-popup__category {
    font-family: var(--ff-system) !important;
    font-weight: 500;
}

/* ====== 4. МОБИЛЬНАЯ АДАПТАЦИЯ ====== */
@media (max-width: 640px) {
    body .t-feed__post-popup .t-feed__post-popup__title { 
        font-size: 22px !important; 
        line-height: 1.2 !important;
        font-family: var(--ff-heading) !important;
    }

    body .t-feed__post-popup .t-feed__post-popup__text-wrapper .t-text,
    body .t-feed__post-popup .t-redactor__text p { 
        font-size: 15px !important; 
        line-height: 1.45 !important;
        font-family: var(--ff-body-read) !important; /* Pangea */
    }
    
    body .t-feed__post-popup .t-redactor__h1, 
    body .t-feed__post-popup .t-redactor__h2 {
        font-size: 19px !important;
        margin-top: 36px !important;
        font-family: var(--ff-heading) !important;
        font-weight: 800 !important;
    }
}