/*
Theme Name: dds_asiageograf.ru
Theme URI: https://asiageograf.ru/
Author: Максим Лебедев
Description: Тема для информационного проекта об атласе гео-путешествий. Холодная картографическая эстетика, японский минимализм и швейцарская строгость.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: asgeo
*/

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

:root {
    --paper: #F1F5F9;
    --paper-alt: #E9EEF5;
    --deep: #0F172A;
    --deep-2: #1E293B;
    --ink: #1E293B;
    --accent: #0EA5E9;
    --accent-2: #38BDF8;
    --muted: #64748B;
    --hair: #CBD5E1;
    --font-head: "Inter", "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Literata", "Merriweather", Georgia, "Times New Roman", serif;
    --shell: min(92%, 1180px);
}

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

html {
    background-color: var(--paper);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--paper);
    background-image:
        repeating-linear-gradient(60deg, rgba(30, 41, 59, 0.04) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(-60deg, rgba(30, 41, 59, 0.04) 0 1px, transparent 1px 34px);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.72;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    right: -60px;
    bottom: -70px;
    width: 460px;
    height: 460px;
    z-index: 0;
    pointer-events: none;
    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 400 400'%3E%3Cpath d='M64 208c-18-52 6-104 54-134 46-29 96-16 128 16 26 26 22 58 48 82 30 28 78 24 92 62 12 34-22 68-64 84-56 22-128 20-186-8-42-20-60-58-72-102z' fill='%230EA5E9' fill-opacity='0.05'/%3E%3C/svg%3E");
}

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

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

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

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

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

h1 { font-size: 3.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.15rem; }

p {
    margin: 0 0 1.1em;
}

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

li {
    margin-bottom: 0.4em;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--deep);
    color: #fff;
    padding: 10px 16px;
    z-index: 99;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
}

/* ---------------------------------------------------------
   2. Кнопки и ссылки
--------------------------------------------------------- */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    padding: 12px 24px;
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: background-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.btn-fill {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-fill:hover,
.btn-fill:focus {
    background: var(--accent-2);
    box-shadow: 0 0 0 1px var(--accent-2), 0 6px 22px -6px rgba(14, 165, 233, 0.75);
}

.btn-ghost {
    background: transparent;
    color: var(--deep);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: rgba(14, 165, 233, 0.1);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.entry-content a,
.card-excerpt a,
.tl-body a,
.widget a,
.archive-desc a {
    text-decoration: none;
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size 0.28s ease;
}

.entry-content a:hover,
.card-excerpt a:hover,
.tl-body a:hover,
.widget a:hover,
.archive-desc a:hover,
.entry-content a:focus,
.widget a:focus {
    background-size: 100% 1px;
}

/* ---------------------------------------------------------
   3. Шапка
--------------------------------------------------------- */

.site-top {
    background: var(--deep);
    color: #E2E8F0;
}

.top-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px 0;
    flex-wrap: wrap;
}

.brand {
    flex: 1 1 340px;
    min-width: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: #F1F5F9;
    min-width: 0;
}

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

.brand-logo {
    flex: 0 0 auto;
    max-width: 190px;
    width: auto;
    max-height: 62px;
}

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    line-height: 1.35;
    color: #F8FAFC;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-desc {
    display: block;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #94A3B8;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid rgba(226, 232, 240, 0.4);
    border-radius: 4px;
    color: #E2E8F0;
    font-family: var(--font-head);
    letter-spacing: 0.05em;
    padding: 10px 16px;
    cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--accent-2);
    position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

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

.nav-list a {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    color: #E2E8F0;
    text-decoration: none;
    padding: 4px 0;
    background-image: linear-gradient(var(--accent-2), var(--accent-2));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.28s ease, color 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus,
.nav-list .current-menu-item > a {
    color: #fff;
    background-size: 100% 2px;
}

.nav-list .sub-menu {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.top-latitude {
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 22%, rgba(56, 189, 248, 0.25) 22%, rgba(56, 189, 248, 0.25) 100%);
}

/* ---------------------------------------------------------
   4. Общие секции и разделители
--------------------------------------------------------- */

.site-main {
    display: block;
    padding-bottom: 20px;
}

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

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

.section-title {
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin-bottom: 0.7em;
}

.section-title-light {
    color: #F8FAFC;
}

.section-lead {
    max-width: 62ch;
    color: var(--muted);
    margin-bottom: 2.4rem;
}

.section-more {
    margin: 2.4rem 0 0;
}

.sec-rule {
    position: relative;
    height: 1px;
    width: 66%;
    margin: 0 0 0 33%;
    background: var(--hair);
}

.sec-rule .rhomb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    background: var(--accent);
    transform: rotate(45deg);
}

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

