/*
Theme Name: dds_oshodvds.ru
Description: Тема для цифрового архива учений и материалов о философии сознания. Японский минимализм, холодная стальная палитра, асимметричная типографика.
Author: Алексей Светлов
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: oshoarc
*/

:root {
    --paper: #f4f6f9;
    --paper-alt: #e8edf2;
    --head-bg: #1a212b;
    --foot-bg: #0d1219;
    --aside-bg: #eef1f5;
    --ink: #1c242e;
    --steel: #a8b4c4;
    --steel-deep: #5c6b80;
    --gold: #c4a35a;
    --muted: #7a8599;
    --line: #d0d7e0;
    --font-head: "Inter", "Neue Haas Grotesk", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    --font-body: "Source Serif Pro", "PT Serif", Georgia, "Times New Roman", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--paper);
    background-image: radial-gradient(circle, rgba(208, 215, 224, 0.2) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
}

body.is-front::after {
    content: "";
    position: fixed;
    right: -60px;
    bottom: -40px;
    width: 420px;
    height: 420px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M100 40c22 20 34 36 34 54s-15 32-34 32-34-14-34-32 12-34 34-54z' fill='%231c242e'/%3E%3Cpath d='M20 132c26-14 52-18 80-18s54 4 80 18c-26 16-52 22-80 22s-54-6-80-22z' fill='%231c242e'/%3E%3Cpath d='M100 96v58' stroke='%23ffffff' stroke-width='3' fill='none'/%3E%3C/svg%3E");
}

.masthead,
.site-main,
.site-footer,
.cookie-banner {
    position: relative;
    z-index: 1;
}

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

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

h1 {
    font-size: 3.5rem;
    line-height: 1.4;
}

h2 {
    font-size: 1.9rem;
}

h3 {
    font-size: 1.35rem;
}

h4 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 1.2em;
}

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

.entry-content a,
.card-excerpt a,
.widget a,
.sec-note a {
    position: relative;
}

.entry-content a::after,
.card-excerpt a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    border-bottom: 1px dashed var(--gold);
    transition: width 0.28s ease;
}

.entry-content a:hover::after,
.card-excerpt a:hover::after {
    width: 100%;
}

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

/* ---------- Кнопки ---------- */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.3;
    padding: 0.85rem 1.7rem;
    border-radius: 0;
    border: 1px solid rgba(168, 180, 196, 0.4);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-solid {
    background: rgba(168, 180, 196, 0.15);
    border-color: rgba(168, 180, 196, 0.4);
}

.btn-solid:hover,
.btn-solid:focus {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: rgba(168, 180, 196, 0.05);
    border-color: var(--ink);
    color: var(--ink);
}

.btn-cut {
    background: rgba(168, 180, 196, 0.15);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.btn-cut:hover,
.btn-cut:focus {
    background: rgba(168, 180, 196, 0.32);
    border-color: var(--gold);
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ---------- Шапка ---------- */

.masthead {
    background: var(--head-bg);
    color: var(--paper);
    padding: 1.4rem 0;
    border-bottom: 1px solid rgba(168, 180, 196, 0.18);
}

.masthead-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.2rem 2rem;
}

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

.brand-link {
    display: block;
    flex: 0 0 auto;
    line-height: 0;
}

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

.brand-mark {
    display: block;
}

.brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 640px;
}

.brand-name {
    font-family: var(--font-head);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.4;
    color: #eef1f5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-tagline {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--steel);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 1px solid rgba(168, 180, 196, 0.4);
    color: var(--paper);
    font-family: var(--font-head);
    font-size: 0.85rem;
    padding: 0.6rem 0.9rem;
    border-radius: 0;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 1px;
    background: var(--steel);
}

.nav-toggle-label {
    margin-left: 0.3rem;
}

.primary-nav {
    flex: 0 1 auto;
    min-width: 0;
}

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

.nav-list a {
    font-family: var(--font-head);
    font-size: 0.92rem;
    color: #dbe2ea;
    position: relative;
    padding-bottom: 4px;
    display: inline-block;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    border-bottom: 1px dashed var(--gold);
    transition: width 0.28s ease;
}

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

