/*
Theme Name: dds_myrubberboots.com
Theme URI: https://myrubberboots.com/
Author: Лариса Власова
Description: Тёмная тема для информационного сайта о недвижимости и практических вопросах жилья. Дизайн-концепция «Инструментальная картография»: асимметричная сетка, схематичная графика, фиолетовый и бирюзовый акценты.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: kartodom
*/

/* ==================================================================
   1. Переменные
   ================================================================== */

:root {
    --bg: #0B0E14;
    --bg-alt: #121820;
    --bg-foot: #06080B;
    --bg-side: #0F141C;
    --ink: #E8EDF5;
    --ink-mute: #6B7280;
    --accent: #A78BFA;
    --accent-deep: #7C3AED;
    --accent-2: #2DD4BF;
    --rule: #2A323D;
    --font-head: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --font-body: 'IBM Plex Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --radius-btn: 8px;
    --radius-card: 12px;
    --shadow-hard: 6px 6px 8px rgba(0, 0, 0, 0.55);
    --shadow-hover: 6px 6px 18px rgba(124, 58, 237, 0.38);
}

/* ==================================================================
   2. Сброс и база
   ================================================================== */

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: 0.012em;
    color: var(--ink);
    background-color: var(--bg);
    background-image: radial-gradient(rgba(167, 139, 250, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    background-attachment: fixed;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 0.7em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.05em; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover, a:focus {
    color: var(--accent);
    text-decoration: underline dotted;
    text-underline-offset: 4px;
}

ul, ol { padding-left: 1.2em; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

code, pre {
    font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
    background: #151B25;
    color: var(--accent-2);
}

code { padding: 0.1em 0.35em; border-radius: 4px; }

pre {
    display: block;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-card);
    border-left: 4px solid var(--accent-2);
    overflow-x: auto;
    min-width: 0;
}

blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 1.6rem;
    border-left: 4px solid var(--accent-2);
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
    background: linear-gradient(90deg, #1E1B4B 0%, var(--bg) 100%);
    font-size: 1.06rem;
}

blockquote p:last-child { margin-bottom: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid var(--rule);
    font-size: 0.96rem;
}

th, td {
    border: 1px solid var(--rule);
    padding: 0.7rem 0.85rem;
    text-align: left;
}

th { background: #171F2A; font-family: var(--font-head); }

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: #0B0E14;
    padding: 0.6rem 1rem;
    z-index: 100;
}

.skip:focus { left: 0; }

/* ==================================================================
   3. Контейнеры и раскладки
   ================================================================== */

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

.site-main { display: block; }

.page-wrap { padding: 2.2rem 0 3.4rem; }

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

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

/* ==================================================================
   4. Шапка
   ================================================================== */

.masthead {
    position: static;
    background: var(--bg);
    padding: 1.4rem 0;
    border: 0;
}

.masthead-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 320px;
}

.brand-mark { display: block; flex: 0 0 auto; line-height: 0; }

.brand-logo { display: block; width: 54px; height: 54px; }

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.brand-name a { color: var(--ink); }

.brand-name a:hover { color: var(--accent); text-decoration: none; }

.brand-tagline {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--ink-mute);
    margin-top: 0.25rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.55rem;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--accent);
    border-radius: var(--radius-btn);
    padding: 0.55rem 0.9rem;
    font-family: var(--font-head);
    font-size: 0.92rem;
    cursor: pointer;
}

.nav-toggle-bars {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 5px 0 var(--accent), 0 -5px 0 var(--accent);
}

.primary-nav[hidden] { display: none !important; }

.primary-nav { flex: 0 1 auto; }

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li { position: relative; }

.nav-list a {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.97rem;
    color: var(--ink);
    padding: 0.3rem 0;
}

.nav-list a:hover,
.nav-list .current-menu-item > a {
    color: var(--accent);
    text-decoration: none;
}

.nav-list .sub-menu {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0 0 0 0.9rem;
    display: block;
}

