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

/* =========================================================
   1. Переменные и база
   ========================================================= */

:root {
    --bg: #F0F4F8;
    --alt: #FFFFFF;
    --ink: #1E293B;
    --line: #D0D9E2;
    --rule: #94A3B8;
    --accent: #2563EB;
    --accent-deep: #1E3A8A;
    --signal: #E63E2E;
    --muted: #64748B;
    --dark: #1A262F;
    --tile: #E2E8F0;
    --font-head: 'Inter', 'Manrope', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'PT Serif', Georgia, 'Times New Roman', serif;
    --font-tech: 'Courier New', 'Consolas', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.72;
    background-color: var(--bg);
    background-image:
        linear-gradient(to right, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
    background-size: 48px 48px;
    background-attachment: fixed;
}

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

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

h1 { font-size: 3.5rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

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

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

.shell-wide {
    width: min(85%, 1360px);
    margin-inline: auto;
}

.tech-index {
    display: inline-block;
    font-family: var(--font-tech);
    font-size: 0.8rem;
    letter-spacing: 0.24em;
    color: var(--rule);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

/* =========================================================
   2. Кнопки и ссылки
   ========================================================= */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    line-height: 1.2;
    padding: 0.82rem 1.6rem;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

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

.btn-outline:hover,
.btn-outline:focus {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.entry-content a,
.card-excerpt a,
.widget a,
.crumbs a,
.brand-name,
.card-title a,
.topic-tile a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-size: 0 3px;
    background-position: 0 100%;
    transition: background-size 0.25s ease, color 0.15s ease;
    padding-bottom: 2px;
}

.entry-content a:hover,
.card-excerpt a:hover,
.widget a:hover,
.crumbs a:hover,
.brand-name:hover,
.card-title a:hover {
    background-size: 100% 3px;
}

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

.site-top {
    position: relative;
    background: var(--alt);
    border-bottom: 1px solid var(--line);
}

.site-top::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(to right, var(--accent) 0 30%, var(--signal) 30% 34%, var(--accent) 34% 100%);
}

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

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

.brand-link {
    display: block;
    flex: none;
}

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

.brand-mark {
    display: block;
}

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.35;
    color: var(--ink);
    max-width: 62ch;
}

.brand-desc {
    margin: 0.4rem 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: 70ch;
}

.site-nav {
    flex: 0 1 auto;
    min-width: 0;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: var(--alt);
    border: 2px solid var(--line);
    border-radius: 4px;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

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

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

#nav-list[hidden] {
    display: none !important;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    position: relative;
}

.nav-list a {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    padding: 0.35rem 0;
    border-bottom: 3px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-list a:hover,
.nav-list .current-menu-item > a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-list .sub-menu {
    list-style: none;
    margin: 0.3rem 0 0;
    padding: 0 0 0 0.9rem;
    border-left: 2px solid var(--line);
}

/* =========================================================
   4. Главная — hero
   ========================================================= */

.site-main {
    display: block;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 4.6rem 0 4.4rem;
    color: #FFFFFF;
    background-color: var(--dark);
    background-image:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.07), transparent 42%),
        radial-gradient(circle at 78% 68%, rgba(37, 99, 235, 0.22), transparent 48%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.028) 0 2px, transparent 2px 7px),
        repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.16) 0 3px, transparent 3px 9px);
}

.hero-mark {
    position: absolute;
    left: -60px;
    bottom: -70px;
    width: 300px;
    height: 300px;
    opacity: 0.07;
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3rem;
    align-items: center;
}

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

.hero-text .tech-index {
    color: rgba(255, 255, 255, 0.5);
}

.hero-title {
    color: #FFFFFF;
    font-size: 3.5rem;
    margin: 0 0 1rem;
}

.hero-sub {
    max-width: 58ch;
    font-size: 1.07rem;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 1.9rem;
}

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

.hero-actions .btn-outline {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.6);
}

.hero-actions .btn-outline:hover {
    background: #FFFFFF;
    border-color: #FFFFFF;
    color: var(--dark);
}

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

.hero-scheme svg {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.35;
}

/* =========================================================
   5. Секции главной
   ========================================================= */

.front-section {
    padding: 3.6rem 0;
    border-top: 1px dashed var(--rule);
}

.section-latest,
.section-topics {
    background: var(--bg);
}