.nav-list .sub-menu {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    background: var(--head-bg);
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.55;
    filter: grayscale(35%) contrast(105%);
}

.hero-shell {
    position: relative;
    z-index: 2;
    padding: 5rem 0;
}

.hero-body {
    max-width: 640px;
    margin-left: 34%;
    text-align: left;
    padding: 2.4rem 2.2rem;
    background: rgba(13, 18, 25, 0.62);
    border-left: 2px solid var(--gold);
    min-width: 0;
}

.hero-eyebrow {
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 1rem;
}

.hero-title {
    font-size: clamp(1.7rem, 2.4vw, 2.4rem);
    line-height: 1.4;
    color: #f4f6f9;
    margin: 0 0 1.2rem;
}

.hero-lead {
    font-size: 0.98rem;
    color: #cfd8e2;
    margin: 0 0 1.8rem;
}

.hero-epigraph {
    font-family: var(--font-body);
    font-size: 1.45rem;
    line-height: 1.6;
    color: #eef1f5;
    margin: 0 0 0.4rem;
    padding-left: 1.2rem;
    background-image: radial-gradient(circle, var(--steel) 1px, transparent 1px);
    background-size: 2px 6px;
    background-repeat: repeat-y;
    background-position: left top;
}

.hero-epigraph-note {
    font-family: var(--font-head);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--steel);
    margin: 0 0 2rem;
    padding-left: 1.2rem;
}

.hero .btn {
    color: #f4f6f9;
    border-color: rgba(196, 163, 90, 0.55);
}

.hero .btn:hover,
.hero .btn:focus {
    background: rgba(196, 163, 90, 0.22);
    border-color: var(--gold);
    color: #f4f6f9;
}

.tilt-divider {
    height: 64px;
    background: linear-gradient(3deg, transparent 49.4%, #ffffff 49.4%, #ffffff 50.4%, transparent 50.4%);
}

/* ---------- Секции главной ---------- */

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

.front-section .shell {
    position: relative;
}

.front-section .shell::before {
    content: "";
    position: absolute;
    top: -1.4rem;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--gold);
}

.section-base {
    background: var(--paper);
}

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

.sec-title {
    position: relative;
    margin-left: -1rem;
    padding-left: 1rem;
    margin-bottom: 1.2rem;
    text-align: left;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.25em;
    width: 2px;
    height: 1.5em;
    background: var(--gold);
}

.sec-note {
    max-width: 640px;
    color: var(--muted);
    margin: 0 0 2.6rem;
}

/* Блок направлений (сетка иконок, 2 колонки) */

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

.dir-item {
    display: flex;
    gap: 1.4rem;
    min-width: 0;
}

.dir-icon {
    flex: 0 0 auto;
    display: block;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--line);
    transition: border-color 0.25s ease;
}

.dir-item:hover .dir-icon {
    border-bottom-color: var(--gold);
}

.dir-body {
    min-width: 0;
}

.dir-title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.dir-text {
    margin: 0;
    color: var(--ink);
    font-size: 0.98rem;
}

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

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

.number-cell {
    position: relative;
    min-width: 0;
    padding-left: 1.6rem;
}

.number-cell + .number-cell::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.9rem;
    width: 1px;
    height: 2rem;
    background: var(--line);
}

.number-value {
    display: block;
    font-family: var(--font-head);
    font-size: 4rem;
    font-weight: 600;
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: 0.9rem;
}

.number-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
}

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

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

