/*
Theme Name: dds_victoriandomesticdangers.com
Author: Eleanor Ashworth
Description: Тёмная ботаническая редакционная тема «The Astringent Herbarium» для информационного сайта о домашнем пивоварении. Викторианская история и современное крафтовое возрождение.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: vdd
*/

/* ============================ Переменные ============================ */
:root {
    --bg:        #1A1C1A; /* Deep Forest Charcoal */
    --bg-alt:    #252A25; /* Mossy Graphite */
    --bg-footer: #0F1210; /* Almost Black Green */
    --bg-side:   #1E221E;
    --bg-card:   #1E221E;
    --text:      #E4E3D8; /* Warm Off-White */
    --gold:      #C7A85C; /* Verdant Gold */
    --sage:      #6A8D73; /* Muted Sage */
    --muted:     #7B8075; /* Dried Herb Grey */
    --font-head: Georgia, 'Playfair Display', 'Times New Roman', serif;
    --font-body: 'Segoe UI', 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', system-ui, sans-serif;
}

/* ============================ Базовое ============================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M12 14h4M14 12v4' stroke='%236A8D73' stroke-opacity='0.14' stroke-width='1'/%3E%3C/svg%3E"),
        linear-gradient(to right, rgba(106,141,115,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(106,141,115,0.06) 1px, transparent 1px);
    background-size: 28px 28px, 28px 28px, 28px 28px;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.15;
    color: var(--text);
    font-weight: 700;
}

p { margin: 0 0 1.1em; }

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.empty { color: var(--muted); }

/* ============================ Кнопки ============================ */
.btn {
    position: relative;
    display: inline-block;
    z-index: 0;
    overflow: hidden;
    padding: 0.75rem 1.6rem;
    border: 1px solid var(--gold);
    border-radius: 0;
    background: transparent;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--gold);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: translateY(0); }

