/*
Theme Name: dds_alphas-projects.com
Author: Игорь Савельев
Description: Информационно-практическая платформа об осознанном ремонте. Дизайн-концепция «Архитектурный эскиз»: журнальная строгость, брутализм и чертёжная эстетика.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: alphaproj
*/

/* =========================================================================
   Переменные
   ====================================================================== */
:root {
    --paper: #F9F7F4;
    --paper-alt: #F2EFEA;
    --ink: #1E1E1E;
    --footer-bg: #2A2A2A;
    --sidebar-bg: #FFFFFF;
    --terracotta: #D84B33;
    --steel: #4A6B8A;
    --muted: #8A827A;
    --line: #cfc9c1;

    --font-head: 'Helvetica Neue', 'Arial Narrow', Arial, 'Segoe UI', sans-serif;
    --font-body: Georgia, 'Times New Roman', 'PT Serif', serif;

    --shell: min(92%, 1180px);
}

/* =========================================================================
   Сброс и база
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background-color: var(--paper);
    background-image: radial-gradient(rgba(30, 30, 30, 0.035) 1px, transparent 1px);
    background-size: 5px 5px;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--terracotta); }

p { margin: 0 0 1.1em; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin: 0 0 0.6em;
}

.shell { width: var(--shell); margin-inline: auto; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 0.6rem 1rem;
    z-index: 999;
}
.skip-link:focus { left: 0; }

/* Текстовые ссылки в контенте — пунктирное подчёркивание */
.entry-content a,
.card-excerpt a,
.tl-card a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px dotted var(--steel);
    transition: border-color .18s, transform .18s, color .18s;
}
.entry-content a:hover,
.card-excerpt a:hover,
.tl-card a:hover {
    border-bottom: 1px solid var(--steel);
    color: var(--steel);
    display: inline-block;
    transform: translateX(2px);
}

/* =========================================================================
   Кнопки
   ====================================================================== */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.86rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform .12s, background-color .18s, color .18s;
}

/* Обводка с двойной рамкой, заливка при наведении */
.btn-ghost {
    color: var(--terracotta);
    background: transparent;
    border: 1px solid var(--terracotta);
    box-shadow: inset 0 0 0 3px rgba(216, 75, 51, 0.14);
}
.btn-ghost:hover {
    background: var(--terracotta);
    color: #fff;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.25);
    transform: translateY(2px);
}

.btn-solid {
    color: #fff;
    background: var(--terracotta);
    border: 2px solid var(--ink);
}
.btn-solid:hover { background: var(--ink); transform: translateY(2px); }

.btn-ghost-light {
    color: var(--paper);
    background: transparent;
    border: 1px solid rgba(249, 247, 244, 0.7);
}
.btn-ghost-light:hover { background: var(--paper); color: var(--ink); transform: translateY(2px); }

button.btn { font-size: 0.86rem; }

/* =========================================================================
   Шапка
   ====================================================================== */
