/*
Theme Name: dds_mysmol.ru
Theme URI: https://mysmol.ru/
Author: Алёна Седова
Description: Индивидуальная тема информационного сайта о покупке квартир и проверке жилья. Архитектурная графика, холодная стальная палитра, чертёжные акценты.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: smplan
*/

:root {
    --c-bg: #EEF2F6;
    --c-alt: #FFFFFF;
    --c-ink: #1B2A3B;
    --c-dark: #13293D;
    --c-accent: #D44C5C;
    --c-accent-2: #5B8C9E;
    --c-muted: #7C8B9A;
    --c-shadow: #D0D7E0;
    --c-line: #D8E0E8;
    --f-head: "Futura", "Century Gothic", "Trebuchet MS", "Segoe UI", sans-serif;
    --f-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.72;
    color: var(--c-ink);
    background-color: var(--c-bg);
    background-image:
        repeating-linear-gradient(0deg, rgba(27, 42, 59, 0.05) 0 1px, transparent 1px 44px),
        repeating-linear-gradient(90deg, rgba(27, 42, 59, 0.05) 0 1px, transparent 1px 44px),
        repeating-linear-gradient(0deg, rgba(91, 140, 158, 0.05) 0 2px, transparent 2px 220px),
        repeating-linear-gradient(90deg, rgba(91, 140, 158, 0.05) 0 2px, transparent 2px 220px);
    background-attachment: fixed;
}

body::after {
    content: "";
    position: fixed;
    right: -60px;
    bottom: -40px;
    width: 420px;
    height: 380px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.07;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom right;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 180'%3E%3Cpath d='M20 90 L100 20 L180 90 L160 90 L160 160 L40 160 L40 90 Z' fill='%23D44C5C'/%3E%3Crect x='78' y='110' width='44' height='50' fill='%23EEF2F6'/%3E%3C/svg%3E");
}

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

a { color: var(--c-accent); text-decoration: none; }
a:hover, a:focus { color: var(--c-accent-2); }

p { margin: 0 0 1.1em; }

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

h1 { font-size: 3.5rem; letter-spacing: 0.05em; }
h2 { font-size: 1.9rem; letter-spacing: 0.02em; }
h3 { font-size: 1.35rem; letter-spacing: 0.02em; }
h4 { font-size: 1.12rem; }

.entry-content h2,
.entry-content h3,
.widget-title,
.block-title {
    position: relative;
    padding-left: 18px;
    border-left: 2px solid var(--c-accent);
}

.entry-content h2::before,
.entry-content h3::before,
.widget-title::before,
.block-title::before {
    content: "";
    position: absolute;
    left: -6px;
    top: -9px;
    width: 9px;
    height: 9px;
    background: var(--c-accent);
    transform: rotate(45deg);
}

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

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

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

.sec-title {
    display: inline-block;
    position: relative;
    transform: skewX(-2deg);
    padding-bottom: 12px;
    margin-bottom: 1.4rem;
    border-bottom: 2px solid var(--c-accent);
    border-left: 0;
    padding-left: 0;
}

.sec-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    border-bottom: 1px dashed var(--c-accent);
}

.sec-title::before { display: none; }

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

.btn,
.btn-ghost {
    display: inline-block;
    font-family: var(--f-head);
    font-size: 0.98rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.9rem 1.7rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.22s, color 0.22s, transform 0.22s, border-color 0.22s;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.btn {
    background: var(--c-accent);
    color: #fff;
}

.btn:hover, .btn:focus {
    background: var(--c-accent-2);
    color: #fff;
    transform: translateX(-4px);
}

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

.btn-ghost:hover, .btn-ghost:focus {
    background: var(--c-accent-2);
    border-color: var(--c-accent-2);
    color: #fff;
    transform: translateX(-4px);
}

/* ---------- Текстовые ссылки с «ледяным» подчёркиванием ---------- */

.entry-content a,
.card-excerpt a,
.crumbs a,
.widget a,
.site-nav a {
    background-image: linear-gradient(var(--c-accent), var(--c-accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.3s ease, color 0.2s;
    text-decoration: none;
}

.entry-content a:hover,
.card-excerpt a:hover,
.crumbs a:hover,
.widget a:hover,
.site-nav a:hover {
    background-size: 100% 2px;
}

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

.site-head {
    position: relative;
    z-index: 2;
    background: var(--c-alt);
    border-bottom: 1px solid var(--c-line);
}

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

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

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

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

.brand-name {
    display: block;
    font-family: var(--f-head);
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--c-ink);
    line-height: 1.3;
}

.brand-name:hover { color: var(--c-accent); }

.brand-desc {
    display: block;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--c-muted);
    margin-top: 0.25rem;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--c-accent-2);
    color: var(--c-ink);
    font-family: var(--f-head);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.55rem 0.95rem;
    cursor: pointer;
}

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

