/*
Theme Name: dds_himki-nedvizhimost.ru
Theme URI: https://himki-nedvizhimost.ru/
Author: Алексей Руднев
Description: Тема для образовательной платформы о расчёте доходности подмосковной недвижимости.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: hnedv
*/

/* =========================================================
   1. Переменные и базовые стили
   ========================================================= */

:root {
    --bg: #F4F7FA;
    --bg-alt: #E6EDF3;
    --head-bg: #16222E;
    --foot-bg: #0E1720;
    --side-bg: #EDF2F6;
    --text: #1B2A38;
    --accent: #00B8C4;
    --accent-2: #F5A623;
    --muted: #6B7F91;
    --line: #B0C4D4;
    --card-border: #D0DCE5;
    --on-dark: #FFFFFF;
    --on-dark-muted: #A0B4C4;
    --font-head: "Inter Tight", "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-body: "Inter", "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
    --radius: 6px;
    --card-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.68;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 260'%3E%3Cg fill='none' stroke='%2300B8C4' stroke-width='3' opacity='0.06'%3E%3Cpath d='M20 250V110L120 30l100 80v140z'/%3E%3Cpath d='M60 250v-70h50v70M140 150h50v40h-50zM140 200h50v40h-50z'/%3E%3Cpath d='M0 250h240'/%3E%3C/g%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, rgba(224, 232, 239, 0.4) 0 1px, transparent 1px 24px);
    background-repeat: no-repeat, repeat;
    background-position: right -30px bottom -20px, 0 0;
    background-size: 380px auto, auto;
    background-attachment: fixed, fixed;
}

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

p {
    margin: 0 0 1.05em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text);
    line-height: 1.22;
    font-weight: 700;
    margin: 1.8rem 0 0.85rem;
}

h1 {
    font-size: 3.2rem;
    letter-spacing: -0.02em;
    margin-top: 0;
}

h2 {
    font-size: 1.95rem;
    position: relative;
    padding-left: 18px;
}

h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.52em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

h3 { font-size: 1.42rem; }
h4 { font-size: 1.18rem; }
h5, h6 { font-size: 1.03rem; }

a {
    color: #008E98;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-shadow 0.18s ease, text-decoration-thickness 0.18s ease, color 0.18s ease;
}

a:hover,
a:focus {
    color: var(--accent);
    text-decoration-thickness: 2px;
    text-shadow: 0 0 10px rgba(0, 184, 196, 0.35);
}

ul, ol {
    padding-left: 1.3rem;
}

blockquote {
    margin: 1.6rem 0;
    padding: 1.2rem 1.5rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--card-radius) var(--card-radius) 0;
    color: #223546;
}

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

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

pre {
    overflow-x: auto;
    padding: 1rem 1.2rem;
    background: #16222E;
    color: #E3ECF2;
    border-radius: var(--card-radius);
}

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

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

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

.table-scroll {
    overflow-x: auto;
}

/* =========================================================
   2. Каркас
   ========================================================= */

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

.top-line {
    height: 3px;
    background: var(--accent);
}

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

.front-main {
    padding: 0 0 3.4rem;
}

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

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

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

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

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

.site-head {
    background-color: var(--head-bg);
    background-image: repeating-linear-gradient(45deg, rgba(30, 48, 64, 0.5) 0 1px, transparent 1px 24px);
    color: var(--on-dark);
    padding: 1.15rem 0;
    position: static;
}

.head-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.4rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 420px;
    text-decoration: none;
    color: inherit;
}

.brand:hover,
.brand:focus {
    color: inherit;
    text-shadow: none;
}

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

.brand-logo {
    display: block;
    max-height: 56px;
    width: auto;
}

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

.brand-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.97rem;
    letter-spacing: 0.01em;
    line-height: 1.35;
    color: var(--on-dark);
}

