/*
Theme Name: dds_uglichshans.ru
Author: Алексей Воронов
Version: 1.1
Description: Региональный аналитический дайджест: мониторинг социально-экономических показателей, методологические материалы и событийный маркетинг муниципальных образований. Кейсы из Углича и соседних территорий.
Text Domain: dds_uglichshans
*/

/* =========================================================
   1. БАЗОВЫЕ ПЕРЕМЕННЫЕ И СБРОС
   ========================================================= */
:root {
    --bg-main: #F6F4F0;
    --bg-soft: #EBE7DE;
    --ink-graphite: #1E2F3D;
    --ink-terracotta: #B64926;
    --ink-terracotta-dark: #8C3B15;
    --ink-olive: #6A7152;
    --line-smoke: #CBC6BC;
    --hover-ochre: #CB8A2A;
    --text-main: #2A2A28;
    --text-mute: #6F6B62;
    --footer-bg: #1E2F3D;
    --footer-text: #D7D2C6;
    --footer-mute: #9DA6AF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

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

a {
    color: var(--ink-graphite);
    text-decoration: underline;
    text-decoration-color: var(--line-smoke);
    text-underline-offset: 3px;
    transition: color .18s ease, text-decoration-color .18s ease;
}
a:hover { color: var(--hover-ochre); text-decoration-color: var(--hover-ochre); }

h1, h2, h3, h4, h5, h6 {
    font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
    color: var(--ink-graphite);
    line-height: 1.25;
    margin: 1.4em 0 .6em;
    letter-spacing: -.005em;
}
h1 { font-size: 2.05rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

blockquote {
    margin: 1.5em 0;
    padding: .6em 0 .6em 1.2em;
    border-left: 3px solid var(--ink-olive);
    color: var(--ink-olive);
    font-style: italic;
}

hr { border: 0; border-top: 1px solid var(--line-smoke); margin: 2em 0; }

code, pre {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    background: var(--bg-soft);
    border: 1px solid var(--line-smoke);
    border-radius: 2px;
    font-size: .93em;
}
code { padding: .05em .35em; }
pre {
    padding: .9em 1.1em;
    overflow-x: auto;
    line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; }

/* =========================================================
   2. ОБЁРТКА СОДЕРЖИМОГО (единый источник ширины)
   ========================================================= */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

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

/* =========================================================
   3. ИНДИКАТОР ПРОГРЕССА ЧТЕНИЯ (поверх шапки)
   ========================================================= */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0;
    background: var(--ink-graphite);
    z-index: 100;
    transition: width .08s linear;
}

/* =========================================================
   4. ШАПКА
   ========================================================= */
.site-head {
    background: var(--bg-main);
    border-bottom: 1px solid var(--line-smoke);
    padding: 1.4em 0 1em;
}
.head-row {
    display: flex;
    align-items: center;
    gap: 1.4em;
    flex-wrap: wrap;
}
.brand-block {
    display: flex;
    align-items: center;
    gap: .9em;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}
.brand-block:hover { color: inherit; }
.brand-logo {
    width: 54px;
    height: 54px;
    display: block;
    flex: 0 0 54px;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: 1.15rem;
    color: var(--ink-graphite);
    line-height: 1.25;
    font-weight: 600;
    margin: 0;
    display: block;
    /* короткое программное имя в header формируется через bloginfo; визуально ограничим */
}
.brand-tagline {
    font-size: .82rem;
    color: var(--text-mute);
    line-height: 1.4;
    margin: .25em 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.head-nav { flex: 0 1 auto; }
.head-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.4em;
    flex-wrap: wrap;
}
.head-nav a {
    text-decoration: none;
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: .95rem;
    color: var(--ink-graphite);
    padding: .15em 0;
    border-bottom: 1px solid transparent;
}
.head-nav a:hover,
.head-nav .current-menu-item > a {
    color: var(--ink-terracotta);
    border-bottom-color: var(--ink-terracotta);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line-smoke);
    border-radius: 2px;
    padding: .45em .8em;
    font-size: .9rem;
    color: var(--ink-graphite);
    cursor: pointer;
}

