/*
Theme Name: dds_johnsorkvist.com
Author: Джон Сорквист
Description: Тёмная тема корпоративно-редакционного стиля для авторского блога инвестора-практика: графитово-синий фон, медный акцент, засечная типографика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: jsinvest
*/

/* ==================================================================
   1. Переменные
   ================================================================== */

:root {
    --bg:            #14181F;
    --bg-alt:        #1B212B;
    --bg-head:       #10141A;
    --bg-foot:       #0D1015;
    --bg-aside:      #1B212B;
    --ink:           #E8E4DC;
    --copper:        #C87A4A;
    --copper-soft:   #2A1F18;
    --teal:          #6FA8A0;
    --muted:         #8A8F98;
    --line:          #2A323F;
    --serif:         Georgia, "Iowan Old Style", "Times New Roman", "PT Serif", serif;
    --sans:          -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --shell:         min(92%, 1180px);
    --shell-front:   min(85%, 1240px);
}

/* ==================================================================
   2. Сброс и база
   ================================================================== */

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(
        45deg,
        rgba(26, 31, 40, 0.30) 0,
        rgba(26, 31, 40, 0.30) 1px,
        transparent 1px,
        transparent 24px
    );
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body::after {
    content: "";
    position: fixed;
    right: 0;
    bottom: 0;
    width: 640px;
    height: 300px;
    max-width: 70vw;
    opacity: 0.15;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 300' fill='none' stroke='%231F2733' stroke-width='2'%3E%3Cpath d='M10 300V210h48v90M58 230h44v70M102 180h52v120M154 245h38v55M192 150h60v150M252 205h40v95M292 120h56v180M348 190h46v110M394 165h50v135M444 230h36v70M480 140h58v160M538 200h44v100M582 175h48v125'/%3E%3Cpath d='M20 225h28M20 245h28M20 265h28M204 170h36M204 195h36M204 220h36M304 140h32M304 165h32M304 190h32M492 160h34M492 185h34M492 210h34' stroke-width='1.5'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

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

a {
    color: var(--ink);
    text-decoration: none;
    background-image: linear-gradient(var(--copper), var(--copper));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size 0.28s ease, color 0.2s ease;
}

a:hover, a:focus { background-size: 100% 1px; color: var(--copper); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.22;
    color: var(--ink);
    margin: 2.2rem 0 1rem;
    letter-spacing: -0.01em;
}

h1 { font-size: 3.2rem; margin-top: 0; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

h2::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--copper);
    margin-right: 0.6em;
    vertical-align: baseline;
}

p { margin: 0 0 1.15em; }

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

blockquote {
    margin: 2rem 0;
    padding: 1.4rem 1.8rem;
    border-left: 3px solid var(--copper);
    background: var(--bg-alt);
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--ink);
}

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

code, pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.92em;
    background: var(--bg-alt);
    color: var(--teal);
}

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

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

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

th { background: var(--bg-alt); font-family: var(--serif); }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }

::selection { background: var(--copper); color: var(--bg); }

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

/* ==================================================================
   3. Контейнеры и раскладки
   ================================================================== */

.shell { width: var(--shell); margin-inline: auto; }
.shell-front { width: var(--shell-front); margin-inline: auto; }

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

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

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

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    cursor: pointer;
    background-image: none;
    transition: filter 0.2s ease, transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-fill {
    background-color: var(--copper);
    color: #14181F;
    border: 1px solid var(--copper);
}

.btn-fill:hover, .btn-fill:focus {
    filter: brightness(1.12);
    transform: translateY(-1px);
    color: #14181F;
    background-image: none;
}

.btn-line {
    background-color: transparent;
    color: var(--copper);
    border: 1px solid var(--copper);
}

.btn-line:hover, .btn-line:focus {
    filter: brightness(1.12);
    transform: translateY(-1px);
    background-color: rgba(200, 122, 74, 0.10);
    color: var(--copper);
    background-image: none;
}

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

.site-header {
    background: var(--bg-head);
    border-bottom: 3px solid var(--copper);
    position: relative;
}

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

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

.brand a { background-image: none; }
.brand-logo { display: block; max-height: 64px; width: auto; }
.brand-mark { display: block; flex: 0 0 auto; }

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

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

.brand-desc {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: 62ch;
}

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

.nav-toggle .bars { display: block; width: 18px; height: 2px; background: var(--copper); position: relative; }
.nav-toggle .bars::before,
.nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--copper); }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

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

.main-nav a {
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}

.main-nav .current-menu-item > a { color: var(--copper); }

/* ==================================================================
   6. Главная: секции
   ================================================================== */

.front-section { padding: 4.2rem 0; }
.front-section.tone-base { background: transparent; }

.front-section.tone-alt {
    background-color: var(--bg-alt);
    background-image: repeating-linear-gradient(
        45deg,
        rgba(42, 31, 24, 0.55) 0,
        rgba(42, 31, 24, 0.55) 1px,
        transparent 1px,
        transparent 24px
    );
}

.sec-head { margin-bottom: 2.2rem; }