.brand-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--on-dark-muted);
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    border-radius: var(--radius);
    padding: 0.5rem 0.9rem;
    font-family: var(--font-head);
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

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

.main-nav a {
    color: #DCE7EF;
    text-decoration: none;
    font-family: var(--font-head);
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0;
    display: inline-block;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav .current-menu-item > a {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-shadow: none;
}

/* =========================================================
   4. Кнопки, чипы, заголовки секций
   ========================================================= */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.93rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius);
    padding: 0.78rem 1.6rem;
    border: 1.5px solid var(--accent);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn-fill {
    background: var(--accent);
    color: #0E1720;
}

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

.btn:hover,
.btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 196, 0.25);
    text-shadow: none;
    color: #0E1720;
    background: var(--accent);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding-left: 0;
    margin: 0 0 1.6rem;
}

.section-title::before {
    content: "";
    flex: 0 0 auto;
    width: 46px;
    height: 4px;
    background: var(--accent);
}

.section-title::after { content: none; }

.on-dark .section-title { color: var(--on-dark); }

.data-dots {
    height: 6px;
    margin: 0 auto;
    background-image: radial-gradient(circle, var(--accent) 1.4px, transparent 1.5px);
    background-size: 10px 6px;
    background-repeat: repeat-x;
    opacity: 0.65;
}

.chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.chip {
    display: inline-block;
    padding: 0.16rem 0.6rem;
    border-radius: 4px;
    font-size: 0.73rem;
    font-family: var(--font-head);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #FFFFFF;
    text-decoration: none;
    border: 0;
}

.chip:hover,
.chip:focus {
    color: #FFFFFF;
    text-shadow: none;
    opacity: 0.86;
}

.chip.tone-0 { background: #00909A; }
.chip.tone-1 { background: #47617A; }
.chip.tone-2 { background: #7C8BAE; }
.chip.tone-3 { background: #3F8F86; }

/* =========================================================
   5. Хлебные крошки, мета
   ========================================================= */

.crumbs {
    font-size: 0.83rem;
    color: var(--muted);
    margin-bottom: 1.3rem;
    word-break: break-word;
}

.crumbs a {
    color: var(--muted);
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--accent);
    text-shadow: none;
}

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

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.9rem;
    font-size: 0.82rem;
    color: var(--muted);
    font-family: var(--font-head);
    letter-spacing: 0.03em;
}

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

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 2px 8px rgba(22, 34, 46, 0.08);
    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: 0 8px 20px rgba(22, 34, 46, 0.12);
    border-color: var(--accent);
}

.card-thumb {
    display: block;
    line-height: 0;
    background: var(--bg-alt);
}

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

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.15rem 1.25rem 1.35rem;
    min-width: 0;
}

.card-title {
    font-size: 1.14rem;
    margin: 0;
    padding-left: 0;
}

.card-title::before { content: none; }

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

.card-title a:hover,
.card-title a:focus {
    color: #008E98;
    text-shadow: none;
}

.card-excerpt {
    color: #33485C;
    font-size: 0.94rem;
}

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

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: #008E98;
    border-bottom: 1px solid rgba(0, 184, 196, 0.5);
    padding-bottom: 2px;
}

.card-more:hover,
.card-more:focus {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-shadow: none;
}

/* =========================================================
   7. Главная: блоки
   ========================================================= */

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

.front-section.alt {
    background-color: var(--bg-alt);
}

.on-dark {
    background-color: var(--head-bg);
    background-image: repeating-linear-gradient(45deg, rgba(30, 48, 64, 0.5) 0 1px, transparent 1px 24px);
    color: var(--on-dark);
}

/* Hero */

.hero {
    padding: 4.2rem 0 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.6rem;
    align-items: center;
}

.hero-kicker {
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.9rem;
}

.hero h1 {
    color: var(--on-dark);
    margin-bottom: 1rem;
}