/* =========================================================
   5. ХЛЕБНЫЕ КРОШКИ
   ========================================================= */
.breadcrumbs {
    font-size: .85rem;
    color: var(--text-mute);
    padding: 1em 0 .4em;
}
.breadcrumbs a {
    color: var(--ink-graphite);
    text-decoration: none;
    border-bottom: 1px dotted var(--line-smoke);
}
.breadcrumbs a:hover { color: var(--hover-ochre); border-bottom-color: var(--hover-ochre); }
.breadcrumbs .sep { margin: 0 .4em; color: var(--line-smoke); }

/* =========================================================
   6. КНОПКИ
   ========================================================= */
.btn,
.btn-solid {
    display: inline-block;
    padding: .65em 1.3em;
    background: var(--ink-terracotta);
    color: #FBF8F2;
    text-decoration: none;
    border: 0;
    border-bottom: 2px solid var(--ink-terracotta-dark);
    border-radius: 2px;
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: .95rem;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease;
}
.btn:hover,
.btn-solid:hover {
    background: var(--ink-graphite);
    border-bottom-color: transparent;
    color: #FBF8F2;
}

.btn-text {
    background: none;
    border: 0;
    color: var(--ink-graphite);
    text-decoration: underline dotted var(--line-smoke);
    text-underline-offset: 4px;
    padding: 0;
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: .95rem;
    cursor: pointer;
}
.btn-text:hover {
    color: var(--ink-terracotta);
    text-decoration: underline solid var(--ink-terracotta);
}

/* Кнопка событийного календаря — со скошенной правой гранью */
.btn-event {
    position: relative;
    display: inline-block;
    padding: .55em 1.7em .55em 1em;
    background: var(--bg-soft);
    color: var(--ink-graphite);
    text-decoration: none;
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: .9rem;
    border: 1px solid var(--line-smoke);
    border-right: 0;
}
.btn-event::after {
    content: "";
    position: absolute;
    top: -1px; right: -10px; bottom: -1px;
    width: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--line-smoke);
    border-left: 0;
    transform: skewX(-12deg);
    transform-origin: bottom right;
}
.btn-event:hover,
.btn-event:hover::after {
    background: var(--ink-terracotta);
    color: #FBF8F2;
    border-color: var(--ink-terracotta-dark);
}

/* =========================================================
   7. ТЕМАТИЧЕСКИЕ БЛОКИ ГЛАВНОЙ
   ========================================================= */
.section {
    padding: 2.6em 0;
    border-bottom: 1px solid var(--line-smoke);
}
.section:last-of-type { border-bottom: 0; }

.section-eyebrow {
    display: inline-block;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-terracotta);
    margin-bottom: .6em;
    font-family: "Iowan Old Style", Georgia, serif;
}
.section-title {
    font-size: 1.85rem;
    margin: 0 0 .55em;
    max-width: 30ch;
}
.section-lead {
    font-size: 1.05rem;
    color: var(--text-mute);
    max-width: 62ch;
    margin: 0 0 1.6em;
}

/* Сетка индикаторов внутри тематического блока */
.indicator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4em;
    margin-top: 1.4em;
}
.indicator-card {
    background: var(--bg-soft);
    padding: 1.3em 1.2em;
    border-top: 3px solid var(--ink-graphite);
    min-width: 0;
}
.indicator-num {
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: 2rem;
    color: var(--ink-terracotta);
    line-height: 1;
    display: block;
    margin-bottom: .3em;
}
.indicator-label {
    font-size: .88rem;
    color: var(--text-mute);
    line-height: 1.45;
}

/* Шаги / алгоритм методологии */
.method-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.4em;
    margin-top: 1.4em;
    counter-reset: step;
}
.method-step {
    background: var(--bg-main);
    border: 1px solid var(--line-smoke);
    padding: 1.2em 1.2em 1.2em 1.6em;
    position: relative;
    min-width: 0;
}
.method-step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: 1em; left: -.7em;
    background: var(--ink-graphite);
    color: var(--bg-main);
    font-size: .75rem;
    padding: .25em .55em;
    font-family: "SF Mono", monospace;
}
.method-step h3 { margin: 0 0 .4em; font-size: 1.05rem; }
.method-step p { margin: 0; font-size: .92rem; color: var(--text-mute); }

