/*
Theme Name: dds_yur-sovet.ru
Author: Максим Лебедев
Description: Тема для информационно-справочного портала о юридическом образовании.
Version: 1.1
Text Domain: yursov
*/

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

:root {
    --bg: #F4F6FA;
    --bg-alt: #E9EDF4;
    --head: #16212E;
    --foot: #0B121A;
    --ink: #1E2A36;
    --gold: #BF8F4A;
    --steel: #42647A;
    --mute: #6F7F8F;
    --line: #D8E0E8;
    --frame: #D0D8E0;
    --sans: "IBM Plex Sans Condensed", "Oswald", "PT Sans Narrow", "Arial Narrow", Arial, sans-serif;
    --serif: "Literata", "Charter", "Charis SIL", Georgia, "Times New Roman", serif;
    --shell: min(92%, 1180px);
}

/* ============================================================
   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(30, 42, 54, 0.03) 0 0.5px, transparent 0.5px 9px),
        repeating-linear-gradient(-45deg, rgba(30, 42, 54, 0.03) 0 0.5px, transparent 0.5px 9px);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

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

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

p {
    margin: 0 0 1.15em;
}

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

h1 {
    font-size: 3.5rem;
    letter-spacing: 0.035em;
    line-height: 1.08;
}

h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.16rem; }

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

/* Текстовые ссылки: подчёркивание от центра к краям */
.prose a,
.entry a,
.trail a,
.panel a,
.site-nav a,
.card-title a {
    position: relative;
}

.prose a::after,
.entry a::after,
.card-title a::after,
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.28s ease;
}

.prose a:hover::after,
.entry a:hover::after,
.card-title a:hover::after,
.site-nav a:hover::after {
    transform: scaleX(1);
}

/* Маркеры списков — квадрат акцентного цвета */
.prose ul,
.entry ul,
.checklist {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0 0 1.3em;
}

.prose ul li,
.entry ul li,
.checklist li {
    position: relative;
    margin-bottom: 0.55em;
}

.prose ul li::before,
.entry ul li::before,
.checklist li::before {
    content: "";
    position: absolute;
    left: -1.2rem;
    top: 0.62em;
    width: 7px;
    height: 7px;
    background: var(--gold);
}

.prose ol,
.entry ol {
    padding-left: 1.4rem;
    margin: 0 0 1.3em;
}

blockquote {
    margin: 1.8rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-left: 3px solid var(--gold);
    font-size: 1.08rem;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    font-size: 0.95rem;
}

table, th, td {
    border: 1px solid var(--frame);
}

th, td {
    padding: 0.7rem 0.9rem;
    text-align: left;
}

th {
    background: var(--bg-alt);
    font-family: var(--sans);
    font-weight: 600;
}

code, pre {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.9em;
}

pre {
    overflow-x: auto;
    padding: 1rem;
    background: var(--bg-alt);
    border-left: 3px solid var(--steel);
}

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

.btn {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.75rem 1.6rem;
    border: 1px solid var(--gold);
    border-radius: 0 0 4px 4px;
    color: var(--gold);
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus {
    background: var(--gold);
    color: #FFF;
    transform: translateY(2px);
    box-shadow: 0 3px 0 rgba(191, 143, 74, 0.35);
}

.btn-light {
    border-color: rgba(255, 255, 255, 0.6);
    color: #F4F6FA;
}

.btn-light:hover,
.btn-light:focus {
    background: var(--gold);
    border-color: var(--gold);
    color: #FFF;
}

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

.masthead {
    background: var(--head);
    color: #E4EAF2;
    position: static;
}

.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.7rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    flex: 1 1 340px;
}

.brand-logo {
    width: auto;
    max-height: 60px;
    display: block;
}

.brand-mark {
    flex: 0 0 46px;
    display: block;
}

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

.brand-name {
    font-family: var(--sans);
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #FFFFFF;
    display: block;
    line-height: 1.35;
    max-height: 3.7em;
    overflow: hidden;
}