/* ==================================================================
   5. Кнопки и ссылки
   ================================================================== */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.72rem 1.35rem;
    border-radius: var(--radius-btn);
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.btn:hover, .btn:focus {
    text-decoration: none;
    box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(167, 139, 250, 0.45);
}

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

.btn-ghost:hover { color: var(--ink); }

.btn-solid { background: var(--accent); color: #0B0E14; }

.btn-solid:hover, .btn-solid:focus { background: var(--accent-deep); color: #FFFFFF; }

/* ==================================================================
   6. Хлебные крошки
   ================================================================== */

.trail {
    font-size: 0.86rem;
    color: var(--ink-mute);
    margin-bottom: 1.6rem;
    line-height: 1.6;
}

.trail a { color: var(--ink-mute); }

.trail a:hover { color: var(--accent); }

.trail-sep { color: var(--accent); padding: 0 0.15rem; }

/* ==================================================================
   7. Секции главной
   ================================================================== */

.fs {
    position: relative;
    overflow: hidden;
    padding: 4.6rem 0;
    background: transparent;
}

.fs-alt { background: var(--bg-alt); }

.fs:not(.fs-hero)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 340px;
    height: 240px;
    opacity: 0.05;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: left bottom;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 240'%3E%3Cg fill='none' stroke='%23A78BFA' stroke-width='4'%3E%3Cpath d='M-10 190 L120 190 L120 90 L250 90 L250 250'/%3E%3Cpath d='M40 250 L40 130 L340 130'/%3E%3Cpath d='M-10 60 L200 60 L200 -10'/%3E%3C/g%3E%3Cg fill='%23A78BFA'%3E%3Ccircle cx='120' cy='90' r='11'/%3E%3Ccircle cx='250' cy='130' r='9'/%3E%3Ccircle cx='40' cy='190' r='8'/%3E%3Ccircle cx='200' cy='60' r='7'/%3E%3C/g%3E%3C/svg%3E");
}

.fs-inner {
    position: relative;
    z-index: 1;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.fs-alt .fs-inner { margin-right: 0; }

.fs-title {
    position: relative;
    font-size: 2rem;
    padding-left: 1.15rem;
    margin-bottom: 0.7rem;
}

.fs-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.18em;
    bottom: 0.18em;
    width: 6px;
    background: var(--accent);
    border-radius: 2px;
}

.fs-lead {
    color: var(--ink-mute);
    max-width: 60ch;
    margin-bottom: 2.2rem;
}

/* --- Блок 1. Hero --- */

.fs-hero {
    padding: 6.5rem 0 6rem;
    background: var(--bg);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
    filter: blur(1px);
}

.hero-veil {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(11, 14, 20, 0.94) 0%, rgba(11, 14, 20, 0.78) 45%, rgba(11, 14, 20, 0.35) 100%);
}

.hero-inner { width: 85%; margin-right: auto; margin-left: 0; }

.hero-kicker {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-2);
    border-left: 4px solid var(--accent-2);
    padding-left: 0.7rem;
    margin-bottom: 1.4rem;
}

.hero-title {
    font-size: clamp(1.85rem, 3.3vw, 3.5rem);
    max-width: 20ch;
    margin-bottom: 0.9rem;
    text-shadow: 0 0 26px rgba(167, 139, 250, 0.35);
}

.hero-sub {
    max-width: 58ch;
    color: #C7D0DE;
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* --- Блок 2. Статистика --- */

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
}

.stat-cell {
    min-width: 0;
    padding: 1.4rem 1.3rem;
    border-bottom: 1px solid var(--rule);
}

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent-2);
    margin-bottom: 0.6rem;
}

.stat-cap {
    display: block;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--ink-mute);
}

/* --- Блок последних записей --- */

.fs-latest .card-grid { margin-top: 1.6rem; }

.empty-note { color: var(--ink-mute); }

/* --- Блок 3. Чек-лист --- */

.check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.check-col { min-width: 0; }

.check-head {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--rule);
}

.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.check-list li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-width: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0.9rem;
}

