/*
Theme Name: dds_etesnn.ru
Theme URI: https://etesnn.ru/
Author: Алексей Зимин
Description: Тема отраслевого интернет-издания о зелёной энергетике: новостная лента, аналитика, обзоры технологий и рыночные исследования.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: etesgrid
*/

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

:root {
    --bg: #F5F7FA;
    --bg-alt: #E9ECF3;
    --head-bg: #1A202C;
    --foot-bg: #0D1117;
    --side-bg: #FFFFFF;
    --ink: #1E293B;
    --accent: #00B894;
    --accent-2: #3B82F6;
    --muted: #64748B;
    --line: #CBD5E1;
    --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --serif: "Literata", "Merriweather", Georgia, "Times New Roman", serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --dots: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
    --dots-light: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--sans);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--ink);
    margin: 0 0 0.8em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

p {
    margin: 0 0 1.2em;
}

ul, ol {
    padding-left: 1.4em;
}

li {
    margin-bottom: 0.4em;
}

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

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

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

.site-main {
    display: block;
}

/* =========================================================
   2. Индикатор «заряда» и шапка
   ========================================================= */

.charge-bar {
    height: 2px;
    background: var(--line);
    line-height: 0;
}

.charge-bar span {
    display: block;
    width: 20%;
    height: 2px;
    background: var(--accent);
}

.site-top {
    background-color: var(--head-bg);
    background-image: var(--dots-light);
    background-size: 30px 30px;
    color: #E9ECF3;
    padding: 1.6rem 0;
    border-bottom: 3px solid var(--accent);
}

.site-top-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem 1.6rem;
}

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

.brand-link {
    display: block;
    flex: 0 0 auto;
}

.brand-logo,
.brand-mark {
    width: 52px;
    height: 52px;
    display: block;
}

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

.brand-name {
    display: block;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: #FFFFFF;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.brand-tagline {
    display: block;
    font-family: var(--sans);
    font-size: 0.78rem;
    line-height: 1.5;
    color: #94A3B8;
    margin-top: 0.25rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #E9ECF3;
    border: 1px solid #3E4A5C;
    border-radius: 4px;
    padding: 0.5rem 0.85rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    content: "";
    position: relative;
}

.nav-toggle-lines::before { top: -6px; }
.nav-toggle-lines::after { top: 4px; }

.primary-nav {
    margin-left: auto;
}

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

.nav-list li {
    margin: 0;
}

.nav-list a {
    font-family: var(--sans);
    font-size: 0.94rem;
    color: #E2E8F0;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.nav-list a:hover,
.nav-list .current-menu-item > a {
    color: #FFFFFF;
    border-bottom: 2px solid var(--accent);
    transform: translateX(2px);
}

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

.btn {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.85rem 1.6rem;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-accent {
    background: var(--accent);
    color: #06231C;
    box-shadow: 0 2px 6px rgba(0, 184, 148, 0.25);
}

.btn-accent:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.35);
}

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

.btn-ghost:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.22);
}

.fs-hero .btn-ghost {
    color: #93C5FD;
    border-color: #3B82F6;
}

.entry-content a,
.card-excerpt a,
.widget a,
.read-link,
.crumbs a {
    color: inherit;
    border-bottom: 1px solid var(--accent);
    transition: border-width 0.15s ease, transform 0.15s ease, color 0.15s ease;
    display: inline-block;
}

.entry-content a:hover,
.card-excerpt a:hover,
.widget a:hover,
.read-link:hover,
.crumbs a:hover {
    border-bottom: 2px solid var(--accent);
    transform: translateX(2px);
}

.read-link {
    font-family: var(--sans);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent-2);
}

/* =========================================================
   4. Раскладки страниц
   ========================================================= */

