/*
Theme Name: dds_stauggens.com
Author: Тимофей Орлов
Description: Тема для информационного сайта о генеалогии и краеведении. Дизайн «Лаврентьевский архив»: холодная зелёная палитра, архивная сетка, асимметричные секции.
Version: 1.1
Text Domain: lavarch
*/

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

:root {
    --bg: #F4F6F3;
    --bg-alt: #E9EDE7;
    --dark: #1C2D28;
    --dark-soft: #2B3A32;
    --side: #EBEEE9;
    --text: #1F2623;
    --acc: #A3B8A3;
    --acc2: #6B7B6B;
    --muted: #7A8B7A;
    --line: #D0D8CD;
    --grid: #E1E6DE;
    --accent-plate: #E1E8DE;
    --dots: #C6D1C2;
    --font-head: "Montserrat", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    --font-body: "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(to right, rgba(225, 230, 222, 0.3) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(225, 230, 222, 0.3) 1px, transparent 1px);
    background-size: 24px 24px;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body::after {
    content: "";
    position: fixed;
    right: -40px;
    bottom: -30px;
    width: 520px;
    height: 420px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.08;
    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 520 420'%3E%3Cg fill='none' stroke='%23DCE3D6' stroke-width='3'%3E%3Cpath d='M40 300 L90 210 L150 240 L210 170 L280 200 L340 130 L420 160 L480 110'/%3E%3Cpath d='M60 360 L130 330 L180 360 L250 300 L320 340 L390 280 L470 320'/%3E%3Cpath d='M110 90 L170 60 L230 100 L200 170 L120 190 Z'/%3E%3Cpath d='M250 40 L330 30 L390 80 L360 150 L280 160 L230 110 Z'/%3E%3Cpath d='M380 190 L460 180 L500 240 L440 300 L370 270 Z'/%3E%3Cpath d='M30 120 L100 100 L120 180 L60 230 L20 190 Z'/%3E%3C/g%3E%3C/svg%3E");
}

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

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

p {
    margin: 0 0 1.1em;
}

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

h1 {
    font-size: 3.8rem;
    letter-spacing: 0.03em;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1.15rem;
}

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

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

.page-body {
    padding: 3rem 0 4.5rem;
}

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

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

.site-aside {
    min-width: 0;
    background: var(--side);
    padding: 1.6rem 1.5rem;
    border-top: 3px solid var(--acc);
}

/* =========================================================
   3. Ссылки в тексте — подчёркивание от центра
   ========================================================= */

.entry-content a,
.trail a,
.widget a,
.card-title a {
    background-image: linear-gradient(var(--acc), var(--acc));
    background-repeat: no-repeat;
    background-position: 50% calc(100% + 2px);
    background-size: 0% 2px;
    transition: background-size 0.25s ease;
    padding-bottom: 2px;
}

.entry-content a:hover,
.trail a:hover,
.widget a:hover,
.card-title a:hover {
    background-size: 100% 2px;
}

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

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    background: transparent;
    border: 2px solid var(--acc);
    border-radius: 0;
    padding: 0.75rem 2.4rem 0.75rem 1.4rem;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.btn:hover,
.btn:focus {
    background: var(--acc);
    color: var(--bg);
}

.btn-light {
    color: var(--bg);
    border-color: var(--acc);
}

.btn-light:hover {
    background: var(--acc);
    color: var(--dark);
}

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

.site-head {
    background: var(--dark);
    color: #E6ECE6;
    padding: 1.5rem 0;
    position: static;
}

.head-row {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-wrap: wrap;
}

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

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

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #F1F5EF;
    line-height: 1.25;
}