/* =========================================================
   8. КЕЙСЫ ИЗ УГЛИЧА — таймлайн-карточки
   ========================================================= */
.case-list {
    display: flex;
    flex-direction: column;
    gap: 1.2em;
    margin-top: 1.4em;
}
.case-row {
    display: grid;
    grid-template-columns: 200px 1px minmax(0, 1fr);
    gap: 1.4em;
    background: var(--bg-soft);
    padding: 1.3em 1.4em;
    align-items: stretch;
}
.case-meta {
    font-variant: small-caps;
    letter-spacing: .05em;
    color: var(--text-mute);
    font-size: .92rem;
    line-height: 1.5;
}
.case-meta strong {
    display: block;
    color: var(--ink-graphite);
    font-size: 1rem;
    margin-bottom: .15em;
    font-variant: normal;
    letter-spacing: 0;
}
.case-divider {
    background: var(--ink-terracotta);
    width: 1px;
}
.case-body { min-width: 0; }
.case-body h3 { margin: 0 0 .4em; font-size: 1.1rem; }
.case-body p { margin: 0 0 .5em; color: var(--text-main); }

/* =========================================================
   9. РЕЖИМЫ-ЯКОРЯ (мониторинг / кейсы / событийный маркетинг)
   ========================================================= */
.mode-anchors {
    display: flex;
    gap: 2.2em;
    flex-wrap: wrap;
    padding: 1.6em 0 1.2em;
    border-bottom: 1px solid var(--line-smoke);
}
.mode-anchors a {
    text-decoration: none;
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: 1.15rem;
    color: var(--text-mute);
    position: relative;
    padding-bottom: .2em;
}
.mode-anchors a.is-active,
.mode-anchors a:hover {
    color: var(--ink-graphite);
}
.mode-anchors a.is-active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink-terracotta);
}

/* =========================================================
   10. БЛОК «ЗАКОНОМЕРНОСТЬ СОБЫТИЯ» — подсветка паттернов
   ========================================================= */
.pattern-feed {
    background: var(--bg-soft);
    padding: 1.6em 1.6em;
    margin-top: 1.4em;
    border-left: 3px solid var(--ink-olive);
}
.pattern-feed ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pattern-feed li {
    padding: .65em 0;
    border-bottom: 1px dashed var(--line-smoke);
    font-size: .95rem;
}
.pattern-feed li:last-child { border-bottom: 0; }
.pattern-tag {
    background: rgba(182, 73, 38, .15);
    padding: 0 .25em;
    border-radius: 1px;
    font-weight: 600;
    color: var(--ink-terracotta-dark);
}

/* =========================================================
   11. МЕТОДОЛОГИЧЕСКАЯ ВРЕЗКА
   ========================================================= */
.method-note {
    position: relative;
    padding: 1em 1.2em 1em 1.6em;
    background: var(--bg-soft);
    margin: 1.5em 0;
    font-size: .95rem;
}
.method-note::before {
    content: attr(data-tag);
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: .9em;
    background: var(--ink-olive);
    color: var(--bg-main);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    font-size: .7rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .5em 0;
    font-family: "Iowan Old Style", Georgia, serif;
}

