/*
Theme Name: dds_labiatalk.com
Theme URI: https://labiatalk.com/
Author: Екатерина Мельникова
Author URI: https://labiatalk.com/
Description: Редакционный сайт/отраслевой блог о пищевых технологиях, безопасности продуктов, ингредиентах, переработке сырья, стандартах качества и современных решениях в производстве питания.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dds_labiatalk
*/

/* =========================================================
   Базовая палитра
   ========================================================= */
:root {
    --ink:        #1E2A2E;
    --paper:      #FCFAF5;
    --card:       #F2EFE9;
    --line:       #D6D0C4;
    --accent:     #A3332F;
    --accent-dk:  #872825;
    --gold:       #D9B23D;
    --warn:       #B53B2E;
    --ok:         #5F6B3C;
    --muted:      #5b6770;
    --footer-bg:  #1E2A2E;
    --footer-ink: #EDE7DA;
    --footer-mute:#A9A28F;

    --rad-sm: 6px;
    --rad-md: 10px;
    --rad-pill: 30px;

    --font-head: "Inter", "Roboto", "Helvetica Neue", system-ui, sans-serif;
    --font-body: "Source Serif Pro", "PT Serif", Georgia, serif;
}

/* =========================================================
   Сброс и базовая типографика
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden; /* страховка от случайного горизонтального скролла */
}

img { max-width: 100%; height: auto; display: block; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .18s ease;
}
a:hover { color: var(--accent-dk); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.2;
    margin: 1.4em 0 .5em;
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.15rem; }

p {
    margin: 0 0 1em;
}

blockquote {
    border-left: 3px solid var(--gold);
    padding: .5em 1.2em;
    margin: 1.5em 0;
    background: var(--card);
    font-style: italic;
    color: var(--ink);
}

code, pre {
    font-family: "JetBrains Mono", Menlo, Consolas, monospace;
    font-size: .92em;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--rad-sm);
}
code { padding: .1em .35em; }
pre { padding: 1em; overflow: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    margin: 1.5em 0;
}
th, td {
    border: 1px solid var(--line);
    padding: .6em .8em;
    text-align: left;
}
th {
    background: var(--card);
    font-family: var(--font-head);
    font-weight: 600;
}

hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 2em 0;
}

/* =========================================================
   Контейнер ширины (единая точка ограничения)
   ========================================================= */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* =========================================================
   Шапка
   ========================================================= */
.masthead {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}

.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
    min-width: 0;
}

.brand-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.brand-text { min-width: 0; }

.brand-title {
    font-family: var(--font-head);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1;
    margin: 0 0 4px;
}

.brand-sub {
    font-family: var(--font-head);
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.author-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-size: .9rem;
    color: var(--muted);
}

.author-tag-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card);
    display: grid;
    place-items: center;
    color: var(--accent);
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.author-tag-name {
    color: var(--ink);
    font-weight: 600;
    line-height: 1.2;
}

/* Навигация */
.primary-nav {
    background: var(--ink);
}

.primary-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 52px;
    min-width: 0;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,.3);
    color: var(--paper);
    padding: 8px 14px;
    border-radius: var(--rad-sm);
    font-family: var(--font-head);
    font-size: .9rem;
    cursor: pointer;
}

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    min-width: 0;
}

.primary-menu a {
    display: block;
    padding: 14px 16px;
    color: var(--paper);
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .01em;
    border-bottom: 2px solid transparent;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.search-toggle {
    background: transparent;
    border: 1px solid rgba(255,255,255,.3);
    color: var(--paper);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: border-color .18s, color .18s;
}
.search-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* Поисковый выпадающий блок */
.search-drawer[hidden] { display: none !important; }
.search-drawer {
    background: var(--ink);
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 14px 0;
}

/* =========================================================
   Лента категорий-индикаторов
   ========================================================= */
.cat-strip {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.cat-strip-inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    flex-wrap: wrap;
    min-width: 0;
    scrollbar-width: thin;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--rad-pill);
    font-family: var(--font-head);
    font-size: .85rem;
    color: var(--ink);
    white-space: nowrap;
    transition: background .18s, border-color .18s, color .18s;
}
.cat-pill:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.cat-pill svg { width: 16px; height: 16px; flex-shrink: 0; }
.cat-pill .cat-count {
    font-size: .72rem;
    color: var(--muted);
    background: var(--card);
    padding: 1px 7px;
    border-radius: 10px;
}
.cat-pill:hover .cat-count { background: rgba(255,255,255,.18); color: var(--paper); }

