/*
Theme Name: dds_nozhi-slon.ru
Author: Анна Вереск
Description: Образовательная платформа о веб-технологиях и работе с CMS через призму создания качественного контента для медиа, с сохранением экспертизы в визуальной культуре.
Version: 1.1
Text Domain: ns
*/

/* ============================================================
   1. БАЗА / ПЕРЕМЕННЫЕ
============================================================ */

:root {
    --ink:       #2A2A2A;
    --paper:    #F9F8F6;
    --terra:    #C46A52;
    --rose:     #D4B5A7;
    --olive:    #8A8D6B;
    --rule:     #E2DFDA;
    --muted:    #6E6E6E;
    --paper-2:  #F2EFEA;
    --grain:    rgba(0, 0, 0, 0.02);

    --serif: 'Spectral', 'PT Serif', 'Georgia', serif;
    --sans:  'Manrope', 'Inter', system-ui, -apple-system, sans-serif;

    --shell-w: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--terra);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
    color: var(--ink);
}

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

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p {
    margin: 0 0 1.2em;
}

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

li {
    margin-bottom: 0.4em;
}

blockquote {
    margin: 1.6em 0;
    padding: 0.4em 1.4em;
    border-left: 3px solid var(--terra);
    font-style: italic;
    color: var(--muted);
    background: var(--paper-2);
}

code, pre {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.92em;
    background: var(--paper-2);
}

code {
    padding: 0.1em 0.4em;
    border-radius: 3px;
}

pre {
    padding: 1em 1.2em;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid var(--rule);
}

pre code {
    background: none;
    padding: 0;
}

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

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

th {
    background: var(--paper-2);
    font-family: var(--sans);
    font-weight: 600;
}

hr {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 2.4em 0;
}

::selection {
    background: var(--rose);
    color: var(--ink);
}

/* ============================================================
   2. КОНТЕЙНЕР / SHELL
============================================================ */

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

/* ============================================================
   3. КНОПКИ
============================================================ */

.btn {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 11px 22px;
    border-radius: 4px;
    border: 1px solid var(--terra);
    background: transparent;
    color: var(--terra);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--terra);
    color: #fff;
    transform: translateX(3px);
}

.btn--solid {
    background: var(--terra);
    color: #fff;
    padding: 12px 28px;
}

.btn--solid:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.btn--ghost {
    border-color: var(--ink);
    color: var(--ink);
}

.btn--ghost:hover {
    background: var(--ink);
    color: var(--paper);
}

/* ============================================================
   4. ШАПКА
============================================================ */

.site-head {
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
}

.site-head__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
    min-width: 0;
    flex: 1 1 auto;
}

.brand-logo,
.brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: block;
}

.brand-mark {
    color: var(--terra);
}

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

.brand-title {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.005em;
    color: var(--ink);
    line-height: 1.25;
    display: block;
    /* «Название сайта» в спецификации — длинная описательная строка;
       обрезаем до двух строк, чтобы шапка не разрасталась */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 540px;
}

.brand-tag {
    display: none;
}

.brand:hover .brand-title {
    color: var(--terra);
}

/* Навигация шапки */

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--ink);
    color: var(--ink);
    padding: 8px 10px;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.85rem;
    border-radius: 4px;
}

.site-nav {
    flex: 0 0 auto;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 26px;
}

.site-nav li {
    margin: 0;
}

.site-nav a {
    font-family: var(--sans);
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--ink);
    padding: 6px 0;
    position: relative;
    display: inline-block;
}

.site-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 1px;
    width: 0;
    background: var(--terra);
    transition: width 0.25s ease;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
    color: var(--terra);
}

.site-nav a:hover::after,
.site-nav .current-menu-item > a::after {
    width: 100%;
}

/* ============================================================
   5. ХЛЕБНЫЕ КРОШКИ
============================================================ */