/* =========================================================
   12. КАРТОЧКИ ЗАПИСЕЙ (template-parts/content-card.php)
   ========================================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6em;
    margin-top: 1.4em;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-soft);
    overflow: hidden;
    border-bottom: 2px solid var(--line-smoke);
    transition: border-color .25s ease;
    min-width: 0;
}
.card:hover { border-bottom-color: var(--ink-terracotta); }

.card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: var(--line-smoke);
}
.card-thumb-link { display: block; }

.card-body {
    flex: 1;
    padding: 1.1em 1.2em 1.2em;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.card-meta {
    font-size: .78rem;
    color: var(--text-mute);
    font-variant: small-caps;
    letter-spacing: .05em;
    margin-bottom: .35em;
}
.card-title {
    margin: 0 0 .5em;
    font-size: 1.1rem;
    line-height: 1.3;
}
.card-title a { text-decoration: none; color: var(--ink-graphite); }
.card-title a:hover { color: var(--ink-terracotta); }
.card-excerpt {
    font-size: .92rem;
    color: var(--text-main);
    margin: 0 0 .9em;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-more { margin-top: auto; }

/* Горизонтальная карточка (используется для случаев, когда нужна — пока не задействована,
   но описана здесь, чтобы был эталон A10) */
.card-row {
    flex-direction: row;
    align-items: stretch;
}
.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================================
   13. РАЗМЕТКА СТРАНИЦ (контент + сайдбар)
   ========================================================= */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 5%;
    padding: 1.6em 0 3em;
}
.layout-no-sidebar {
    display: block;
    width: 85%;
    margin-inline: auto;
    padding: 1.6em 0 3em;
}
.layout-no-sidebar > *,
.layout-with-sidebar > * { min-width: 0; }

/* =========================================================
   14. САЙДБАР И ВИДЖЕТЫ (общий стиль)
   ========================================================= */
.sidebar {
    font-size: .95rem;
    color: var(--text-main);
}
.sidebar .widget {
    background: var(--bg-soft);
    padding: 1.2em 1.2em;
    margin-bottom: 1.2em;
    border-top: 3px solid var(--ink-graphite);
}
.sidebar .widget-title,
.sidebar .widget h2 {
    margin: 0 0 .7em;
    font-size: 1rem;
    color: var(--ink-graphite);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-family: "Iowan Old Style", Georgia, serif;
}
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: .45em 0;
    border-bottom: 1px dashed var(--line-smoke);
    font-size: .92rem;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a {
    color: var(--ink-graphite);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.sidebar .widget a:hover {
    color: var(--ink-terracotta);
    border-bottom-color: var(--ink-terracotta);
}
.sidebar .widget .post-date { color: var(--text-mute); font-size: .8rem; }

/* =========================================================
   15. ТАБЛИЦЫ
   ========================================================= */
.entry-content table,
.widget table,
table.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: .94rem;
    border: 0;
}
.entry-content th,
.entry-content td,
table.data-table th,
table.data-table td {
    padding: .7em .9em;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--line-smoke);
}
.entry-content th,
table.data-table th {
    border-bottom: 2px solid var(--ink-graphite);
    color: var(--ink-graphite);
    font-family: "Iowan Old Style", Georgia, serif;
    font-weight: 600;
}
.entry-content tr:nth-child(even) td,
table.data-table tr:nth-child(even) td {
    background: var(--bg-soft);
}

/* Глобальное правило для всех обычных таблиц (комментарии, и пр.) */
table { border-collapse: collapse; }
table, th, td {
    border: 1px solid var(--line-smoke);
}
.entry-content table, .entry-content th, .entry-content td,
.widget table, .widget th, .widget td,
table.data-table, table.data-table th, table.data-table td {
    border: 0;
}
.entry-content th, .entry-content td,
table.data-table th, table.data-table td {
    border-bottom: 1px solid var(--line-smoke);
}
.entry-content th, table.data-table th {
    border-bottom: 2px solid var(--ink-graphite);
}

/* =========================================================
   16. КОНТЕНТ СТАТЬИ
   ========================================================= */
.entry {
    background: var(--bg-main);
}
.entry-header {
    padding: 1.4em 0 .6em;
    border-bottom: 1px solid var(--line-smoke);
    margin-bottom: 1.6em;
}
.entry-title {
    font-size: 2.1rem;
    margin: 0 0 .4em;
    line-height: 1.15;
}
.entry-meta {
    font-size: .85rem;
    color: var(--text-mute);
    font-variant: small-caps;
    letter-spacing: .04em;
}
.entry-thumb {
    margin: 0 0 1.4em;
}
.entry-thumb img {
    width: 100%;
    height: auto;
    display: block;
}
.entry-content {
    font-size: 1.02rem;
}
.entry-content :is(h2,h3,h4) {
    scroll-margin-top: 80px;
}
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption {
    font-size: .85rem;
    color: var(--text-mute);
    margin-top: .4em;
    text-align: center;
}