.hero-sub {
    color: var(--on-dark-muted);
    font-size: 1.06rem;
    max-width: 46ch;
    margin-bottom: 1.8rem;
}

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

.hero-art svg {
    display: block;
    width: 100%;
    height: auto;
}

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

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

.stat {
    padding: 0.4rem 1.2rem;
    border-left: 1px solid var(--line);
    min-width: 0;
}

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

.stat-num {
    font-family: var(--font-head);
    font-size: 2.9rem;
    font-weight: 700;
    line-height: 1.05;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.stat-label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

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

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

.latest-head .section-title {
    margin-bottom: 0;
}

/* Шаги */

.steps {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 1.3rem;
    padding: 0 0 2.1rem;
}

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

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

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

.step-num {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #0E1720;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
}

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

.step-title {
    margin: 0 0 0.35rem;
    font-size: 1.16rem;
    padding-left: 0;
}

.step-title::before { content: none; }

.step-text {
    margin: 0;
    color: var(--muted);
}

/* CTA */

.cta {
    position: relative;
    overflow: hidden;
    background-color: var(--foot-bg);
    background-image: repeating-linear-gradient(45deg, rgba(30, 48, 64, 0.5) 0 1px, transparent 1px 24px);
    color: var(--on-dark);
    border-left: 4px solid var(--accent);
    border-radius: var(--card-radius);
    padding: 2.8rem 2.4rem;
    margin: 3.4rem 0;
}

.cta h2 {
    color: var(--on-dark);
    font-size: 2.1rem;
    padding-left: 0;
    margin-top: 0;
}

.cta h2::before { content: none; }

.cta p {
    color: var(--on-dark-muted);
    max-width: 58ch;
    margin-bottom: 1.7rem;
}

.cta-key {
    position: absolute;
    right: 1.4rem;
    bottom: -0.8rem;
    width: 190px;
    opacity: 0.12;
    pointer-events: none;
}

.cta-key svg {
    display: block;
    width: 100%;
    height: auto;
}

.cta-inner {
    position: relative;
    z-index: 1;
}

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

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

.entry-title {
    font-size: 2.45rem;
    margin: 0 0 0.8rem;
    padding-left: 0;
}

.entry-title::before { content: none; }

.entry-thumb {
    margin: 0 0 1.6rem;
    line-height: 0;
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

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

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

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-tags {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--line);
    font-size: 0.88rem;
    color: var(--muted);
}

.post-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.post-nav a {
    display: block;
    padding: 1rem 1.2rem;
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.post-nav a:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 184, 196, 0.15);
    text-shadow: none;
}

.post-nav span {
    display: block;
    font-family: var(--font-head);
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

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

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

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

.sidebar .widget + .widget {
    margin-top: 1.8rem;
    padding-top: 1.4rem;
    border-top: 1px dashed var(--line);
}

.widget-title {
    font-family: var(--font-head);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 1rem;
    padding-left: 0;
}

.widget-title::before { content: none; }

.sidebar .widget-title {
    color: var(--text);
    border-left: 4px solid var(--accent);
    padding-left: 0.65rem;
}

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

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

.sidebar li {
    padding: 0.42rem 0;
    border-bottom: 1px dashed rgba(176, 196, 212, 0.7);
    font-size: 0.94rem;
}

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

.sidebar a {
    color: #1B2A38;
    text-decoration: none;
}

.sidebar a:hover,
.sidebar a:focus {
    color: #007E87;
    text-shadow: none;
}

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

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

.site-foot {
    background-color: var(--foot-bg);
    background-image: repeating-linear-gradient(45deg, rgba(30, 48, 64, 0.5) 0 1px, transparent 1px 24px);
    color: #C8D6E0;
    padding: 3rem 0 1.6rem;
    margin-top: 2rem;
}

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

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

.site-foot .widget-title {
    color: #FFFFFF;
    border-left: 4px solid var(--accent);
    padding-left: 0.65rem;
}

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

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

.site-foot li {
    padding: 0.36rem 0;
    border-bottom: 1px dashed rgba(200, 214, 224, 0.18);
}

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

.site-foot a {
    color: #DDE8EF;
    text-decoration: none;
}

.site-foot a:hover,
.site-foot a:focus {
    color: var(--accent);
    text-shadow: none;
}

.site-foot .post-date {
    display: block;
    font-size: 0.78rem;
    color: #8FA4B4;
}

.foot-bottom {
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(200, 214, 224, 0.16);
    font-size: 0.82rem;
    color: #8FA4B4;
    line-height: 1.6;
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 2.4rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    background: #FFFFFF;
    color: var(--text);
    font-family: var(--font-head);
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.pager a.page-numbers:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 196, 0.25);
    border-color: var(--accent);
    color: #0E1720;
    text-shadow: none;
}