/* ---------------------------------------------------------
   5. Hero
--------------------------------------------------------- */

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

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

.hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.74) 46%, rgba(30, 41, 59, 0.35) 100%);
}

.hero-topo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-meridian {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 62%;
    width: 1px;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0) 0%, var(--accent) 22%, var(--accent) 78%, rgba(14, 165, 233, 0) 100%);
}

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

.hero-kicker {
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.76rem;
    color: var(--accent-2);
    margin-bottom: 1.1rem;
}

.hero-title {
    color: #F8FAFC;
    margin-bottom: 0.5em;
    max-width: 14ch;
}

.hero-sub {
    color: #CBD5E1;
    max-width: 54ch;
    font-size: 1.06rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0;
}

.hero-actions .btn-ghost {
    color: #F1F5F9;
}

.hero-actions .btn-ghost:hover {
    background: rgba(56, 189, 248, 0.16);
}

/* ---------------------------------------------------------
   6. Таймлайн сезонов
--------------------------------------------------------- */

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--hair);
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 8px 34px;
    padding: 0 0 2.6rem 56px;
    margin: 0;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-mark {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--paper-alt);
    display: block;
}

.tl-mark svg {
    display: block;
    width: 32px;
    height: 32px;
}

.tl-date {
    font-family: var(--font-head);
    font-size: 0.86rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 6px;
    min-width: 0;
}

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

.tl-title {
    font-size: 1.2rem;
    margin-bottom: 0.45em;
}

.tl-body p {
    margin-bottom: 0.7em;
}

.tl-link {
    font-family: var(--font-head);
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    color: var(--deep);
}

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

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0px 8px 20px -6px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.25s ease;
}

.card:hover {
    box-shadow: 0px 12px 28px -8px rgba(15, 23, 42, 0.15);
}

.card-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
}

.card-thumb a {
    display: block;
}

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

.card-thumb-fallback svg {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
}

.card-thumb-veil {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.42) 100%);
}

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

.card-title {
    font-size: 1.14rem;
    margin-bottom: 0.4em;
}

.card-title a {
    text-decoration: none;
    color: var(--deep);
}

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

.post-meta {
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.9em;
}

.post-meta a {
    color: var(--muted);
    text-decoration: none;
}

.post-meta a:hover {
    color: var(--accent);
}

.post-meta .dot {
    color: var(--accent);
    margin: 0 6px;
}

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

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

.card-more {
    margin: auto 0 0;
    padding-top: 16px;
}

/* ---------------------------------------------------------
   8. Полярный блок статистики
--------------------------------------------------------- */

.polar-block {
    background-color: var(--deep);
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
        linear-gradient(140deg, var(--deep) 0%, var(--deep-2) 100%);
    background-size: 26px 26px, auto;
    color: #E2E8F0;
    padding: 4rem 2.2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
}

.stat-cell {
    min-width: 0;
    padding: 4px 0 4px 22px;
    border-left: 1px dashed rgba(148, 163, 184, 0.55);
}

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

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--accent);
    line-height: 1.1;
}

.stat-label {
    display: block;
    margin-top: 8px;
    font-size: 0.92rem;
    color: #94A3B8;
}

/* ---------------------------------------------------------
   9. Карта тем
--------------------------------------------------------- */

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

.topic-tile {
    position: relative;
    display: block;
    min-width: 0;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    outline: 1px solid transparent;
    outline-offset: -1px;
    transition: outline-color 0.25s ease;
}

.topic-tile img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.topic-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.62) 100%);
}

.topic-name {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    font-family: var(--font-head);
    font-size: 1.16rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
}

.topic-tile:hover,
.topic-tile:focus {
    outline-color: var(--accent-2);
}

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