.brand-desc {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #9DB0A4;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--acc);
    color: #F1F5EF;
    font-family: var(--font-head);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

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

.main-nav a {
    font-family: var(--font-head);
    font-size: 0.87rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #DCE5DC;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: #F1F5EF;
    border-bottom-color: var(--acc);
}

/* =========================================================
   6. Хлебные крошки
   ========================================================= */

.trail {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 1.4rem 0 0;
}

.trail a {
    color: var(--acc2);
}

.trail-sep {
    color: var(--acc);
    margin: 0 0.25rem;
}

/* =========================================================
   7. Заголовки секций — «уголок + отступ»
   ========================================================= */

.sec-title {
    position: relative;
    padding-left: 1.1rem;
    margin-left: -1.1rem;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 8px;
    height: 0.85em;
    background: var(--acc);
}

.sec-lead {
    max-width: 62ch;
    color: #38443E;
}

/* =========================================================
   8. Разделители секций
   ========================================================= */

.sec-divider {
    height: 2px;
    background-image: repeating-linear-gradient(to right, var(--dots) 0 2px, transparent 2px 10px);
    border: 0;
    margin: 0;
}

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

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

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

.card-list {
    display: block;
}

.card {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 1.6rem 0.2rem 1.6rem 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: none;
    transition: transform 0.25s ease;
}

.card::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 1.2rem;
    bottom: 1.2rem;
    width: 3px;
    background: var(--acc);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card:hover {
    transform: translateX(-4px);
}

.card:hover::before {
    opacity: 1;
}

.card-inner {
    display: flex;
    flex-direction: row;
    gap: 1.6rem;
    align-items: stretch;
}

.card-thumb-wrap {
    flex: 0 0 210px;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-alt);
}

.card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-label {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    background: var(--acc2);
    color: #F2F5F0;
    font-family: var(--font-head);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.32rem 1.4rem 0.32rem 0.7rem;
    clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}

.card-label-flat {
    position: static;
    align-self: flex-start;
    margin-bottom: 0.7rem;
}

.card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.card-meta {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: var(--font-head);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.35rem;
    margin: 0 0 0.6rem;
    line-height: 1.25;
}

.card-excerpt {
    color: #3B463F;
    font-size: 0.96rem;
    margin-bottom: 0.9rem;
}

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

.card-more {
    margin-top: auto;
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--acc2);
    border-bottom: 2px solid var(--acc);
    align-self: flex-start;
    padding-bottom: 2px;
}

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

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

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

.pager .page-numbers {
    display: inline-block;
    min-width: 44px;
    text-align: center;
    padding: 0.5rem 0.9rem;
    border: 2px solid var(--line);
    border-radius: 0;
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--text);
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.pager .page-numbers:hover {
    border-color: var(--acc);
}

.pager .page-numbers.current {
    background: var(--acc);
    border-color: var(--acc);
    color: var(--bg);
}

.pager .page-numbers.dots {
    border-color: transparent;
}

/* =========================================================
   11. Hero (блок 1 главной)
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    background: var(--dark);
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.55;
}

.hero-inner {
    position: relative;
    padding: 6rem 0 4.5rem;
}

.hero-kicker {
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--acc);
    margin-bottom: 1.2rem;
}

.hero h1 {
    color: #F4F6F3;
    max-width: 20ch;
    text-shadow: 0 2px 14px rgba(20, 30, 26, 0.55);
}

.hero-sub {
    max-width: 58ch;
    color: #DDE5DC;
    font-size: 1.05rem;
    text-shadow: 0 1px 10px rgba(20, 30, 26, 0.55);
    margin-bottom: 2rem;
}

.hero-scroll {
    margin-top: 1.5rem;
}

/* =========================================================
   12. Таймлайн (блок 2 главной)
   ========================================================= */

.timeline {
    position: relative;
    margin-top: 2.6rem;
    padding-left: 0;
}

.tl-row {
    display: grid;
    grid-template-columns: minmax(0, 120px) 34px minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
    padding-bottom: 2.4rem;
}

.tl-year {
    font-family: var(--font-head);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--acc2);
    letter-spacing: 0.02em;
    text-align: right;
    line-height: 1.1;
}

.tl-axis {
    position: relative;
    justify-self: center;
    width: 34px;
    align-self: stretch;
}

.tl-axis::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: -2.4rem;
    width: 2px;
    margin-left: -1px;
    background-image: repeating-linear-gradient(to bottom, var(--dots) 0 2px, transparent 2px 9px);
}

.tl-row:last-child .tl-axis::before {
    bottom: 0;
}