.map-tile {
    display: block;
    min-width: 0;
    padding: 2rem 1.8rem;
    border: 3px solid var(--steel);
    background: rgba(244, 246, 249, 0.55);
    color: var(--ink);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.map-tile:hover,
.map-tile:focus {
    border-width: 1px;
    border-color: var(--gold);
    padding: calc(2rem + 2px) calc(1.8rem + 2px);
    transform: translateY(-4px);
    box-shadow: 0 8px 0 0 #ffffff;
}

.map-icon {
    display: block;
    margin-bottom: 1.2rem;
}

.map-name {
    display: block;
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.map-note {
    display: block;
    font-size: 0.92rem;
    color: var(--muted);
}

.empty-note {
    color: var(--muted);
}

/* ---------- Раскладки внутренних страниц ---------- */

.page-shell {
    padding: 2.6rem 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, 67%) minmax(0, 27%);
    gap: 6%;
    align-items: start;
}

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

.trail {
    font-family: var(--font-head);
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

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

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

.trail-sep {
    color: var(--line);
    margin: 0 0.35rem;
}

.page-head {
    margin-bottom: 2.4rem;
}

.page-title,
.entry-title {
    font-size: 3.5rem;
    line-height: 1.4;
    margin: 0 0 0.6rem;
}

.archive-note {
    color: var(--muted);
}

/* ---------- Карточки записей ---------- */

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

.card {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--line);
    padding: 0.4rem 0 0.4rem 1.6rem;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.card-row {
    display: flex;
    gap: 1.6rem;
    align-items: stretch;
    min-width: 0;
}

.card-thumb-wrap {
    flex: 0 0 25%;
    position: relative;
    overflow: hidden;
    min-height: 150px;
}

.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(100%) contrast(118%) brightness(0.98);
}

.card-body {
    flex: 1;
    min-width: 0;
    position: relative;
    padding-top: 0.9rem;
}

.card-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.card:hover .card-body::before {
    width: 100%;
}

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

.card-title {
    font-size: 1.35rem;
    margin: 0 0 0.7rem;
}

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

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

.card-excerpt {
    color: var(--ink);
    font-size: 0.98rem;
}

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

.card-more {
    margin-top: 0.6rem;
}

/* ---------- Запись и страница ---------- */

.entry-meta {
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

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

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

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

.entry-content ul,
.entry-content ol {
    padding-left: 1.4rem;
    margin: 0 0 1.4rem;
}

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

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

.entry-content blockquote {
    margin: 2rem 0;
    padding: 0.6rem 0 0.6rem 1.6rem;
    font-family: var(--font-body);
    font-size: 1.28rem;
    line-height: 1.7;
    color: var(--ink);
    background-image: radial-gradient(circle, var(--steel) 1px, transparent 1px);
    background-size: 2px 6px;
    background-repeat: repeat-y;
    background-position: left top;
}

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

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

.entry-content th {
    background: var(--paper-alt);
    font-family: var(--font-head);
    font-size: 0.92rem;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2rem;
}

.tag-chip {
    font-family: var(--font-head);
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--line);
    color: var(--steel-deep);
}

.tag-chip:hover {
    border-color: var(--gold);
    color: var(--ink);
}

.post-switch {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 3rem 0 0;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
    font-family: var(--font-head);
    font-size: 0.9rem;
}

.post-switch-cell {
    min-width: 0;
}

.post-switch-next {
    text-align: right;
}

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

/* ---------- Пагинация ---------- */

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

.pager .page-numbers {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(168, 180, 196, 0.4);
    color: var(--ink);
    background: transparent;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.pager a.page-numbers:hover {
    background: rgba(168, 180, 196, 0.15);
    border-color: var(--ink);
}

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

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

.comments-pagination {
    margin-top: 2rem;
    font-family: var(--font-head);
    font-size: 0.9rem;
}

/* ---------- Сайдбар и виджеты ---------- */

.sidebar {
    min-width: 0;
    background: var(--aside-bg);
    border-left: 1px solid var(--line);
    padding: 1.8rem 1.6rem;
}

.widget {
    margin-bottom: 2.2rem;
}

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

.widget-title {
    font-size: 1.02rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line);
}

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

.widget li {
    margin-bottom: 0.7rem;
    line-height: 1.5;
}

.sidebar .widget-title,
.sidebar .widget,
.sidebar .widget li {
    color: var(--ink);
}

.sidebar .widget a {
    color: var(--ink);
    font-size: 0.95rem;
}

.sidebar .widget a:hover {
    color: var(--steel-deep);
}

.sidebar .post-date {
    display: block;
    font-family: var(--font-head);
    font-size: 0.76rem;
    color: var(--muted);
}

.search-form {
    margin: 1.4rem 0;
}

.search-label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

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

.search-input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #ffffff;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.search-input:focus {
    border-color: var(--steel);
    outline: none;
}