.brand-tagline {
    display: block;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #93A4B6;
    max-height: 3em;
    overflow: hidden;
    margin-top: 0.25rem;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0 0 4px 4px;
    color: #E4EAF2;
    font-family: var(--sans);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.site-nav[hidden] {
    display: block;
}

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

.site-nav a {
    font-family: var(--sans);
    font-size: 0.98rem;
    letter-spacing: 0.05em;
    color: #D6DEE8;
    padding: 0.2rem 0;
    display: inline-block;
}

.site-nav a:hover {
    color: #FFFFFF;
}

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

/* Судебная лента */
.ribbon {
    height: 3px;
    background: var(--gold);
}

/* ============================================================
   5. Каркас страницы
   ============================================================ */

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

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    gap: 2.5rem;
    align-items: start;
}

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

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

/* Хлебные крошки */
.trail {
    font-family: var(--sans);
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    color: var(--mute);
    padding: 1.4rem 0 0;
}

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

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

.trail .sep {
    color: var(--gold);
    padding: 0 0.25rem;
}

/* Заголовок секции: вертикальная плашка слева, текст сдвинут вправо */
.rule-title {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1.6rem;
}

.rule-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 4px;
    height: 1.05em;
    background: var(--gold);
}

.section-note {
    color: var(--mute);
    max-width: 62ch;
    margin-bottom: 2rem;
}

/* Асимметричный разделитель */
.divider {
    border: 0;
    height: 1px;
    background: var(--line);
    width: 50%;
    margin: 0 0 0 auto;
}

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

.aside {
    min-width: 0;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--frame);
    padding: 1.6rem 1.5rem;
}

.panel {
    margin-bottom: 2rem;
}

.panel:last-child {
    margin-bottom: 0;
}

.panel-title {
    font-size: 1.05rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 1rem;
}

.panel-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 4px;
    height: 0.9em;
    background: var(--gold);
}

.aside .panel,
.aside .panel-title,
.aside .panel li,
.aside .panel p {
    color: var(--ink);
}

.aside .panel a {
    color: var(--ink);
}

.aside .panel a:hover {
    color: var(--gold);
}

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

.panel li {
    padding: 0.5rem 0 0.5rem 1rem;
    position: relative;
    border-bottom: 1px solid var(--line);
    font-size: 0.97rem;
    line-height: 1.5;
}

.panel li:last-child {
    border-bottom: 0;
}

.panel li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1rem;
    width: 6px;
    height: 6px;
    background: var(--gold);
}

.panel .post-date {
    display: block;
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--mute);
}

.panel select,
.panel input[type="search"],
.panel input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--frame);
    background: #FFFFFF;
    color: var(--ink);
    font-family: var(--serif);
}

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

.card-stack {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-bottom: 2.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 0;
    border-left: 1px solid var(--frame);
    box-shadow: 4px 4px 0 rgba(30, 42, 54, 0.09);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-left-color: var(--gold);
    box-shadow: 6px 6px 0 rgba(30, 42, 54, 0.12);
}

.card-row {
    flex-direction: row;
    align-items: stretch;
}

.card-thumb-wrap {
    flex: 0 0 260px;
    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;
    filter: grayscale(1) sepia(0.22) hue-rotate(175deg) contrast(0.96);
    transition: filter 0.35s ease;
}

.card:hover .card-thumb-wrap img {
    filter: grayscale(0.65) sepia(0.12) hue-rotate(175deg);
}

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

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

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

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

.meta {
    font-family: var(--sans);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--mute);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

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

.meta-sep {
    color: var(--gold);
}

.card-excerpt {
    color: #35434F;
    font-size: 0.98rem;
    margin-bottom: 1.1rem;
}

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

.card-more {
    margin-top: auto;
    align-self: flex-start;
}

/* ============================================================
   8. Главная
   ============================================================ */

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

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

.front-shell {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* 8.1 Hero */

.hero {
    background: var(--head);
    color: #E8EDF4;
    padding: 4.6rem 0 4.8rem;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    color: #FFFFFF;
    margin-bottom: 1.2rem;
}

.hero h1 .gold {
    color: var(--gold);
}

.hero-lead {
    color: #A9B9C9;
    font-size: 1.08rem;
    max-width: 54ch;
    margin-bottom: 2rem;
}

.hero-kicker {
    font-family: var(--sans);
    font-size: 0.85rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.4rem;
}

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

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

/* 8.2 Таймлайн «Статьи» */

.codex {
    position: relative;
    margin-top: 2.4rem;
    padding-left: 0;
}

.codex::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--steel);
    opacity: 0.45;
}