.btn-primary {
    background: var(--gold);
    color: #161816;
    border-color: var(--gold);
}
.btn-primary::before { background: #161816; }
.btn-primary:hover { color: var(--gold); }

.btn-ghost { background: transparent; color: var(--gold); }

/* ============================ Шапка (не липкая) ============================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid rgba(199,168,92,0.25);
    position: relative;
    z-index: 10;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.branding { display: flex; align-items: center; gap: 0.9rem; min-width: 0; flex: 1; }
.brand-link { display: inline-flex; flex: 0 0 auto; }
.brand-logo { max-height: 60px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.site-title {
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.02em;
    line-height: 1.25;
    /* Название сайта длинное — ограничиваем высоту визуально */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.site-desc {
    font-size: 0.82rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.primary-nav .menu {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.primary-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.98rem;
    letter-spacing: 0.03em;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
    color: var(--gold);
    border-bottom-color: var(--sage);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: transparent;
    border: 1px solid rgba(199,168,92,0.4);
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 22px; height: 2px;
    margin: 0 auto;
    background: var(--gold);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================ Заголовки секций ============================ */
.section-title {
    display: inline-block;
    position: relative;
    margin: 0 0 2rem;
    padding-bottom: 0.6rem;
    font-size: 2.1rem;
    letter-spacing: 0.01em;
    border-bottom: 2px solid var(--gold);
}
.section-title::before {
    content: "";
    display: block;
    width: 40px; height: 22px;
    margin-bottom: 0.7rem;
    opacity: 0.75;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24'%3E%3Cpath d='M4 20 Q20 20 36 4' fill='none' stroke='%23C7A85C' stroke-width='1.4'/%3E%3Cpath d='M12 16 q2-5 8-6M18 12 q2-5 8-6M24 9 q2-4 7-4' stroke='%23C7A85C' stroke-width='1.2' fill='none'/%3E%3C/svg%3E") no-repeat left center/contain;
}

/* ============================ Секции главной ============================ */
.front-section { padding: 4.5rem 0; position: relative; }
.fs-alt { background: var(--bg-alt); }

/* Волнистый разделитель (перегонная кривая) сверху альтернативных секций */
.fs-alt::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 26px;
    opacity: 0.1;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 26' preserveAspectRatio='none'%3E%3Cpath d='M0 13 Q25 0 50 13 T100 13 T150 13 T200 13' fill='none' stroke='%23C7A85C' stroke-width='2'/%3E%3C/svg%3E") repeat-x left top/200px 26px;
}

.section-cta { margin-top: 2.5rem; text-align: center; }

/* ============================ Hero ============================ */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 62vh;
    display: flex;
    align-items: center;
    background: var(--bg);
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.5;
    z-index: 0;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(120% 90% at 50% 40%, rgba(26,28,26,0.35) 0%, rgba(26,28,26,0.82) 70%, rgba(26,28,26,0.95) 100%);
    backdrop-filter: blur(1px);
}
.hero-blob {
    position: absolute;
    z-index: 1;
    top: 50%; left: 46%;
    transform: translate(-50%, -50%);
    width: 460px; height: 460px;
    max-width: 90vw;
    border-radius: 50%;
    background: radial-gradient(circle at 42% 40%, rgba(199,168,92,0.42), rgba(199,168,92,0.08) 62%, transparent 72%);
    filter: blur(2px);
    pointer-events: none;
}
.hero-sprig {
    position: absolute;
    z-index: 2;
    right: 3%; bottom: 0;
    width: 90px;
    opacity: 0.5;
    pointer-events: none;
}
.hero-sprig svg { width: 100%; height: auto; display: block; }
.hero-inner {
    position: relative;
    z-index: 3;
    width: min(90%, 900px);
    margin-inline: auto;
    text-align: center;
    padding: 4rem 1.4rem;
}
.hero-eyebrow {
    color: var(--sage);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin: 0 0 1rem;
}
.hero-title {
    font-size: 4.5rem;
    letter-spacing: 0.02em;
    margin: 0 0 1.4rem;
    color: var(--text);
    text-shadow: 0 2px 30px rgba(0,0,0,0.5);
}
.hero-lead {
    color: var(--text);
    font-size: 1.08rem;
    max-width: 640px;
    margin: 0 auto 2rem;
}

/* ============================ Таймлайн ============================ */
.timeline {
    list-style: none;
    margin: 0; padding: 0;
    position: relative;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 0;
    border-left: 2px dashed var(--gold);
    transform: translateX(-50%);
}
.tl-item {
    position: relative;
    width: 50%;
    padding: 1rem 2.5rem 2rem;
    min-width: 0;
}
.tl-left { left: 0; text-align: right; }
.tl-right { left: 50%; text-align: left; }
.tl-node {
    position: absolute;
    top: 1.5rem;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(199,168,92,0.18);
}
.tl-left .tl-node { right: -8px; }
.tl-right .tl-node { left: -8px; }
.tl-year {
    display: inline-block;
    color: var(--gold);
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
}
.tl-body h3 { margin: 0.2rem 0 0.5rem; font-size: 1.25rem; }
.tl-body p { color: var(--text); margin: 0; }

/* ============================ Цитата ============================ */
.fs-quote { background: var(--bg-alt); text-align: center; }
.pull-quote {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 3.5rem;
}
.pull-quote blockquote {
    margin: 0;
    font-family: var(--font-head);
    font-style: italic;
    font-size: 2.1rem;
    line-height: 1.35;
    color: var(--text);
}
.pull-quote figcaption {
    margin-top: 1.4rem;
    color: var(--gold);
    letter-spacing: 0.05em;
    font-size: 0.95rem;
}
.pq-star {
    position: absolute;
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.22;
    line-height: 1;
}
.pq-star-left { top: -0.4rem; left: 0; }
.pq-star-right { bottom: -0.4rem; right: 0; }

/* ============================ Рубрикатор ============================ */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
}
.topic-card {
    display: block;
    padding: 1.8rem 1.8rem;
    background: var(--bg-side);
    border: 1px solid var(--sage);
    border-radius: 0;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.topic-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
}
.topic-icon { display: block; width: 40px; height: 40px; margin-bottom: 1rem; }
.topic-icon svg { width: 100%; height: 100%; display: block; }
.topic-card h3 { margin: 0 0 0.5rem; color: var(--gold); font-size: 1.3rem; }
.topic-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ============================ Раскладки ============================ */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
    gap: 2.6rem;
    padding: 3rem 0 4rem;
    align-items: start;
}
.layout-single { padding: 3rem 0 4rem; }
.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
.content-area { min-width: 0; }

