/*
Theme Name: dds_jk-na-krasnyh-partizan-2.ru
Theme URI: https://jk-na-krasnyh-partizan-2.ru/
Author: Алиса Фомина
Description: Информационная тема для сайта о жилых комплексах и недвижимости. Лавандовый техно-минимализм: холодная фиолетовая палитра, неоморфные акцентные блоки, чёткая геометрия.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: jknote
*/

:root {
    --bg: #F4F2F9;
    --bg-alt: #EBE5F5;
    --head: #2A1E3C;
    --foot: #1A1228;
    --text: #1F1A2E;
    --accent: #6A5292;
    --accent-dark: #4F3A73;
    --accent-soft: #B8A3D9;
    --muted: #88819B;
    --line: #E8E0F2;
    --line-strong: #C9BBDC;
    --shadow: #D3C9E6;
    --grid: #E3DAEE;
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(0deg, rgba(227, 218, 238, 0.4) 0 1px, transparent 1px 30px),
        repeating-linear-gradient(90deg, rgba(227, 218, 238, 0.4) 0 1px, transparent 1px 30px);
    color: var(--text);
    font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .28s ease, color .2s ease;
}

a:hover,
a:focus {
    background-size: 100% 1px;
    color: var(--accent-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.24;
    letter-spacing: 0.02em;
    color: var(--text);
    margin: 0 0 0.7em;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
    margin: 0 0 1.1em;
}

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

li {
    margin-bottom: 0.45em;
}

blockquote {
    margin: 1.8em 0;
    padding: 1.6rem 1.8rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 1.08rem;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    background: #fff;
    border: 1px solid var(--line-strong);
}

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

th {
    background: var(--bg-alt);
    font-weight: 700;
}

code, pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 0.92em;
}

pre {
    background: var(--head);
    color: #EBE5F5;
    padding: 1.2rem;
    border-radius: var(--radius);
    overflow-x: auto;
}

/* ---------- Контейнер ---------- */

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

.front-shell {
    width: min(85%, 1320px);
}

.site-main {
    display: block;
    padding: 2.4rem 0 3.4rem;
}

/* ---------- Кнопки ---------- */

.btn {
    display: inline-block;
    padding: 0.78rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.97rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
    background-image: none;
    transition: background-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}

.btn-solid {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(106, 82, 146, 0.28);
}

.btn-solid:hover,
.btn-solid:focus {
    background-color: var(--accent-dark);
    color: #fff;
    transform: translateY(2px);
    box-shadow: 0 3px 10px rgba(106, 82, 146, 0.3);
}

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

.btn-ghost:hover,
.btn-ghost:focus {
    background-color: rgba(106, 82, 146, 0.1);
    color: var(--accent-dark);
}

.btn-sm {
    padding: 0.5rem 1.05rem;
    font-size: 0.88rem;
}

/* ---------- Шапка ---------- */

.edge-line {
    height: 4px;
    background: var(--accent);
}

.site-top {
    background: var(--head);
    color: #EDE7F5;
}

.site-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}

.brand {
    min-width: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    color: #fff;
    background-image: none;
    min-width: 0;
}

.brand-logo {
    width: 60px;
    height: auto;
}

.brand-mark {
    flex: 0 0 48px;
}

.brand-words {
    display: block;
    min-width: 0;
}

.brand-name {
    display: block;
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: #fff;
    max-width: 520px;
}

.brand-desc {
    display: block;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--accent-soft);
    margin-top: 0.25rem;
    max-width: 520px;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(184, 163, 217, 0.5);
    border-radius: 8px;
    color: #EDE7F5;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent-soft);
    margin: 3px 0;
}

.nav-toggle-text {
    margin-left: 0.3rem;
}

.primary-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu li {
    margin: 0;
}

.primary-menu a {
    display: inline-block;
    color: #EDE7F5;
    font-size: 0.98rem;
    font-weight: 500;
    padding: 0.35rem 0;
    background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
    background-size: 0 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
}

.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a {
    color: #fff;
    background-size: 100% 2px;
}

.primary-menu .sub-menu {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0 0 0 0.8rem;
}

/* ---------- Раскладки ---------- */

.layout-single {
    display: block;
}

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
}

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

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