.tl-dot {
    position: relative;
    display: block;
    width: 12px;
    height: 12px;
    margin: 0.5rem auto 0;
    background: var(--acc);
}

.tl-body {
    min-width: 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tl-icon {
    flex: 0 0 34px;
    color: var(--acc2);
}

.tl-icon svg {
    display: block;
    width: 34px;
    height: 34px;
}

.tl-text h3 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tl-text p {
    margin: 0;
    color: #3B463F;
    font-size: 0.97rem;
}

/* =========================================================
   13. Цитата (блок 3 главной) — библиографическая рамка
   ========================================================= */

.creed-wrap {
    display: block;
}

.creed {
    position: relative;
    width: 82%;
    margin-left: auto;
    margin-right: 0;
    background: var(--dark-soft);
    color: #EAF0E8;
    border: 1px solid var(--acc);
    padding: 3rem 3rem 2.6rem;
}

.creed::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(163, 184, 163, 0.55);
    pointer-events: none;
}

.creed p {
    position: relative;
    font-size: 1.4rem;
    line-height: 1.6;
    margin: 0 0 1.2rem;
}

.creed p::first-letter {
    font-family: var(--font-head);
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 0.8;
    float: left;
    margin: 0.12em 0.5rem 0 0;
    color: var(--acc);
}

.creed-sign {
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--acc);
    margin: 0;
}

/* =========================================================
   14. Рубрикатор (блок 4 главной)
   ========================================================= */

.rubrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2.6rem;
}

.rubric {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    padding: 1.8rem 1.8rem;
    border: 2px solid var(--acc2);
    background: transparent;
    clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%);
    min-width: 0;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.rubric svg {
    display: block;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    color: var(--acc2);
    transition: color 0.25s ease;
}

.rubric-name {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
}

.rubric-note {
    display: block;
    font-size: 0.87rem;
    color: var(--muted);
    margin-top: 0.3rem;
    line-height: 1.5;
    transition: color 0.25s ease;
}

.rubric:hover {
    background: var(--acc);
    border-color: var(--acc);
    color: var(--dark);
}

.rubric:hover svg,
.rubric:hover .rubric-note {
    color: var(--dark);
}

/* =========================================================
   15. Блок последних записей на главной
   ========================================================= */

.latest-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.latest-list {
    margin-top: 1.6rem;
}

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

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

.entry-title {
    font-size: 2.6rem;
    letter-spacing: 0.01em;
}

.entry-meta {
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

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

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

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

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

.entry-content img {
    display: block;
    height: auto;
}

.entry-content blockquote {
    position: relative;
    margin: 2rem 0;
    padding: 1.8rem 2rem;
    background: var(--accent-plate);
    border: 1px solid var(--acc);
}

.entry-content blockquote::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(163, 184, 163, 0.6);
    pointer-events: none;
}

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

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

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

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

.entry-content th,
.entry-content td {
    border: 1px solid var(--acc2);
    padding: 0.65rem 0.85rem;
    text-align: left;
}

.entry-content th {
    background: var(--bg-alt);
    font-family: var(--font-head);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entry-tags {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.entry-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

.entry-nav a {
    color: var(--acc2);
}

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

.site-aside .widget {
    margin-bottom: 2rem;
    color: var(--text);
}

.site-aside .widget:last-child {
    margin-bottom: 0;
}

.site-aside .widget-title {
    position: relative;
    padding-left: 0.9rem;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    margin-bottom: 1rem;
}

.site-aside .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 6px;
    height: 0.85em;
    background: var(--acc);
}

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

.site-aside .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}

.site-aside .widget li:last-child {
    border-bottom: 0;
}

.site-aside .widget a {
    color: var(--text);
}

.site-aside .widget a:hover {
    color: var(--acc2);
}

.site-aside .post-date,
.site-aside .rss-date {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.06em;
}

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

.site-foot {
    background: var(--dark);
    color: #D4DED3;
    padding: 3.2rem 0 1.8rem;
    margin-top: 0;
}

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

.foot-cols .widget {
    min-width: 0;
    color: #D4DED3;
    font-size: 0.94rem;
}