.breadcrumbs {
    margin: 22px 0 12px;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.breadcrumbs a {
    color: var(--muted);
    border-bottom: 1px solid transparent;
}

.breadcrumbs a:hover {
    color: var(--terra);
    border-bottom-color: var(--terra);
}

.breadcrumbs .sep {
    margin: 0 6px;
    color: var(--rule);
}

.breadcrumbs span:last-child {
    color: var(--ink);
}

/* ============================================================
   6. LAYOUT СТРАНИЦ
============================================================ */

.site-main {
    padding: 18px 0 60px;
    min-width: 0;
}

/* Однокол: 85%, block-контекст, по правилу A12.3 */
.layout-single {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
}

/* Двукол: 67% + 27% — grid, по правилу A12 */
.layout-two {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}

@media (max-width: 960px) {
    .layout-two {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
    .layout-single {
        width: 100%;
    }
}

/* ============================================================
   7. HERO (главная)
============================================================ */

.hero {
    padding: 80px 0 60px;
    border-bottom: 1px solid var(--rule);
    position: relative;
    min-width: 0;
}

.hero__kicker {
    font-family: var(--sans);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--olive);
    margin-bottom: 22px;
}

.hero__name {
    font-family: var(--sans);
    font-weight: 200;
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
}

.hero__name strong {
    font-weight: 700;
    color: var(--terra);
}

.hero__rotator {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    color: var(--muted);
    min-height: 1.8em;
    margin-bottom: 32px;
}

.hero__rotator-word {
    color: var(--ink);
    border-bottom: 1px dashed var(--rose);
    padding-bottom: 2px;
}

.hero__cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ============================================================
   8. ТЕМАТИЧЕСКИЕ БЛОКИ ГЛАВНОЙ
============================================================ */

.feature {
    padding: 70px 0;
    border-bottom: 1px solid var(--rule);
}

.feature__head {
    margin-bottom: 36px;
}

.feature__label {
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--olive);
    margin-bottom: 10px;
}

.feature__title {
    margin: 0 0 14px;
}

.feature__lead {
    color: var(--muted);
    max-width: 640px;
    font-size: 1.05rem;
}

/* Сетка 2:1:2 — коллаж */
.collage {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr);
    gap: 30px;
    align-items: stretch;
}

.collage > * {
    min-width: 0;
}

@media (max-width: 960px) {
    .collage {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

.collage__cell {
    padding: 26px 24px;
    background: var(--paper-2);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.collage__cell--terra {
    background: #F4E5DF;
}

.collage__cell--quote {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ink);
}

.collage__cell--quote::before {
    content: '«';
    font-size: 3rem;
    line-height: 0.5;
    color: var(--terra);
    display: block;
    margin-bottom: 18px;
}

.collage__cell h3 {
    margin-top: 0;
    margin-bottom: 14px;
}

.collage__cell p {
    margin-bottom: 0.8em;
    color: var(--muted);
    font-size: 0.95rem;
}

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

/* Шаги / нумерованные пункты внутри тематического блока */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.steps > * {
    min-width: 0;
}

.step {
    padding: 20px 0 0;
    border-top: 1px solid var(--rule);
    min-width: 0;
}

.step__num {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    color: var(--terra);
    margin-bottom: 10px;
}

.step__title {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 8px;
    color: var(--ink);
}

.step__text {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Список «инструментов / категорий» как теги */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--rule);
    border-radius: 4px;
    font-family: var(--sans);
    font-size: 0.86rem;
    color: var(--ink);
    background: transparent;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.tag .dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    background: var(--terra);
}

/* ============================================================
   9. ПОСЛЕДНИЕ ЗАПИСИ НА ГЛАВНОЙ
============================================================ */

.latest {
    padding: 70px 0;
    border-bottom: 1px solid var(--rule);
}

.latest__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.latest__head h2 {
    margin: 0;
}

/* ============================================================
   10. КАРТОЧКИ ЗАПИСЕЙ (вертикальная сетка)
============================================================ */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 36px 30px;
}

.cards > * {
    min-width: 0;
}