.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #0E1720;
    font-weight: 700;
}

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

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

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

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

.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.62rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
}

.search-field:focus,
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 184, 196, 0.16);
}

.search-submit,
.comment-form .submit {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.62rem 1.3rem;
    border-radius: var(--radius);
    border: 1.5px solid var(--accent);
    background: var(--accent);
    color: #0E1720;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.search-submit:hover,
.comment-form .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 196, 0.25);
}

.comments-area {
    margin-top: 2.6rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--card-border);
}

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

.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 1.4rem;
}

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

.comment-body {
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 1.1rem 1.25rem;
}

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

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

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

.comment-actions {
    font-size: 0.84rem;
}

.comment-wait {
    color: var(--accent-2);
    font-size: 0.85rem;
}

.comment-respond {
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 1.4rem 1.5rem;
}

.comment-reply-title {
    margin-top: 0;
    padding-left: 0;
}

.comment-reply-title::before { content: none; }

.comment-form label {
    display: block;
    font-size: 0.86rem;
    font-family: var(--font-head);
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

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

.no-comments {
    color: var(--muted);
}

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

.err-code {
    font-family: var(--font-head);
    font-size: 5.4rem;
    line-height: 1;
    color: var(--accent);
    margin: 0 0 0.6rem;
}

.err-box {
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 2rem 2rem 2.2rem;
}

.err-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: center;
    margin-top: 1.4rem;
}

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

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

.cookie-banner {
    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 1.4rem;
    background: #16222E;
    border-top: 3px solid var(--accent);
    color: #D7E3EC;
    padding: 1rem 1.6rem;
    font-size: 0.88rem;
}

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

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

.cookie-accept {
    flex: 0 0 auto;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--accent);
    color: #0E1720;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.55rem 1.4rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 196, 0.25);
}

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

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

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

    .layout-single {
        width: 100%;
    }

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

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

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

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

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

    h1 { font-size: 1.95rem; }
    h2 { font-size: 1.5rem; }
    .entry-title { font-size: 1.7rem; }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

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

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

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        border-top: 1px solid rgba(160, 180, 196, 0.25);
        margin-top: 0.8rem;
    }

    .main-nav li {
        border-bottom: 1px solid rgba(160, 180, 196, 0.18);
    }

    .main-nav a {
        display: block;
        padding: 0.65rem 0;
        border-bottom: 0;
    }

    .brand {
        flex: 1 1 auto;
    }

    .front-main .shell {
        width: 92%;
    }

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

    .hero {
        padding: 2.8rem 0 2.6rem;
    }

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

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

    .stat:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

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

    .cta {
        padding: 1.9rem 1.4rem;
        margin: 2.4rem 0;
    }

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

    .cta-key { display: none; }

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

    .sidebar {
        padding: 1.2rem 1.1rem 1.4rem;
    }

    .err-box {
        padding: 1.5rem 1.3rem 1.7rem;
    }

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

    .step {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 0.9rem;
    }

    .step-num {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .step::before {
        left: 16px;
        top: 38px;
    }
}