/* ============================ Карточки записей ============================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-card);
    border-left: 6px solid var(--gold);
    border-radius: 0;
    box-shadow: inset 0 0 0 1px rgba(106,141,115,0.15);
    overflow: hidden;
    transition: border-left-width 0.25s ease, background 0.25s ease;
}
.card:hover { border-left-width: 12px; background: var(--bg-alt); }
.card-thumb-wrap {
    position: relative;
    overflow: hidden;
}
.card-thumb-wrap a { display: block; }
.card-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.spec-tag {
    position: absolute;
    top: 12px; left: -4px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #E4E3D8;
    color: #1A1C1A;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.28rem 0.7rem 0.28rem 0.55rem;
    clip-path: polygon(0 0, 100% 6%, 96% 100%, 4% 94%);
}
.spec-pin {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--sage);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.4rem 1.4rem;
    min-width: 0;
}
.card-meta { color: var(--muted); font-size: 0.82rem; margin-bottom: 0.5rem; letter-spacing: 0.03em; }
.card-title { font-size: 1.28rem; margin: 0 0 0.7rem; line-height: 1.25; }
.card-title a { color: var(--text); text-decoration: none; transition: color 0.2s ease; }
.card-title a:hover { color: var(--gold); }
.card-excerpt { flex: 1; color: var(--text); font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: var(--gold); }
.card-more {
    margin-top: 1rem;
    align-self: flex-start;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}
.card-more:hover { border-bottom-color: var(--gold); }

/* ============================ Хлебные крошки ============================ */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    line-height: 1.8;
}
.breadcrumbs a { color: var(--sage); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .sep { color: var(--muted); margin: 0 0.2rem; }

/* ============================ Заголовки страниц ============================ */
.page-head { margin-bottom: 2rem; }
.page-title { font-size: 2.4rem; margin: 0 0 0.5rem; }
.archive-desc { color: var(--muted); }

/* ============================ Одиночная запись ============================ */
.single-post, .single-page { min-width: 0; }
.single-head { margin-bottom: 1.6rem; }
.single-cats, .single-tags { margin-bottom: 0.9rem; }
.cat-chip {
    display: inline-block;
    background: var(--bg-alt);
    color: var(--gold);
    border: 1px solid var(--sage);
    padding: 0.2rem 0.7rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    margin: 0 0.3rem 0.3rem 0;
}
.cat-chip:hover { border-color: var(--gold); }
.single-title { font-size: 2.7rem; margin: 0 0 0.8rem; line-height: 1.12; }
.single-meta { color: var(--muted); font-size: 0.9rem; }
.single-meta .meta-sep { margin: 0 0.4rem; }
.single-thumb { margin: 0 0 2rem; }
.single-thumb img { width: 100%; display: block; }

.single-content { font-size: 1.06rem; }
.single-content p { margin: 0 0 1.3em; }
.single-content h2 { font-size: 1.9rem; margin: 2rem 0 0.9rem; }
.single-content h3 { font-size: 1.45rem; margin: 1.7rem 0 0.7rem; }
.single-content a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 2px solid var(--sage);
    padding-bottom: 1px;
    background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 100% / 0% 2px;
    transition: background-size 0.3s ease;
}
.single-content a:hover { background-size: 100% 2px; }
.single-content ul, .single-content ol { padding-left: 1.4rem; margin: 0 0 1.3em; }
.single-content li { margin-bottom: 0.4rem; }
.single-content blockquote {
    margin: 1.6rem 0;
    padding: 1.2rem 1.6rem;
    border-left: 4px solid var(--gold);
    background: var(--bg-alt);
    font-family: var(--font-head);
    font-style: italic;
    color: var(--text);
}
.single-content img { display: block; height: auto; }
.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.single-content table, .single-content th, .single-content td {
    border: 1px solid rgba(106,141,115,0.45);
}
.single-content th, .single-content td { padding: 0.6rem 0.8rem; text-align: left; }
.single-content th { background: var(--bg-alt); color: var(--gold); }