.layout-with-sidebar {
    width: min(92%, 1180px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3.4rem;
    padding: 2.4rem 0 4.5rem;
}

.layout-single {
    width: min(85%, 1060px);
    margin-inline: auto;
    display: block;
    padding: 2.4rem 0 4.5rem;
}

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

.page-title {
    font-size: 2.4rem;
    margin-bottom: 0.7rem;
}

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

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

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

.entry-meta {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
}

.entry-meta a {
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.meta-sep {
    color: var(--accent);
    margin: 0 0.2rem;
}

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

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

.entry-content h2,
.entry-content h3 {
    margin-top: 2rem;
}

.entry-content h2 {
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--line);
}

.entry-content img {
    margin: 1.4rem 0;
}

.entry-content blockquote,
.pull {
    position: relative;
    margin: 1.8rem 0;
    padding: 1.6rem 1.8rem;
    background: #FFFFFF;
    border-left: 4px solid var(--accent);
    font-size: 1.05rem;
    font-style: italic;
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}

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

.entry-content table,
.comment-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

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

.entry-content th {
    background: var(--bg-alt);
    font-family: var(--sans);
}

.entry-content code,
.entry-content pre {
    font-family: var(--mono);
    font-size: 0.9rem;
    background: var(--bg-alt);
}

.entry-content pre {
    padding: 1.1rem 1.3rem;
    overflow-x: auto;
    border-left: 3px solid var(--accent-2);
}

.entry-tags {
    margin-top: 1.8rem;
    font-family: var(--sans);
    font-size: 0.85rem;
}

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

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

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

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

.post-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin: 2.5rem 0 0;
    padding-top: 1.4rem;
    border-top: 3px solid var(--head-bg);
}

.switch-link {
    font-family: var(--sans);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent-2);
    max-width: 46%;
    min-width: 0;
}

.switch-link:hover {
    text-decoration: underline;
}

.err-actions {
    margin-top: 1.6rem;
}

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 0;
    border-top: 3px solid var(--accent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    min-width: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:nth-child(even) {
    border-top-color: var(--accent-2);
}

.card:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.1);
}

.card-thumb {
    position: relative;
    overflow: hidden;
}

.card-thumb a {
    display: block;
}

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

.card-thumb::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(to bottom, rgba(13, 17, 23, 0.35), rgba(13, 17, 23, 0));
    pointer-events: none;
}

.thumb-stub {
    background: var(--head-bg);
    background-image: var(--dots-light);
    background-size: 22px 22px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-stub svg {
    width: 46%;
    height: auto;
    display: block;
}

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

.card-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

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

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

.card-excerpt {
    color: #334155;
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

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

.card-more {
    margin: auto 0 0;
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 2rem 0 0;
}

.pager .page-numbers {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.92rem;
    line-height: 1;
    padding: 0.7rem 1rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #FFFFFF;
    color: var(--ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pager .page-numbers:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 184, 148, 0.18);
}

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

.pager .page-numbers.dots {
    border: none;
    background: transparent;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
}

.pager .page-numbers.dots:hover {
    transform: none;
    box-shadow: none;
}

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

/* =========================================================
   7. Секции главной страницы
   ========================================================= */

.fs {
    padding: 4.5rem 0;
}

.fs-alt {
    background: var(--bg-alt);
}

.shift-left .front-shell {
    padding-left: 3.2rem;
}

.shift-right .front-shell {
    padding-right: 3.2rem;
}

.sec-title {
    position: relative;
    font-size: 1.9rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.9rem;
}

.sec-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 66%;
    height: 1px;
    background: var(--accent);
}

.sec-note {
    color: var(--muted);
    max-width: 44em;
    margin-bottom: 2.2rem;
}

/* --- Блок 1: Hero --- */

.fs-hero {
    position: relative;
    background-color: var(--head-bg);
    background-image: var(--dots-light);
    background-size: 30px 30px;
    color: #E2E8F0;
    padding: 5rem 0 3rem;
    overflow: hidden;
}

.fs-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 460px;
    height: 460px;
    background: var(--accent);
    opacity: 0.05;
    border-radius: 62% 38% 46% 54% / 54% 44% 56% 46%;
    pointer-events: none;
}

