/*
Theme Name: dds_mytishhi-nedvizhimost.ru
Theme URI: https://mytishhi-nedvizhimost.ru/
Author: Дмитрий Горелов
Description: Тема для образовательной онлайн-платформы об урбанистике спальных районов и транспортной логистике городов-спутников. Холодная сине-бирюзовая палитра, швейцарская сетка, маршрутная графика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: sputlab
*/

/* =========================================================
   1. Переменные и базовая типографика
   ========================================================= */

:root {
    --c-bg: #F4F7FA;
    --c-bg-alt: #E8EFF5;
    --c-dark: #0B1F33;
    --c-side: #EDF3F8;
    --c-text: #12263A;
    --c-accent: #007C91;
    --c-accent2: #E4572E;
    --c-muted: #6B7C8C;
    --c-line: #D3DEE8;
    --c-grid: #E1EAF2;
    --f-head: "Futura", "Century Gothic", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    --f-body: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --shadow: 0 6px 18px rgba(11, 31, 51, 0.07);
    --shadow-hi: 0 12px 28px rgba(11, 31, 51, 0.13);
}

*,
*::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.7;
    color: var(--c-text);
    background-color: var(--c-bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='320' viewBox='0 0 420 320'%3E%3Cg fill='none' stroke='%23007C91' stroke-opacity='0.06' stroke-width='3'%3E%3Cpath d='M24 286 L96 208 L164 232 L232 140 L318 168 L396 74'/%3E%3Cpath d='M18 120 L110 96 L186 150 L270 60 L360 96'/%3E%3Crect x='96' y='196' width='24' height='24'/%3E%3Crect x='220' y='128' width='24' height='24'/%3E%3Crect x='306' y='156' width='24' height='24'/%3E%3Cpath d='M12 40 L408 40' stroke-dasharray='10 12'/%3E%3C/g%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, var(--c-grid) 0, var(--c-grid) 1px, transparent 1px, transparent 24px);
    background-repeat: no-repeat, repeat;
    background-position: right -40px bottom -20px, 0 0;
    background-attachment: fixed, fixed;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--f-head);
    color: var(--c-text);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 0.7em;
}

h1 {
    font-size: 3.25rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.4rem;
}

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.4em;
}

blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 1.8rem;
    background: var(--c-bg-alt);
    border-left: 4px solid var(--c-accent);
    color: var(--c-text);
    font-size: 1.08rem;
}

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

code,
pre {
    font-family: "Consolas", "Menlo", monospace;
    font-size: 0.92em;
    background: var(--c-bg-alt);
}

pre {
    padding: 1rem 1.2rem;
    overflow-x: auto;
    border: 1px solid var(--c-line);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.6rem;
    border: 1px solid var(--c-line);
}

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

th {
    background: var(--c-bg-alt);
    font-family: var(--f-head);
    letter-spacing: 0.04em;
}

/* Ссылки с анимированным подчёркиванием слева направо */

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

.entry-body a,
.widget a,
.trail a,
.note-text a {
    position: relative;
}

.entry-body a::after,
.widget a::after,
.trail a::after,
.note-text a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.25s ease;
}

.entry-body a:hover::after,
.widget a:hover::after,
.trail a:hover::after,
.note-text a:hover::after {
    width: 100%;
}

/* =========================================================
   2. Сетка и служебные блоки
   ========================================================= */

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

.narrow {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.site-main {
    padding: 2.6rem 0 4rem;
}

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

.layout-single {
    display: block;
}

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

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

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

/* Маршрутная полоса сверху страницы */

.route-bar {
    height: 4px;
    width: 100%;
    background-image: repeating-linear-gradient(90deg, var(--c-accent) 0, var(--c-accent) 64px, var(--c-accent2) 64px, var(--c-accent2) 96px);
}

/* Разделитель-маршрут между секциями */

.route-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.route-line::before,
.route-line::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-accent);
    flex: none;
}

.route-line span {
    display: block;
    width: 62%;
    border-top: 1px dashed var(--c-line);
    min-width: 0;
}

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

.site-header {
    background: var(--c-dark);
    color: #FFFFFF;
    position: static;
}

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

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

.brand-mark,
.brand-logo {
    display: block;
    flex: none;
}

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

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

.brand-name {
    display: block;
    font-family: var(--f-head);
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #FFFFFF;
    line-height: 1.3;
}

.brand-name:hover {
    color: #7FD3DE;
}

.brand-tagline {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #9FB3C4;
    max-width: 52ch;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #FFFFFF;
    font-family: var(--f-head);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-radius: 0;
}