/* Буквица */
.dropcap > p:first-of-type::first-letter {
    font-family: var(--font-head);
    font-size: 4.4rem;
    line-height: 0.78;
    font-weight: 700;
    float: left;
    color: var(--gold);
    margin: 0.08em 0.12em -0.05em -0.06em;
}

.single-tags .tags-label { color: var(--muted); }
.single-tags a { color: var(--sage); text-decoration: none; }
.single-tags a:hover { color: var(--gold); }
.page-links { margin-top: 1.5rem; color: var(--muted); }
.page-links a { color: var(--gold); }

/* ============================ Сайдбар ============================ */
.sidebar {
    min-width: 0;
    background: var(--bg-side);
    border-top: 3px solid var(--gold);
    padding: 1.6rem 1.5rem;
    align-self: start;
}
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    color: var(--gold);
    font-size: 1.15rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(106,141,115,0.4);
}
.sidebar .widget, .sidebar .widget p, .sidebar .widget li { color: var(--text); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.5rem 0; border-bottom: 1px solid rgba(106,141,115,0.18); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--text); text-decoration: none; transition: color 0.2s ease; }
.sidebar .widget a:hover { color: var(--gold); }
.sidebar .post-date, .sidebar .rss-date { color: var(--muted); font-size: 0.82rem; }

/* ============================ Подвал ============================ */
.site-footer { background: var(--bg-footer); margin-top: 3rem; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding: 3rem 0;
}
.footer-col { min-width: 0; }
.site-footer .widget-title {
    color: var(--gold);
    font-size: 1.1rem;
    margin: 0 0 1rem;
    letter-spacing: 0.02em;
}
.site-footer .widget, .site-footer .widget p, .site-footer .widget li { color: var(--text); }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 0.4rem 0; }
.site-footer .widget a { color: var(--text); text-decoration: none; transition: color 0.2s ease; }
.site-footer .widget a:hover { color: var(--gold); }
.site-footer .post-date { color: var(--muted); font-size: 0.82rem; }
.footer-bottom {
    border-top: 1px solid rgba(199,168,92,0.2);
    padding: 1.4rem 0;
}
.copyright { margin: 0; color: var(--muted); font-size: 0.86rem; }

/* ============================ Пагинация ============================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 3rem 0 0;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.85rem;
    border: 1px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pagination a.page-numbers:hover {
    background: var(--sage);
    border-color: var(--sage);
    color: #161816;
}
.pagination .page-numbers.current {
    background: var(--gold);
    color: #161816;
    border-color: var(--gold);
}
.pagination .page-numbers.dots {
    border-color: transparent;
    color: var(--muted);
}

.comment-navigation, .posts-navigation { margin: 2rem 0; }
.comment-navigation a, .posts-navigation a { color: var(--gold); text-decoration: none; }

/* ============================ Комментарии ============================ */
.comments-area { margin-top: 3rem; }
.comments-title { font-size: 1.6rem; margin: 0 0 1.5rem; color: var(--text); }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list ol.children { list-style: none; margin: 1rem 0 0 1.5rem; padding: 0; }
.comment-item { margin-bottom: 1.5rem; }
.comment-body {
    background: var(--bg-alt);
    border-left: 3px solid var(--sage);
    padding: 1.1rem 1.3rem;
}
.comment-meta { display: flex; gap: 0.8rem; align-items: baseline; margin-bottom: 0.5rem; flex-wrap: wrap; }
.comment-author { color: var(--gold); font-weight: 700; }
.comment-date { color: var(--muted); font-size: 0.8rem; }
.comment-content { color: var(--text); }
.comment-awaiting { color: var(--muted); font-style: italic; }
.comment-reply a { color: var(--sage); text-decoration: none; font-size: 0.85rem; }
.comment-reply a:hover { color: var(--gold); }