.check-ic {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 0.15rem;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5 L10 17.5 L19 7' fill='none' stroke='%23A78BFA' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 14px 14px;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- Блок 4. Таймлайн --- */

.fs-line::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    background-image:
        linear-gradient(30deg, transparent 47%, rgba(167, 139, 250, 0.09) 47%, rgba(167, 139, 250, 0.09) 53%, transparent 53%),
        linear-gradient(-30deg, transparent 47%, rgba(167, 139, 250, 0.09) 47%, rgba(167, 139, 250, 0.09) 53%, transparent 53%),
        linear-gradient(90deg, transparent 47%, rgba(45, 212, 191, 0.06) 47%, rgba(45, 212, 191, 0.06) 53%, transparent 53%);
    background-size: 48px 84px;
}

.tl {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tl::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: linear-gradient(180deg, transparent 0%, var(--rule) 8%, var(--rule) 92%, transparent 100%);
}

.tl-item {
    position: relative;
    display: flex;
    min-width: 0;
    margin-bottom: 2.2rem;
}

.tl-item:nth-child(odd) { justify-content: flex-start; padding-right: 52%; }

.tl-item:nth-child(even) { justify-content: flex-end; padding-left: 52%; }

.tl-node {
    position: absolute;
    left: 50%;
    top: 1.6rem;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent-2);
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.45);
}

.tl-card {
    min-width: 0;
    width: 100%;
    padding: 1.4rem 1.5rem;
    background: var(--bg-alt);
    border-radius: var(--radius-card);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-hard);
}

.tl-stage {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 0.5rem;
}

.tl-head { font-size: 1.12rem; margin-bottom: 0.5rem; }

.tl-card p { margin: 0; font-size: 0.94rem; color: #B9C3D2; }

/* ==================================================================
   8. Карточки записей
   ================================================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.9rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--bg-alt);
    border: 0;
    border-bottom: 1px solid var(--rule);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-hard);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-thumb {
    position: relative;
    display: block;
    min-width: 0;
}

.card-thumb a { display: block; }

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(18, 24, 32, 0) 0%, rgba(18, 24, 32, 0.85) 100%);
}

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

.card-title {
    font-size: 1.16rem;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.card-title a { color: var(--ink); }

.card-title a:hover { color: var(--accent); text-decoration: none; }

.card-meta {
    font-size: 0.82rem;
    color: var(--ink-mute);
    margin: 0 0 0.8rem;
}

.card-excerpt {
    font-size: 0.94rem;
    color: #B9C3D2;
    margin-bottom: 1.1rem;
}

.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more { align-self: flex-start; margin-top: auto; }

.risk-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.risk-dot.is-calm { background: #34D399; box-shadow: 0 0 9px rgba(52, 211, 153, 0.75); }

.risk-dot.is-watch { background: #FBBF24; box-shadow: 0 0 9px rgba(251, 191, 36, 0.75); }

.risk-dot.is-alert { background: #F87171; box-shadow: 0 0 9px rgba(248, 113, 113, 0.75); }

/* ==================================================================
   9. Страницы и записи
   ================================================================== */

.page-head { margin-bottom: 1.8rem; }

.page-title, .entry-title {
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    margin-bottom: 0.5rem;
}

.page-desc { color: var(--ink-mute); }

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.86rem;
    color: var(--ink-mute);
    margin-bottom: 1.6rem;
}

.entry-cat { color: var(--accent-2); }

.entry-cover { margin: 0 0 1.8rem; }

.entry-cover img {
    display: block;
    width: 100%;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-hard);
}

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

.entry-content h2 {
    position: relative;
    font-size: 1.65rem;
    padding-left: 1.05rem;
    margin-top: 2rem;
}

.entry-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 5px;
    background: var(--accent);
    border-radius: 2px;
}

.entry-content h3 { margin-top: 1.7rem; }

.entry-content img { border-radius: var(--radius-card); display: block; }

.entry-content ul, .entry-content ol { margin: 0 0 1.2em; }

.entry-content li { margin-bottom: 0.45em; }