/* =========================================================
   Подложка контента (страница в целом)
   ========================================================= */
.site-main {
    padding: 36px 0 56px;
}

/* Хлебные крошки */
.breadcrumbs {
    font-family: var(--font-head);
    font-size: .85rem;
    color: var(--muted);
    margin: 0 0 22px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--line); margin: 0 6px; }

/* =========================================================
   Раскладки
   ========================================================= */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}

.layout-no-sidebar {
    /* одноколоночная — обычный block-контекст, а не grid (см. A12 п.3) */
    display: block;
}
.layout-no-sidebar > .content-wrap {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .layout-no-sidebar > .content-wrap { width: 100%; }
}

/* =========================================================
   Карточки записей
   ========================================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 26px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--rad-md);
    overflow: hidden;
    min-width: 0;
    transition: transform .2s ease, border-color .2s ease;
}
.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.card-thumb-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--card);
    display: block;
    min-width: 0;
}
.card-thumb-wrap a { display: block; width: 100%; }
.card-thumb-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .35s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }

.card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--card) 0%, #e6e0d2 100%);
    display: grid;
    place-items: center;
    color: var(--accent);
}
.card-thumb-placeholder svg { width: 56px; height: 56px; opacity: .7; }

.card-body {
    flex: 1;
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-meta {
    font-family: var(--font-head);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 8px;
}
.card-meta .cat-link { color: var(--accent); font-weight: 600; }

.card-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }

.card-excerpt {
    color: var(--ink);
    font-size: .94rem;
    line-height: 1.55;
    margin-bottom: 14px;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 .5em;
    background: none;
}

.card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-head);
    font-size: .9rem;
    font-weight: 600;
    color: var(--accent);
    align-self: flex-start;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--accent);
    transition: padding-right .2s ease;
}
.card-more:hover { padding-right: 8px; }
.card-more::after { content: "→"; }

/* =========================================================
   Сайдбар и виджеты
   ========================================================= */
.sidebar {
    min-width: 0;
}

.widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--rad-md);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--ink);
}

/* Контраст: цвета текста в сайдбаре заданы явно */
.sidebar .widget,
.sidebar .widget a,
.sidebar .widget li,
.sidebar .widget p { color: var(--ink); }
.sidebar .widget a { color: var(--accent); }
.sidebar .widget a:hover { color: var(--accent-dk); }

.widget-title {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ink);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: .95rem;
}
.widget li:last-child { border-bottom: none; }
.widget li a { color: var(--ink); }
.widget li a:hover { color: var(--accent); }

.widget .post-date,
.widget .rss-date,
.widget time {
    display: block;
    font-family: var(--font-head);
    font-size: .75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-top: 2px;
}

/* Форма поиска */
.search-form {
    display: flex;
    gap: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--rad-sm);
    overflow: hidden;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 10px 14px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: .95rem;
    outline: none;
}
.search-form button {
    border: none;
    background: var(--accent);
    color: var(--paper);
    padding: 0 18px;
    font-family: var(--font-head);
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
}
.search-form button:hover { background: var(--accent-dk); }

/* =========================================================
   Главная — тематические блоки
   ========================================================= */
.hero {
    background: var(--card);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 48px 0;
    margin-bottom: 40px;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
@media (max-width: 760px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); }
}

.hero-eyebrow {
    font-family: var(--font-head);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--accent);
    margin: 0 0 14px;
}
.hero h1 {
    font-size: 2.6rem;
    margin: 0 0 16px;
}
.hero p {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.6;
}

.hero-illu {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--rad-md);
    padding: 26px;
    display: grid;
    place-items: center;
    min-height: 200px;
}
.hero-illu svg { max-width: 100%; height: auto; }

/* Дайджест: 3 ключевые статьи с уровнем сложности */
.digest {
    margin-bottom: 56px;
}
.digest h2 {
    margin: 0 0 22px;
    font-size: 1.9rem;
}
.digest-eyebrow {
    font-family: var(--font-head);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--gold);
    margin: 0 0 6px;
}

.digest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}
@media (max-width: 880px) { .digest-grid { grid-template-columns: 1fr; } }