.sec-title {
    margin: 0 0 0.7rem;
    padding-left: 1.1rem;
    border-left: 2px solid var(--copper);
    font-size: 2.1rem;
}

.sec-note { margin: 0; color: var(--muted); max-width: 68ch; }

.rule-left {
    width: 60%;
    height: 1px;
    background: var(--line);
    border: 0;
    margin: 0 0 3rem;
}

.dot-rule {
    height: 3px;
    margin: 0;
    background-image: radial-gradient(circle, var(--copper) 1px, transparent 1.2px);
    background-size: 10px 3px;
    background-repeat: repeat-x;
    opacity: 0.55;
}

/* Блок 1 — hero */

.hero {
    background: var(--bg-head);
    padding: 4.8rem 0 4.4rem;
    border-bottom: 1px solid var(--line);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 3.2rem;
    align-items: center;
}

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

.hero-kicker {
    display: inline-block;
    margin-bottom: 1.3rem;
    padding: 0.25rem 0.6rem;
    background: var(--copper-soft);
    color: var(--copper);
    border-radius: 2px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    padding-top: 1.4rem;
    border-top: 2px solid var(--copper);
    margin-bottom: 1.3rem;
}

.hero-lead { color: var(--muted); font-size: 1.06rem; max-width: 56ch; }

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

.hero-art { min-width: 0; }
.hero-art img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; }

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

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

.stat-cell {
    min-width: 0;
    padding: 0.4rem 1.4rem;
    text-align: center;
    border-left: 1px dotted rgba(200, 122, 74, 0.55);
}

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

.stat-num {
    display: block;
    font-family: var(--serif);
    font-size: 3.4rem;
    line-height: 1.05;
    color: var(--copper);
}

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

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

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

.latest-more { margin-top: 2.6rem; }

/* Блок 3 — zigzag */

.zig-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
    padding: 2.6rem 0;
    border-bottom: 1px solid var(--line);
}

.zig-row:last-child { border-bottom: 0; }
.zig-row.flip .zig-art { order: -1; }

.zig-copy { min-width: 0; }
.zig-copy h3 { margin-top: 0; font-size: 1.7rem; }
.zig-copy p:last-child { margin-bottom: 0; }

.zig-index {
    display: block;
    margin-bottom: 0.6rem;
    font-family: var(--serif);
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    color: var(--copper);
}

.zig-art { min-width: 0; }
.zig-art img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; }

/* Блок 4 — FAQ */

.faq-list { border-top: 1px dotted rgba(200, 122, 74, 0.5); }

.faq-item { border-bottom: 1px dotted rgba(200, 122, 74, 0.5); }

.faq-q {
    display: block;
    width: 100%;
    padding: 1.25rem 2.6rem 1.25rem 0;
    position: relative;
    background: transparent;
    border: 0;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.22rem;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.faq-q .sq {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.7em;
    background: var(--copper);
    vertical-align: baseline;
}

.faq-q::after {
    content: "";
    position: absolute;
    right: 0.4rem;
    top: 50%;
    width: 11px;
    height: 11px;
    margin-top: -8px;
    border-right: 2px solid var(--copper);
    border-bottom: 2px solid var(--copper);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.faq-q[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: -3px; }

.faq-a {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
}

.faq-a-inner {
    padding: 0 2.6rem 1.4rem 1.3rem;
    color: var(--muted);
}

.faq-a-inner p:last-child { margin-bottom: 0; }

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--copper);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.card-thumb { display: block; border-bottom: 1px solid var(--line); }
.card-thumb a { display: block; background-image: none; }

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

.card:hover .card-thumb img { filter: sepia(0.22) saturate(1.15); }

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.card-title {
    margin: 0 0 0.7rem;
    font-size: 1.22rem;
    line-height: 1.32;
}

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

.card-excerpt { color: var(--muted); font-size: 0.94rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-foot { margin-top: auto; padding-top: 1rem; }

.tagline { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }

.tag-chip {
    display: inline-block;
    padding: 0.18rem 0.5rem;
    background: var(--copper-soft);
    color: var(--copper);
    border-radius: 2px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background-image: none;
}

.tag-chip:hover { color: var(--ink); background-color: var(--copper); background-image: none; }

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

/* Лента списка (архивы, блог, поиск) */

.feed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
.no-aside .feed.feed-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

.crumbs {
    margin: 0 0 1.8rem;
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.7;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--copper); }
.crumbs .sep { color: var(--copper); margin: 0 0.35rem; }

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

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background-color: var(--bg-alt);
    background-image: none;
    color: var(--ink);
    font-size: 0.9rem;
    text-align: center;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pager .page-numbers:hover {
    border-color: var(--copper);
    color: var(--copper);
    transform: translateY(-1px);
    background-image: none;
}

.pager .page-numbers.current {
    background-color: var(--copper);
    border-color: var(--copper);
    color: #14181F;
    font-weight: 600;
}

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

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

.entry-head { margin-bottom: 1.8rem; }
.entry-head h1 { font-size: 2.6rem; margin-bottom: 0.9rem; }

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.entry-thumb { margin: 0 0 2rem; }

.entry-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.entry-content { font-size: 1.02rem; }
.entry-content img { border-radius: 6px; }
.entry-content h2 { margin-top: 2.6rem; }

.entry-content a { color: var(--copper); }

.entry-foot {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2.4rem;
}

.post-nav .nav-box {
    min-width: 0;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-alt);
}

