/*
Theme Name: dds_zklestoriya.ru
Theme URI: https://zklestoriya.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: zkles
*/

/* ---------- Токены ---------- */
:root {
    --c-bg: #F4F7FA;
    --c-alt: #E8EEF4;
    --c-white: #FFFFFF;
    --c-line: #D6E0EA;
    --c-foot: #1B2A3A;
    --c-aside: #EDF2F7;
    --c-text: #1E2A38;
    --c-accent: #3A7BD5;
    --c-accent-dark: #2C5FA8;
    --c-ice: #7FD1E8;
    --c-muted: #6B7F94;
    --f-head: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --f-body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --shadow-soft: 0 4px 16px rgba(58, 123, 213, 0.08);
    --shadow-up: -4px -4px 12px rgba(255, 255, 255, 0.9), 0 10px 28px rgba(58, 123, 213, 0.16);
    --grid-pat: linear-gradient(rgba(214, 224, 234, 0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(214, 224, 234, 0.3) 1px, transparent 1px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--c-text);
    background-color: var(--c-bg);
    background-image: var(--grid-pat);
    background-size: 24px 24px;
}

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    color: var(--c-text);
    line-height: 1.25;
    margin: 1.6em 0 0.6em;
    font-weight: 600;
    letter-spacing: 0.01em;
}
h1 { font-size: 2.3rem; line-height: 1.15; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

p, li, dd, dt, h1, h2, h3, h4, h5, h6, .card-title, .brand-name, .brand-desc, td, th, blockquote, figcaption {
    overflow-wrap: break-word;
    hyphens: auto;
}

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

a {
    color: var(--c-accent);
    text-decoration: none;
}

.entry-content a, .page-desc a, .wgt a, .crumbs a, .colophon-copy a, .cf-note a {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.3s ease;
}
.entry-content a:hover, .page-desc a:hover, .wgt a:hover, .crumbs a:hover, .colophon-copy a:hover, .cf-note a:hover {
    background-size: 100% 2px;
}

:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

table { width: 100%; border-collapse: collapse; margin: 1.5em 0; border: 1px solid var(--c-line); background: var(--c-white); }
th, td { border: 1px solid var(--c-line); padding: 0.6em 0.8em; text-align: start; vertical-align: top; }
th { background: var(--c-alt); font-family: var(--f-head); font-weight: 600; }

blockquote {
    margin: 1.6em 0;
    padding: 1.2em 1.5em;
    border-left: 3px solid var(--c-accent);
    background: var(--c-alt);
    border-radius: 0 10px 10px 0;
    font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

pre { overflow-x: auto; background: var(--c-foot); color: #E8EEF4; padding: 1em 1.2em; border-radius: 8px; }
code { font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: 2em 0; }

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

.skip {
    position: absolute;
    top: -60px;
    left: 1rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--c-accent);
    color: #fff;
    border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* ---------- Контейнер ---------- */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: 0.8em 1.6em;
    border-radius: 8px;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-fill { background: var(--c-accent); color: #fff; border-color: var(--c-accent); box-shadow: 0 4px 12px rgba(58, 123, 213, 0.18); }
.btn-fill:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: #fff; box-shadow: 0 10px 22px rgba(44, 95, 168, 0.3); }

.btn-line { background: transparent; color: var(--c-accent); border-color: var(--c-accent); }
.btn-line:hover { background: var(--c-accent); color: #fff; box-shadow: 0 10px 22px rgba(58, 123, 213, 0.22); }

.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.85); }
.btn-ghost-light:hover { background: #fff; color: var(--c-foot); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }

/* ---------- Шапка ---------- */
.masthead {
    position: relative;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-line);
    padding-top: 4px;
}
.masthead::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3A7BD5, #7FD1E8);
}

.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--c-text);
    flex: 1 1 420px;
    min-width: 0;
}