.digest-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--rad-md);
    padding: 24px 24px 22px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.digest-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--accent);
}
.digest-card h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    line-height: 1.3;
}
.digest-card p {
    color: var(--muted);
    font-size: .95rem;
    margin: 0 0 14px;
    flex: 1;
}
.digest-card .digest-level {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}
.digest-card .digest-level-num {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.4rem;
    color: var(--accent);
    line-height: 1;
}
.digest-card .digest-level-label {
    font-family: var(--font-head);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

/* Тематический блок (универсальный) */
.topic-block {
    padding: 48px 0;
    border-top: 1px solid var(--line);
}
.topic-block:nth-of-type(even) {
    background: var(--card);
}
.topic-block-head {
    margin: 0 0 28px;
}
.topic-block-eyebrow {
    font-family: var(--font-head);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--accent);
    margin: 0 0 8px;
}
.topic-block h2 {
    margin: 0;
    font-size: 1.9rem;
}
.topic-block-lead {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 720px;
    margin: 10px 0 0;
}

/* Шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

.step {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--rad-md);
    padding: 22px 20px;
    min-width: 0;
}
.step-num {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 8px;
}
.step h3 {
    font-size: 1.05rem;
    margin: 0 0 8px;
}
.step p {
    color: var(--muted);
    font-size: .9rem;
    margin: 0;
}

/* Колонки фактов */
.facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
@media (max-width: 880px) { .facts { grid-template-columns: 1fr; } }

.fact {
    padding: 22px 24px;
    background: var(--paper);
    border-left: 3px solid var(--gold);
    min-width: 0;
}
.fact-key {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.7rem;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 6px;
}
.fact-label {
    font-family: var(--font-head);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: 8px;
}
.fact p { color: var(--ink); margin: 0; font-size: .94rem; }

/* =========================================================
   Запись (single)
   ========================================================= */
.entry-header { margin-bottom: 24px; }
.entry-eyebrow {
    font-family: var(--font-head);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: var(--accent);
    margin: 0 0 10px;
}
.entry-title {
    font-size: 2.3rem;
    margin: 0 0 14px;
    line-height: 1.15;
}
.entry-meta {
    font-family: var(--font-head);
    font-size: .85rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.entry-meta a { color: var(--accent); }
.entry-meta-sep { color: var(--line); }

.entry-thumb {
    margin: 0 0 28px;
    border-radius: var(--rad-md);
    overflow: hidden;
    border: 1px solid var(--line);
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.75;
}
.entry-content h2 { font-size: 1.6rem; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .4em; }

/* Лабораторный блок (выноска с фактами) */
.lab-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--rad-md);
    padding: 20px 24px;
    margin: 28px 0;
    font-size: .95rem;
}
.lab-box-title {
    font-family: var(--font-head);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--accent);
    margin: 0 0 8px;
    font-weight: 700;
}

/* Теги под записью */
.entry-footer {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-family: var(--font-head);
    font-size: .85rem;
}
.entry-tags a {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 6px 6px 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--rad-pill);
    color: var(--ink);
    font-size: .8rem;
}
.entry-tags a:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* =========================================================
   Пагинация
   ========================================================= */
.pagination {
    margin: 40px 0 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    font-family: var(--font-head);
}
.pagination .page-numbers {
    display: inline-block;
    min-width: 40px;
    padding: 9px 14px;
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--rad-sm);
    color: var(--ink);
    font-size: .9rem;
    font-weight: 500;
    transition: background .18s, border-color .18s, color .18s;
}
.pagination .page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--paper);
}
.pagination .dots { border: none; background: transparent; }

/* =========================================================
   Комментарии
   ========================================================= */
.comments-area {
    margin-top: 48px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}
.comments-title {
    font-size: 1.4rem;
    margin: 0 0 22px;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}
.comment-list .children {
    list-style: none;
    padding-left: 30px;
    margin-top: 16px;
}
.comment-body {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--rad-md);
    padding: 18px 22px;
    margin-bottom: 16px;
}
.comment-author {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 4px;
}
.comment-meta {
    font-family: var(--font-head);
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--rad-sm);
    background: var(--paper);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 14px;
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form .submit,
.comment-form input[type="submit"] {
    background: var(--accent);
    color: var(--paper);
    border: none;
    padding: 11px 22px;
    font-family: var(--font-head);
    font-weight: 600;
    border-radius: var(--rad-sm);
    cursor: pointer;
    transition: background .18s;
}
.comment-form .submit:hover,
.comment-form input[type="submit"]:hover { background: var(--accent-dk); }

