/*
Theme Name: dds_mmaaddicts.com
Theme URI: https://mmaaddicts.com
Author: Дмитрий Кравцов
Author URI: https://mmaaddicts.com
Description: Строительный блог с практическими руководствами, выросший из сообщества любителей единоборств и обустройства тренировочных пространств. Тема в духе контраста сырого бетона и тёплого дерева.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
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: ddsmma
*/

/* ===========================================================================
   ПЕРЕМЕННЫЕ И ТЕМЫ
   =========================================================================== */
:root {
    --concrete:        #efefe7;
    --terracotta:      #c25a3c;
    --terracotta-dark: #a3472c;
    --graphite:        #2b2b26;
    --oak:             #b97f4b;
    --blueprint:       #1c2c44;
    --blueprint-2:     #233755;

    --bg:        var(--concrete);
    --surface:   #ffffff;
    --surface-2: #f6f5ee;
    --text:      var(--graphite);
    --text-soft: #67675c;
    --heading:   var(--graphite);
    --border:    #d6d5c6;
    --accent:    var(--terracotta);
}

[data-theme="dark"] {
    --bg:        #1f1f1b;
    --surface:   #2a2a25;
    --surface-2: #313029;
    --text:      #e7e4d8;
    --text-soft: #a6a394;
    --heading:   #f4f1e6;
    --border:    #3e3d34;
    --accent:    #d97a5b;
}

/* ===========================================================================
   БАЗОВЫЙ СБРОС
   =========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--terracotta-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.18;
    letter-spacing: 0.01em;
    margin: 0 0 0.6em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

blockquote {
    margin: 1.6em 0;
    padding: 1rem 1.4rem;
    border-left: 5px solid var(--oak);
    background: var(--surface-2);
    font-style: italic;
}

code, pre {
    font-family: 'Courier New', monospace;
    background: var(--surface-2);
}
pre { padding: 1rem; overflow: auto; border: 1px solid var(--border); }

/* Таблицы — видимые границы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}
table, th, td {
    border: 1px solid var(--border);
}
th, td {
    padding: 0.6rem 0.9rem;
    text-align: left;
}
th {
    background: var(--surface-2);
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
}

/* ===========================================================================
   КОНТЕЙНЕРЫ ШИРИНЫ
   =========================================================================== */
.wrap-front  { width: min(85%, 1280px); margin-inline: auto; }
.wrap-single { width: min(85%, 1000px); margin-inline: auto; }
.wrap-wide   { width: min(94%, 1320px); margin-inline: auto; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3.4rem;
    align-items: start;
}
.layout-single { display: block; }

.content-area { min-width: 0; }

.site-main { padding: 2.6rem 0 3.4rem; }

/* ===========================================================================
   ШАПКА САЙТА
   =========================================================================== */
.site-header {
    background: var(--surface);
    border-bottom: 3px solid var(--graphite);
}
.header-inner {
    width: min(94%, 1320px);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}
.brand-logo,
.brand-logo-svg {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--heading);
    line-height: 1.2;
    display: block;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--text-soft);
    display: block;
    margin-top: 0.2rem;
}

/* Мини-инфографика «строительный уровень» */
.header-level {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border: 2px solid var(--oak);
    background: var(--surface-2);
}
.header-level-bubble {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--oak);
}
.header-level-bubble.is-on { background: var(--terracotta); }
.header-level-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
}

/* Переключатель темы — лампочка / боксёрская груша */
.theme-toggle {
    border: 2px solid var(--graphite);
    background: transparent;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    color: var(--heading);
    transition: background 0.2s, color 0.2s;
}
.theme-toggle:hover { background: var(--graphite); color: var(--concrete); }
.theme-toggle svg { width: 22px; height: 22px; }
.theme-toggle .icon-dark { display: none; }
[data-theme="dark"] .theme-toggle .icon-light { display: none; }
[data-theme="dark"] .theme-toggle .icon-dark  { display: block; }

/* ===========================================================================
   НАВИГАЦИЯ (не липкая)
   =========================================================================== */
.main-nav {
    background: var(--graphite);
}
.main-nav-inner {
    width: min(94%, 1320px);
    margin-inline: auto;
    display: flex;
    align-items: center;
}
.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--concrete);
    color: var(--concrete);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.5rem 1rem;
    margin: 0.7rem 0;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.main-nav li { margin: 0; }