.site-nav a {
    font-family: var(--f-head);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    color: var(--c-ink);
    padding-bottom: 3px;
}

.site-nav .current-menu-item > a { color: var(--c-accent); }

/* ---------- Основная область ---------- */

.site-main {
    position: relative;
    z-index: 1;
    display: block;
    padding: 2.4rem 0 3.2rem;
}

.front-main { padding-top: 0; }

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

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

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

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

.crumbs {
    font-size: 0.86rem;
    color: var(--c-muted);
    margin-bottom: 1.6rem;
    line-height: 1.7;
}

.crumbs a { color: var(--c-accent-2); }
.crumbs-sep { color: var(--c-muted); margin: 0 0.3rem; }

/* ---------- Карточки записей ---------- */

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--c-alt);
    border-radius: 0;
    box-shadow: 8px 8px 0 var(--c-shadow);
    transition: box-shadow 0.25s ease;
}

.card:hover { box-shadow: 14px 14px 0 rgba(212, 76, 92, 0.32); }

.card-thumb-wrap {
    display: block;
    overflow: hidden;
    border-top-left-radius: 12px;
    background: #E4EAF0;
}

.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;
    object-fit: cover;
}

.card-thumb-blank {
    aspect-ratio: 3 / 1;
    background-image: repeating-linear-gradient(45deg, #DCE4EC 0 10px, #E6ECF2 10px 20px);
}

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

.card-title {
    font-size: 1.2rem;
    margin: 0 0 0.55rem;
    padding-left: 0;
    border-left: 0;
}

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

.card-meta {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 0.7rem;
}

.card-excerpt {
    flex: 1;
    font-size: 0.95rem;
    color: #40536A;
}

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

.card-more {
    align-self: flex-start;
    margin-top: 0.9rem;
    font-family: var(--f-head);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-accent);
    border-bottom: 2px solid transparent;
}

.card-more:hover { border-bottom-color: var(--c-accent-2); color: var(--c-accent-2); }

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 2.4rem 0 0;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 44px;
    text-align: center;
    padding: 0.6rem 0.85rem;
    font-family: var(--f-head);
    font-size: 0.95rem;
    color: var(--c-ink);
    background: var(--c-alt);
    border: 1px solid var(--c-line);
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.pager .page-numbers:hover {
    background: var(--c-accent-2);
    border-color: var(--c-accent-2);
    color: #fff;
    transform: translateX(-3px);
}

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

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

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

.entry {
    background: var(--c-alt);
    padding: 2.2rem 2.4rem 2.4rem;
    box-shadow: 8px 8px 0 var(--c-shadow);
}

.entry-title {
    font-size: 2.35rem;
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}

.entry-meta {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--c-accent-2);
}

.entry-thumb { margin-bottom: 1.6rem; }
.entry-thumb img { display: block; width: 100%; height: auto; border-top-left-radius: 12px; }

.entry-content { min-width: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content ul, .entry-content ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.45em; }

.entry-content blockquote {
    margin: 1.6rem 0;
    padding: 1.4rem 1.6rem;
    background: #F3F6F9;
    border-left: 4px solid var(--c-accent);
    color: #33465C;
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

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

.entry-content img { display: block; height: auto; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.4em;
    border: 1px solid var(--c-ink);
    font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--c-ink);
    padding: 0.65rem 0.8rem;
    text-align: left;
}