/* =========================================================
   Подвал
   ========================================================= */
.colophon {
    background: var(--footer-bg);
    color: var(--footer-ink);
    margin-top: 64px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    padding: 48px 0 32px;
}
@media (max-width: 880px) { .footer-widgets { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 20px; } }

/* Контраст: тёмный фон футера → светлый текст */
.footer-widgets .widget {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--footer-ink);
    margin-bottom: 0;
}
.footer-widgets .widget,
.footer-widgets .widget p,
.footer-widgets .widget li,
.footer-widgets .widget li a,
.footer-widgets .widget a { color: var(--footer-ink); }
.footer-widgets .widget a:hover { color: var(--gold); }
.footer-widgets .widget-title {
    color: var(--paper);
    border-bottom-color: var(--gold);
}
.footer-widgets .widget li { border-bottom-color: rgba(255,255,255,.08); }
.footer-widgets .widget .post-date,
.footer-widgets .widget time { color: var(--footer-mute); }

/* Маркировка качества */
.quality-marks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.1);
    border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 700px) { .quality-marks { grid-template-columns: 1fr; } }

.quality-marks .qm {
    padding: 22px 24px;
    color: var(--paper);
    font-family: var(--font-head);
    min-width: 0;
}
.qm-1 { background: var(--accent); }
.qm-2 { background: var(--gold); color: var(--ink); }
.qm-3 { background: var(--ok); }
.qm-title {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .13em;
    font-weight: 700;
    margin-bottom: 6px;
    opacity: .85;
}
.qm-text { font-size: .95rem; line-height: 1.45; }

.footer-bottom {
    padding: 22px 0;
    text-align: center;
    font-family: var(--font-head);
    font-size: .85rem;
    color: var(--footer-mute);
}

/* =========================================================
   Cookie-баннер
   ========================================================= */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--rad-md);
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    max-width: 1140px;
    margin-inline: auto;
}
.cookie-banner p {
    margin: 0;
    font-family: var(--font-head);
    font-size: .9rem;
    line-height: 1.45;
    flex: 1;
    min-width: 220px;
    color: var(--paper);
}
.cookie-banner .cookie-accept {
    background: var(--accent);
    color: var(--paper);
    border: none;
    padding: 10px 22px;
    font-family: var(--font-head);
    font-weight: 600;
    border-radius: var(--rad-sm);
    cursor: pointer;
    transition: background .18s;
}
.cookie-banner .cookie-accept:hover { background: var(--accent-dk); }

/* =========================================================
   404
   ========================================================= */
.not-found {
    text-align: center;
    padding: 40px 0;
}
.not-found-code {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 6rem;
    color: var(--accent);
    line-height: 1;
    margin: 0;
}
.not-found h1 {
    font-size: 1.6rem;
    margin: 12px 0 14px;
}
.not-found p {
    color: var(--muted);
    margin-bottom: 26px;
}
.not-found .search-form { max-width: 460px; margin: 0 auto 22px; }
.btn-home {
    display: inline-block;
    background: var(--accent);
    color: var(--paper);
    padding: 12px 26px;
    border-radius: var(--rad-sm);
    font-family: var(--font-head);
    font-weight: 600;
}
.btn-home:hover { background: var(--accent-dk); color: var(--paper); }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 760px) {
    .masthead-inner { flex-direction: column; align-items: flex-start; }
    .author-tag { align-self: flex-start; }
    .brand-title { font-size: 1.25rem; }
    .entry-title { font-size: 1.7rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero { padding: 36px 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .site-main { padding: 24px 0 40px; }

    .menu-toggle { display: inline-block; }
    .primary-menu[hidden] { display: none !important; }
    .primary-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 8px 0 12px;
    }
    .primary-menu.is-open { display: flex; }
    .primary-menu a { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }

    .primary-nav-inner {
        flex-wrap: wrap;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .cat-strip-inner {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .cookie-banner .cookie-accept { width: 100%; }
}

/* Доступность */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px; height: 1px;
    overflow: hidden;
}
.screen-reader-text:focus {
    clip: auto !important;
    width: auto; height: auto;
    padding: 10px;
    background: var(--ink);
    color: var(--paper);
    z-index: 10000;
    top: 5px; left: 5px;
    position: absolute !important;
}

/* Алайнмент изображений в записях */
.alignleft  { float: left;  margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) {
    .alignleft, .alignright { float: none; margin: 0 0 1em; }
}