.page-wrap {
    padding: 34px 0 60px;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 67% 27%;
    justify-content: space-between;
    gap: 40px;
    align-items: start;
}

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

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

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

.breadcrumbs {
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 28px;
}

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

.breadcrumbs a:hover {
    color: var(--accent);
}

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

.single-thumb {
    margin: 0 0 28px;
    border-radius: 6px;
    overflow: hidden;
}

.single-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.6em;
}

.entry-content h2 {
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

.entry-content img {
    display: block;
    border-radius: 6px;
}

.entry-content blockquote {
    margin: 1.8em 0;
    padding: 1.6rem 1.8rem;
    background: var(--paper-alt);
    border-left: 4px solid var(--accent);
    border-radius: 0 6px 6px 0;
    font-size: 1.06rem;
}

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

.entry-content code,
.entry-content pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    background: var(--paper-alt);
    font-size: 0.9rem;
}

.entry-content code {
    padding: 2px 6px;
    border-radius: 4px;
}

.entry-content pre {
    padding: 1.2rem 1.4rem;
    border-radius: 6px;
    overflow-x: auto;
}

.archive-desc {
    color: var(--muted);
    margin-bottom: 26px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.6em;
    border: 1px solid var(--hair);
    background: #fff;
}

th, td {
    border: 1px solid var(--hair);
    padding: 10px 14px;
    text-align: left;
}

th {
    font-family: var(--font-head);
    letter-spacing: 0.05em;
    background: var(--paper-alt);
}

.post-tags {
    margin-top: 24px;
    font-family: var(--font-head);
    font-size: 0.86rem;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.post-tags a {
    color: var(--deep);
    text-decoration: none;
}

.post-tags a:hover {
    color: var(--accent);
}

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 40px 0 0;
}

.post-nav-link {
    min-width: 0;
    display: block;
    padding: 18px 20px;
    background: #fff;
    border-radius: 6px;
    text-decoration: none;
    color: var(--deep);
    font-family: var(--font-head);
    font-size: 0.98rem;
    box-shadow: 0px 8px 20px -6px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.25s ease;
}

.post-nav-link:hover {
    box-shadow: 0px 12px 28px -8px rgba(15, 23, 42, 0.15);
}

.post-nav-link span {
    display: block;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.post-nav-link.next {
    text-align: right;
}

.notfound-code {
    font-family: var(--font-head);
    font-size: 4.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--hair);
    margin: 0;
    line-height: 1;
}

.notfound-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 26px;
}

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

.sidebar {
    min-width: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 6px;
    padding: 26px 24px;
}

.sidebar .widget {
    margin-bottom: 30px;
    color: var(--ink);
}

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

.sidebar .widget-title {
    font-size: 1.05rem;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    color: var(--deep);
    margin-bottom: 0.8em;
}

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

.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(203, 213, 225, 0.9);
    font-size: 0.96rem;
}

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

.sidebar .widget a {
    color: var(--deep);
    text-decoration: none;
}

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

.sidebar .post-date,
.sidebar .rss-date {
    display: block;
    font-family: var(--font-head);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-top: 3px;
}

/* ---------------------------------------------------------
   12. Поиск
--------------------------------------------------------- */

.search-form {
    margin: 0 0 24px;
}

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

.search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-field {
    flex: 1 1 220px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--hair);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.96rem;
    color: var(--ink);
}

.search-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.sidebar .search-field {
    background: #fff;
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 44px;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 9px 14px;
    border: 1px solid var(--hair);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-head);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--deep);
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pager a.page-numbers:hover {
    border-color: var(--accent);
    background: rgba(14, 165, 233, 0.1);
}

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

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

.comments-area .nav-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
    font-family: var(--font-head);
    font-size: 0.9rem;
}

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

.comments-area {
    margin-top: 52px;
    padding: 30px 32px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0px 8px 20px -6px rgba(15, 23, 42, 0.08);
}