.codex-item {
    position: relative;
    width: 46%;
    padding: 1.4rem 1.6rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--frame);
    margin-bottom: 1.8rem;
    min-width: 0;
}

.codex-item:nth-child(even) {
    margin-left: 54%;
}

.codex-item::after {
    content: "";
    position: absolute;
    top: 1.9rem;
    width: 9px;
    height: 9px;
    background: var(--gold);
}

.codex-item:nth-child(odd)::after {
    right: -13.5%;
}

.codex-item:nth-child(even)::after {
    left: -13.5%;
}

.codex-num {
    display: block;
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.4rem;
}

.codex-item h3 {
    font-size: 1.18rem;
    margin-bottom: 0.4rem;
}

.codex-item p {
    margin: 0;
    font-size: 0.96rem;
    color: #3A4854;
}

/* 8.3 Статистика */

.figures {
    background: linear-gradient(135deg, #1A2B3C 0%, #253A4A 100%);
    color: #FFFFFF;
    padding: 3rem 2.6rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.figure-cell {
    min-width: 0;
    padding: 0.4rem 1.4rem;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

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

.figure-num {
    display: block;
    font-family: var(--sans);
    font-size: 3.3rem;
    line-height: 1;
    color: var(--gold);
    letter-spacing: 0.02em;
    margin-bottom: 0.7rem;
}

.figure-cell p {
    margin: 0;
    color: #C3D0DC;
    font-size: 0.98rem;
}

/* 8.4 Карта тем */

.topics {
    margin-top: 2.2rem;
}

.topic-plate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.7rem 1.6rem;
    border-top: 1px solid var(--frame);
    border-bottom: 1px solid var(--frame);
    margin-top: -1px;
    color: var(--ink);
    transition: background 0.25s ease, padding-left 0.25s ease, color 0.25s ease;
}

.topic-plate:hover {
    background: rgba(255, 255, 255, 0.72);
    padding-left: 2.3rem;
    color: var(--gold);
}

.topic-name {
    font-family: var(--sans);
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    min-width: 0;
}

.topic-arrow {
    font-family: var(--sans);
    font-size: 1.5rem;
    color: var(--gold);
    flex: 0 0 auto;
}

/* Декоративный силуэт весов */
.emblem {
    position: absolute;
    right: 2%;
    bottom: -10%;
    width: 320px;
    opacity: 0.03;
    pointer-events: none;
}

.front-section {
    position: relative;
    overflow: hidden;
}

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

.entry-header {
    margin-bottom: 1.8rem;
}

.entry-header h1 {
    font-size: 2.6rem;
}

.entry-thumb {
    margin-bottom: 1.8rem;
}

.entry-thumb img {
    width: 100%;
    display: block;
}

.entry h2,
.prose h2 {
    margin-top: 2.2rem;
    position: relative;
    padding-left: 1.5rem;
}

.entry h2::before,
.prose h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 4px;
    height: 1.05em;
    background: var(--gold);
}

.entry h3 {
    margin-top: 1.7rem;
}

.entry img {
    height: auto;
}

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

.tags {
    margin: 2rem 0 0;
    font-family: var(--sans);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.tags a {
    display: inline-block;
    border: 1px solid var(--frame);
    padding: 0.25rem 0.7rem;
    margin: 0 0.35rem 0.5rem 0;
    color: var(--steel);
}

.tags a:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Комментарии */

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

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

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

.note {
    background: #FFFFFF;
    border-left: 1px solid var(--frame);
    box-shadow: 3px 3px 0 rgba(30, 42, 54, 0.07);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.2rem;
}

.note-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: var(--sans);
    font-size: 0.88rem;
    color: var(--mute);
    margin-bottom: 0.6rem;
}

.note-author {
    color: var(--ink);
    font-weight: 600;
    letter-spacing: 0.04em;
}

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

.note-actions {
    font-family: var(--sans);
    font-size: 0.87rem;
    margin-top: 0.5rem;
}

.note-hold {
    color: var(--gold);
    font-size: 0.9rem;
}

.comment-respond {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--frame);
    padding: 1.7rem 1.8rem;
}