.nav-toggle:hover {
    border-color: var(--c-accent);
    color: #7FD3DE;
}

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

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

.site-nav li {
    margin: 0;
}

.site-nav a {
    display: inline-block;
    font-family: var(--f-head);
    font-size: 0.86rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #DCE7EF;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
    color: #FFFFFF;
    border-bottom-color: var(--c-accent2);
}

/* =========================================================
   4. Кнопки
   ========================================================= */

.btn {
    display: inline-block;
    font-family: var(--f-head);
    font-size: 0.84rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.85rem 1.7rem;
    border: 2px solid var(--c-accent);
    border-radius: 0;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.btn::after {
    display: none;
}

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

.btn-fill:hover {
    background: var(--c-accent2);
    border-color: var(--c-accent2);
    color: #FFFFFF;
    transform: translateY(-2px);
}

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

.btn-ghost:hover {
    background: var(--c-accent);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.btn-light {
    background: transparent;
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.btn-light:hover {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.btn-coral {
    background: var(--c-accent2);
    border-color: var(--c-accent2);
    color: #FFFFFF;
}

.btn-coral:hover {
    background: #FFFFFF;
    border-color: #FFFFFF;
    color: var(--c-dark);
    transform: translateY(-2px);
}

/* =========================================================
   5. Заголовки секций
   ========================================================= */

.sec-kicker {
    display: block;
    font-family: var(--f-head);
    font-size: 0.74rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 0.7rem;
}

.sec-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 2.1rem;
    margin: 0 0 1.6rem;
}

.sec-title::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-accent);
}

.sec-title .rule {
    display: inline-block;
    width: 54px;
    height: 1px;
    background: var(--c-accent);
    flex: none;
}

/* =========================================================
   6. Главная страница
   ========================================================= */

.front-section {
    padding: 4rem 0;
}

.front-section--alt {
    background-color: var(--c-bg-alt);
    background-image: repeating-linear-gradient(45deg, var(--c-grid) 0, var(--c-grid) 1px, transparent 1px, transparent 48px);
}

/* 6.1 Hero */

.hero {
    position: relative;
    overflow: hidden;
    background: var(--c-dark);
    padding: 0;
}

.hero-media {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-veil {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(100deg, rgba(11, 31, 51, 0.92) 0%, rgba(11, 31, 51, 0.78) 48%, rgba(11, 31, 51, 0.42) 100%);
}

.hero-inner {
    position: relative;
    padding: 5.5rem 0 5rem;
}

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

.hero-kicker {
    display: block;
    font-family: var(--f-head);
    font-size: 0.76rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #7FD3DE;
    margin-bottom: 1.1rem;
}

.hero h1 {
    color: #FFFFFF;
    max-width: 20ch;
    margin-bottom: 1.2rem;
}

.hero-lead {
    color: #C8D8E4;
    font-size: 1.1rem;
    max-width: 62ch;
    margin-bottom: 2rem;
}

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

.hero-scheme {
    position: absolute;
    right: -20px;
    bottom: -10px;
    width: 320px;
    opacity: 0.5;
    pointer-events: none;
}

/* 6.2 Статистика */

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

.stat-cell {
    padding: 0.6rem 1.4rem;
    border-left: 1px solid var(--c-line);
    min-width: 0;
}

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

.stat-num {
    display: block;
    font-family: var(--f-head);
    font-size: 3rem;
    line-height: 1.05;
    color: var(--c-accent);
    letter-spacing: -0.02em;
}

.stat-label {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.93rem;
    color: var(--c-muted);
}

/* 6.3 Последние записи */

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

.front-more {
    margin-top: 2.4rem;
}

/* 6.4 Таймлайн */

.timeline {
    position: relative;
    padding: 1rem 0;
    margin: 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: var(--c-accent);
}

.tl-item {
    position: relative;
    width: 46%;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.8rem;
    background: #FFFFFF;
    border: 1px solid var(--c-line);
    border-radius: 2px;
    box-shadow: var(--shadow);
    min-width: 0;
}

.tl-item:nth-child(odd) {
    margin-right: auto;
}

.tl-item:nth-child(even) {
    margin-left: auto;
}

.tl-item::after {
    content: "";
    position: absolute;
    top: 1.8rem;
    width: 14px;
    height: 14px;
    background: var(--c-accent);
    border: 2px solid #FFFFFF;
}

.tl-item:nth-child(odd)::after {
    right: -8.9%;
}

.tl-item:nth-child(even)::after {
    left: -8.9%;
}

.tl-year {
    display: block;
    font-family: var(--f-head);
    font-size: 1.9rem;
    color: var(--c-accent);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.tl-item h3 {
    font-size: 1.12rem;
    margin-bottom: 0.4rem;
}

.tl-item p {
    margin: 0;
    font-size: 0.96rem;
    color: var(--c-muted);
}

/* 6.5 CTA */

.fs-cta {
    position: relative;
    background: var(--c-dark);
    padding: 3.2rem 2.6rem;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.fs-cta::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(0, 124, 145, 0.85);
    pointer-events: none;
}

.fs-cta-text {
    min-width: 0;
    flex: 1 1 380px;
}

.fs-cta h2 {
    color: #FFFFFF;
    font-size: 2.05rem;
    margin-bottom: 0.7rem;
}

.fs-cta p {
    color: #A9BDCC;
    margin: 0;
    max-width: 60ch;
}

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

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

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hi);
    border-color: var(--c-accent);
}

.card-thumb {
    display: block;
    border-bottom: 1px solid var(--c-line);
}

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

.card-thumb--empty {
    height: 6px;
    background: repeating-linear-gradient(90deg, var(--c-accent) 0, var(--c-accent) 24px, var(--c-accent2) 24px, var(--c-accent2) 36px);
    border-bottom: 1px solid var(--c-line);
}

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

.card-title {
    font-size: 1.22rem;
    margin: 0 0 0.6rem;
}

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

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

.card-excerpt {
    color: var(--c-muted);
    font-size: 0.97rem;
    flex: 1;
}

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

.card-foot {
    margin-top: 1.1rem;
}

.card-link {
    font-family: var(--f-head);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-accent);
}