/* =========================================================
   17. ПАГИНАЦИЯ
   ========================================================= */
.pagination {
    display: flex;
    gap: .4em;
    flex-wrap: wrap;
    justify-content: center;
    padding: 2em 0;
    border-top: 1px solid var(--line-smoke);
    margin-top: 2em;
}
.pagination a,
.pagination span {
    padding: .5em .85em;
    text-decoration: none;
    color: var(--ink-graphite);
    border: 1px solid var(--line-smoke);
    border-radius: 2px;
    font-size: .9rem;
    background: var(--bg-main);
}
.pagination a:hover {
    background: var(--ink-terracotta);
    color: #FBF8F2;
    border-color: var(--ink-terracotta-dark);
}
.pagination .current {
    background: var(--ink-graphite);
    color: #FBF8F2;
    border-color: var(--ink-graphite);
}

/* =========================================================
   18. КОММЕНТАРИИ
   ========================================================= */
.comments-area {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid var(--line-smoke);
}
.comments-title {
    font-size: 1.3rem;
    margin: 0 0 1.2em;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2em;
}
.comment-body {
    padding: 1em 0;
    border-bottom: 1px dashed var(--line-smoke);
}
.comment-author {
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink-graphite);
}
.comment-meta {
    font-size: .8rem;
    color: var(--text-mute);
    font-variant: small-caps;
    margin-bottom: .5em;
}
.comment-content p:last-child { margin-bottom: 0; }
.comment-reply-link {
    font-size: .85rem;
    color: var(--ink-terracotta);
    text-decoration: none;
}
.comment-reply-link:hover { color: var(--hover-ochre); }
.children {
    list-style: none;
    padding-left: 1.4em;
    margin-top: 0;
    border-left: 2px solid var(--bg-soft);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .6em .8em;
    border: 1px solid var(--line-smoke);
    border-radius: 2px;
    background: var(--bg-main);
    font: inherit;
    font-size: .95rem;
    margin-top: .25em;
}
.comment-form label { display: block; margin-bottom: .8em; font-size: .9rem; }
.comment-form .form-submit input[type="submit"] {
    display: inline-block;
    padding: .65em 1.3em;
    background: var(--ink-terracotta);
    color: #FBF8F2;
    border: 0;
    border-bottom: 2px solid var(--ink-terracotta-dark);
    border-radius: 2px;
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: .95rem;
    cursor: pointer;
    width: auto;
}
.comment-form .form-submit input[type="submit"]:hover {
    background: var(--ink-graphite);
    border-bottom-color: transparent;
}

/* =========================================================
   19. ФОРМА ПОИСКА
   ========================================================= */
.search-form {
    display: flex;
    gap: .5em;
    margin: 1em 0;
    max-width: 480px;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: .6em .8em;
    border: 1px solid var(--line-smoke);
    background: var(--bg-main);
    font: inherit;
    font-size: .95rem;
    border-radius: 2px;
}
.search-form button {
    padding: .6em 1.1em;
    background: var(--ink-graphite);
    color: var(--bg-main);
    border: 0;
    border-radius: 2px;
    cursor: pointer;
    font: inherit;
    font-size: .9rem;
}
.search-form button:hover { background: var(--ink-terracotta); }

/* =========================================================
   20. 404
   ========================================================= */
.error-404 {
    text-align: center;
    padding: 4em 0;
}
.error-404 .big {
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: 6rem;
    line-height: 1;
    color: var(--ink-terracotta);
    margin: 0 0 .2em;
}
.error-404 h1 { margin-top: 0; }
.error-404 .form-wrap { max-width: 480px; margin: 1.6em auto 0; }

/* =========================================================
   21. ПОДВАЛ
   ========================================================= */
