/*
Theme Name: dds_nottinghamforest.ru
Theme URI: https://nottinghamforest.ru/
Author: Алексей Ковалёв
Description: Тёмная «лесная» тема для образовательно-фанатского проекта об английском языке через историю и культуру «Ноттингем Форест».
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nfeng
*/

:root {
    --bg: #0F1A14;
    --bg-alt: #16241C;
    --bg-head: #0B140F;
    --bg-foot: #0A110D;
    --bg-side: #132019;
    --text: #E8F0E9;
    --red: #C8102E;
    --red-dark: #9E0C24;
    --emerald: #4A9B6E;
    --emerald-dark: #3A7D58;
    --muted: #7A8F80;
    --line: #2A3D31;
    --pattern: #1A2B20;
    --f-head: "Rubik", "Arial Black", "Segoe UI", Arial, sans-serif;
    --f-body: "PT Sans", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 240'%3E%3Cpath d='M100 230V40M100 40c-8-14-4-30 8-34 6 12 4 24-8 34zm0 30c-20-4-36-18-38-36 18-2 34 12 38 36zm0 0c20-4 36-18 38-36-18-2-34 12-38 36zm0 44c-26-4-48-22-50-46 24-2 46 18 50 46zm0 0c26-4 48-22 50-46-24-2-46 18-50 46zm0 50c-30-2-56-22-58-50 28 0 54 20 58 50zm0 0c30-2 56-22 58-50-28 0-54 20-58 50z' fill='none' stroke='%234A9B6E' stroke-opacity='.09' stroke-width='3'/%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, var(--pattern) 0 1px, transparent 1px 20px);
    background-repeat: no-repeat, repeat;
    background-position: right -40px bottom -30px, 0 0;
    background-size: 260px auto, auto;
    background-attachment: fixed, scroll;
}