.comment-respond label {
    display: block;
    font-family: var(--sans);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--frame);
    background: #FFFFFF;
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 1rem;
}

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

.comment-respond input[type="submit"] {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 1.7rem;
    border: 1px solid var(--gold);
    border-radius: 0 0 4px 4px;
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.comment-respond input[type="submit"]:hover {
    background: var(--gold);
    color: #FFFFFF;
    transform: translateY(2px);
    box-shadow: 0 3px 0 rgba(191, 143, 74, 0.35);
}

/* ============================================================
   10. Поиск, пагинация, 404
   ============================================================ */

.searchform {
    display: flex;
    gap: 0.6rem;
    align-items: stretch;
}

.searchform input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--frame);
    background: #FFFFFF;
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--ink);
}

.searchform button {
    flex: 0 0 auto;
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.65rem 1.2rem;
    border: 1px solid var(--gold);
    border-radius: 0 0 4px 4px;
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.searchform button:hover {
    background: var(--gold);
    color: #FFFFFF;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.4rem 0 0;
}

.pager .page-numbers {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    padding: 0.55rem 1rem;
    border: 1px solid var(--frame);
    border-radius: 0 0 4px 4px;
    color: var(--steel);
    background: #FFFFFF;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

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

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

.notfound {
    text-align: left;
    padding: 1rem 0 2rem;
}

.notfound-code {
    font-family: var(--sans);
    font-size: 6rem;
    line-height: 1;
    color: var(--gold);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.notfound-tools {
    margin-top: 2rem;
    max-width: 520px;
}

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

.colophon {
    background: var(--foot);
    color: #B4C1CE;
    padding: 3.4rem 0 1.8rem;
}

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

.colophon .panel-title {
    color: #FFFFFF;
}

.colophon .panel,
.colophon .panel p,
.colophon .panel li {
    color: #B4C1CE;
}

.colophon .panel a {
    color: #D3DDE7;
}

.colophon .panel a:hover {
    color: var(--gold);
}

.colophon .panel li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.colophon .panel .post-date {
    color: #8496A6;
}

.colophon-contacts {
    margin-top: 2.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--sans);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    justify-content: space-between;
}

.colophon-contacts a {
    color: var(--gold);
}

.copyright {
    color: #7B8C9C;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--head);
    color: #D6DEE8;
    border-top: 3px solid var(--gold);
    padding: 1.1rem 1.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    font-size: 0.94rem;
}

.cookie-banner p {
    margin: 0;
    min-width: 0;
    flex: 1 1 340px;
}

.cookie-banner a {
    color: var(--gold);
}

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

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

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

    .layout-single,
    .front-shell {
        width: 100%;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.2rem;
    }

    .figures {
        padding: 2.4rem 1.8rem;
    }

    .figure-num {
        font-size: 2.6rem;
    }
}

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

    h1 { font-size: 2.05rem; }
    h2 { font-size: 1.5rem; }

    .masthead-inner {
        padding: 1.2rem 0;
        gap: 1rem;
    }

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

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

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

    .site-nav ul {
        flex-direction: column;
        gap: 0.2rem;
        padding-top: 0.8rem;
    }

    .site-nav li {
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        padding: 0.55rem 0;
    }

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

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

    .hero {
        padding: 2.8rem 0 3rem;
    }

    .card-row {
        flex-direction: column;
    }

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

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

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

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

    .codex::before {
        left: 4px;
    }

    .codex-item,
    .codex-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding-left: 1.6rem;
    }

    .codex-item:nth-child(odd)::after,
    .codex-item:nth-child(even)::after {
        left: -4.5px;
        right: auto;
    }

    .figures {
        grid-template-columns: minmax(0, 1fr);
        padding: 1.9rem 1.4rem;
        gap: 1.6rem;
    }

    .figure-cell,
    .figure-cell:first-child {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        padding: 1.2rem 0 0;
    }

    .figure-cell:first-child {
        border-top: 0;
        padding-top: 0;
    }

    .topic-plate {
        padding: 1.2rem 1.1rem;
    }

    .topic-plate:hover {
        padding-left: 1.5rem;
    }

    .topic-name {
        font-size: 1.2rem;
    }

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

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

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

    .emblem {
        display: none;
    }

    .notfound-code {
        font-size: 4.2rem;
    }
}