.site-foot {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2.6em 0 0;
    margin-top: 3em;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2em;
}
.foot-col { min-width: 0; }

/* Виджеты в подвале — явный контраст (тёмный фон → светлый текст) */
.site-foot .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--footer-text);
}
.site-foot .widget-title,
.site-foot .widget h2 {
    color: #F0EBE0;
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 .9em;
    padding-bottom: .5em;
    border-bottom: 1px solid rgba(215, 210, 198, .2);
}
.site-foot .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-foot .widget li {
    padding: .35em 0;
    font-size: .92rem;
}
.site-foot .widget a {
    color: var(--footer-text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.site-foot .widget a:hover {
    color: var(--hover-ochre);
    border-bottom-color: var(--hover-ochre);
}
.site-foot .widget p { color: var(--footer-text); margin: 0 0 .7em; font-size: .92rem; }
.site-foot .widget .post-date { color: var(--footer-mute); font-size: .8rem; }

.foot-now-reading {
    padding: 1.2em 0;
    border-top: 1px solid rgba(215, 210, 198, .18);
    margin-top: 2em;
    font-size: .9rem;
    color: var(--footer-mute);
}
.foot-now-reading a {
    color: #F0EBE0;
    text-decoration: none;
    border-bottom: 1px dotted rgba(215, 210, 198, .35);
}
.foot-now-reading a:hover { color: var(--hover-ochre); border-bottom-color: var(--hover-ochre); }
.foot-now-reading .label {
    color: var(--ink-terracotta);
    font-variant: small-caps;
    letter-spacing: .08em;
    margin-right: .5em;
}

.foot-copy {
    border-top: 1px solid rgba(215, 210, 198, .18);
    padding: 1.2em 0;
    font-size: .82rem;
    color: var(--footer-mute);
    text-align: center;
}

/* =========================================================
   22. COOKIE-БАННЕР
   ========================================================= */
/* Защитное правило — выигрывает у любого .cookie-banner display'а */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 1em;
    right: 1em;
    bottom: 1em;
    z-index: 200;
    background: var(--ink-graphite);
    color: #F0EBE0;
    padding: 1em 1.2em;
    display: flex;
    align-items: center;
    gap: 1.2em;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
    border-radius: 2px;
    max-width: 720px;
    margin-inline: auto;
    font-size: .92rem;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 0; color: #F0EBE0; }
.cookie-banner .btn {
    flex: 0 0 auto;
    background: var(--ink-terracotta);
    border-bottom-color: var(--ink-terracotta-dark);
}
.cookie-banner .btn:hover {
    background: var(--hover-ochre);
}

/* =========================================================
   23. АДАПТИВ
   ========================================================= */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.4em;
    }
    .case-row {
        grid-template-columns: 1fr;
        gap: .6em;
    }
    .case-divider { display: none; }
    .foot-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1, .entry-title { font-size: 1.6rem; }
    h2, .section-title { font-size: 1.35rem; }

    .head-row { flex-wrap: wrap; }
    .nav-toggle { display: inline-block; order: 3; margin-left: auto; }
    .head-nav {
        flex-basis: 100%;
        order: 4;
    }
    .head-nav[hidden] { display: none !important; }
    .head-nav ul {
        flex-direction: column;
        gap: .4em;
        padding: .8em 0 0;
    }

    .mode-anchors { gap: 1.2em; }
    .mode-anchors a { font-size: 1rem; }

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

    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .cookie-banner .btn { width: 100%; }

    .layout-no-sidebar {
        width: 92%;
    }

    /* Адаптив для горизонтальной карточки */
    .card-row {
        flex-direction: column;
    }
    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-row .card-thumb-wrap a {
        position: static;
    }
    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* =========================================================
   24. УТИЛИТЫ
   ========================================================= */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.alignleft { float: left; margin: .25em 1.2em 1em 0; }
.alignright { float: right; margin: .25em 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--text-mute); text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 1.2em 0; }
.gallery-item { margin: 0; }
.gallery-item img { display: block; width: 100%; height: auto; }