.main-nav a {
    display: block;
    padding: 0.95rem 1.3rem;
    color: var(--concrete);
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    border-left: 1px solid rgba(255,255,255,0.08);
    transition: background 0.2s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--terracotta);
    color: #fff;
}
.main-nav .menu-empty {
    color: var(--text-soft);
    padding: 0.95rem 1.3rem;
    font-family: 'Oswald', sans-serif;
}

/* ===========================================================================
   КНОПКИ
   =========================================================================== */
.btn {
    display: inline-block;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.92rem;
    padding: 0.75rem 1.7rem;
    border: 2px solid var(--terracotta);
    background: transparent;
    color: var(--terracotta);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    /* Срезанный угол — отсылка к листу чертежа / углу ринга */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.btn:hover { background: var(--terracotta); color: #fff; }
.btn-solid {
    background: var(--terracotta);
    color: #fff;
}
.btn-solid:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); }

/* «Читать далее» — подчёркнутая ссылка с иконкой рулетки */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    margin-top: auto;
}
.read-more svg { width: 16px; height: 16px; flex: 0 0 16px; }
.read-more:hover { color: var(--terracotta-dark); }

/* ===========================================================================
   ХЛЕБНЫЕ КРОШКИ
   =========================================================================== */
.breadcrumbs {
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.9rem 0;
    color: var(--text-soft);
}
.breadcrumbs a { color: var(--text-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--oak); margin: 0 0.15rem; }
.breadcrumbs span:last-child { color: var(--heading); }

/* ===========================================================================
   КАРТОЧКИ ЗАПИСЕЙ
   =========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    gap: 2rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 2px solid var(--graphite);
    overflow: hidden;
    min-width: 0;
    transition: transform 0.18s ease;
}
.card:hover { transform: translateY(-4px); }

.card-thumb-wrap {
    display: block;
    overflow: hidden;
    border-bottom: 2px solid var(--graphite);
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-fallback {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(45deg, var(--surface-2) 0 14px, var(--bg) 14px 28px);
}
.card-thumb-fallback svg { width: 54px; height: 54px; opacity: 0.5; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.4rem;
    min-width: 0;
}

.card-cats {
    margin-bottom: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.card-cat {
    font-family: 'Oswald', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--oak);
    color: #fff;
    padding: 0.18rem 0.55rem;
    text-decoration: none;
}
.card-cat:hover { background: var(--terracotta); color: #fff; }

.card-title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}
.card-title a { color: var(--heading); text-decoration: none; }
.card-title a:hover { color: var(--accent); }

.card-excerpt {
    font-size: 0.95rem;
    color: var(--text);
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-meta {
    font-family: 'Oswald', sans-serif;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
    margin: 0.7rem 0;
}

/* ===========================================================================
   ГЛАВНАЯ СТРАНИЦА
   =========================================================================== */
.front-hero {
    background:
        linear-gradient(rgba(27,27,24,0.62), rgba(27,27,24,0.62)),
        repeating-linear-gradient(90deg, var(--blueprint) 0 38px, var(--blueprint-2) 38px 39px);
    color: #f4f1e6;
    padding: 4.5rem 0;
}
.front-hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    max-width: 22ch;
}
.front-hero p {
    max-width: 56ch;
    font-size: 1.1rem;
    color: #e2dfd2;
}
.front-hero .btn { margin-top: 0.6rem; }

.front-section { padding: 3.4rem 0; }
.front-section:nth-child(even) { background: var(--surface-2); }

.section-kicker {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
}
.section-title {
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
    margin-bottom: 1.4rem;
}

/* Карточки-инструменты (категории) */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 1.2rem;
}
.tool-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.3rem;
    background: var(--surface);
    border: 2px solid var(--graphite);
    text-decoration: none;
    min-width: 0;
    transition: background 0.2s, color 0.2s;
}
.tool-card:hover { background: var(--graphite); }
.tool-card:hover .tool-card-name { color: var(--concrete); }
.tool-card:hover .tool-card-count { color: var(--oak); }
.tool-card-mark {
    width: 30px;
    height: 30px;
    background: var(--terracotta);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
    margin-bottom: 0.4rem;
}
.tool-card-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1.05rem;
    color: var(--heading);
}
.tool-card-count {
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    color: var(--text-soft);
}