/* ---------- Хлебные крошки ---------- */

.crumbs {
    font-size: 0.87rem;
    color: var(--muted);
    padding: 0.2rem 0 1.6rem;
    line-height: 1.6;
}

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

.crumbs-sep {
    color: var(--line-strong);
    margin: 0 0.15rem;
}

/* ---------- Заголовки страниц и секций ---------- */

.page-title {
    margin-top: 0;
    margin-bottom: 0.6em;
}

.fs {
    padding: 80px 0;
    border-bottom: 1px dashed var(--line-strong);
}

.fs:last-child {
    border-bottom: 0;
}

.fs-title {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 2.2rem;
}

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

.entry-content h2 {
    position: relative;
    padding-left: 1.15rem;
    margin-top: 1.7em;
}

.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 10px;
    height: 10px;
    background: var(--accent);
}

.entry-content h3 {
    margin-top: 1.5em;
}

/* ---------- Блок 1: статистика ---------- */

.fs-stats {
    position: relative;
    padding: 0;
    border-bottom: 0;
    margin-top: 2rem;
}

.fs-stats-inner {
    position: relative;
    overflow: hidden;
    padding: 4rem 3rem 5rem;
    border-radius: 14px;
    background:
        repeating-linear-gradient(45deg, rgba(184, 163, 217, 0.06) 0 2px, transparent 2px 14px),
        repeating-linear-gradient(-45deg, rgba(184, 163, 217, 0.06) 0 2px, transparent 2px 14px),
        linear-gradient(160deg, #2A1E3C 0%, #1A1228 100%);
    color: #F1ECF8;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 42px), 0 100%);
}

.fs-stats-inner::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -110px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--accent) 0%, var(--accent-soft) 60%, transparent 72%);
    opacity: 0.15;
    filter: blur(6px);
    pointer-events: none;
}

.fs-stats-lead {
    position: relative;
    max-width: 780px;
    min-width: 0;
}

.fs-stats-title {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 0.5em;
}

.fs-stats-sub {
    color: #D6CBE8;
    font-size: 1.05rem;
    margin-bottom: 0;
}

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

.stat-cell {
    position: relative;
    padding-left: 1.6rem;
    min-width: 0;
}

.stat-cell + .stat-cell {
    border-left: 1px solid var(--accent);
}

.stat-cell:first-child {
    padding-left: 0;
}

.stat-num {
    display: block;
    font-size: 3.3rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.01em;
    background: linear-gradient(120deg, var(--accent-soft) 0%, var(--accent) 145%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-cap {
    display: block;
    margin-top: 0.5rem;
    color: #C9BBDC;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ---------- Блок 2: чередующиеся строки ---------- */

.zz-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
    margin-bottom: 3.2rem;
}

.zz-row:last-child {
    margin-bottom: 0;
}

.zz-row-flip .zz-media {
    order: 2;
}

.zz-media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    box-shadow: 0 10px 26px var(--shadow);
}

.zz-text {
    min-width: 0;
}

.zz-text h3 {
    margin-top: 0;
}

.zz-list {
    list-style: none;
    padding: 0;
    margin: 1.1rem 0 0;
}

.zz-list li {
    position: relative;
    padding-left: 1.9rem;
    color: var(--text);
}

.zz-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

/* ---------- Свежие материалы ---------- */

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

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #FBFAFE;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 0 15px var(--shadow);
    transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 25px var(--shadow);
    background: #fff;
}

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

.card-thumb a {
    display: block;
    background-image: none;
}

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

.card-title {
    font-size: 1.18rem;
    margin: 0 0 0.5rem;
}

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

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

.post-meta {
    color: var(--muted);
    font-size: 0.84rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.7rem;
}

.card-excerpt {
    color: #4A445C;
    font-size: 0.96rem;
}

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

.card-more {
    margin: auto 0 0;
    padding-top: 0.9rem;
}

.fs-latest-more {
    margin: 2.2rem 0 0;
}

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

/* ---------- Блок 3: шаги ---------- */

.fs-steps {
    padding: 3.4rem 2.4rem 3.6rem;
    background: var(--bg-alt);
    border-radius: 14px;
    border-bottom: 0;
    margin: 80px 0;
}

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