/* ---------- Подвал ---------- */

.site-footer {
    background: var(--foot-bg);
    color: #cfd8e2;
    padding: 3.5rem 0 2rem;
}

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

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

.site-footer .widget-title {
    color: #f4f6f9;
    border-bottom-color: rgba(168, 180, 196, 0.25);
}

.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li {
    color: #cfd8e2;
    font-size: 0.94rem;
}

.site-footer .widget a {
    color: var(--steel);
}

.site-footer .widget a:hover {
    color: var(--gold);
}

.footer-bottom {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(168, 180, 196, 0.2);
    font-family: var(--font-head);
    font-size: 0.82rem;
    color: var(--steel);
}

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

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

.comments-title {
    font-size: 1.4rem;
}

.comment-list,
.comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.comment-item {
    margin-bottom: 1.8rem;
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-head);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

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

.comment-hold {
    color: var(--muted);
    font-size: 0.9rem;
}

.comment-actions {
    font-family: var(--font-head);
    font-size: 0.82rem;
}

.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #ffffff;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.comment-form textarea {
    resize: vertical;
}

.comment-form .form-submit {
    margin-top: 1rem;
}

/* ---------- Cookie-баннер ---------- */

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--head-bg);
    border-top: 1px solid rgba(196, 163, 90, 0.5);
    padding: 1.1rem 0;
}

.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.cookie-text {
    margin: 0;
    color: #cfd8e2;
    font-size: 0.9rem;
    min-width: 0;
    flex: 1 1 320px;
}

.cookie-accept {
    color: #f4f6f9;
    border-color: rgba(196, 163, 90, 0.55);
    background: rgba(196, 163, 90, 0.18);
}

.cookie-accept:hover,
.cookie-accept:focus {
    background: var(--gold);
    border-color: var(--gold);
    color: #10161d;
}

/* ---------- Адаптив ---------- */

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

    h1,
    .page-title,
    .entry-title {
        font-size: 2.2rem;
    }

    .nav-toggle {
        display: flex;
    }

    .primary-nav {
        flex: 1 1 100%;
        display: none;
    }

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

    .nav-list {
        flex-direction: column;
        gap: 0.9rem;
        padding-top: 0.8rem;
    }

    .hero-body {
        margin-left: 0;
        max-width: none;
    }

    .hero {
        min-height: 420px;
    }

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

    .layout-single {
        width: 100%;
    }

    .sidebar {
        border-left: none;
        border-top: 1px solid var(--line);
    }

    .numbers-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.2rem;
    }

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

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

@media (max-width: 600px) {
    .front-section {
        padding: 3.2rem 0;
    }

    .hero-shell {
        padding: 3.2rem 0;
    }

    .hero-body {
        padding: 1.8rem 1.4rem;
    }

    .hero-epigraph {
        font-size: 1.2rem;
    }

    h1,
    .page-title,
    .entry-title {
        font-size: 1.85rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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

    .numbers-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.8rem;
    }

    .number-cell {
        padding-left: 0;
    }

    .number-cell + .number-cell::before {
        display: none;
    }

    .number-value {
        font-size: 3rem;
    }

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

    .map-tile {
        padding: 1.6rem 1.4rem;
    }

    .map-tile:hover,
    .map-tile:focus {
        padding: calc(1.6rem + 2px) calc(1.4rem + 2px);
    }

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

    .card {
        padding-left: 1.1rem;
    }

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

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

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

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

    .post-switch {
        flex-direction: column;
    }

    .post-switch-next {
        text-align: left;
    }

    body.is-front::after {
        display: none;
    }

    .tilt-divider {
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}