/* Контейнер карточки — flex column, правило A8 */
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: none;
    /* Разделительная линия между карточками — снизу */
    padding-bottom: 26px;
    border-bottom: 1px solid var(--rule);
    transition: border-color 0.25s ease;
}

.card:hover {
    border-bottom-color: transparent;
}

.card-thumb-wrap {
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--paper-2);
    min-width: 0;
}

.card-thumb-wrap a {
    display: block;
}

.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    filter: grayscale(0.85) contrast(1.02);
    transition: filter 0.3s ease, transform 0.5s ease;
}

.card:hover .card-thumb-wrap img {
    filter: grayscale(0.4) contrast(1.05);
    transform: scale(1.02);
}

.card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--paper-2) 0%, var(--rose) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--terra);
    font-family: var(--sans);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Тело карточки — flex: 1, правило A8 */
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-meta {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--olive);
    margin-bottom: 10px;
}

.card-meta a {
    color: var(--olive);
}

.card-meta a:hover {
    color: var(--terra);
}

.card-title {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.25;
    margin: 0 0 12px;
    color: var(--ink);
}

.card-title a {
    color: inherit;
}

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

.card-excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Правило A8: убираем глобальные стили p в excerpt */
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-excerpt p:last-child {
    margin-bottom: 0;
}

.card-more {
    margin-top: auto;
    font-family: var(--sans);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--terra);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.card-more:hover {
    color: var(--ink);
    gap: 12px;
}

.card-more::after {
    content: '→';
}

/* ============================================================
   11. СОДЕРЖАНИЕ ЗАПИСИ / СТРАНИЦЫ
============================================================ */

.entry-head {
    margin-bottom: 36px;
}

.entry-meta {
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--olive);
    margin-bottom: 14px;
}

.entry-meta a {
    color: var(--olive);
}

.entry-meta a:hover {
    color: var(--terra);
}

.entry-title {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    margin: 0 0 18px;
    line-height: 1.15;
}

.entry-thumb {
    margin: 0 0 36px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--paper-2);
}

.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    filter: grayscale(0.55);
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    min-width: 0;
}

.entry-content img {
    border-radius: 4px;
    margin: 1.4em 0;
}

.entry-content a {
    border-bottom: 1px solid var(--rose);
}

.entry-content a:hover {
    border-bottom-color: var(--terra);
}

.entry-footer {
    margin-top: 50px;
    padding-top: 26px;
    border-top: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    font-family: var(--sans);
    font-size: 0.88rem;
    color: var(--muted);
}

.entry-tags a {
    display: inline-block;
    margin-right: 8px;
    color: var(--olive);
    border-bottom: 1px solid transparent;
}

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

/* ============================================================
   12. САЙДБАР
============================================================ */

.sidebar {
    min-width: 0;
}

.widget {
    margin-bottom: 38px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule);
    /* В сайдбаре фон — paper, текст — ink */
    color: var(--ink);
}

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

.widget-title {
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terra);
    margin: 0 0 18px;
    font-weight: 600;
}

/* Текст и ссылки в сайдбаре — явно на светлом фоне */
.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li {
    color: var(--ink);
}

.sidebar .widget a {
    color: var(--ink);
    border-bottom: 1px solid transparent;
}

.sidebar .widget a:hover {
    color: var(--terra);
    border-bottom-color: var(--terra);
}

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

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px dotted var(--rule);
    font-size: 0.95rem;
    line-height: 1.4;
}

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

.widget ul li ul {
    margin-top: 6px;
    padding-left: 14px;
}

/* «Последние записи» — дата под заголовком */
.widget_recent_entries .post-date {
    display: block;
    font-family: var(--sans);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--olive);
    margin-top: 2px;
    text-transform: uppercase;
}

/* ============================================================
   13. ПОДВАЛ
============================================================ */

.site-foot {
    background: var(--ink);
    color: var(--paper);
    padding: 60px 0 24px;
    margin-top: 60px;
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

@media (max-width: 960px) {
    .foot-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 38px;
    }
}

.foot-col {
    min-width: 0;
    color: var(--paper);
}