.comments-title {
    font-size: 1.35rem;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

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

.comment-list .children {
    list-style: none;
    margin: 16px 0 0 24px;
    padding: 0;
}

.comment-item {
    margin-bottom: 20px;
}

.comment-body {
    padding: 18px 20px;
    background: var(--paper);
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.comment-head {
    display: flex;
    gap: 14px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.comment-author {
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--deep);
}

.comment-head time {
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--muted);
}

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

.comment-actions {
    margin-top: 10px;
    font-family: var(--font-head);
    font-size: 0.84rem;
}

.comment-actions a {
    color: var(--accent);
    text-decoration: none;
}

.comment-await {
    font-size: 0.86rem;
    color: var(--muted);
}

.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.84rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--hair);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.96rem;
    color: var(--ink);
    margin-bottom: 16px;
}

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

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.comment-form .submit {
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    cursor: pointer;
    transition: background-color 0.22s ease, box-shadow 0.22s ease;
}

.comment-form .submit:hover {
    background: var(--accent-2);
    box-shadow: 0 6px 22px -6px rgba(14, 165, 233, 0.75);
}

.comment-form .comment-form-cookies-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.comment-form .comment-form-cookies-consent label {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--ink);
}

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

.site-bottom {
    background: var(--deep);
    color: #CBD5E1;
    padding: 56px 0 34px;
    margin-top: 60px;
}

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

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

.footer-col .widget {
    color: #CBD5E1;
    font-size: 0.96rem;
}

.footer-col .widget-title {
    font-size: 1rem;
    color: #F8FAFC;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin-bottom: 0.9em;
}

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

.footer-col .widget li {
    padding: 7px 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.28);
}

.footer-col .widget li:last-child {
    border-bottom: 0;
}

.footer-col .widget a {
    color: #E2E8F0;
    text-decoration: none;
}

.footer-col .widget a:hover {
    color: var(--accent-2);
}

.footer-col .widget .post-date,
.footer-col .widget .rss-date {
    display: block;
    font-family: var(--font-head);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    color: #94A3B8;
}

.footer-rule {
    position: relative;
    height: 1px;
    width: 66%;
    margin: 42px 0 26px 33%;
    background: rgba(148, 163, 184, 0.35);
}

.footer-rule .rhomb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    background: var(--accent);
    transform: rotate(45deg);
}

.copyright {
    margin: 0;
    font-family: var(--font-head);
    font-size: 0.84rem;
    letter-spacing: 0.06em;
    color: #94A3B8;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 18px 26px;
    background: rgba(15, 23, 42, 0.97);
    border-top: 2px solid var(--accent);
    color: #E2E8F0;
}

.cookie-text {
    margin: 0;
    min-width: 0;
    flex: 1 1 320px;
    font-size: 0.92rem;
    line-height: 1.6;
}

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

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

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

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

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

    .nav-list {
        flex-direction: column;
        gap: 4px;
        padding: 12px 0 4px;
    }

    .nav-list li {
        border-bottom: 1px dashed rgba(148, 163, 184, 0.3);
        margin: 0;
    }

    .nav-list a {
        display: block;
        padding: 10px 0;
    }

    .layout-with-sidebar {
        display: block;
    }

    .sidebar {
        margin-top: 42px;
    }

    .layout-single {
        width: 100%;
    }

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

    .stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .stat-cell:nth-child(3) {
        border-left: 0;
        padding-left: 0;
    }

    .hero-meridian {
        left: 78%;
    }
}

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

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

    .page-title { font-size: 1.8rem; }

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

    .polar-block {
        padding: 2.6rem 1.4rem;
    }

    .hero {
        min-height: 440px;
    }

    .hero-inner {
        padding: 3.4rem 0;
    }

    .hero-title {
        max-width: none;
    }

    .tl-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding-left: 44px;
    }

    .tl-mark,
    .tl-mark svg {
        width: 26px;
        height: 26px;
    }

    .timeline::before {
        left: 12px;
    }

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

    .stat-cell {
        border-left: 0;
        padding-left: 0;
        border-top: 1px dashed rgba(148, 163, 184, 0.55);
        padding-top: 16px;
    }

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

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

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

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

    .post-nav-link.next {
        text-align: left;
    }

    .comments-area {
        padding: 22px 18px;
    }

    .entry-content blockquote {
        padding: 1.2rem 1.2rem;
    }

    .cookie-banner {
        padding: 16px 18px;
    }

    body::before {
        display: none;
    }
}