/* Колонки шагов */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.4rem;
}
.step-item {
    background: var(--surface);
    border-top: 4px solid var(--terracotta);
    padding: 1.4rem;
    min-width: 0;
}
.step-num {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 2.4rem;
    color: var(--oak);
    line-height: 1;
}
.step-item h3 { margin: 0.4rem 0 0.4rem; }
.step-item p { margin: 0; font-size: 0.95rem; color: var(--text-soft); }

/* Блок «Перемотка опыта» — фильтр уровня сложности */
.xp-rewind {
    background: var(--surface);
    border: 2px solid var(--graphite);
    padding: 1.8rem;
}
.xp-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1rem 0;
}
.xp-level {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    padding: 0.55rem 1.2rem;
    border: 2px solid var(--oak);
    background: transparent;
    color: var(--heading);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.xp-level:hover { background: var(--surface-2); }
.xp-level.is-active {
    background: var(--oak);
    color: #fff;
}
.xp-note {
    font-size: 0.92rem;
    color: var(--text-soft);
    margin: 0;
}

/* ===========================================================================
   ОДИНОЧНАЯ ЗАПИСЬ / СТРАНИЦА
   =========================================================================== */
.entry-header { margin-bottom: 1.4rem; }
.entry-title { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.entry-meta {
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
}
.entry-thumb {
    margin: 1.2rem 0;
    border: 2px solid var(--graphite);
}
.entry-thumb img { display: block; width: 100%; }
.entry-content { font-size: 1.05rem; }
.entry-content img { display: block; margin: 1.2rem 0; }
.entry-content h2,
.entry-content h3 { margin-top: 1.6em; }

.entry-footer {
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 2px solid var(--border);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
}
.entry-tags a {
    display: inline-block;
    text-decoration: none;
    color: var(--accent);
    margin-right: 0.5rem;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.post-nav a {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--accent);
}

/* ===========================================================================
   САЙДБАР И ВИДЖЕТЫ
   =========================================================================== */
.sidebar { min-width: 0; }

.sidebar .widget {
    background: var(--surface);
    border: 2px solid var(--graphite);
    padding: 1.3rem;
    margin-bottom: 1.6rem;
    /* Светлый фон — тёмный текст (контраст, см. F) */
    color: var(--text);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--heading);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--terracotta);
}
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border);
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--text); text-decoration: none; }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date,
.sidebar .widget .rss-date {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 0.74rem;
    color: var(--text-soft);
}

/* ===========================================================================
   ПАГИНАЦИЯ
   =========================================================================== */
.pagination { margin: 2.4rem 0 0; }
.pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.pagination .page-numbers li { margin: 0; }
.pagination .page-numbers a,
.pagination .page-numbers span {
    display: block;
    min-width: 44px;
    text-align: center;
    padding: 0.5rem 0.8rem;
    font-family: 'Oswald', sans-serif;
    text-decoration: none;
    border: 2px solid var(--graphite);
    color: var(--heading);
    background: var(--surface);
}
.pagination .page-numbers a:hover,
.pagination .page-numbers .current {
    background: var(--terracotta);
    color: #fff;
    border-color: var(--terracotta);
}

/* ===========================================================================
   ПОИСК
   =========================================================================== */
.search-form {
    display: flex;
    gap: 0;
    max-width: 460px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--graphite);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}
.search-form .search-submit {
    border: 2px solid var(--graphite);
    border-left: none;
    background: var(--graphite);
    color: var(--concrete);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    padding: 0 1.1rem;
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--terracotta); border-color: var(--terracotta); }

/* ===========================================================================
   КОММЕНТАРИИ
   =========================================================================== */
.comments-area { margin-top: 2.6rem; }
.comments-title,
.comment-reply-title {
    font-size: 1.4rem;
    text-transform: uppercase;
    border-bottom: 3px solid var(--terracotta);
    padding-bottom: 0.4rem;
}
.comment-list {
    list-style: none;
    margin: 1.4rem 0;
    padding: 0;
}
.comment-list .children {
    list-style: none;
    margin-left: 1.6rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}