.post-nav .nav-lab {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--copper);
}

.page-head { margin-bottom: 1.6rem; }
.page-head h1 { font-size: 2.5rem; }

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

.sidebar {
    min-width: 0;
    background: var(--bg-aside);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.5rem 1.5rem 0.6rem;
    color: var(--ink);
}

.sidebar .widget { margin-bottom: 1.6rem; }

.sidebar .widget-title {
    margin: 0 0 1rem;
    padding-left: 0.9rem;
    border-left: 2px solid var(--copper);
    font-size: 1.1rem;
    color: var(--ink);
}

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

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

.sidebar li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.94rem;
    color: var(--ink);
}

.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); }
.sidebar a:hover { color: var(--copper); }
.sidebar p, .sidebar .textwidget { color: var(--muted); font-size: 0.94rem; }
.sidebar .post-date, .sidebar .wp-block-latest-posts__post-date { color: var(--muted); font-size: 0.8rem; }

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

.site-footer {
    background: var(--bg-foot);
    border-top: 1px solid var(--line);
    color: var(--ink);
    padding: 3.2rem 0 1.6rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

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

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

.site-footer .widget { margin-bottom: 1.4rem; }

.site-footer .widget-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: var(--ink);
}

.site-footer .widget-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.6em;
    background: var(--copper);
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 0.35rem 0; font-size: 0.92rem; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--copper); }
.site-footer p, .site-footer .textwidget { color: var(--muted); font-size: 0.92rem; }
.site-footer .post-date { color: var(--muted); }

.foot-bottom {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.7;
}

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

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

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

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.95rem;
}

input:focus, textarea:focus { outline: none; border-color: var(--copper); }

::placeholder { color: var(--muted); }

.comments-area { margin-top: 3rem; }

.comments-title, .comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 1.4rem;
}

.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.2rem; }

.comment-inner {
    padding: 1.1rem 1.3rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
}

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

.comment-author { font-family: var(--serif); font-weight: 700; }
.comment-meta-date { color: var(--muted); font-size: 0.82rem; }
.comment-text { font-size: 0.97rem; }
.comment-text p:last-child { margin-bottom: 0; }
.comment-hold { color: var(--copper); font-size: 0.85rem; }
.comment-actions { margin-top: 0.6rem; font-size: 0.85rem; }
.comment-actions a { color: var(--copper); }

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

.comment-form .submit {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--copper);
    border: 1px solid var(--copper);
    border-radius: 4px;
    color: #14181F;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.comment-form .submit:hover { filter: brightness(1.12); transform: translateY(-1px); }

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

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.6rem;
    background: var(--bg-head);
    border-top: 3px solid var(--copper);
    color: var(--ink);
    font-size: 0.88rem;
    line-height: 1.6;
}

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

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

.err-block {
    padding: 2.6rem 2.2rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.err-code {
    display: block;
    font-family: var(--serif);
    font-size: 4.6rem;
    line-height: 1;
    color: var(--copper);
    margin-bottom: 1rem;
}

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

.nothing {
    padding: 2rem 2.2rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
}

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

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

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

    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
    .zig-row { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
    .zig-row.flip .zig-art { order: 0; }

    .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .no-aside .feed.feed-wide { grid-template-columns: minmax(0, 1fr); }

    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.8rem; }
    .stat-cell:nth-child(odd) { border-left: 0; }

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

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

    .main-nav {
        flex: 1 1 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav.is-open { max-height: 420px; }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.6rem 0 0.2rem;
    }

    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav li:last-child { border-bottom: 0; }
    .main-nav a { display: block; padding: 0.8rem 0; }

    .header-inner { flex-wrap: wrap; }
}

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

    h1, .hero h1 { font-size: 2rem; }
    h2, .sec-title { font-size: 1.6rem; }

    .front-section { padding: 3rem 0; }
    .hero { padding: 3.2rem 0 3rem; }

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

    .stat-row { grid-template-columns: minmax(0, 1fr); row-gap: 1.6rem; }
    .stat-cell { border-left: 0; padding: 0 0.6rem; }
    .stat-num { font-size: 2.8rem; }

    .entry-head h1 { font-size: 1.9rem; }
    .err-block { padding: 1.8rem 1.4rem; }
    .nothing { padding: 1.6rem 1.4rem; }
    .cookie-banner { padding: 1rem 1.2rem; }
    .blockquote, blockquote { padding: 1.1rem 1.2rem; }
    .sidebar { padding: 1.2rem 1.2rem 0.4rem; }
    .comment-list .children { padding-left: 0.8rem; }
    .faq-a-inner { padding: 0 0.4rem 1.2rem 1rem; }
    .faq-q { font-size: 1.08rem; padding-right: 2rem; }
}