.entry-content th { background: #E6ECF2; font-family: var(--f-head); }

.entry-tags {
    margin-top: 1.8rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--c-accent-2);
    font-size: 0.86rem;
    color: var(--c-muted);
}

.post-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
    font-family: var(--f-head);
    font-size: 0.9rem;
}

.post-nav a { color: var(--c-accent-2); }
.post-nav a:hover { color: var(--c-accent); }

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

.page-heading .sec-title { margin-bottom: 0.6rem; }

.page-heading p { color: var(--c-muted); margin: 0; }

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

.sidebar {
    min-width: 0;
    background: var(--c-alt);
    padding: 1.6rem 1.5rem;
    box-shadow: 8px 8px 0 var(--c-shadow);
    align-self: start;
}

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

.sidebar .widget-title {
    font-size: 1.08rem;
    color: var(--c-ink);
    margin-bottom: 1rem;
}

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: #40536A; }

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

.sidebar .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--c-line);
    font-size: 0.94rem;
    line-height: 1.55;
}

.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--c-ink); }
.sidebar .widget a:hover { color: var(--c-accent); }
.sidebar .post-date { display: block; font-size: 0.76rem; color: var(--c-muted); margin-top: 0.2rem; }

.sidebar .search-form { display: flex; gap: 0.5rem; }

/* ---------- Форма поиска ---------- */

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

.search-form input[type="search"] {
    flex: 1 1 180px;
    min-width: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--c-line);
    background: #fff;
    color: var(--c-ink);
    font-family: var(--f-body);
    font-size: 0.95rem;
}

.search-form input[type="search"]:focus {
    outline: 2px solid var(--c-accent-2);
    outline-offset: 1px;
}

.search-form button { border: 0; }

/* ---------- Главная: секции ---------- */

.band { position: relative; padding: 3.4rem 0; }
.band-alt { background: var(--c-alt); }

.band-steel {
    background-color: var(--c-bg);
    background-image:
        repeating-linear-gradient(0deg, rgba(27, 42, 59, 0.06) 0 1px, transparent 1px 36px),
        repeating-linear-gradient(90deg, rgba(27, 42, 59, 0.06) 0 1px, transparent 1px 36px),
        repeating-linear-gradient(90deg, rgba(91, 140, 158, 0.08) 0 2px, transparent 2px 180px);
}

.band-dark {
    background-color: var(--c-dark);
    color: #F2F6FA;
}

.seam {
    position: relative;
    height: 40px;
}

.seam::before,
.seam::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    border-top: 1px dashed var(--c-accent-2);
}

.seam::before { top: 18px; }
.seam::after { top: 23px; }

.seam-mark {
    position: absolute;
    left: 50%;
    top: 6px;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--c-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Блок 1 — hero */

.fs-hero { padding: 4rem 0 3.6rem; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
    align-items: center;
}

.hero-title {
    display: inline-block;
    position: relative;
    transform: skewX(-2deg);
    padding-bottom: 14px;
    margin-bottom: 1.4rem;
    border-bottom: 3px solid var(--c-accent);
    font-size: 3.5rem;
}

.hero-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    border-bottom: 1px dashed var(--c-accent);
}

.hero-lead {
    font-size: 1.08rem;
    color: #33465C;
    max-width: 34em;
}

.hero-mark {
    display: inline-block;
    background: rgba(91, 140, 158, 0.25);
    padding: 0 0.25em;
    font-weight: 700;
}

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

.hero-art { min-width: 0; }

.hero-art img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
}

/* Блок 2 — пошаговый таймлайн */

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

.step-item {
    position: relative;
    padding-left: 5.2rem;
    padding-bottom: 2.2rem;
    min-width: 0;
}

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

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

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

.step-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--c-accent);
    color: #fff;
    font-family: var(--f-head);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-marker::before,
.step-marker::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.55);
}

.step-marker::before { left: 6px; right: 6px; top: 50%; height: 1px; }
.step-marker::after { top: 6px; bottom: 6px; left: 50%; width: 1px; }