.wp-caption-text, figcaption {
    font-size: 0.84rem;
    color: var(--ink-mute);
    padding-top: 0.5rem;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.entry-tags a {
    font-size: 0.84rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-btn);
}

.entry-tags a:hover { border-color: var(--accent); text-decoration: none; }

.entry-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin: 2.4rem 0;
    padding: 1.3rem 1.4rem;
    background: var(--bg-alt);
    border-radius: var(--radius-card);
    border-bottom: 1px solid var(--rule);
    font-size: 0.92rem;
}

.entry-nav-prev, .entry-nav-next { min-width: 0; flex: 1 1 240px; }

.entry-nav-next { text-align: right; }

.page-links { margin: 1.5rem 0; font-size: 0.9rem; }

/* ==================================================================
   10. Сайдбар и виджеты
   ================================================================== */

.sidebar {
    min-width: 0;
    padding: 1.5rem 1.4rem;
    background: var(--bg-side);
    border-right: 1px solid var(--rule);
    border-radius: var(--radius-card);
    color: var(--ink);
}

.widget { margin-bottom: 2rem; }

.widget:last-child { margin-bottom: 0; }

.widget-title {
    position: relative;
    font-size: 1.05rem;
    padding-left: 0.85rem;
    margin-bottom: 1rem;
}

.widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 0.93rem;
    line-height: 1.5;
}

.widget li:last-child { border-bottom: 0; }

.widget .post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-mute);
}

.sidebar .widget-title { color: var(--ink); }

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--ink); }

.sidebar .widget a { color: var(--accent); }

.sidebar .widget a:hover { color: var(--ink); }

.sidebar .widget .post-date { color: var(--ink-mute); }

/* ==================================================================
   11. Формы, поиск, комментарии
   ================================================================== */

.searchform { margin: 1.4rem 0; }

.searchform-label {
    display: block;
    font-size: 0.86rem;
    color: var(--ink-mute);
    margin-bottom: 0.45rem;
}

.searchform-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.searchform-field { flex: 1 1 200px; min-width: 0; }

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="number"],
textarea {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    background: #101722;
    border: 1px solid var(--rule);
    border-radius: var(--radius-btn);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.3);
}

textarea { min-height: 150px; resize: vertical; }

.comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
}

.comments-title { font-size: 1.5rem; }

.note-list, .note-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.note-list .children { padding-left: 1.4rem; margin-top: 1rem; }

.note {
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.2rem;
    background: var(--bg-alt);
    border-radius: var(--radius-card);
    border-bottom: 1px solid var(--rule);
}

.note-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.9rem;
    align-items: baseline;
    margin-bottom: 0.6rem;
}

.note-author { font-family: var(--font-head); font-weight: 700; }

.note-date { font-size: 0.82rem; color: var(--ink-mute); }

.note-hold { font-size: 0.88rem; color: var(--accent-2); }

.note-body { font-size: 0.95rem; }

.note-body p:last-child { margin-bottom: 0; }

.note-tools { font-size: 0.86rem; margin-top: 0.6rem; }

.comment-respond {
    margin-top: 2rem;
    padding: 1.6rem 1.7rem;
    background: var(--bg-alt);
    border-radius: var(--radius-card);
    border-bottom: 1px solid var(--rule);
}

.comment-reply-title { font-size: 1.25rem; }

.comment-form p { margin-bottom: 1rem; }

.comment-form label { display: block; font-size: 0.88rem; margin-bottom: 0.35rem; }

.form-note, .comment-notes { font-size: 0.86rem; color: var(--ink-mute); }

.comment-form input[type="submit"] {
    font-family: var(--font-head);
    font-weight: 600;
    padding: 0.72rem 1.35rem;
    border-radius: var(--radius-btn);
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #0B0E14;
    cursor: pointer;
    width: auto;
}

.comment-form input[type="submit"]:hover {
    background: var(--accent-deep);
    color: #FFFFFF;
    box-shadow: 0 0 18px rgba(167, 139, 250, 0.45);
}

.comments-closed { color: var(--ink-mute); }