.card-link:hover {
    color: var(--c-accent2);
}

.post-meta {
    font-size: 0.82rem;
    color: var(--c-muted);
    margin-bottom: 0.6rem;
    font-family: var(--f-head);
    letter-spacing: 0.05em;
}

.post-meta .meta-sep {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--c-accent2);
    vertical-align: middle;
    margin: 0 0.35rem;
}

.post-meta .meta-cat {
    color: var(--c-accent);
}

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

/* =========================================================
   8. Хлебные крошки, пагинация
   ========================================================= */

.trail {
    font-size: 0.86rem;
    color: var(--c-muted);
    padding: 1.4rem 0 0;
}

.trail a {
    color: var(--c-muted);
}

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

.trail .trail-sep {
    color: var(--c-accent);
    margin: 0 0.35rem;
}

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

.pager .page-numbers {
    display: inline-block;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--c-line);
    background: #FFFFFF;
    color: var(--c-text);
    font-family: var(--f-head);
    font-size: 0.9rem;
    line-height: 1.2;
    border-radius: 0;
}

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

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

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

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

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

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 0.6rem;
}

.entry-thumb {
    margin-bottom: 1.8rem;
    border: 1px solid var(--c-line);
}

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

.entry-body {
    background: #FFFFFF;
    border: 1px solid var(--c-line);
    border-radius: 2px;
    padding: 2.2rem 2.4rem;
    box-shadow: var(--shadow);
}

.entry-body img {
    height: auto;
}

.entry-body h2 {
    font-size: 1.7rem;
    margin-top: 1.8rem;
}

.entry-body h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
}

.entry-tags {
    margin-top: 1.8rem;
    font-size: 0.88rem;
    color: var(--c-muted);
}

.entry-tags a {
    display: inline-block;
    margin: 0 0.4rem 0.4rem 0;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--c-line);
    color: var(--c-accent);
}

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

.archive-lead {
    color: var(--c-muted);
    margin-bottom: 2rem;
}

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

.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--c-side);
    border: 1px solid var(--c-line);
    border-radius: 2px;
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.6rem;
    color: var(--c-text);
}

.sidebar .widget-title {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--c-text);
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--c-line);
}

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

.sidebar .widget li {
    padding: 0.5rem 0 0.5rem 1.1rem;
    position: relative;
    border-bottom: 1px dashed var(--c-line);
}

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

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 6px;
    height: 6px;
    background: var(--c-accent);
}

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

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

.sidebar .widget .post-date,
.sidebar .widget .rss-date {
    display: block;
    font-size: 0.8rem;
    color: var(--c-muted);
}

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

.site-footer {
    background: var(--c-dark);
    color: #C3D2DE;
    margin-top: 3rem;
}

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

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

.site-footer .widget {
    margin-bottom: 1.6rem;
    color: #C3D2DE;
}

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