.comment-respond {
    background: var(--bg-alt);
    border-top: 3px solid var(--gold);
    padding: 1.6rem 1.8rem;
    margin-top: 2rem;
}
.comment-reply-title { margin: 0 0 1rem; color: var(--text); font-size: 1.35rem; }
.comment-form label { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid rgba(106,141,115,0.4);
    color: var(--text);
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    border-radius: 0;
}
.comment-form textarea:focus,
.comment-form input:focus { outline: 1px solid var(--gold); }
.comment-form .comment-notes, .comment-form .comment-form-cookies-consent { color: var(--muted); font-size: 0.85rem; }

/* ============================ Форма поиска ============================ */
.search-form { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0; }
.search-field {
    flex: 1;
    min-width: 0;
    background: var(--bg-alt);
    border: 1px solid rgba(106,141,115,0.4);
    color: var(--text);
    padding: 0.65rem 0.9rem;
    font-family: var(--font-body);
    border-radius: 0;
}
.search-field::placeholder { color: var(--muted); }
.search-field:focus { outline: 1px solid var(--gold); }
.search-submit { white-space: nowrap; }

/* ============================ 404 ============================ */
.error-404 { text-align: center; padding: 2rem 0; }
.error-code { font-family: var(--font-head); font-size: 6rem; color: var(--gold); opacity: 0.35; margin: 0; line-height: 1; }
.error-text { color: var(--muted); max-width: 520px; margin: 0.5rem auto 1.5rem; }
.error-404 .search-form { max-width: 440px; margin: 0 auto 1.5rem; }

/* ============================ Cookie-баннер (A11: [hidden] до основного блока) ============================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    background: var(--bg-footer);
    border-top: 1px solid var(--gold);
    padding: 1.1rem 1.6rem;
}
.cookie-text { margin: 0; color: var(--text); font-size: 0.9rem; flex: 1; min-width: 220px; }
.cookie-accept { flex: 0 0 auto; }

/* ============================ Адаптив ============================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .layout-single .content-area { width: 100%; }
    .hero-title { font-size: 3.4rem; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pull-quote blockquote { font-size: 1.7rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .nav-toggle { display: flex; }
    .primary-nav {
        flex-basis: 100%;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav .menu { flex-direction: column; gap: 0.2rem; }
    .primary-nav a { display: block; padding: 0.6rem 0; border-bottom: 1px solid rgba(106,141,115,0.18); }

    .hero { min-height: 52vh; }
    .hero-title { font-size: 2.5rem; }
    .hero-inner { padding: 3rem 1rem; }

    .front-section { padding: 3rem 0; }
    .section-title { font-size: 1.7rem; }

    /* Таймлайн в один столбец */
    .timeline::before { left: 8px; }
    .tl-item { width: 100%; left: 0 !important; text-align: left; padding: 0.5rem 0 1.8rem 2.4rem; }
    .tl-left { text-align: left; }
    .tl-left .tl-node, .tl-right .tl-node { left: 1px; right: auto; }

    .topics-grid { grid-template-columns: 1fr; }
    .topic-card { padding: 1.5rem 1.4rem; }

    .pull-quote { padding: 2rem 2.4rem; }
    .pull-quote blockquote { font-size: 1.45rem; }
    .pq-star { font-size: 3.2rem; }

    .footer-cols { grid-template-columns: 1fr; gap: 1.8rem; padding: 2.4rem 0; }

    .single-title { font-size: 2rem; }
    .page-title { font-size: 1.9rem; }
    .dropcap > p:first-of-type::first-letter { font-size: 3.4rem; }

    .cookie-banner { padding: 1rem 1.1rem; }
}