.step {
    position: relative;
    display: flex;
    gap: 1.5rem;
    padding-bottom: 2.2rem;
    margin: 0;
}

.step:last-child {
    padding-bottom: 0;
}

.step::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 56px;
    bottom: 6px;
    border-left: 2px dashed var(--accent-soft);
}

.step:last-child::before {
    display: none;
}

.step-num {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: #FBFAFE;
    color: var(--accent);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(106, 82, 146, 0.15);
}

.step-body {
    min-width: 0;
    padding-top: 0.35rem;
}

.step-body h3 {
    margin: 0 0 0.4rem;
}

.step-body p {
    margin: 0;
    color: #4A445C;
}

/* ---------- Блок 4: карта тем ---------- */

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

.topic-tile {
    display: block;
    min-width: 0;
    padding: 1.7rem 1.5rem;
    border-radius: 14px;
    background: #FBFAFE;
    border: 1px solid var(--line);
    color: var(--text);
    background-image: none;
    box-shadow: 6px 6px 16px var(--shadow), -6px -6px 16px #FFFFFF;
    transition: background-color .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.topic-tile:hover,
.topic-tile:focus {
    background-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 8px 10px 22px var(--shadow);
}

.topic-icon {
    display: block;
    color: var(--accent-soft);
    margin-bottom: 0.9rem;
    transition: color .22s ease;
}

.topic-tile:hover .topic-icon {
    color: #fff;
}

.topic-name {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
}

.topic-note {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    transition: color .22s ease;
}

.topic-tile:hover .topic-note {
    color: #E5DCF2;
}

/* ---------- Запись и страница ---------- */

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

.entry-cover img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 0 20px var(--shadow);
}

.entry-content img {
    border-radius: 10px;
}

.entry-content ul li::marker,
.entry-content ol li::marker {
    color: var(--accent);
}

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

.tag-chip {
    display: inline-block;
    padding: 0.32rem 0.8rem;
    border-radius: 8px;
    background: var(--bg-alt);
    color: var(--accent-dark);
    font-size: 0.85rem;
    background-image: none;
}

.tag-chip:hover {
    background: var(--accent);
    color: #fff;
}

.post-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin: 2.6rem 0 0;
}

.post-switch-item {
    display: block;
    min-width: 0;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #FBFAFE;
    background-image: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.98rem;
}

.post-switch-item span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
}

.post-switch-item:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.post-switch-next {
    text-align: right;
}

.archive-note {
    color: var(--muted);
    margin-bottom: 1.6rem;
}

/* ---------- Сайдбар ---------- */

.sidebar {
    min-width: 0;
    background: #FFFFFF;
    border: 1px solid rgba(106, 82, 146, 0.15);
    border-radius: 14px;
    padding: 1.6rem 1.5rem;
    box-shadow: 0 0 18px var(--shadow);
}

.sidebar .widget + .widget {
    margin-top: 1.8rem;
}

.sidebar .widget-title {
    font-size: 1.06rem;
    color: var(--text);
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed var(--line-strong);
}

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

.sidebar li {
    margin-bottom: 0.7rem;
    line-height: 1.45;
}

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

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

.sidebar .post-date {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.sidebar,
.sidebar p {
    color: var(--text);
}

/* ---------- Подвал ---------- */

.site-bottom {
    background: var(--foot);
    color: #D6CBE8;
    padding: 3.2rem 0 2rem;
    margin-top: 3rem;
}

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

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

.site-bottom .widget-title {
    color: #FFFFFF;
    font-size: 1.02rem;
    margin-bottom: 0.9rem;
    padding-left: 0.75rem;
    position: relative;
}

.site-bottom .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 3px;
    background: var(--accent-soft);
}

.site-bottom p,
.site-bottom li,
.site-bottom .widget {
    color: #D6CBE8;
    font-size: 0.94rem;
}

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

.site-bottom li {
    margin-bottom: 0.6rem;
}

.site-bottom a {
    color: #E5DCF2;
    background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
}

.site-bottom a:hover,
.site-bottom a:focus {
    color: #FFFFFF;
}

.foot-line {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(184, 163, 217, 0.22);
    color: #A99CC0;
    font-size: 0.86rem;
}