.site-footer .widget-title {
    color: #FFFFFF;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.site-footer .widget p,
.site-footer .widget li,
.site-footer .widget .textwidget {
    color: #C3D2DE;
    font-size: 0.94rem;
}

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

.site-footer .widget li {
    padding: 0.4rem 0 0.4rem 1.1rem;
    position: relative;
}

.site-footer .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95rem;
    width: 6px;
    height: 6px;
    background: var(--c-accent2);
}

.site-footer .widget a {
    color: #DCE7EF;
}

.site-footer .widget a:hover {
    color: #7FD3DE;
}

.site-footer .widget .post-date {
    color: #8FA4B5;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 1.3rem 0 1.6rem;
    font-size: 0.86rem;
    color: #8FA4B5;
}

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

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

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

.cookie-banner p {
    margin: 0;
    max-width: 70ch;
}

.cookie-banner a {
    color: #7FD3DE;
}

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

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

.search-form label {
    flex: 1 1 200px;
    min-width: 0;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--c-line);
    background: #FFFFFF;
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: 0.95rem;
    border-radius: 0;
}

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

.sidebar .search-form input[type="search"] {
    background: #FFFFFF;
}

.comments-area {
    margin-top: 2.6rem;
    background: #FFFFFF;
    border: 1px solid var(--c-line);
    border-radius: 2px;
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow);
}

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

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

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

.note-body {
    padding: 1.1rem 1.3rem;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    margin-bottom: 1rem;
}

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

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

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

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

.note-actions {
    margin-top: 0.6rem;
    font-size: 0.85rem;
}

.comment-respond {
    margin-top: 1.6rem;
}

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

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

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

.comment-form .submit {
    display: inline-block;
    font-family: var(--f-head);
    font-size: 0.84rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.85rem 1.7rem;
    border: 2px solid var(--c-accent);
    background: var(--c-accent);
    color: #FFFFFF;
    cursor: pointer;
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.comment-form .submit:hover {
    background: var(--c-accent2);
    border-color: var(--c-accent2);
    transform: translateY(-2px);
}

/* =========================================================
   14. 404 и поиск
   ========================================================= */

.notfound {
    background: #FFFFFF;
    border: 1px solid var(--c-line);
    border-radius: 2px;
    padding: 2.6rem 2.4rem;
    box-shadow: var(--shadow);
}

.notfound-code {
    font-family: var(--f-head);
    font-size: 4.6rem;
    line-height: 1;
    color: var(--c-accent);
    margin-bottom: 0.6rem;
}

.notfound-actions {
    margin-top: 1.8rem;
}

.no-results {
    background: #FFFFFF;
    border: 1px solid var(--c-line);
    padding: 1.8rem 2rem;
}

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

@media (max-width: 960px) {
    h1 {
        font-size: 2.5rem;
    }

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

    .layout-single .content-area,
    .narrow,
    .hero-copy {
        width: 100%;
    }

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

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

    .hero-scheme {
        width: 220px;
        opacity: 0.32;
    }

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

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

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

    h1 {
        font-size: 2rem;
    }

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

    .header-inner {
        padding: 1.1rem 0;
    }

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

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

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

    .site-nav ul {
        flex-direction: column;
        gap: 0.2rem;
        padding-top: 0.8rem;
    }

    .site-nav a {
        display: block;
        padding: 0.6rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .front-section {
        padding: 2.6rem 0;
    }

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

    .hero-scheme {
        display: none;
    }

    .cards-grid,
    .cards-stack {
        grid-template-columns: minmax(0, 1fr);
    }

    .entry-body,
    .comments-area,
    .notfound {
        padding: 1.5rem 1.3rem;
    }

    .entry-title {
        font-size: 1.85rem;
    }

    .fs-cta {
        padding: 2rem 1.4rem;
    }

    .fs-cta::before {
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .fs-cta h2 {
        font-size: 1.6rem;
    }

    .timeline::before {
        left: 7px;
        margin-left: 0;
    }

    .tl-item {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 2.2rem;
    }

    .tl-item::after {
        left: 0;
        right: auto;
        top: 1.6rem;
    }

    .tl-item:nth-child(odd)::after,
    .tl-item:nth-child(even)::after {
        left: 1px;
        right: auto;
    }

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

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

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

    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        padding: 2.2rem 0 1.6rem;
    }

    .cookie-banner {
        padding: 0.9rem 1.1rem;
        gap: 0.9rem;
        text-align: left;
    }

    .route-line span {
        width: 50%;
    }
}