.section-glossary {
    background: var(--alt);
}

.section-head {
    max-width: 74ch;
    margin-bottom: 2.1rem;
}

.section-title {
    margin: 0 0 0.5rem;
    font-size: 2.1rem;
}

.section-title::after {
    content: "";
    display: block;
    height: 3px;
    width: 132px;
    margin-top: 0.65rem;
    background: linear-gradient(to right, var(--accent) 0 52px, transparent 52px 70px, var(--accent) 70px 132px);
}

.section-lead {
    margin: 0.9rem 0 0;
    color: var(--muted);
    font-size: 1.02rem;
}

.section-head-light .section-title,
.section-head-light .tech-index {
    color: #FFFFFF;
}

.section-head-light .tech-index {
    color: rgba(255, 255, 255, 0.6);
}

.section-head-light .section-lead {
    color: rgba(255, 255, 255, 0.82);
}

.section-head-light .section-title::after {
    background: linear-gradient(to right, #FFFFFF 0 52px, transparent 52px 70px, #FFFFFF 70px 132px);
}

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

.section-stats {
    padding: 3.4rem 0;
    color: #FFFFFF;
    background-color: var(--accent);
    background-image:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 12px),
        linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    border-top: none;
}

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

.stat-cell {
    min-width: 0;
    padding: 0.4rem 1.6rem;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

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

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-label {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
}

/* --- Блок 3: глоссарий --- */

.glossary {
    margin: 0;
    padding: 0;
    border-top: 1px dashed var(--rule);
}

.glossary-row {
    display: grid;
    grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr);
    gap: 1.5rem;
    padding: 1.15rem 0;
    border-bottom: 1px dashed var(--rule);
}

.glossary dt {
    min-width: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
}

.glossary dd {
    min-width: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.99rem;
}

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

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

.topic-tile {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.7rem 1.6rem;
    background: var(--tile);
    border: 1px solid var(--line);
    color: var(--ink);
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.topic-tile svg {
    display: block;
    width: 46px;
    height: 46px;
    color: var(--accent);
    transition: color 0.18s ease;
}

.topic-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.22rem;
}

.topic-note {
    font-size: 0.92rem;
    color: var(--muted);
    transition: color 0.18s ease;
}

.topic-tile:hover {
    background: var(--accent);
    color: #FFFFFF;
    transform: translateY(-3px);
}

.topic-tile:hover svg,
.topic-tile:hover .topic-note {
    color: #FFFFFF;
}

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

.cards {
    display: grid;
    gap: 2rem 1.8rem;
    counter-reset: cardnum;
}

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

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

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    counter-increment: cardnum;
    background: var(--alt);
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.card::before {
    content: counter(cardnum, decimal-leading-zero);
    position: absolute;
    top: 0.55rem;
    right: 0.8rem;
    z-index: 2;
    font-family: var(--font-tech);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    color: var(--rule);
}

.card:hover {
    box-shadow: 16px 16px 0 rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.card-thumb {
    display: block;
    overflow: hidden;
}

.card-thumb a {
    display: block;
}

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

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

.card-title {
    font-size: 1.32rem;
    margin: 0 0 0.55rem;
    padding-right: 2.2rem;
}

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

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

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

.post-meta a {
    color: var(--muted);
}

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

.meta-sep {
    color: var(--line);
    margin: 0 0.25rem;
}

.card-excerpt {
    color: var(--ink);
    font-size: 0.99rem;
}

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

.card-more {
    margin-top: auto;
    padding-top: 1rem;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    align-self: flex-start;
}

.card-more:hover {
    color: var(--accent-deep);
}

.empty-note {
    padding: 1.6rem 1.7rem;
    background: var(--alt);
    border: 1px solid var(--line);
    border-left: 8px solid var(--accent);
    color: var(--muted);
}

/* =========================================================
   7. Внутренние страницы
   ========================================================= */

.page-wrap {
    padding: 2.2rem 0 4rem;
}

.crumbs {
    font-family: var(--font-head);
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 1.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed var(--rule);
}

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

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

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

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

.layout-single {
    display: block;
    width: min(85%, 1000px);
    margin-left: auto;
    margin-right: auto;
}

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

.page-head,
.entry-head {
    margin-bottom: 2rem;
}

.page-title,
.entry-title {
    font-size: 2.7rem;
    margin: 0 0 0.6rem;
}

.page-title::after,
.entry-title::after {
    content: "";
    display: block;
    height: 3px;
    width: 132px;
    margin-top: 0.7rem;
    background: linear-gradient(to right, var(--accent) 0 52px, transparent 52px 70px, var(--accent) 70px 132px);
}

.page-lead {
    color: var(--muted);
    margin-top: 1rem;
}

.entry-thumb {
    margin: 0 0 2rem;
    border: 1px solid var(--line);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.08);
}

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