.comment-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.1rem;
    margin-bottom: 1rem;
}
.comment-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.comment-avatar img { display: block; border-radius: 2px; }
.comment-author {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.92rem;
}
.comment-date {
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    color: var(--text-soft);
}
.comment-pending { color: var(--terracotta); font-style: italic; }
.comment-reply a {
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--accent);
}

.comment-respond {
    background: var(--surface-2);
    border: 2px solid var(--border);
    padding: 1.3rem;
    margin-top: 1.4rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
}
.comment-form p { margin-bottom: 0.9rem; }
.comment-form label { font-family: 'Oswald', sans-serif; font-size: 0.85rem; }
.comment-form .form-submit input {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.7rem 1.7rem;
    border: 2px solid var(--terracotta);
    background: var(--terracotta);
    color: #fff;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

/* ===========================================================================
   404
   =========================================================================== */
.error-404 {
    text-align: center;
    padding: 2rem 0 3rem;
}
.error-404 .big-code {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(5rem, 16vw, 9rem);
    color: var(--oak);
    line-height: 1;
}
.error-404 .search-form { margin: 1.6rem auto; }

/* ===========================================================================
   ПОДВАЛ — стилизация под синюю печать чертежа
   =========================================================================== */
.site-footer {
    background-color: var(--blueprint);
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    color: #e9ecf3;
    border-top: 4px solid var(--terracotta);
    margin-top: 2rem;
}
.footer-widgets {
    width: min(94%, 1320px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding: 3rem 0 2rem;
}
/* Тёмный фон — светлый текст виджетов (контраст, см. F) */
.footer-widgets .widget { color: #d7dce6; min-width: 0; }
.footer-widgets .widget-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.05rem;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 0.7rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid rgba(255,255,255,0.25);
}
.footer-widgets .widget p { color: #d7dce6; }
.footer-widgets .widget a { color: #f0c9a0; text-decoration: none; }
.footer-widgets .widget a:hover { color: #ffffff; text-decoration: underline; }
.footer-widgets .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-widgets .widget li {
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(255,255,255,0.14);
}
.footer-widgets .widget li:last-child { border-bottom: none; }
.footer-widgets .widget .post-date,
.footer-widgets .widget .rss-date {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 0.74rem;
    color: #9aa6bd;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.16);
}
.footer-bottom-inner {
    width: min(94%, 1320px);
    margin-inline: auto;
    padding: 1.2rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
}
.footer-copy { color: #c3cad8; }
.footer-sign { color: #9aa6bd; }

/* ===========================================================================
   COOKIE-БАННЕР
   Правило [hidden] размещено ДО основных стилей баннера (см. A11)
   =========================================================================== */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--graphite);
    color: #ece9dd;
    border-top: 3px solid var(--terracotta);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 1rem 1.4rem;
}
.cookie-banner p {
    margin: 0;
    flex: 1;
    min-width: 220px;
    font-size: 0.9rem;
}
.cookie-banner a { color: var(--oak); }
.cookie-banner .btn {
    border-color: var(--terracotta);
    color: #fff;
    background: var(--terracotta);
    padding: 0.55rem 1.4rem;
}
.cookie-banner .btn:hover { background: var(--terracotta-dark); }

/* ===========================================================================
   ПЛАВАЮЩАЯ КНОПКА «ВВЕРХ» — шайба гантели
   =========================================================================== */
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid var(--graphite);
    background:
        radial-gradient(circle at 50% 50%, rgba(0,0,0,0.18) 2px, transparent 3px) 0 0 / 9px 9px,
        linear-gradient(145deg, #d4d4cc, #8f8f86);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--graphite);
    z-index: 800;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { border-color: var(--terracotta); }
.to-top svg { width: 22px; height: 22px; }

/* ===========================================================================
   АДАПТИВ
   =========================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2.4rem;
    }
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.55rem; }

    .menu-toggle { display: block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    .main-nav ul.is-open { display: flex; }
    .main-nav a { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); }

    .header-inner { gap: 0.9rem; }
    .header-level { display: none; }

    .front-hero { padding: 3rem 0; }
    .front-section { padding: 2.4rem 0; }

    .post-nav { flex-direction: column; }
}
