/* MES ARCHITECTURE: SYSTEM CORE v1.9 (DW-STYLE REPLICA)
   FONTS: Manrope (Headings & Read) + JetBrains Mono (System/UI)
   UPDATE: Корректировка мобильного кегля до 15px для идеального баланса плотности
*/

: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;
    --ff-body-read: "Manrope", Inter, sans-serif;
    --ff-system: "JetBrains Mono", monospace;
    
    /* Геометрия */
    --grid-max-width: 1200px;
    --read-max-width: 700px;
}

/* ====== 1. ГЛОБАЛЬНЫЕ СТИЛИ ====== */
body {
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: var(--ff-body-read);
    -webkit-font-smoothing: antialiased;
}

/* ====== 2. МОДУЛЬ: ПОТОКИ (DW-STYLE) ====== */

/* --- А: Карточки в списке (Главная) --- */
.t-feed .t-feed__post-title,
.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.4px !important;
}

/* --- Б: Внутренняя статья (Интерфейс чтения) --- */
.t-feed__post-popup__container,
.t-feed__post-popup__content,
.t-feed__post-popup__text-wrapper {
    background-color: var(--c-white) !important;
}

/* Заголовок статьи (Desktop) */
.t-feed__post-popup .t-feed__post-popup__title {
    color: var(--c-black) !important;
    font-family: var(--ff-heading) !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    margin-bottom: 24px !important;
    letter-spacing: -0.8px !important;
}

/* Текст статьи (Desktop: 17px) */
.t-feed__post-popup .t-redactor__text,
.t-feed__post-popup .t-feed__post-popup__text-wrapper .t-text,
.t-feed__post-popup .t-feed__post-popup__text-wrapper p {
    color: var(--c-black) !important;
    font-family: var(--ff-body-read) !important;
    font-size: 17px !important;
    line-height: 1.4 !important;
    max-width: var(--read-max-width) !important;
    margin-bottom: 20px !important;
}

/* Внутренние заголовки (Desktop) */
.t-feed__post-popup .t-redactor__h1, 
.t-feed__post-popup .t-redactor__h2,
.t-feed__post-popup .t-redactor__text h1,
.t-feed__post-popup .t-redactor__text h2 {
    color: var(--c-black) !important;
    font-family: var(--ff-heading) !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    margin-top: 32px !important;
}

/* ====== 3. ФУТЕР И UI ====== */
footer.footer, 
.f-col.brand .tag {
    font-family: var(--ff-system) !important;
}

/* ====== 4. МОБИЛЬНАЯ АДАПТАЦИЯ (DW EXACT REPLICA) ====== */
@media (max-width: 640px) {
    /* Компактный заголовок на мобиле */
    .t-feed__post-popup .t-feed__post-popup__title { 
        font-size: 19px !important; 
        line-height: 1.25 !important;
        margin-bottom: 15px !important;
    }

    /* Текст статьи: форсированные 15px */
    .t-feed__post-popup .t-feed__post-popup__text-wrapper .t-text,
    .t-feed__post-popup .t-redactor__text p,
    .t-feed__post-popup .t-feed__post-popup__text-wrapper p,
    .t-feed__post-popup .t-feed__post-popup__text-wrapper div { 
        font-size: 15px !important; 
        line-height: 1.4 !important; /* Газетная плотность */
        margin-bottom: 16px !important;
        letter-spacing: -0.1px !important;
    }
    
    /* Внутренние заголовки на мобиле */
    .t-feed__post-popup .t-redactor__h1, 
    .t-feed__post-popup .t-redactor__h2,
    .t-feed__post-popup .t-redactor__text h1,
    .t-feed__post-popup .t-redactor__text h2 {
        font-size: 16px !important;
        margin-top: 24px !important;
        margin-bottom: 8px !important;
    }
    
    /* Ужимаем боковые отступы контейнера для экономии места */
    .t-feed__post-popup__text-wrapper {
        padding: 20px 15px !important;
    }
}