.entry-content {
    font-size: 1.05rem;
}

.entry-content h2 {
    font-size: 1.85rem;
    margin: 2.1rem 0 0.9rem;
    padding-left: 0.95rem;
    border-left: 8px solid var(--accent);
}

.entry-content h3 {
    font-size: 1.4rem;
    margin: 1.8rem 0 0.7rem;
    padding-left: 0.95rem;
    border-left: 8px solid var(--line);
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4rem;
    margin: 0 0 1.3rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    margin: 1.8rem 0;
    padding: 1.7rem 1.9rem;
    color: #FFFFFF;
    background-color: var(--accent);
    background-image:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 12px),
        linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    border-radius: 4px;
}

.entry-content blockquote p {
    margin: 0 0 0.6em;
    font-size: 1.12rem;
}

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

.entry-content blockquote a {
    color: #FFFFFF;
}

.entry-content img {
    display: block;
    height: auto;
    border: 1px solid var(--line);
}

.entry-content figure {
    margin: 1.8rem 0;
}

.entry-content figcaption {
    margin-top: 0.6rem;
    font-size: 0.87rem;
    color: var(--muted);
}

.entry-content table {
    width: 100%;
    margin: 1.6rem 0;
    border-collapse: collapse;
    border: 1px solid var(--line);
    font-size: 0.97rem;
}

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

.entry-content th {
    background: var(--tile);
    font-family: var(--font-head);
    font-weight: 700;
}

.entry-content code,
.entry-content pre {
    font-family: var(--font-tech);
    font-size: 0.92rem;
    background: var(--tile);
}

.entry-content pre {
    padding: 1rem 1.2rem;
    overflow-x: auto;
    border-left: 8px solid var(--accent);
}

.entry-pages {
    margin: 1.6rem 0;
    font-family: var(--font-head);
    font-size: 0.9rem;
}

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

.entry-tags a {
    display: inline-block;
    padding: 0.32rem 0.75rem;
    font-family: var(--font-head);
    font-size: 0.82rem;
    color: var(--muted);
    background: var(--alt);
    border: 1px solid var(--line);
    border-radius: 4px;
}

.entry-tags a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin: 2.6rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px dashed var(--rule);
    font-family: var(--font-head);
    font-size: 0.94rem;
}

.post-nav-item {
    min-width: 0;
}

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

.notfound-box {
    padding: 2rem 2.1rem;
    background: var(--alt);
    border: 1px solid var(--line);
    border-left: 8px solid var(--accent);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.08);
}

.notfound-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0 0;
}

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

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

.pager .page-numbers {
    display: inline-block;
    min-width: 44px;
    padding: 0.55rem 0.85rem;
    text-align: center;
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--alt);
    border: 1px solid var(--line);
    border-radius: 4px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.pager a.page-numbers:hover {
    color: #FFFFFF;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(2px);
}

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

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

.comments .nav-links {
    display: flex;
    gap: 0.6rem;
    margin: 1.4rem 0;
    font-family: var(--font-head);
    font-size: 0.9rem;
}

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

.sidebar {
    min-width: 0;
    padding: 1.5rem 1.5rem 0.5rem;
    background: var(--bg);
    border: 1px solid var(--line);
}

.sidebar .widget {
    margin-bottom: 1.8rem;
    padding-left: 1rem;
    border-left: 8px solid var(--accent);
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.08rem;
    margin: 0 0 0.8rem;
    color: var(--ink);
}

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

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

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

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

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

.sidebar .post-date {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: var(--muted);
}

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

.site-bottom {
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding: 3.4rem 0 2rem;
    background: var(--dark);
    color: #CBD5E1;
    border-top: 4px solid var(--accent);
}