.brand-mark { flex: 0 0 auto; display: block; }
.brand-svg, .brand-logo { display: block; width: 52px; height: 52px; 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: 0.98rem;
    line-height: 1.3;
    letter-spacing: 0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-desc {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--c-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-nav { flex: 0 0 auto; }

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

.nav-list a {
    display: block;
    padding: 0.55rem 0.95rem;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--c-text);
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-list a:hover { background: var(--c-alt); color: var(--c-accent); }
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a { color: var(--c-accent); background: var(--c-alt); }

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border: 1.5px solid var(--c-accent);
    border-radius: 8px;
    background: transparent;
    color: var(--c-accent);
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
    transition: transform 0.2s ease;
}
.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; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Секции главной ---------- */
.zone {
    position: relative;
    padding: 90px 0;
}

.zone-alt {
    background-color: var(--c-alt);
    background-image: linear-gradient(rgba(214, 224, 234, 0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(214, 224, 234, 0.5) 1px, transparent 1px);
    background-size: 24px 24px;
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
}

.zone-alt::after {
    content: "";
    position: absolute;
    right: 2%;
    bottom: 0;
    width: 220px;
    height: 240px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 240'%3E%3Cg fill='none' stroke='%233A7BD5' stroke-width='2'%3E%3Cpath d='M20 240V90l60-30v180M80 240V20l70 25v195M150 240V80l50 20v140'/%3E%3Cpath d='M95 60h40M95 85h40M95 110h40M95 135h40M95 160h40M95 185h40M35 115h30M35 140h30M35 165h30M162 115h26M162 140h26M162 165h26'/%3E%3C/g%3E%3C/svg%3E") no-repeat right bottom / contain;
    opacity: 0.04;
    pointer-events: none;
}

.zone > .shell { position: relative; z-index: 1; }

.dots-rule {
    height: 2px;
    margin-block: 0;
    background-image: radial-gradient(circle, #7FD1E8 1px, transparent 1.5px);
    background-size: 10px 2px;
    background-repeat: repeat-x;
    opacity: 0.9;
}

.sec-head { margin-bottom: 2.6rem; max-width: 760px; }

.sec-kicker {
    margin: 0 0 0.6rem;
    font-family: var(--f-head);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-muted);
}

.sec-title {
    position: relative;
    margin: 0;
    padding-left: 16px;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-left: 3px solid var(--c-accent);
}

.sec-lead { margin: 1rem 0 0; color: var(--c-muted); max-width: 640px; }

/* Декоративная точка у H2 */
.entry-content h2::before,
.page-title::before,
.remarks-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 12px;
    border-radius: 50%;
    background: var(--c-ice);
    vertical-align: middle;
    position: relative;
    top: -0.12em;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: var(--c-foot);
    color: #fff;
}

.hero-photo {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-veil {
    position: absolute;
    inset: 0;
    background: rgba(27, 42, 58, 0.55);
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 110px 0 120px;
}

.hero-kicker {
    margin: 0 0 1.1rem;
    font-family: var(--f-head);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-ice);
}

.hero-title {
    margin: 0;
    max-width: 820px;
    color: #fff;
    font-size: 3.2rem;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.hero-lead {
    margin: 1.4rem 0 2.2rem;
    max-width: 640px;
    font-size: 1.15rem;
    color: #D6E0EA;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-markup {
    position: absolute;
    left: 4%;
    bottom: 22px;
    z-index: 1;
    display: block;
    opacity: 0.85;
}

/* Статистика */
.stats-row {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--c-white);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 2.4rem 1rem;
}

.stats-cell {
    min-width: 0;
    padding: 0.5rem 1.6rem;
    border-left: 1px solid var(--c-line);
}
.stats-cell:first-child { border-left: 0; }

.stats-num {
    font-family: var(--f-head);
    font-size: 3rem;
    font-weight: 600;
    line-height: 1;
    color: var(--c-text);
    letter-spacing: 0.01em;
    margin-bottom: 0.8rem;
}
.stats-num::after {
    content: "";
    display: block;
    width: 28px;
    height: 3px;
    margin-top: 0.8rem;
    background: var(--c-ice);
    border-radius: 2px;
}

.stats-cap { margin: 0; color: var(--c-muted); font-size: 0.95rem; line-height: 1.5; }

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

/* Шаги */
.steps-track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.6rem;
    position: relative;
}

.steps-track::before {
    content: "";
    position: absolute;
    top: 46px;
    left: 4%;
    right: 4%;
    height: 0;
    border-top: 2px dashed var(--c-ice);
    z-index: 0;
}

.step-card {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: hidden;
    padding: 2rem 1.4rem 1.6rem;
    background: var(--c-bg);
    border-radius: 12px;
    box-shadow: -6px -6px 14px rgba(255, 255, 255, 0.85), 6px 6px 16px rgba(58, 123, 213, 0.12);
}