.fs-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
    gap: 2.6rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: #FFFFFF;
    margin-bottom: 1.4rem;
}

.hero-title span {
    display: block;
}

.hero-title-accent {
    color: var(--accent);
}

.hero-sub {
    font-size: 1.05rem;
    color: #B6C2D2;
    max-width: 34em;
    margin-bottom: 1.8rem;
}

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

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

.hero-anchor {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem 1rem;
    margin-top: 3rem;
    padding: 1.1rem 1.4rem;
    background: rgba(245, 247, 250, 0.06);
    border-top: 1px solid rgba(203, 213, 225, 0.25);
}

.anchor-label {
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7E8CA0;
    margin-right: 0.4rem;
}

.tag-chip {
    font-family: var(--sans);
    font-size: 0.86rem;
    font-weight: 600;
    color: #E2E8F0;
    border: 1px solid #3E4A5C;
    border-radius: 4px;
    padding: 0.4rem 0.95rem;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tag-chip:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* --- Блок 2: Таймлайн --- */

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

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 130px) 36px minmax(0, 1fr);
    align-items: start;
    margin: 0;
    padding-bottom: 2.2rem;
}

.tl-item::before {
    content: "";
    position: absolute;
    top: 0.6rem;
    bottom: -0.6rem;
    left: 148px;
    width: 2px;
    background: var(--accent-2);
}

.tl-item:last-child::before {
    bottom: auto;
    height: 0.4rem;
}

.tl-item::after {
    content: "";
    position: absolute;
    top: 0.35rem;
    left: 142px;
    width: 14px;
    height: 14px;
    background: var(--accent-2);
    border: 3px solid var(--bg-alt);
    border-radius: 50%;
}

.tl-item:nth-child(even)::after {
    background: var(--accent);
}

.tl-date {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    padding-right: 1rem;
    min-width: 0;
}

.tl-body {
    grid-column: 3;
    min-width: 0;
}

.tl-head {
    font-size: 1.18rem;
    margin-bottom: 0.35rem;
}

.tl-body p {
    margin: 0;
    color: #334155;
    font-size: 0.98rem;
}

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

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

.stat-cell {
    background: #FFFFFF;
    border-top: 3px solid var(--accent);
    padding: 1.6rem 1.5rem;
    min-width: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.stat-num {
    display: block;
    font-family: var(--mono);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.stat-cap {
    display: block;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--muted);
}

/* --- Блок 4: Zigzag --- */

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

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

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

.zz-media img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    border-top: 3px solid var(--accent-2);
}

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

.zz-head {
    font-size: 1.5rem;
}

.zz-lead::first-letter {
    float: left;
    font-family: var(--sans);
    font-size: 3.4rem;
    line-height: 0.86;
    font-weight: 700;
    color: var(--accent);
    padding: 0.1em 0.14em 0 0;
}

.zz-text .pull {
    background: var(--bg-alt);
    font-size: 1rem;
    padding: 1.3rem 1.5rem;
}

.fs-alt .pull,
.fs-alt .entry-content blockquote {
    background: #FFFFFF;
}

.latest-more {
    margin: 0;
}

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

.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--side-bg);
    border-top: 3px solid var(--accent-2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.8rem;
    color: var(--ink);
}

.widget-title {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line);
}

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

.widget li {
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li {
    color: var(--ink);
}

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

.sidebar .widget .post-date {
    display: block;
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--muted);
}

.sidebar .widget_recent_entries li {
    padding-left: 1rem;
    position: relative;
}

.sidebar .widget_recent_entries li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 6px;
    height: 6px;
    background: var(--accent);
}

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

.site-bottom {
    background-color: var(--foot-bg);
    background-image: var(--dots-light);
    background-size: 30px 30px;
    color: #CBD5E1;
    padding: 3.4rem 0 2rem;
    border-top: 3px solid var(--accent);
}

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

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

.site-bottom .widget {
    margin-bottom: 1.5rem;
    color: #CBD5E1;
}