/* ---------- Пагинация ---------- */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.6rem 0 0;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: 0.5rem 0.85rem;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #FBFAFE;
    color: var(--accent-dark);
    font-weight: 600;
    font-size: 0.94rem;
    background-image: none;
    box-shadow: 0 4px 12px rgba(106, 82, 146, 0.08);
}

.pager .page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
}

.comments .nav-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

/* ---------- Формы поиска и комментариев ---------- */

.search-form {
    margin: 1.4rem 0;
}

.search-label {
    display: block;
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

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

.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 0.96rem;
}

.search-field:focus,
.comment-form input:focus,
.comment-form textarea:focus {
    outline: 2px solid var(--accent-soft);
    outline-offset: 1px;
}

.search-submit {
    flex: 0 0 auto;
}

.comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--line-strong);
}

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

.comment-list {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    margin: 1rem 0 0;
    padding-left: 1.4rem;
    border-left: 2px solid var(--line);
}

.comment-item {
    background: #FBFAFE;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 700;
}

.comment-date {
    color: var(--muted);
    font-size: 0.84rem;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.comment-actions {
    margin-top: 0.6rem;
    font-size: 0.9rem;
}

.comment-form label {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

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

.comment-form .submit {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.78rem 1.5rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.comment-form .submit:hover {
    background: var(--accent-dark);
}

/* ---------- 404 ---------- */

.notfound {
    background: #FBFAFE;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2.6rem 2.2rem;
    box-shadow: 0 0 20px var(--shadow);
    text-align: center;
}

.notfound-code {
    display: block;
    font-size: 4.4rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(120deg, var(--accent-soft) 0%, var(--accent) 120%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.6rem;
}

.notfound .search-form {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.notfound-actions {
    margin-bottom: 0;
}

/* ---------- Cookie-баннер ---------- */

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

.cookie-note {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.6rem;
    background: var(--head);
    color: #EDE7F5;
    border-top: 3px solid var(--accent);
    box-shadow: 0 -8px 24px rgba(26, 18, 40, 0.25);
}

.cookie-note-text {
    margin: 0;
    font-size: 0.9rem;
    min-width: 0;
    max-width: 900px;
}

.cookie-note-btn {
    flex: 0 0 auto;
}

/* ---------- Адаптив ---------- */

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

    h1, .fs-stats-title {
        font-size: 2.1rem;
    }

    h2 {
        font-size: 1.6rem;
    }

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

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

    .primary-nav {
        flex-basis: 100%;
        display: none;
    }

    .primary-nav.is-open {
        display: block;
    }

    .primary-menu {
        flex-direction: column;
        gap: 0.2rem;
        padding-top: 0.6rem;
        border-top: 1px solid rgba(184, 163, 217, 0.25);
    }

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

    .layout-single .content-area {
        width: 100%;
    }

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

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

    .stat-cell:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

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

@media (max-width: 600px) {
    h1, .fs-stats-title {
        font-size: 1.75rem;
    }

    .fs {
        padding: 48px 0;
    }

    .fs-stats {
        margin-top: 1.2rem;
    }

    .fs-stats-inner {
        padding: 2.2rem 1.4rem 3rem;
        clip-path: none;
    }

    .fs-steps {
        padding: 2.2rem 1.3rem 2.4rem;
        margin: 48px 0;
    }

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

    .stat-cell,
    .stat-cell + .stat-cell {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--accent);
        padding-top: 1rem;
    }

    .stat-cell:first-child {
        border-top: 0;
        padding-top: 0;
    }

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

    .zz-row,
    .zz-row-flip {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.3rem;
    }

    .zz-row-flip .zz-media {
        order: 0;
    }

    .card-grid,
    .card-list,
    .topic-grid,
    .post-switch,
    .foot-cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .step {
        gap: 1rem;
    }

    .step-num {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        font-size: 1.15rem;
    }

    .step::before {
        left: 22px;
        top: 48px;
    }

    .post-switch-next {
        text-align: left;
    }

    .search-row {
        flex-direction: column;
    }

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

    .notfound {
        padding: 1.8rem 1.3rem;
    }

    blockquote {
        padding: 1.2rem 1.2rem;
    }
}