img { max-width: 100%; height: auto; }
a { color: var(--emerald); text-decoration: none; }
a:hover { color: #66B98A; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    line-height: 1.2;
    margin: 1.6em 0 .6em;
    color: var(--text);
    letter-spacing: -.01em;
}
h1 { font-size: 2.2rem; font-weight: 800; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
h1, h2 {
    background: linear-gradient(180deg, #FFFFFF 0%, #CFE3D4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
p { margin: 0 0 1em; }

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

blockquote {
    margin: 1.5em 0;
    padding: 1.1em 1.4em;
    border-left: 4px solid var(--red);
    background: var(--bg-alt);
    border-radius: 0 6px 6px 0;
}
blockquote p:last-child { margin-bottom: 0; }

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

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

/* ---------- Полоса «лента формы» ---------- */
.kit-stripe {
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--red) 0 48px, var(--emerald) 48px 72px);
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: .98rem;
    padding: .72em 1.4em;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1.2;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn-fill { background: var(--red); color: #FFFFFF; border-color: var(--red); }
.btn-fill:hover { background: var(--red-dark); border-color: var(--red-dark); color: #FFFFFF; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(74, 155, 110, .28); }
.btn-line { background: transparent; color: var(--emerald); border-color: var(--emerald); }
.btn-line:hover { background: rgba(74, 155, 110, .12); border-color: var(--emerald-dark); color: #7CC79D; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(74, 155, 110, .28); }

/* Анимированное подчёркивание текстовых ссылок */
.entry a, .page-intro a, .widget a, .crumbs a, .card-title a, .foot-copy a {
    background-image: linear-gradient(var(--red), var(--red));
    background-repeat: no-repeat;
    background-size: 0 2px;
    background-position: 0 100%;
    transition: background-size .3s, color .2s;
}
.entry a:hover, .page-intro a:hover, .widget a:hover, .crumbs a:hover, .card-title a:hover {
    background-size: 100% 2px;
}

/* ---------- Шапка ---------- */
.masthead { background: var(--bg-head); border-bottom: 1px solid var(--line); }
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}
.brand { display: flex; align-items: center; gap: .9rem; color: var(--text); min-width: 0; }
.brand:hover { color: var(--text); }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-logo, .brand-svg { display: block; width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.35;
    margin-top: .2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .55rem .8rem;
    font-family: var(--f-head);
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 20px; height: 2px;
    background: var(--emerald);
    position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.primary-nav { display: none; border-top: 1px solid var(--line); }
.primary-nav.is-open { display: block; }
.nav-list { list-style: none; margin: 0; padding: .4rem 0; }
.nav-list li { position: relative; }
.nav-list a {
    display: block;
    padding: .7rem 0;
    color: var(--text);
    font-family: var(--f-head);
    font-weight: 500;
    border-bottom: 1px solid rgba(42, 61, 49, .6);
}
.nav-list a:hover, .nav-list .current-menu-item > a { color: var(--emerald); }
.nav-list .sub-menu { list-style: none; margin: 0; padding-left: 1rem; }

/* ---------- Крошки ---------- */
.crumbs { font-size: .9rem; color: var(--muted); padding: 1.4rem 0 .4rem; }
.crumbs a { color: var(--emerald); }
.crumbs .sep { color: var(--red); margin: 0 .35rem; }
.crumbs span:last-child { color: var(--muted); }

/* ---------- Раскладка ---------- */
.page-wrap { padding-bottom: 4rem; }
.layout-single, .layout-with-sidebar { display: block; }
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }
.sidebar { min-width: 0; margin-top: 2.5rem; }

.page-head { margin-bottom: 2rem; }
.page-title { font-size: 2.3rem; margin: .8rem 0 .6rem; }
.page-intro { color: var(--muted); }

/* ---------- Заголовки секций ---------- */
.sec-title {
    position: relative;
    display: inline-block;
    font-size: 2rem;
    margin: 0 0 .8rem;
    padding-left: 4.2rem;
}
.sec-title::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 2.6rem; height: 3px;
    background: var(--red);
    transform: translateY(-50%);
}
.sec-title::after {
    content: "";
    position: absolute;
    left: 3.1rem; top: 50%;
    width: 8px; height: 8px;
    background: var(--emerald);
    transform: translateY(-50%);
}
.sec-lead { color: var(--muted); max-width: 62ch; margin: 0 0 2.4rem; }

/* Красный квадрат-маркер у заголовков контента */
.entry h2, .entry h3 { position: relative; padding-left: 1.1rem; }
.entry h2::before, .entry h3::before {
    content: "";
    position: absolute;
    left: 0; top: .5em;
    width: 8px; height: 8px;
    background: var(--red);
}

/* ---------- Главная ---------- */
.front-shell { width: 85%; margin-left: auto; margin-right: auto; }
.front-section { padding: 5rem 0; }
.tone-main { background-color: transparent; }
.tone-alt { background-color: rgba(22, 36, 28, .85); }
.tone-accent {
    background:
        radial-gradient(ellipse at 0% 50%, rgba(200, 16, 46, .16), transparent 45%),
        radial-gradient(ellipse at 100% 50%, rgba(200, 16, 46, .16), transparent 45%),
        linear-gradient(135deg, #17301F 0%, #080E0B 100%);
}

.hero {
    position: relative;
    padding: 6rem 0 6.5rem;
    background-color: var(--bg-head);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 14, 11, .92) 0%, rgba(8, 14, 11, .7) 55%, rgba(8, 14, 11, .35) 100%);
}
.hero-inner { position: relative; }
.hero-kicker { color: var(--emerald); font-family: var(--f-head); font-weight: 500; margin: 0 0 1rem; }
.hero-title { font-size: 2.3rem; margin: 0 0 1.2rem; max-width: 18ch; }
.hero-lead { max-width: 58ch; font-size: 1.12rem; color: #C9D8CC; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* Таймлайн */
.chrono { list-style: none; margin: 0; padding: 0 0 0 2.2rem; position: relative; }
.chrono::before {
    content: "";
    position: absolute;
    left: .45rem; top: .4rem; bottom: .4rem;
    width: 2px;
    background: var(--emerald);
}
.chrono-item { position: relative; margin-bottom: 1.8rem; }
.chrono-item:last-child { margin-bottom: 0; }
.chrono-item::before {
    content: "";
    position: absolute;
    left: -2.2rem; top: .35rem;
    width: 14px; height: 14px;
    margin-left: .1rem;
    background: var(--red);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-alt);
}
.chrono-date {
    display: block;
    font-family: var(--f-head);
    font-weight: 700;
    color: var(--emerald);
    margin-bottom: .45rem;
    font-size: 1.05rem;
}
.chrono-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.3rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.chrono-card h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.chrono-card p { margin: 0; color: #C5D3C8; }
.chrono-card em { color: var(--text); font-style: italic; }

/* Разделители */
.branch-rule {
    height: 48px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 44L1200 4M820 17l40 -20M860 16l30 14M380 32l-30 -22M420 30l28 12' fill='none' stroke='%234A9B6E' stroke-opacity='.35' stroke-width='2'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.dash-rule {
    width: 85%;
    margin: 0 auto;
    border-top: 1px dashed rgba(74, 155, 110, .5);
}

/* Последние записи */
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.latest .sec-title { margin-bottom: 2.4rem; }
.latest-more { margin: 2.4rem 0 0; }
.empty-note { color: var(--muted); }

/* Статистика */
.stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid rgba(74, 155, 110, .3);
    border-bottom: 1px solid rgba(74, 155, 110, .3);
}
.stat { padding: 2rem 1.2rem; min-width: 0; border-left: 1px solid rgba(74, 155, 110, .3); }
.stat:nth-child(odd) { border-left: 0; }
.stat:nth-child(n+3) { border-top: 1px solid rgba(74, 155, 110, .3); }
.stat-num {
    display: block;
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 2.8rem;
    line-height: 1;
    color: #FFFFFF;
    text-shadow: 0 0 18px rgba(232, 240, 233, .35), 0 0 42px rgba(74, 155, 110, .25);
    margin-bottom: .7rem;
}
.stat-label { display: block; color: var(--emerald); font-size: .95rem; line-height: 1.4; }

/* Карта тем */
.topic-map { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.topic {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
    padding: 1.6rem 1.5rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    transition: transform .25s, border-color .25s, background-color .25s, box-shadow .25s;
}
.topic svg { width: 44px; height: 44px; color: var(--emerald); margin-bottom: .6rem; transition: color .25s; }
.topic-name { font-family: var(--f-head); font-weight: 600; font-size: 1.12rem; }
.topic-note { color: var(--muted); font-size: .92rem; }
.topic:hover {
    color: var(--text);
    transform: translateY(-4px);
    border-color: var(--red);
    background: linear-gradient(160deg, rgba(200, 16, 46, .22), rgba(15, 26, 20, 1) 70%);
    box-shadow: 0 10px 26px rgba(200, 16, 46, .18);
}
.topic:hover svg { color: #FF5A73; }

/* ---------- Карточки ---------- */
.card-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: transform .25s, border-color .25s;
}
.card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s;
    z-index: 2;
}
.card:hover { transform: translateY(-3px); border-color: var(--emerald); }
.card:hover::before { transform: scaleX(1); }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 1.3rem 1.4rem 1.5rem; min-width: 0; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.card-tag {
    display: inline-block;
    font-size: .78rem;
    font-family: var(--f-head);
    font-weight: 500;
    color: var(--emerald);
    border: 1px solid rgba(74, 155, 110, .5);
    border-radius: 4px;
    padding: .1em .55em;
}
.card-tag:hover { color: #FFFFFF; border-color: var(--emerald); }
.card-title { margin: 0 0 .6rem; font-size: 1.22rem; -webkit-text-fill-color: currentColor; }
.card-title a { color: var(--text); }
.card-excerpt { color: #C5D3C8; font-size: .98rem; margin-bottom: 1.1rem; overflow-wrap: anywhere; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { align-self: flex-start; margin-top: auto; font-size: .9rem; padding: .55em 1.1em; }

/* ---------- Запись и страница ---------- */
.entry-head { margin-bottom: 1.4rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; color: var(--muted); font-size: .92rem; }
.entry-cover { margin: 0 0 2rem; }
.entry-cover img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.entry { overflow-wrap: break-word; }
.entry img { border-radius: 6px; }
.entry ul, .entry ol { padding-left: 1.4rem; }
.entry li { margin-bottom: .35em; }
.entry ul li::marker { color: var(--red); }
.entry pre { overflow-x: auto; background: var(--bg-head); border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.2rem; }
.entry code { background: var(--bg-head); padding: .1em .35em; border-radius: 4px; }
.entry pre code { background: none; padding: 0; }
.entry figure { margin: 1.5em 0; }
.entry figcaption { color: var(--muted); font-size: .88rem; margin-top: .4rem; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; }
.entry-tags a { color: var(--emerald); border: 1px solid var(--line); border-radius: 4px; padding: .2em .6em; font-size: .88rem; }
.entry-tags a:hover { border-color: var(--emerald); }
.entry-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px dashed rgba(74, 155, 110, .5); }
.entry-nav-next { text-align: right; }

/* ---------- Сайдбар и виджеты ---------- */
.sidebar .widget {
    background: var(--bg-side);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.4rem 1.4rem 1.2rem;
    margin-bottom: 1.6rem;
    color: var(--text);
}
.widget-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-left: 1rem;
    position: relative;
    color: var(--text);
    -webkit-text-fill-color: currentColor;
    background: none;
}
.widget-title::before { content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 8px; background: var(--red); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .5rem 0; border-bottom: 1px solid rgba(42, 61, 49, .7); }
.widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: #BFD9C8; }
.sidebar .widget a:hover { color: var(--text); }
.sidebar .widget .post-date { display: block; font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.sidebar .widget p { color: #C5D3C8; }

/* ---------- Подвал ---------- */
.site-foot { background: var(--bg-foot); border-top: 1px solid var(--line); padding: 3.5rem 0 1.5rem; color: #C5D3C8; position: relative; }
.site-foot::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -1px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--red) 0 48px, var(--emerald) 48px 72px);
    opacity: .6;
}
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.foot-col { min-width: 0; }
.site-foot .widget-title { color: var(--text); }
.site-foot .widget p, .site-foot .textwidget { color: #B7C7BB; font-size: .95rem; }
.site-foot .widget a { color: #8FCBA8; }
.site-foot .widget a:hover { color: #FFFFFF; }
.site-foot .widget li { border-bottom-color: rgba(42, 61, 49, .5); }
.foot-copy { margin: 2.5rem 0 0; padding-top: 1.4rem; border-top: 1px dashed rgba(74, 155, 110, .35); color: var(--muted); font-size: .88rem; }

/* ---------- Пагинация (type => plain) ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .45rem; margin: 2.5rem 0 0; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 .8rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg-alt);
    color: var(--text);
    font-family: var(--f-head);
    font-weight: 500;
    transition: border-color .2s, color .2s, transform .2s;
}
.pager a.page-numbers:hover { border-color: var(--emerald); color: var(--emerald); transform: translateY(-2px); }
.pager .page-numbers.current { background: var(--red); border-color: var(--red); color: #FFFFFF; }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; }
.pager .post-page-numbers { margin-right: .3rem; }

/* ---------- Поиск ---------- */
.seek { display: flex; gap: .5rem; margin: 1.2rem 0; }
.seek-field {
    flex: 1;
    min-width: 0;
    padding: .7rem .9rem;
    background: var(--bg-head);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font: inherit;
}
.seek-field::placeholder { color: var(--muted); }
.empty-box { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 1.6rem 1.6rem 1rem; }

/* ---------- 404 ---------- */
.lost { text-align: left; padding: 2rem 0; }
.lost-code {
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 6rem;
    line-height: 1;
    margin: 0;
    color: transparent;
    -webkit-text-stroke: 2px var(--red);
}

/* ---------- Комментарии ---------- */
.talk { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px dashed rgba(74, 155, 110, .5); }
.talk-title { font-size: 1.5rem; }
.talk-list, .talk-list .children { list-style: none; margin: 0; padding: 0; }
.talk-list .children { padding-left: 1.5rem; }
.talk-body { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
.talk-head { display: flex; gap: .8rem; align-items: center; margin-bottom: .6rem; }
.talk-head img { border-radius: 4px; display: block; }
.talk-author { display: block; font-family: var(--f-head); }
.talk-date { font-size: .82rem; color: var(--muted); }
.talk-wait, .talk-note, .talk-closed { color: var(--muted); font-size: .9rem; }
.comment-reply-link { font-size: .88rem; }
.comment-respond { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem; margin-top: 1.5rem; }
.comment-reply-title { margin-top: 0; font-size: 1.3rem; }
.comment-form label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: .3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .65rem .8rem;
    background: var(--bg-head);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 4px;
    font: inherit;
}
.comment-form .comment-form-cookies-consent label { display: inline; }

/* ---------- Cookie ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    padding: 1.1rem 1.3rem;
    background: var(--bg-head);
    border: 1px solid var(--line);
    border-top: 3px solid var(--red);
    border-radius: 6px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .5);
    color: var(--text);
}
.cookie-text { margin: 0; font-size: .92rem; color: #C5D3C8; }
.cookie-accept { align-self: flex-start; }

/* ---------- WordPress ---------- */
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { color: var(--muted); font-size: .88rem; }
.sticky .card-title a::before { content: "Закреплено: "; color: var(--red); }
.bypostauthor > .talk-body { border-color: rgba(74, 155, 110, .6); }

/* ---------- ≥600px ---------- */
@media (min-width: 600px) {
    .hero-title { font-size: 2.8rem; }
    .card-grid, .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topic-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .entry-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cookie-banner { flex-direction: row; align-items: center; left: 1.5rem; right: 1.5rem; }
    .cookie-accept { align-self: center; flex: 0 0 auto; }
    .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- ≥960px ---------- */
@media (min-width: 960px) {
    body { font-size: 1.08rem; }
    h1 { font-size: 3.2rem; }
    .page-title { font-size: 2.8rem; }
    .hero { padding: 8rem 0 8.5rem; }
    .hero-title { font-size: 3.2rem; }
    .nav-toggle { display: none; }
    .primary-nav { display: block; }
    .nav-list { display: flex; flex-wrap: wrap; gap: 2rem; padding: 0; }
    .nav-list a { padding: .85rem 0; border-bottom: 2px solid transparent; }
    .nav-list a:hover, .nav-list .current-menu-item > a { border-bottom-color: var(--red); }
    .nav-list .sub-menu {
        display: none;
        position: absolute;
        top: 100%; left: 0;
        min-width: 220px;
        padding: .4rem 1rem;
        background: var(--bg-head);
        border: 1px solid var(--line);
        z-index: 20;
    }
    .nav-list li:hover > .sub-menu, .nav-list li:focus-within > .sub-menu { display: block; }
    .brand-name { font-size: 1.05rem; max-width: 70ch; }

    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
        column-gap: 6%;
        align-items: start;
    }
    .sidebar { margin-top: 0; }

    .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sec-title { font-size: 2.3rem; }

    .chrono { padding-left: 3rem; }
    .chrono::before { left: .6rem; }
    .chrono-item { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
    .chrono-item::before { left: -3rem; top: 1.4rem; }
    .chrono-date { padding-top: 1.2rem; margin: 0; font-size: 1.2rem; }

    .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat { border-left: 1px solid rgba(74, 155, 110, .3); padding: 2.4rem 1.6rem; }
    .stat:first-child { border-left: 0; }
    .stat:nth-child(odd) { border-left: 1px solid rgba(74, 155, 110, .3); }
    .stat:nth-child(1) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 0; }
    .stat-num { font-size: 3.6rem; }

    .topic-map { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; }
    .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
    .front-section { padding: 6.5rem 0; }
}

/* ---------- ≤600px ---------- */
@media (max-width: 600px) {
    .front-section { padding: 3.5rem 0; }
    .front-shell, .layout-single .content-area { width: 100%; }
    .hero { padding: 4rem 0 4.5rem; }
    .sec-title { font-size: 1.6rem; padding-left: 3.4rem; }
    .sec-title::before { width: 2rem; }
    .sec-title::after { left: 2.45rem; }
    .chrono-card { padding: 1.1rem 1.2rem; }
    .topic { padding: 1.3rem 1.2rem; }
    .stat { padding: 1.5rem 1rem; }
    .stat-num { font-size: 2.3rem; }
    .sidebar .widget { padding: 1.2rem 1.1rem 1rem; }
    .comment-respond { padding: 1.2rem 1.1rem; }
    .empty-box { padding: 1.3rem 1.2rem .8rem; }
    .cookie-banner { padding: 1rem 1.1rem; }
    .seek { flex-direction: column; }
    .lost-code { font-size: 4.2rem; }
    body { background-size: 160px auto, auto; }
}