.site-header {
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.brand-logo-svg { height: 52px; width: auto; display: block; }
.brand-logo { max-height: 60px; width: auto; display: block; }
.brand-text { min-width: 0; }
.brand-name {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.02em;
    line-height: 1.25;
    max-width: 46ch;
}
.brand-name a { color: var(--ink); text-decoration: none; }
.brand-desc {
    margin: 0.3rem 0 0;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
    text-transform: none;
    max-width: 52ch;
}

/* Навигация (не липкая) */
.primary-nav { min-width: 0; }
.primary-menu {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.primary-menu a {
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    color: var(--ink);
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: border-color .18s, color .18s;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--ink);
    width: 46px;
    height: 42px;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.nav-toggle-bar { width: 22px; height: 2px; background: var(--ink); display: block; }

/* =========================================================================
   Общая обёртка контента
   ====================================================================== */
.site-main { display: block; }
.page-wrap { padding: 2.4rem 0 3.5rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2.48fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area { width: 100%; }
.content-area { min-width: 0; }

/* Хлебные крошки */
.breadcrumbs {
    font-family: var(--font-head);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 1.8rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed var(--line);
}
.breadcrumbs a { color: var(--steel); text-decoration: none; border-bottom: 1px dotted var(--steel); }
.breadcrumbs a:hover { border-bottom-style: solid; }
.breadcrumbs .sep { color: var(--muted); margin: 0 0.35rem; }

/* Заголовок области с «угольной» скобкой и линейкой */
.area-head {
    position: relative;
    margin-bottom: 1.8rem;
    padding-top: 0.4rem;
}
.area-head::after {
    content: '';
    display: block;
    height: 2px;
    background: var(--ink);
    width: 108%;
    margin-left: -4%;
    margin-top: 0.6rem;
}
.head-bracket {
    color: var(--terracotta);
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.2rem;
    line-height: 0.6;
    margin-right: 0.15em;
    vertical-align: -0.08em;
}
.area-title {
    display: inline;
    font-size: 2.2rem;
    margin: 0;
}

/* =========================================================================
   Сетка карточек
   ====================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.8rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 2px solid var(--ink);
    padding: 10px;
    position: relative;
    transition: border-color .2s, background-color .2s;
}
.card:hover { border-color: var(--terracotta); background: rgba(216, 75, 51, 0.06); }

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    margin-bottom: 0.9rem;
}
.card-thumb-link { display: block; }
.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.15);
    transition: filter .3s;
}
.card:hover .card-thumb { filter: grayscale(60%) contrast(1.1); }
.card-thumb-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(74, 107, 138, 0.22);
    pointer-events: none;
    transition: background .3s;
}
.card:hover .card-thumb-wrap::after { background: rgba(216, 75, 51, 0.14); }

.card-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--terracotta);
    z-index: 2;
    pointer-events: none;
}
.card-corner-tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.card-corner-br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 0.35rem 0.35rem;
}
.card-meta {
    font-family: var(--font-head);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.6rem;
}
.card-cat { color: var(--steel); }
.card-title {
    font-size: 1.22rem;
    margin: 0 0 0.6rem;
    text-transform: none;
    line-height: 1.2;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--terracotta); }
.card-excerpt { font-size: 0.94rem; color: #2c2c2c; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--terracotta);
    text-decoration: none;
    padding-top: 0.6rem;
}
.card-more:hover { color: var(--ink); }

/* =========================================================================
   Одиночная запись / страница
   ====================================================================== */
.single-post, .single-page { margin-bottom: 2.5rem; }
.single-meta {
    font-family: var(--font-head);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    display: flex;
    gap: 1rem;
    margin-bottom: 0.7rem;
}
.single-cat { color: var(--steel); }
.single-title {
    font-size: 3.5rem;
    margin: 0 0 1.2rem;
    line-height: 1.05;
}
.single-thumb {
    margin: 0 0 1.6rem;
    border: 2px solid var(--ink);
}
.single-thumb img { display: block; width: 100%; }

.entry-content { font-size: 1.02rem; }
.entry-content h2, .entry-content h3 {
    text-transform: none;
    margin-top: 1.6em;
    padding-left: 0.6em;
    border-left: 6px solid var(--terracotta);
}
.entry-content h2 { font-size: 1.7rem; }
.entry-content h3 { font-size: 1.32rem; }
.entry-content img { border: 2px solid var(--ink); display: block; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }

.entry-content blockquote {
    margin: 1.6em 0;
    background: var(--paper-alt);
    border-left: 40px solid var(--terracotta);
    padding: 1.4rem 1.6rem;
    font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}
.entry-content table, .entry-content th, .entry-content td {
    border: 1px solid var(--ink);
}
.entry-content th, .entry-content td { padding: 0.6rem 0.8rem; text-align: left; }
.entry-content th { background: var(--paper-alt); font-family: var(--font-head); text-transform: uppercase; font-size: 0.82rem; }

.single-tags {
    margin-top: 1.6rem;
    font-family: var(--font-head);
    font-size: 0.8rem;
    text-transform: uppercase;
}
.single-tags a {
    display: inline-block;
    border: 1px solid var(--steel);
    color: var(--steel);
    padding: 0.2rem 0.6rem;
    margin: 0 0.4rem 0.4rem 0;
    text-decoration: none;
}
.single-tags a:hover { background: var(--steel); color: #fff; }

.page-links { margin: 1.4rem 0; font-family: var(--font-head); }

/* =========================================================================
   Сайдбар
   ====================================================================== */
.sidebar {
    background: var(--sidebar-bg);
    border: 2px solid var(--ink);
    padding: 1.4rem 1.3rem;
    min-width: 0;
    align-self: start;
}
.sidebar .widget { margin-bottom: 1.8rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.widget-title {
    font-size: 1rem;
    color: var(--ink);
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ink);
}
.sidebar a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--steel); }
.sidebar a:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin-bottom: 0.6rem; padding-bottom: 0.6rem; border-bottom: 1px dashed var(--line); font-size: 0.94rem; }
.sidebar li:last-child { border-bottom: none; }
.sidebar .post-date { display: block; color: var(--muted); font-size: 0.76rem; font-family: var(--font-head); margin-top: 0.2rem; }

/* =========================================================================
   Пагинация (type => plain, стилизуем .page-numbers)
   ====================================================================== */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.6rem;
    justify-content: center;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.7rem;
    border: 2px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 700;
    text-decoration: none;
    transition: background .18s, color .18s;
}
.pager a.page-numbers:hover { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.pager .page-numbers.current { background: var(--ink); color: #fff; }
.pager .page-numbers.dots { border: none; background: transparent; }

/* =========================================================================
   Секции главной
   ====================================================================== */
.front { display: block; }
.front-section, .fs-timeline, .fs-latest, .fs-stats, .fs-checklist {
    padding: 3.4rem 0;
}
.fs-timeline { background: var(--paper); }
.fs-latest { background: var(--paper-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fs-stats { background: var(--paper-alt); }
.fs-checklist { background: var(--paper); }

/* Заголовок секции: номер, скобка, линейка */
.sec-head { position: relative; margin-bottom: 2.2rem; padding-top: 1.6rem; }
.sec-head::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background-image: repeating-linear-gradient(45deg, var(--line) 0, var(--line) 1px, transparent 1px, transparent 7px);
}
.sec-num {
    position: absolute;
    top: -0.7rem;
    left: 50%;
    transform: translateX(-50%);
    background: inherit;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--muted);
    padding: 0 0.7rem;
}
.fs-timeline .sec-num, .fs-checklist .sec-num { background: var(--paper); }
.fs-latest .sec-num, .fs-stats .sec-num { background: var(--paper-alt); }

.sec-title {
    font-size: 2.1rem;
    margin: 0 0 0.6rem;
    max-width: 24ch;
}
.sec-title::before {
    content: '[';
    color: var(--terracotta);
    font-weight: 800;
    margin-right: 0.12em;
}
.sec-lead {
    font-size: 1.02rem;
    color: #3a3a3a;
    max-width: 62ch;
    margin: 0;
}

/* --- Hero --- */
.fs-hero {
    background: var(--footer-bg);
    color: var(--paper);
    padding: 3.6rem 0 3.8rem;
    border-bottom: 3px solid var(--terracotta);
}
.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
}
.hero-copy { min-width: 0; }
.hero-kicker {
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.76rem;
    color: #b9c4d1;
    margin: 0 0 1rem;
}
.hero-title {
    font-size: 3.5rem;
    color: #fff;
    margin: 0 0 1rem;
    line-height: 1;
    letter-spacing: 0.01em;
}
.hero-accent { color: var(--terracotta); }
.hero-slogan {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #e7e3dd;
    max-width: 46ch;
    margin: 0 0 1.8rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-plan { min-width: 0; }
.hero-plan-svg {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(249, 247, 244, 0.25);
}

/* --- Таймлайн --- */
.timeline {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    position: relative;
    max-width: 900px;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 0;
    border-left: 2px dashed var(--steel);
    transform: translateX(-50%);
}
.tl-item {
    position: relative;
    width: 50%;
    padding: 0 2.4rem 2rem 0;
    box-sizing: border-box;
    min-width: 0;
}
.tl-item:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 2rem 2.4rem;
}
.tl-dot {
    position: absolute;
    top: 0.5rem;
    width: 15px;
    height: 15px;
    background: var(--paper);
    border: 2px solid var(--steel);
    z-index: 2;
}
.tl-item:nth-child(odd) .tl-dot { right: -8px; }
.tl-item:nth-child(even) .tl-dot { left: -8px; }
.tl-item:hover .tl-dot { background: var(--terracotta); border-color: var(--terracotta); }
.tl-card {
    background: var(--paper-alt);
    border: 2px solid var(--ink);
    padding: 1.2rem 1.3rem;
    position: relative;
    min-width: 0;
}
.tl-num {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2rem;
    color: var(--terracotta);
    display: block;
    line-height: 1;
    margin-bottom: 0.4rem;
}
.tl-title { font-size: 1.1rem; text-transform: none; margin: 0 0 0.4rem; }
.tl-card p { margin: 0; font-size: 0.94rem; }

/* --- Последние записи --- */
.latest-all { text-align: center; margin: 2.2rem 0 0; }

/* --- Статистика --- */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.4rem;
}
.stat { text-align: center; min-width: 0; flex: 1 1 160px; max-width: 220px; }
.stat-num {
    display: block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 3.4rem;
    color: var(--ink);
    line-height: 1;
}
.stat-label {
    display: block;
    font-size: 0.86rem;
    color: var(--muted);
    margin-top: 0.5rem;
    line-height: 1.35;
}
.stat-div {
    font-family: var(--font-head);
    font-size: 1.8rem;
    color: var(--steel);
}