.site-bottom .widget p,
.site-bottom .widget li,
.site-bottom .widget .post-date {
    color: #CBD5E1;
}

.site-bottom .widget-title {
    color: #FFFFFF;
    border-bottom-color: rgba(203, 213, 225, 0.25);
}

.site-bottom .widget a {
    color: #E2E8F0;
    border-bottom: 1px solid var(--accent);
}

.site-bottom .widget a:hover {
    color: #FFFFFF;
    border-bottom: 2px solid var(--accent);
}

.foot-copy {
    margin: 2rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(203, 213, 225, 0.2);
    font-family: var(--sans);
    font-size: 0.85rem;
    color: #94A3B8;
}

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

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

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

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

.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    font-family: var(--serif);
    font-size: 0.98rem;
    color: var(--ink);
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.75rem 0.9rem;
    min-width: 0;
}

.search-field {
    flex: 1 1 200px;
}

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

.site-bottom .search-field,
.sidebar .search-field {
    width: 100%;
}

.comments {
    margin-top: 3rem;
    padding-top: 1.8rem;
    border-top: 3px solid var(--head-bg);
}

.comments-title,
.comment-reply-title {
    font-size: 1.35rem;
}

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

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

.comment-body {
    background: #FFFFFF;
    border-left: 3px solid var(--accent-2);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

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

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

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

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

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

.comment-actions a {
    color: var(--accent-2);
    border-bottom: 1px solid var(--accent);
}

.comment-hold {
    font-size: 0.88rem;
    color: var(--muted);
}

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

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

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
}

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

.comment-note,
.comment-notes,
.logged-in-as {
    font-size: 0.88rem;
    color: var(--muted);
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.6rem;
    background: linear-gradient(120deg, #1A202C, #0D1117);
    background-image: var(--dots-light), linear-gradient(120deg, #1A202C, #0D1117);
    background-size: 30px 30px, auto;
    color: #E2E8F0;
    padding: 1.1rem 1.6rem;
    border-top: 2px solid var(--accent);
}

.cookie-text {
    margin: 0;
    font-size: 0.92rem;
    max-width: 62em;
    min-width: 0;
}

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

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

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

    .primary-nav {
        flex: 1 1 100%;
        margin-left: 0;
        display: none;
    }

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

    .nav-list {
        flex-direction: column;
        gap: 0.2rem;
        padding-top: 0.8rem;
        border-top: 1px solid rgba(203, 213, 225, 0.2);
    }

    .nav-list a {
        padding: 0.5rem 0;
    }

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

    .layout-single {
        width: min(92%, 1060px);
    }

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

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

    .hero-art {
        max-width: 340px;
    }

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

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

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

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

    .shift-left .front-shell,
    .shift-right .front-shell {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 600px) {
    .fs {
        padding: 3rem 0;
    }

    .fs-hero {
        padding: 3rem 0 2.4rem;
    }

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

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

    .page-title {
        font-size: 1.7rem;
    }

    .hero-anchor {
        padding: 1rem 1.1rem;
        margin-top: 2.2rem;
    }

    .tl-item {
        grid-template-columns: minmax(0, 1fr);
        padding-left: 26px;
        padding-bottom: 1.8rem;
    }

    .tl-item::before {
        left: 5px;
    }

    .tl-item::after {
        left: 0;
        top: 0.5rem;
    }

    .tl-date {
        font-size: 1.25rem;
        padding-right: 0;
        margin-bottom: 0.3rem;
    }

    .tl-body {
        grid-column: 1;
    }

    .stat-cell {
        padding: 1.3rem 1.2rem;
    }

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

    .card-body {
        padding: 1.1rem 1.2rem 1.3rem;
    }

    .entry-content blockquote,
    .pull,
    .zz-text .pull {
        padding: 1.2rem 1.3rem;
    }

    .comment-body {
        padding: 1rem 1.1rem;
    }

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

    .cookie-banner {
        padding: 1rem 1.2rem;
    }

    .switch-link {
        max-width: 100%;
    }
}