.foot-cols .widget-title {
    position: relative;
    padding-left: 0.9rem;
    color: #F1F5EF;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.foot-cols .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 6px;
    height: 0.85em;
    background: var(--acc);
}

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

.foot-cols .widget li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(163, 184, 163, 0.22);
}

.foot-cols .widget li:last-child {
    border-bottom: 0;
}

.foot-cols .widget a {
    color: #D4DED3;
}

.foot-cols .widget a:hover {
    color: var(--acc);
}

.foot-cols .widget .post-date,
.foot-cols .widget .rss-date {
    display: block;
    color: #9DB0A4;
    font-size: 0.78rem;
}

.foot-note {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(163, 184, 163, 0.25);
    font-size: 0.83rem;
    letter-spacing: 0.06em;
    color: #9DB0A4;
}

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

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

.cookie-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    background: var(--dark);
    color: #DCE5DC;
    border-top: 2px solid var(--acc);
    padding: 1.1rem 1.6rem;
    font-size: 0.9rem;
}

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

/* =========================================================
   20. Форма поиска, комментарии, 404
   ========================================================= */

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

.search-line input[type="search"] {
    flex: 1 1 200px;
    min-width: 0;
    border: 2px solid var(--line);
    background: #FFFFFF;
    border-radius: 0;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
}

.search-line input[type="search"]:focus {
    outline: none;
    border-color: var(--acc);
}

.comments-block {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

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

.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 1.6rem;
    border-left: 1px solid var(--line);
}

.comment-item {
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
}

.comment-head {
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

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

.comment-date {
    color: var(--muted);
    margin-left: 0.6rem;
}

.comment-reply a {
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--acc2);
}

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

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    border: 2px solid var(--line);
    background: #FFFFFF;
    border-radius: 0;
    padding: 0.6rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
}

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

.comment-respond .submit {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    background: transparent;
    border: 2px solid var(--acc);
    border-radius: 0;
    padding: 0.7rem 2.2rem 0.7rem 1.3rem;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
    cursor: pointer;
}

.comment-respond .submit:hover {
    background: var(--acc);
    color: var(--bg);
}

.error-box {
    background: var(--accent-plate);
    border: 1px solid var(--acc);
    padding: 2.6rem 2.4rem;
    position: relative;
}

.error-box::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(163, 184, 163, 0.6);
    pointer-events: none;
}

.error-code {
    font-family: var(--font-head);
    font-size: 4.5rem;
    line-height: 1;
    color: var(--acc2);
    margin-bottom: 0.6rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.6rem;
}

.page-intro {
    margin-bottom: 2rem;
}

.nothing-found {
    padding: 2rem 0;
    color: var(--muted);
}

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

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

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

    .layout-single {
        width: 100%;
    }

    .creed {
        width: 100%;
    }

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

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

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

    h1 {
        font-size: 2.1rem;
    }

    h2,
    .sec-title {
        font-size: 1.55rem;
    }

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

    .hero-inner {
        padding: 4rem 0 3rem;
    }

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

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

    .main-nav[hidden] {
        display: none !important;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.9rem;
        padding-top: 1rem;
    }

    .card-inner {
        flex-direction: column;
        gap: 1.1rem;
    }

    .card-thumb-wrap {
        flex: none;
        width: 100%;
        aspect-ratio: auto;
        position: static;
    }

    .card-thumb-wrap a {
        position: static;
    }

    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .tl-row {
        grid-template-columns: minmax(0, 74px) 26px minmax(0, 1fr);
        gap: 0.9rem;
    }

    .tl-year {
        font-size: 1.2rem;
    }

    .tl-body {
        flex-direction: column;
        gap: 0.6rem;
    }

    .creed {
        padding: 2rem 1.5rem;
    }

    .creed p {
        font-size: 1.15rem;
    }

    .rubric {
        padding: 1.4rem 1.3rem;
    }

    .entry-title {
        font-size: 1.9rem;
    }

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

    .comment-respond {
        padding: 1.4rem 1.2rem;
    }

    .error-box {
        padding: 1.8rem 1.4rem;
    }

    .site-aside {
        padding: 1.4rem 1.2rem;
    }

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

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