/* ==================================================================
   12. Пагинация
   ================================================================== */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    font-family: var(--font-head);
    font-size: 0.93rem;
    line-height: 1.2;
    padding: 0.6rem 0.85rem;
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: var(--radius-btn);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pager a.page-numbers:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.35);
}

.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #0B0E14;
}

.pager .page-numbers.dots {
    border-color: transparent;
    color: var(--ink-mute);
}

.pagination, .comments-pagination { margin-top: 2rem; }

.comments-pagination .page-numbers {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-btn);
    margin-right: 0.4rem;
    color: var(--ink);
}

/* ==================================================================
   13. Подвал
   ================================================================== */

.site-foot {
    background: var(--bg-foot);
    padding: 3.4rem 0 2rem;
    margin-top: 0;
    color: var(--ink);
}

.foot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--rule);
}

.foot-col { min-width: 0; }

.site-foot .widget-title { color: var(--ink); font-size: 1rem; }

.site-foot .widget,
.site-foot .widget p,
.site-foot .widget li,
.site-foot .textwidget { color: #C3CBD8; font-size: 0.92rem; }

.site-foot .widget a { color: var(--accent); }

.site-foot .widget a:hover { color: var(--ink); }

.site-foot .widget li { border-bottom-color: #1A2029; }

.site-foot .widget .post-date { color: var(--ink-mute); }

.foot-legal {
    margin: 1.6rem 0 0;
    font-size: 0.85rem;
    color: var(--ink-mute);
}

/* ==================================================================
   14. Cookie-баннер
   ================================================================== */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.6rem;
    background: #0F141C;
    border-top: 1px solid var(--rule);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
}

.cookie-text {
    margin: 0;
    flex: 1 1 320px;
    min-width: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #C3CBD8;
}

/* ==================================================================
   15. Адаптив
   ================================================================== */

@media (max-width: 960px) {
    body { font-size: 16px; }

    h1 { font-size: 2.4rem; }

    .nav-toggle { display: inline-flex; }

    .primary-nav { flex: 1 1 100%; }

    .nav-list {
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--rule);
        margin-top: 0.6rem;
    }

    .nav-list li { border-bottom: 1px solid var(--rule); }

    .nav-list a { display: block; padding: 0.7rem 0; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }

    .layout-single { width: 100%; }

    .sidebar { border-right: 0; }

    .fs { padding: 3.4rem 0; }

    .fs-hero { padding: 4.4rem 0 3.8rem; }

    .fs-inner, .hero-inner { width: 100%; margin-left: 0; margin-right: 0; }

    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .check-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }

    .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 961px) {
    .primary-nav[hidden] { display: block !important; }
}

@media (max-width: 600px) {
    body { font-size: 15.5px; }

    h1 { font-size: 2rem; }

    h2 { font-size: 1.55rem; }

    .page-wrap { padding: 1.6rem 0 2.6rem; }

    .fs { padding: 2.8rem 0; }

    .fs-hero { padding: 3.4rem 0 3rem; }

    .fs-title { font-size: 1.55rem; }

    .stat-row { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }

    .stat-cell { padding: 1rem 1.1rem; }

    .stat-num { font-size: 2.4rem; }

    .tl::before { left: 8px; margin-left: 0; }

    .tl-item:nth-child(odd),
    .tl-item:nth-child(even) {
        padding-left: 30px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .tl-node { left: 8px; margin-left: -7px; top: 1.3rem; }

    .tl-card { padding: 1.15rem 1.2rem; }

    .card-body { padding: 1.1rem 1.15rem 1.3rem; }

    blockquote { padding: 1.15rem 1.2rem; }

    .comment-respond { padding: 1.2rem 1.25rem; }

    .entry-nav { padding: 1.1rem 1.15rem; }

    .entry-nav-next { text-align: left; }

    .sidebar { padding: 1.2rem 1.15rem; }

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

    .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }

    .site-foot { padding: 2.6rem 0 1.6rem; }

    .fs:not(.fs-hero)::after { width: 200px; height: 150px; background-size: contain; }
}