.step-num {
    position: absolute;
    top: -0.15em;
    right: 0.15em;
    font-family: var(--f-head);
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--c-ice);
    opacity: 0.4;
    pointer-events: none;
}

.step-title { position: relative; margin: 0 0 0.6rem; font-size: 1.08rem; color: var(--c-text); }
.step-text { position: relative; margin: 0; font-size: 0.95rem; color: var(--c-muted); }

/* CTA */
.cta-zone { padding-top: 90px; padding-bottom: 100px; }

.cta-plate {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 3.6rem 3.4rem;
    border-radius: 12px;
    background-color: var(--c-foot);
    background-image: linear-gradient(rgba(127, 209, 232, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(127, 209, 232, 0.07) 1px, transparent 1px);
    background-size: 24px 24px;
    color: #fff;
}

.cta-copy { position: relative; z-index: 1; max-width: 640px; min-width: 0; }

.cta-title { margin: 0 0 1rem; color: #fff; font-size: 2.1rem; line-height: 1.25; }
.cta-accent { color: var(--c-ice); }
.cta-text { margin: 0; color: #D6E0EA; }

.cta-actions { position: relative; z-index: 1; flex: 0 0 auto; }

.cta-building {
    position: absolute;
    right: 2%;
    bottom: -20px;
    opacity: 0.06;
    display: block;
    pointer-events: none;
}

/* ---------- Карточки ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-single .card-grid-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--c-white);
    border-radius: 12px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--c-ice);
    box-shadow: var(--shadow-up);
}

.card-thumb { position: relative; overflow: hidden; }
.card-thumb::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(27, 42, 58, 0.35), transparent);
    pointer-events: none;
}
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--c-alt);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.9rem;
    margin-bottom: 0.7rem;
}

.card-date { font-size: 0.85rem; color: var(--c-muted); }

.tag-chip {
    display: inline-block;
    padding: 0.2em 0.65em;
    border-radius: 4px;
    background: var(--c-alt);
    color: var(--c-accent);
    font-family: var(--f-head);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.tag-chip:hover { background: var(--c-accent); color: #fff; }

.card-title {
    margin: 0 0 0.6rem;
    font-size: 1.15rem;
    line-height: 1.35;
}
.card-title a { color: var(--c-text); transition: color 0.2s ease; }
.card:hover .card-title a { color: var(--c-accent); }

.card-excerpt { color: var(--c-muted); font-size: 0.97rem; margin-bottom: 1rem; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more {
    align-self: flex-start;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.9rem;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.3s ease;
}
.card-more:hover { background-size: 100% 2px; }

.empty-note { color: var(--c-muted); }
.empty-box { padding: 2rem 2rem; background: var(--c-white); border-radius: 12px; box-shadow: var(--shadow-soft); }

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 2rem 0 5rem; }

.crumbs {
    font-size: 0.88rem;
    color: var(--c-muted);
    margin-bottom: 2rem;
}
.crumbs-sep { margin: 0 0.35rem; color: var(--c-ice); }

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

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

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

.page-head { margin-bottom: 2rem; }
.page-title { margin: 0; font-size: 2.3rem; }
.page-desc { margin: 0.8rem 0 0; color: var(--c-muted); }

.entry {
    padding: 2.4rem 2.6rem;
    background: var(--c-white);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.entry-head { margin-bottom: 1.6rem; }
.entry-title { margin: 0; font-size: 2.3rem; line-height: 1.2; }

.entry-cover { margin: 0 0 2rem; }
.entry-cover img { display: block; width: 100%; height: auto; border-radius: 10px; }

.entry-content > *:first-child { margin-top: 0; }
.entry-content img { display: block; border-radius: 8px; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { font-size: 0.88rem; color: var(--c-muted); margin-top: 0.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content ul li::marker { color: var(--c-accent); }
.entry-content .alignleft { float: left; margin: 0.4em 1.5em 1em 0; }
.entry-content .alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--c-line); }

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}
.post-nav-link {
    display: block;
    min-width: 0;
    padding: 1.1rem 1.3rem;
    background: var(--c-white);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    color: var(--c-text);
    font-family: var(--f-head);
    font-weight: 600;
    transition: transform 0.2s ease, color 0.2s ease;
}
.post-nav-link span { display: block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 0.3rem; font-weight: 600; }
.post-nav-link:hover { color: var(--c-accent); transform: translateY(-2px); }
.post-nav-next { grid-column: 2; text-align: end; }

/* ---------- Пагинация (type => plain) ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 2.6rem;
    align-items: center;
}
.pager .page-numbers {
    display: inline-block;
    min-width: 2.6rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    border: 1.5px solid var(--c-line);
    background: var(--c-white);
    color: var(--c-text);
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.92rem;
    text-align: center;
    line-height: 1.2;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.pager a.page-numbers:hover { border-color: var(--c-accent); color: var(--c-accent); transform: translateY(-2px); }
.pager .page-numbers.current { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.pager .page-numbers.dots { border: 0; background: none; min-width: 0; padding-inline: 0.3rem; }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    padding: 1.8rem 1.6rem;
    background: var(--c-aside);
    border-radius: 12px;
    color: var(--c-text);
}
.sidebar .wgt { margin-bottom: 2rem; color: var(--c-text); }
.sidebar .wgt:last-child { margin-bottom: 0; }
.sidebar .wgt-title {
    margin: 0 0 1rem;
    padding-left: 12px;
    border-left: 3px solid var(--c-accent);
    font-size: 1.05rem;
    color: var(--c-text);
}
.sidebar .wgt ul { list-style: none; margin: 0; padding: 0; }
.sidebar .wgt li { padding: 0.6rem 0; border-bottom: 1px dashed var(--c-line); color: var(--c-text); }
.sidebar .wgt li:last-child { border-bottom: 0; }
.sidebar .wgt a { color: var(--c-text); }
.sidebar .wgt a:hover { color: var(--c-accent); }
.sidebar .post-date, .sidebar .wgt .rss-date { color: var(--c-muted); font-size: 0.85rem; display: block; }

/* ---------- Подвал ---------- */
.colophon {
    position: relative;
    background-color: var(--c-foot);
    background-image: linear-gradient(rgba(127, 209, 232, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(127, 209, 232, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    color: #C9D6E3;
    padding: 70px 0 30px;
}

.colophon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.6rem;
}
.colophon-col { min-width: 0; }

.colophon .wgt { color: #C9D6E3; margin-bottom: 1.5rem; }
.colophon .wgt p { color: #C9D6E3; }
.colophon .wgt-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #FFFFFF;
    letter-spacing: 0.04em;
}
.colophon .wgt-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--c-ice);
    vertical-align: middle;
    position: relative;
    top: -0.1em;
}
.colophon .wgt ul { list-style: none; margin: 0; padding: 0; }
.colophon .wgt li { margin-bottom: 0.55rem; }
.colophon .wgt a { color: #D6E0EA; }
.colophon .wgt a:hover { color: var(--c-ice); }

.colophon-copy {
    margin: 3rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(214, 224, 234, 0.15);
    font-size: 0.88rem;
    color: #9FB1C4;
}

/* ---------- Поиск ---------- */
.search-box { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.2rem 0; }
.search-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-white);
    font: inherit;
    color: var(--c-text);
}
.search-input:focus { border-color: var(--c-accent); outline: none; box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.15); }

/* ---------- 404 ---------- */
.nf-box { padding: 3rem 2.6rem; background: var(--c-white); border-radius: 12px; box-shadow: var(--shadow-soft); text-align: center; }
.nf-code { margin: 0; font-family: var(--f-head); font-size: 6rem; font-weight: 700; line-height: 1; color: var(--c-ice); opacity: 0.6; }
.nf-box .page-title::before { display: none; }
.nf-text { color: var(--c-muted); max-width: 520px; margin: 1rem auto; }
.nf-box .search-box { max-width: 520px; margin-inline: auto; }
.nf-home { margin-top: 1.4rem; }

/* ---------- Комментарии ---------- */
.remarks {
    margin-top: 2rem;
    padding: 2rem 2.4rem;
    background: var(--c-white);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}
.remarks-title { margin-top: 0; font-size: 1.4rem; }
.remarks-list, .remarks-list .children { list-style: none; margin: 0; padding: 0; }
.remarks-list .children { padding-left: 1.6rem; border-left: 2px solid var(--c-alt); }
.rmk-body { padding: 1.1rem 0; border-bottom: 1px solid var(--c-line); }
.rmk-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.rmk-ava { display: block; border-radius: 50%; }
.rmk-author { display: block; font-family: var(--f-head); font-weight: 600; }
.rmk-date { font-size: 0.82rem; color: var(--c-muted); }
.rmk-wait { font-size: 0.88rem; color: var(--c-accent); }
.rmk-reply a { font-family: var(--f-head); font-size: 0.85rem; font-weight: 600; }

.comment-respond { margin-top: 1.6rem; }
.comment-reply-title { font-size: 1.25rem; margin-top: 0; }
.comment-reply-title small { margin-left: 0.8rem; font-size: 0.8rem; }
.cf-note { color: var(--c-muted); font-size: 0.9rem; }
.cf-row label { display: block; font-family: var(--f-head); font-size: 0.88rem; font-weight: 600; margin-bottom: 0.3rem; }
.cf-row input, .cf-row textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-bg);
    font: inherit;
    color: var(--c-text);
}
.cf-row input:focus, .cf-row textarea:focus { border-color: var(--c-accent); outline: none; }
.cf-check { font-size: 0.9rem; color: var(--c-muted); }
.form-submit .submit {
    padding: 0.8em 1.6em;
    border: 1.5px solid var(--c-accent);
    border-radius: 8px;
    background: var(--c-accent);
    color: #fff;
    font-family: var(--f-head);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.form-submit .submit:hover { background: var(--c-accent-dark); transform: translateY(-2px); }

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

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    padding: 1.1rem 1.5rem;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-top: 3px solid var(--c-accent);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(27, 42, 58, 0.18);
}
.cookie-text { margin: 0; font-size: 0.92rem; color: var(--c-text); min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .masthead-row { gap: 1rem; }
    .brand { flex: 1 1 0; }
    .nav-toggle { display: inline-flex; }
    .site-nav { flex: 1 1 100%; display: none; }
    .site-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0; padding: 0.4rem 0 0.6rem; border-top: 1px solid var(--c-line); }
    .nav-list a { padding: 0.75rem 0.4rem; border-radius: 0; }

    .hero { min-height: 520px; }
    .hero-title { font-size: 2.5rem; }

    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
    .stats-cell:nth-child(3) { border-left: 0; }

    .steps-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps-track::before { display: none; }

    .cta-plate { flex-direction: column; align-items: flex-start; padding: 2.8rem 2.4rem; }

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

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .layout-single { width: 100%; }

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

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .brand-desc { display: none; }
    .brand-name { font-size: 0.86rem; -webkit-line-clamp: 3; }
    .brand-svg, .brand-logo { width: 42px; height: 42px; }
    .nav-toggle-label { display: none; }

    .zone { padding: 60px 0; }
    .hero { min-height: 0; }
    .hero-inner { padding: 70px 0 90px; }
    .hero-title { font-size: 1.95rem; }
    .hero-lead { font-size: 1.02rem; }

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

    .stats-row { grid-template-columns: minmax(0, 1fr); padding: 1.6rem 1.2rem; }
    .stats-cell { border-left: 0; border-top: 1px solid var(--c-line); padding: 1.2rem 0.4rem; }
    .stats-cell:first-child { border-top: 0; }
    .stats-num { font-size: 2.5rem; }

    .steps-track { grid-template-columns: minmax(0, 1fr); }
    .step-card { padding: 1.7rem 1.3rem 1.4rem; }

    .cta-zone { padding: 60px 0 70px; }
    .cta-plate { padding: 2.2rem 1.5rem; }
    .cta-title { font-size: 1.6rem; }

    .card-grid, .card-grid-2, .layout-single .card-grid-2 { grid-template-columns: minmax(0, 1fr); }

    .page-title, .entry-title { font-size: 1.75rem; }
    .entry { padding: 1.6rem 1.3rem; }
    .remarks { padding: 1.6rem 1.3rem; }
    .nf-box { padding: 2.2rem 1.3rem; }
    .empty-box { padding: 1.5rem 1.3rem; }
    .sidebar { padding: 1.5rem 1.3rem; }

    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .post-nav-next { grid-column: auto; }

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

    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.2rem; left: 0.6rem; right: 0.6rem; bottom: 0.6rem; }
    .cookie-accept { width: 100%; }
}