/* В подвале фон тёмный — текст и ссылки светлые */
.foot-col .widget,
.foot-col .widget p,
.foot-col .widget li {
    color: var(--paper);
    border-color: rgba(255, 255, 255, 0.1);
}

.foot-col .widget {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.foot-col .widget-title {
    color: var(--rose);
}

.foot-col .widget a {
    color: var(--paper);
    border-bottom: 1px solid transparent;
}

.foot-col .widget a:hover {
    color: var(--rose);
    border-bottom-color: var(--rose);
}

.foot-col .widget ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--paper);
}

.foot-col .widget_recent_entries .post-date {
    color: var(--rose);
}

/* Эмодзи-меню в подвале */
.emoji-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-bottom: 30px;
    justify-content: center;
}

.emoji-link {
    font-size: 1.6rem;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    color: var(--paper);
    text-decoration: none;
    position: relative;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.emoji-link__emoji,
.emoji-link__label {
    transition: opacity 0.2s ease;
}

.emoji-link__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--paper);
    opacity: 0;
    text-transform: lowercase;
    padding: 0 6px;
    text-align: center;
}

.emoji-link:hover {
    background: var(--terra);
    border-color: var(--terra);
}

.emoji-link:hover .emoji-link__emoji {
    opacity: 0;
}

.emoji-link:hover .emoji-link__label {
    opacity: 1;
}

.foot-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 22px;
    text-align: center;
    font-family: var(--sans);
    font-size: 0.82rem;
    color: rgba(249, 248, 246, 0.6);
    letter-spacing: 0.04em;
}

/* ============================================================
   14. ПАГИНАЦИЯ
============================================================ */

.pagination {
    margin: 50px 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--rule);
    border-radius: 4px;
    color: var(--ink);
    font-size: 0.92rem;
    background: transparent;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
    border-color: var(--terra);
    color: var(--terra);
}

.pagination .page-numbers.current {
    background: var(--terra);
    border-color: var(--terra);
    color: #fff;
}

.pagination .dots {
    border: none;
    background: none;
}

/* ============================================================
   15. ФОРМЫ (поиск, комментарии)
============================================================ */

.searchform {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin: 18px 0;
}

.searchform input[type="search"],
.searchform input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.searchform input[type="search"]:focus,
.searchform input[type="text"]:focus {
    outline: none;
    border-color: var(--terra);
}

.searchform input[type="submit"] {
    padding: 11px 22px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    border-radius: 4px;
    font-family: var(--sans);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.searchform input[type="submit"]:hover {
    background: var(--terra);
    border-color: var(--terra);
}

/* Поиск в виджете сайдбара */
.widget .searchform {
    margin: 0;
}

/* ============================================================
   16. КОММЕНТАРИИ
============================================================ */

.comments-area {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
}

.comments-title {
    font-size: 1.4rem;
    margin: 0 0 26px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 38px;
}

.comment-list .children {
    list-style: none;
    padding-left: 30px;
    border-left: 2px solid var(--rule);
    margin-top: 18px;
}

.comment-list li {
    margin-bottom: 22px;
}

.comment-body {
    padding: 20px;
    background: var(--paper-2);
    border-radius: 4px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--muted);
}

.comment-author {
    font-weight: 700;
    color: var(--ink);
}

.comment-content {
    font-size: 0.98rem;
    line-height: 1.65;
}

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

.comment-reply-link {
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--terra);
}

.comment-respond {
    margin-top: 30px;
}

.comment-form label {
    display: block;
    font-family: var(--sans);
    font-size: 0.85rem;
    margin: 14px 0 6px;
    color: var(--ink);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 0.98rem;
}

.comment-form textarea {
    min-height: 130px;
    resize: vertical;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--terra);
}

.comment-form .form-submit {
    margin-top: 16px;
}