/* --- Чек-лист --- */
.checklist-inner { position: relative; }
.checklist-inner::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: -20px;
    width: 6px;
    background: var(--terracotta);
}
.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 760px;
}
.check-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--line);
    min-width: 0;
}
.check-item:last-child { border-bottom: none; }
.check-box {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--ink);
    margin-top: 3px;
    position: relative;
    transition: background .2s;
}
.check-box::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 0px;
    width: 8px;
    height: 14px;
    border: solid var(--terracotta);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .2s;
}
.check-item:hover .check-box::after { transform: rotate(45deg) scale(1); }
.check-item:hover .check-box { border-color: var(--terracotta); }
.check-text { font-size: 1.02rem; min-width: 0; }

/* =========================================================================
   Формы поиска и комментариев
   ====================================================================== */
.search-form { margin: 1.4rem 0; }
.search-label { display: block; font-family: var(--font-head); text-transform: uppercase; font-size: 0.76rem; letter-spacing: 0.05em; margin-bottom: 0.5rem; color: var(--muted); }
.search-row { display: flex; gap: 0; }
.search-field {
    flex: 1 1 auto;
    min-width: 0;
    border: 2px solid var(--ink);
    border-right: none;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #fff;
    color: var(--ink);
}
.search-submit { border: 2px solid var(--ink); background: var(--ink); color: #fff; }
.search-submit:hover { background: var(--terracotta); border-color: var(--terracotta); }

.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--ink); }
.comments-title { font-size: 1.5rem; text-transform: none; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list ol.children { list-style: none; margin-left: 1.6rem; padding: 0; }
.comment-item { margin-bottom: 1.2rem; }
.comment-body { border: 1px solid var(--line); padding: 1rem 1.2rem; background: #fff; }
.comment-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.comment-author { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: 0.86rem; }
.comment-date { color: var(--muted); font-size: 0.78rem; font-family: var(--font-head); }
.comment-await { color: var(--terracotta); font-size: 0.86rem; }
.comment-reply { margin-top: 0.5rem; font-family: var(--font-head); font-size: 0.8rem; text-transform: uppercase; }

.comment-form { margin-top: 1.4rem; }
.comment-form label { display: block; font-family: var(--font-head); text-transform: uppercase; font-size: 0.78rem; margin-bottom: 0.3rem; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    border: 2px solid var(--ink);
    padding: 0.6rem 0.8rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #fff;
    margin-bottom: 1rem;
}
.comment-form textarea { min-height: 140px; }

.empty-note { font-size: 1.05rem; color: var(--muted); padding: 1.2rem 0; }

/* =========================================================================
   404
   ====================================================================== */
.error-404 { text-align: center; padding: 2rem 0; }
.error-code {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 7rem;
    line-height: 1;
    color: var(--terracotta);
    letter-spacing: 0.05em;
}
.error-404 .area-head { display: inline-block; }
.error-404 .area-head::after { display: none; }
.error-lead { max-width: 46ch; margin: 1rem auto 1.6rem; color: #3a3a3a; }
.error-404 .search-form { max-width: 440px; margin-left: auto; margin-right: auto; }
.error-home { margin-top: 1.6rem; }

/* =========================================================================
   Подвал
   ====================================================================== */
.site-footer {
    background: var(--footer-bg);
    color: #e7e3dd;
    padding: 3rem 0 1.6rem;
    margin-top: 0;
    border-top: 3px solid var(--terracotta);
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}
.footer-col { min-width: 0; }
.site-footer .widget-title { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.3); }
.site-footer .widget { margin-bottom: 1.4rem; }
.site-footer p { color: #cfc9c1; font-size: 0.94rem; }
.site-footer a { color: #e7e3dd; text-decoration: none; border-bottom: 1px dotted var(--steel); }
.site-footer a:hover { color: #fff; border-bottom-color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; font-size: 0.94rem; }
.site-footer .post-date { color: #a49b90; font-size: 0.76rem; display: block; }

.footer-bottom {
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.copyright { margin: 0; font-family: var(--font-head); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.05em; color: #a49b90; }

/* =========================================================================
   Cookie-баннер
   ====================================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: var(--ink);
    color: #f2efea;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    padding: 1rem 1.4rem;
    border-top: 3px solid var(--terracotta);
}
.cookie-text { margin: 0; font-size: 0.9rem; max-width: 74ch; min-width: 0; }
.cookie-accept { background: var(--terracotta); color: #fff; border: 2px solid #fff; }
.cookie-accept:hover { background: #fff; color: var(--ink); }

/* =========================================================================
   Адаптив
   ====================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .sidebar { order: 2; }
    .hero-inner { grid-template-columns: minmax(0, 1fr); }
    .hero-plan { max-width: 420px; }
    .single-title, .hero-title { font-size: 2.7rem; }
    body { font-size: 17px; }
}

@media (max-width: 600px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        flex-basis: 100%;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .primary-menu { flex-direction: column; gap: 0.4rem; margin-top: 0.8rem; }
    .primary-menu a { display: block; padding: 0.5rem 0; border-bottom: 1px dashed var(--line); }

    .site-header-inner { align-items: flex-start; }

    .single-title, .hero-title { font-size: 2.1rem; }
    .area-title, .sec-title { font-size: 1.6rem; }
    .head-bracket { font-size: 1.6rem; }
    .error-code { font-size: 4.6rem; }

    /* Таймлайн в одну колонку */
    .timeline::before { left: 8px; }
    .tl-item, .tl-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding: 0 0 1.6rem 2.2rem;
    }
    .tl-item:nth-child(odd) .tl-dot,
    .tl-item:nth-child(even) .tl-dot { left: 1px; right: auto; }

    .stat-num { font-size: 2.6rem; }
    .stats-row { gap: 1.2rem; }
    .stat-div { display: none; }

    .checklist-inner::before { left: -12px; }
    .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }

    .front-section, .fs-hero, .fs-timeline, .fs-latest, .fs-stats, .fs-checklist { padding: 2.4rem 0; }
    .cookie-banner { padding: 0.9rem 1rem; }
}