.step-num { position: relative; z-index: 1; }

.step-title { font-size: 1.22rem; margin: 0.5rem 0 0.4rem; }
.step-item p { margin: 0; color: #40536A; }

/* Блок «последние записи» */

.fs-latest { padding: 3.4rem 0; }

.fs-latest .card-grid { margin-bottom: 0; }

.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

/* Блок 3 — статистика */

.fs-stats { background: var(--c-dark); color: #F2F6FA; padding: 3.2rem 2.2rem; }

.fs-stats .sec-title { color: #fff; border-bottom-color: var(--c-accent); }

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 2rem;
}

.stat-cell {
    position: relative;
    min-width: 0;
    padding: 0 1rem;
    text-align: center;
}

.stat-cell + .stat-cell::before {
    content: "";
    position: absolute;
    left: -0.7rem;
    top: 10%;
    bottom: 10%;
    border-left: 1px solid rgba(242, 246, 250, 0.35);
}

.stat-cell + .stat-cell::after {
    content: "";
    position: absolute;
    left: -0.95rem;
    top: 50%;
    width: 6px;
    height: 6px;
    background: var(--c-accent);
    transform: translateY(-50%) rotate(45deg);
}

.stat-num {
    display: block;
    font-family: var(--f-head);
    font-size: 2.9rem;
    line-height: 1.1;
    color: #fff;
    letter-spacing: 0.02em;
}

.stat-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--c-accent);
    line-height: 1.5;
}

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

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

.topic-tile {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
    background: var(--c-alt);
    color: var(--c-ink);
    padding: 1.6rem 1.5rem;
    box-shadow: 8px 8px 0 var(--c-shadow);
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
    transition: background-color 0.22s, color 0.22s, box-shadow 0.22s;
}

.topic-tile svg { width: 40px; height: 40px; flex: 0 0 auto; }
.topic-tile svg * { transition: stroke 0.22s, fill 0.22s; }

.topic-name {
    font-family: var(--f-head);
    font-size: 1.15rem;
    letter-spacing: 0.03em;
}

.topic-desc { font-size: 0.9rem; color: var(--c-muted); }

.topic-tile:hover {
    background: var(--c-accent);
    color: #fff;
    box-shadow: 8px 8px 0 rgba(19, 41, 61, 0.25);
}