.comment-form .submit {
    padding: 12px 28px;
    background: var(--terra);
    color: #fff;
    border: 1px solid var(--terra);
    border-radius: 4px;
    font-family: var(--sans);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.comment-form .submit:hover {
    background: var(--ink);
    border-color: var(--ink);
}

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

/* ============================================================
   17. 404
============================================================ */

.page-404 {
    text-align: center;
    padding: 60px 0;
}

.page-404__num {
    font-family: var(--sans);
    font-size: clamp(5rem, 18vw, 11rem);
    font-weight: 200;
    line-height: 1;
    color: var(--terra);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-404__title {
    margin: 14px 0 14px;
}

.page-404__text {
    color: var(--muted);
    max-width: 480px;
    margin: 0 auto 32px;
}

.page-404 .searchform {
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   18. COOKIE-БАННЕР
============================================================ */

/* Правило A11: [hidden] должен иметь приоритет над display: flex */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999;
    background: var(--ink);
    color: var(--paper);
    padding: 18px 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-family: var(--sans);
    font-size: 0.92rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    max-width: 720px;
    margin-inline: auto;
}

.cookie-banner__text {
    flex: 1;
    min-width: 220px;
    color: var(--paper);
}

.cookie-banner__text a {
    color: var(--rose);
    border-bottom: 1px solid var(--rose);
}

.cookie-banner__btn {
    flex: 0 0 auto;
    padding: 10px 22px;
    background: var(--terra);
    border: 1px solid var(--terra);
    color: #fff;
    border-radius: 4px;
    font-family: var(--sans);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cookie-banner__btn:hover {
    background: var(--rose);
    border-color: var(--rose);
    color: var(--ink);
}

/* ============================================================
   19. АРХИВЫ / ПОИСК (заголовки)
============================================================ */

.archive-head {
    margin: 8px 0 36px;
}

.archive-kicker {
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--olive);
    margin-bottom: 8px;
}

.archive-title {
    margin: 0 0 10px;
}

.archive-desc {
    color: var(--muted);
    max-width: 640px;
}

/* ============================================================
   20. КОНТАКТЫ (статичные, без форм — правило D7)
============================================================ */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    margin: 30px 0;
}

.contact-grid > * {
    min-width: 0;
}

.contact-cell {
    padding: 26px 22px;
    background: var(--paper-2);
    border-radius: 4px;
}

.contact-cell__label {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--olive);
    margin-bottom: 10px;
}

.contact-cell__value {
    font-family: var(--sans);
    font-size: 1.05rem;
    color: var(--ink);
}

.contact-cell__value a {
    color: var(--ink);
    border-bottom: 1px solid var(--rose);
}

.contact-cell__value a:hover {
    color: var(--terra);
    border-bottom-color: var(--terra);
}

/* ============================================================
   21. АДАПТИВ
============================================================ */

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

    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.55rem; }
    h3 { font-size: 1.25rem; }

    .hero {
        padding: 60px 0 40px;
    }

    .feature,
    .latest {
        padding: 50px 0;
    }
}

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

    .site-head {
        padding: 16px 0;
    }

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

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper);
        border-top: 1px solid var(--rule);
        border-bottom: 1px solid var(--rule);
        padding: 14px 24px 18px;
        z-index: 50;
    }

    .site-head__row {
        position: relative;
    }

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

    .site-nav ul {
        flex-direction: column;
        gap: 8px;
    }

    .brand-title {
        font-size: 0.95rem;
    }

    .brand-logo,
    .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

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

    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .cookie-banner__btn {
        width: 100%;
    }

    .foot-cols {
        gap: 30px;
    }

    .pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 0.85rem;
    }
}

/* ============================================================
   22. УТИЛИТЫ WordPress
============================================================ */

.alignleft {
    float: left;
    margin: 0.4em 1.4em 1em 0;
}

.alignright {
    float: right;
    margin: 0.4em 0 1em 1.4em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.4em;
}

.wp-caption-text {
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    margin-top: 0.6em;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.sticky {
    background: var(--paper-2);
    padding: 24px;
    border-radius: 4px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 1.6em 0;
}

.gallery > * {
    min-width: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}