.bottom-mark {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 260px;
    height: 260px;
    opacity: 0.06;
    pointer-events: none;
}

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

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

.site-bottom .widget {
    margin-bottom: 1.6rem;
    color: #CBD5E1;
    font-size: 0.95rem;
}

.site-bottom .widget-title {
    font-size: 1.02rem;
    color: #FFFFFF;
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(203, 213, 225, 0.35);
}

.site-bottom .widget p {
    color: #CBD5E1;
}

.site-bottom .widget a {
    color: #93C5FD;
}

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

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

.site-bottom .widget li {
    padding: 0.42rem 0;
    font-family: var(--font-head);
    font-size: 0.92rem;
}

.site-bottom .post-date {
    display: block;
    color: #94A3B8;
    font-size: 0.8rem;
}

.copyright {
    position: relative;
    margin: 2.4rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px dashed rgba(203, 213, 225, 0.3);
    font-family: var(--font-head);
    font-size: 0.86rem;
    color: #94A3B8;
}

/* =========================================================
   11. Формы, комментарии
   ========================================================= */

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

.search-label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--muted);
}

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

.search-input,
.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.72rem 0.9rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--alt);
    border: 1px solid var(--line);
    border-radius: 4px;
}

.search-input:focus,
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.search-submit {
    flex: none;
}

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

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

.comments-count {
    font-family: var(--font-tech);
    font-size: 1rem;
    color: var(--muted);
}

.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-inner {
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    background: var(--alt);
    border: 1px solid var(--line);
    border-left: 8px solid var(--line);
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: baseline;
    margin-bottom: 0.6rem;
    font-family: var(--font-head);
    font-size: 0.88rem;
}

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

.comment-head time {
    color: var(--muted);
    font-size: 0.82rem;
}

.comment-hold {
    color: var(--signal);
    font-size: 0.9rem;
}

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

.comment-actions {
    margin-top: 0.6rem;
    font-family: var(--font-head);
    font-size: 0.86rem;
}

.comment-respond {
    padding: 1.7rem 1.8rem;
    background: var(--alt);
    border: 1px solid var(--line);
    border-left: 8px solid var(--accent);
}

.comment-reply-title {
    font-size: 1.3rem;
    margin-top: 0;
}

.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

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

.comment-notes,
.comment-form .form-submit {
    margin-bottom: 0;
}

.comment-form .comment-form-cookies-consent label {
    display: inline;
    font-weight: 400;
    font-family: var(--font-body);
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--dark);
    border-top: 4px solid var(--accent);
    color: #E2E8F0;
}

.cookie-inner {
    width: min(92%, 1180px);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.1rem 0;
}

.cookie-text {
    margin: 0;
    min-width: 0;
    flex: 1 1 420px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #CBD5E1;
}

.cookie-accept {
    flex: none;
}

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

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

    .shell-wide {
        width: 92%;
    }

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

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

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin-top: 1rem;
        padding: 0.6rem 0;
        border-top: 1px dashed var(--rule);
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px dashed var(--line);
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-list a {
        display: block;
        padding: 0.7rem 0;
        border-bottom: none;
    }

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

    .hero-title {
        font-size: 2.6rem;
    }

    .hero-scheme {
        max-width: 460px;
    }

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

    .layout-single {
        width: 100%;
    }

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

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

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

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

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

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

    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.65rem; }

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

    .hero-title {
        font-size: 2.1rem;
    }

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

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

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

    .stat-cell {
        padding: 0 0 0 1.1rem;
        border-left: 3px solid rgba(255, 255, 255, 0.35);
    }

    .stat-cell:first-child {
        padding-left: 1.1rem;
        border-left: 3px solid rgba(255, 255, 255, 0.35);
    }

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

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

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

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

    .page-title,
    .entry-title {
        font-size: 2rem;
    }

    .entry-content blockquote {
        padding: 1.4rem 1.3rem;
    }

    .notfound-box,
    .comment-respond {
        padding: 1.5rem 1.3rem;
    }

    .empty-note {
        padding: 1.3rem 1.2rem;
    }

    .sidebar {
        padding: 1.2rem 1.2rem 0.4rem;
    }

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

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

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

    .search-row {
        flex-wrap: wrap;
    }

    .cookie-inner {
        padding: 1rem 0;
    }
}