.topic-tile:hover .topic-desc { color: rgba(255, 255, 255, 0.85); }
.topic-tile:hover svg [stroke] { stroke: #fff; }
.topic-tile:hover svg [fill]:not([fill="none"]) { fill: #fff; }

/* ---------- Комментарии ---------- */

.comments-area {
    margin-top: 2.4rem;
    background: var(--c-alt);
    padding: 2rem 2.2rem;
    box-shadow: 8px 8px 0 var(--c-shadow);
}

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

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

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

.comment-item { margin-bottom: 1.4rem; }

.comment-inner {
    background: #F3F6F9;
    padding: 1.1rem 1.3rem;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

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

.comment-author { font-family: var(--f-head); font-weight: 700; }
.comment-date { font-size: 0.78rem; color: var(--c-muted); }
.comment-hold { font-size: 0.85rem; color: var(--c-accent); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-reply { margin-top: 0.5rem; font-size: 0.85rem; }

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

.comment-form label {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 0.35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--c-line);
    background: #fff;
    font-family: var(--f-body);
    font-size: 0.95rem;
    color: var(--c-ink);
}

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

.comment-form .submit {
    display: inline-block;
    font-family: var(--f-head);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.9rem 1.7rem;
    background: var(--c-accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    transition: background-color 0.22s, transform 0.22s;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.comment-form .submit:hover { background: var(--c-accent-2); transform: translateX(-4px); }

/* ---------- 404 и поиск ---------- */

.nf-block {
    background: var(--c-alt);
    padding: 2.4rem 2.4rem 2.6rem;
    box-shadow: 8px 8px 0 var(--c-shadow);
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.nf-code {
    font-family: var(--f-head);
    font-size: 5.4rem;
    line-height: 1;
    color: var(--c-accent);
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}

.nf-actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

.no-results {
    background: var(--c-alt);
    padding: 1.8rem 2rem;
    box-shadow: 8px 8px 0 var(--c-shadow);
}

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

.site-foot {
    position: relative;
    z-index: 1;
    background: var(--c-dark);
    color: #DCE5EE;
    padding: 3rem 0 1.6rem;
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 14px);
}

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

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

.site-foot .widget-title {
    font-size: 1.05rem;
    color: #FFFFFF;
    border-left-color: var(--c-accent);
    margin-bottom: 1rem;
}

.site-foot .widget,
.site-foot .widget p,
.site-foot .widget li { color: #C6D3DF; font-size: 0.93rem; }

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

.site-foot .widget li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.site-foot .widget li:last-child { border-bottom: 0; }
.site-foot .widget a { color: #EAF1F7; }
.site-foot .widget a:hover { color: var(--c-accent); }
.site-foot .post-date { display: block; font-size: 0.76rem; color: #9BAEC0; }

.foot-mail { color: #EAF1F7; }

.foot-bottom {
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    color: #9BAEC0;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 1rem 1.6rem;
    background: var(--c-dark);
    color: #E4EBF2;
    border-top: 2px solid var(--c-accent);
    font-size: 0.9rem;
}

.cookie-banner p { margin: 0; max-width: 62ch; }
.cookie-banner a { color: var(--c-accent); }

.cookie-accept {
    font-family: var(--f-head);
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.65rem 1.4rem;
    background: var(--c-accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.cookie-accept:hover { background: var(--c-accent-2); transform: translateX(-3px); }

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

@media (max-width: 960px) {
    h1 { font-size: 2.5rem; }
    .hero-title { font-size: 2.5rem; }
    .entry-title { font-size: 1.9rem; }

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

    .layout-single, .nf-block { width: 100%; }

    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .topics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
    .stat-cell:nth-child(3)::before,
    .stat-cell:nth-child(3)::after { display: none; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
}

@media (max-width: 780px) {
    .nav-toggle { display: inline-block; }

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

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

    .site-nav ul {
        flex-direction: column;
        gap: 0;
        border-top: 1px dashed var(--c-accent-2);
        margin-top: 0.9rem;
        padding-top: 0.5rem;
    }

    .site-nav li { padding: 0.55rem 0; border-bottom: 1px dashed var(--c-line); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2.05rem; letter-spacing: 0.03em; }
    .hero-title { font-size: 2.05rem; }
    h2 { font-size: 1.5rem; }

    .shell { width: 92%; }
    .fshell { width: 92%; }

    .band { padding: 2.4rem 0; }
    .fs-hero { padding: 2.6rem 0 2.4rem; }
    .fs-stats { padding: 2rem 1.4rem; }
    .entry { padding: 1.5rem 1.3rem 1.7rem; }
    .comments-area { padding: 1.4rem 1.2rem; }
    .sidebar { padding: 1.3rem 1.2rem; }
    .nf-block { padding: 1.6rem 1.4rem 1.8rem; }
    .topic-tile { padding: 1.3rem 1.2rem; }

    .card-grid { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
    .topics-grid { grid-template-columns: minmax(0, 1fr); }
    .stats-row { grid-template-columns: minmax(0, 1fr); }
    .stat-cell + .stat-cell::before,
    .stat-cell + .stat-cell::after { display: none; }
    .stat-cell { padding: 1.2rem 0 0; border-top: 1px dashed rgba(242, 246, 250, 0.3); }

    .step-item { padding-left: 4rem; }
    .step-marker { width: 44px; height: 44px; font-size: 1rem; }
    .step-item::before { left: 21px; top: 46px; }

    .card { box-shadow: 6px 6px 0 var(--c-shadow); }
    .entry, .sidebar, .comments-area, .no-results, .nf-block, .topic-tile { box-shadow: 6px 6px 0 var(--c-shadow); }

    .cookie-banner { flex-direction: column; align-items: flex-start; gap: 0.8rem; padding: 1rem 1.1rem; }
}
