/*
Theme Name: dds_maunhadepmoi.com
Theme URI: https://maunhadepmoi.com/
Author: Игорь Кудрявцев
Description: Тёмная тема для информационного сайта об архитектуре и частном строительстве. Японский минимализм и чертёжная графика: графитово-синий фон, миллиметровая подложка, выбеленное золото и ржаво-кирпичный акцент.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: arhplan
*/

/* ------------------------------------------------------------------
   1. Переменные и базовый слой
   ------------------------------------------------------------------ */

:root {
    --bg: #12181C;
    --bg-alt: #1A232A;
    --panel: #0B0F12;
    --text: #DFE7EF;
    --accent: #C89B5C;
    --rust: #A8523A;
    --muted: #7A8794;
    --line: #2A353E;
    --display: "Futura", "Century Gothic", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    --body-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --shell: min(92%, 1180px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--body-font);
    font-size: 17px;
    line-height: 1.78;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(223, 231, 239, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(223, 231, 239, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed;
}

body::after {
    content: "";
    position: fixed;
    right: -30px;
    bottom: -20px;
    width: 380px;
    height: 380px;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
    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 240 240' fill='none' stroke='%232A353E' stroke-width='3'%3E%3Cpath d='M40 220V90h60v130'/%3E%3Cpath d='M40 90a30 30 0 0 1 60 0'/%3E%3Cpath d='M30 220h180'/%3E%3Cpath d='M130 220V60h70v160'/%3E%3Cpath d='M130 100h70M130 140h70M130 180h70'/%3E%3Cpath d='M120 40h100M170 40v20'/%3E%3C/svg%3E");
}

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

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

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

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

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

.page-intro {
    margin-bottom: 2.6rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid var(--line);
}

/* ------------------------------------------------------------------
   2. Типографика
   ------------------------------------------------------------------ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1.35;
    color: var(--text);
    margin: 2.2rem 0 1rem;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.14;
    letter-spacing: 0.03em;
    margin-top: 0;
}

h2 {
    font-size: 1.85rem;
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1.15em;
    background: none;
}

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

.entry-content a,
.widget a,
.comment-text a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.entry-content a:hover,
.widget a:hover,
.comment-text a:hover {
    text-decoration-style: solid;
    text-underline-offset: 7px;
}

blockquote {
    margin: 2rem 0;
    padding: 1.6rem 1.8rem;
    background: linear-gradient(160deg, #12181C, #1A232A);
    border-left: 4px solid var(--rust);
}

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

code,
pre {
    font-family: "Consolas", "Courier New", monospace;
    background: #0E1418;
    color: #C9D6E2;
}

pre {
    padding: 1.1rem 1.3rem;
    overflow-x: auto;
    border: 1px solid var(--line);
}

ul,
ol {
    padding-left: 1.4rem;
}

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

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

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

th {
    background: #101A20;
    font-family: var(--display);
    letter-spacing: 0.06em;
    font-weight: 400;
}

/* Чертёжный уголок у заголовков контента */
.entry-content h2,
.entry-content h3 {
    position: relative;
    padding-left: 0.95rem;
}

.entry-content h2::before,
.entry-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: -7px;
    width: 18px;
    height: 1px;
    background: var(--accent);
}

.entry-content h2::after,
.entry-content h3::after {
    content: "";
    position: absolute;
    left: 0;
    top: -7px;
    width: 1px;
    height: 18px;
    background: var(--accent);
}

/* Ржавая метка — даты, номера, мета */
.entry-meta,
.card-meta,
.comment-date,
.widget .post-date {
    color: var(--rust);
    font-variant-caps: small-caps;
    font-size: 0.9rem;
    letter-spacing: 0.14em;
}

.entry-meta a,
.card-meta a {
    color: var(--rust);
    text-decoration: none;
}

.entry-meta a:hover,
.card-meta a:hover {
    color: var(--accent);
}

.meta-sep {
    opacity: 0.6;
    margin: 0 0.25rem;
}

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

.btn {
    display: inline-block;
    padding: 0.72rem 1.7rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    color: var(--accent);
    background: transparent;
    font-family: var(--display);
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.btn:hover,
.btn:focus {
    background: var(--accent);
    color: #12181C;
}

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

.btn-ghost:hover {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

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

.site-top {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    background-image: radial-gradient(rgba(223, 231, 239, 0.05) 1px, transparent 1px);
    background-size: 6px 6px;
}

.site-top-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem 0;
}

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

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

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

.brand-mark {
    display: block;
    width: 54px;
    height: 54px;
}

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

.brand-name {
    display: block;
    font-family: var(--display);
    font-size: 1.02rem;
    letter-spacing: 0.08em;
    color: var(--text);
    line-height: 1.35;
}

.brand-desc {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--muted);
}

.brand a {
    text-decoration: none;
}

.nav-toggle {
    display: none;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    background: transparent;
    color: var(--accent);
    font-family: var(--display);
    letter-spacing: 0.12em;
    cursor: pointer;
}

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

.primary-nav a {
    position: relative;
    display: inline-block;
    padding: 0.2rem 0;
    color: var(--text);
    font-family: var(--display);
    font-size: 0.98rem;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.primary-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: -4px;
    height: 1px;
    background: var(--accent);
    transition: left 0.25s ease, right 0.25s ease;
}

.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after {
    left: 0;
    right: 0;
}

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

/* ------------------------------------------------------------------
   5. Общая раскладка страниц
   ------------------------------------------------------------------ */

.site-main {
    display: block;
    padding-bottom: 4rem;
}

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

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

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

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

.breadcrumbs {
    margin-bottom: 1.8rem;
    font-size: 0.86rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}

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

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

.breadcrumbs .sep {
    margin: 0 0.4rem;
    color: var(--line);
}

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

/* Заголовок секции: асимметрия + вертикальная засечка */
.section-title {
    position: relative;
    margin: 0 0 2.6rem 2.6rem;
    padding-left: 1.3rem;
    font-size: 1.9rem;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 0.09em;
    line-height: 1.6;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 1px;
    background: var(--accent);
}

.section-lead {
    max-width: 62ch;
    margin: -1.4rem 0 2.6rem 3.9rem;
    color: var(--muted);
}

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

.card-list {
    display: block;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 0;
    margin-bottom: 2.2rem;
    transition: transform 0.25s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    bottom: 4px;
    left: 4px;
    border: 1px dashed rgba(200, 155, 92, 0.16);
    pointer-events: none;
    z-index: 2;
}

.card::after {
    content: "";
    position: absolute;
    top: 0;
    right: -4px;
    bottom: 0;
    width: 3px;
    background: var(--rust);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

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

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    background: #0E1418;
}

.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: grayscale(1) contrast(1.18) sepia(0.16) brightness(0.95);
    transition: filter 0.3s ease;
}

.card:hover .card-thumb-wrap img {
    filter: grayscale(0.75) contrast(1.1) sepia(0.1);
}

.card-body {
    flex: 1;
    min-width: 0;
    padding: 1.7rem 1.9rem;
}

.card-title {
    margin: 0.6rem 0 0.8rem;
    font-size: 1.32rem;
    line-height: 1.4;
}

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

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

.card-excerpt {
    color: #C3CDD8;
    font-size: 0.97rem;
}

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

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

@media (min-width: 720px) {
    .card {
        flex-direction: row;
    }

    .card-thumb-wrap {
        flex: 0 0 33%;
        min-height: 230px;
    }

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

    .card-thumb-wrap img {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        object-fit: cover;
    }
}

@media (max-width: 600px) {
    .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;
    }
}

/* ------------------------------------------------------------------
   7. Главная страница
   ------------------------------------------------------------------ */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 92vh;
    padding: 6rem 0;
    background: var(--panel);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0.5;
}

.hero-veil {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 15, 18, 0.55);
    background-image:
        linear-gradient(180deg, rgba(11, 15, 18, 0.8), rgba(18, 24, 28, 0.92)),
        linear-gradient(rgba(223, 231, 239, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(223, 231, 239, 0.05) 1px, transparent 1px);
    background-size: auto, 20px 20px, 20px 20px;
}

.hero-rule {
    position: absolute;
    left: 0;
    right: 0;
    top: 54%;
    height: 1px;
    background: var(--accent);
    opacity: 0.55;
}

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 1.6rem;
    color: var(--rust);
    font-variant-caps: small-caps;
    letter-spacing: 0.28em;
    font-size: 0.9rem;
}

.hero h1 {
    margin: 0 0 3.4rem;
}

.hero-sub {
    max-width: 46ch;
    margin: 3.2rem auto 0;
    color: #C3CDD8;
    font-size: 1.12rem;
    line-height: 1.85;
}

.hero-sub span {
    display: block;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 0.16em;
    font-variant-caps: small-caps;
}

.front-section {
    position: relative;
    padding: 120px 0;
    background: var(--bg);
}

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

.front-section.alt::after {
    content: "";
    position: absolute;
    right: 4%;
    bottom: 30px;
    width: 260px;
    height: 150px;
    opacity: 0.13;
    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 300 170' fill='none' stroke='%23C89B5C' stroke-width='1.5'%3E%3Cpath d='M10 160h280'/%3E%3Cpath d='M40 160V60h80v100'/%3E%3Cpath d='M40 60l40-30 40 30'/%3E%3Cpath d='M150 160V40h60v120'/%3E%3Cpath d='M150 80h60M150 120h60'/%3E%3Cpath d='M230 160V90a30 30 0 0 1 60 0v70'/%3E%3C/svg%3E");
}

.node-divider {
    position: relative;
    width: 60%;
    height: 1px;
    margin: 5rem auto 0;
    background: var(--line);
}

.node-divider::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 11px;
    margin: -6px 0 0 -6px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background-color: var(--bg);
}

.front-section.alt .node-divider::after {
    background-color: var(--bg-alt);
}

/* Таймлайн этапов */
.stage-list {
    position: relative;
    margin: 0;
    padding: 0 0 0 3.4rem;
    list-style: none;
}

.stage-list::before {
    content: "";
    position: absolute;
    left: 0.9rem;
    top: 0.6rem;
    bottom: 0.6rem;
    width: 0;
    border-left: 1px dashed var(--line);
}

.stage-item {
    position: relative;
    min-width: 0;
    margin-bottom: 3rem;
}

.stage-item:last-child {
    margin-bottom: 0;
}

.stage-item::before {
    content: "";
    position: absolute;
    left: -2.9rem;
    top: 0.55rem;
    width: 13px;
    height: 13px;
    border: 1px solid var(--accent);
    background: var(--bg);
    transform: rotate(45deg);
}

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

.stage-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.5rem;
}

.stage-num {
    color: var(--rust);
    font-family: var(--display);
    font-variant-caps: small-caps;
    letter-spacing: 0.2em;
    font-size: 0.95rem;
}

.stage-icon {
    display: block;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
}

.stage-title {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: 0.06em;
}

.stage-item p {
    margin: 0;
    max-width: 68ch;
    color: #C3CDD8;
}

/* Цитата владельца */
.fs-quote {
    width: 70%;
    margin-left: auto;
    margin-right: 0;
    padding: 3rem 3.2rem;
    border-left: 10px solid var(--accent);
    background-color: #151D23;
    background-image:
        linear-gradient(140deg, #12181C, #1A232A),
        radial-gradient(rgba(223, 231, 239, 0.05) 1px, transparent 1px);
    background-size: auto, 4px 4px;
}

.fs-quote-text {
    margin: 0;
    font-family: var(--display);
    font-size: 3rem;
    line-height: 1.28;
    letter-spacing: 0.02em;
}

.fs-quote-sign {
    margin: 2.2rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

.fs-quote-sign strong {
    display: block;
    color: var(--rust);
    font-weight: 400;
    font-variant-caps: small-caps;
    letter-spacing: 0.16em;
    margin-bottom: 0.3rem;
}

.fs-quote-sign a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 5px;
}

.fs-quote-sign a:hover {
    text-decoration-style: solid;
}

/* Рубрикатор 2x2 */
.rubric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.rubric-tile {
    min-width: 0;
    padding: 2.6rem 2.2rem;
    border: 1px solid var(--line);
    background: rgba(11, 15, 18, 0.45);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.rubric-tile:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.rubric-symbol {
    display: block;
    width: 92px;
    height: 92px;
    margin: 0 auto 1.4rem;
}

.rubric-symbol path,
.rubric-symbol circle,
.rubric-symbol polygon {
    fill: transparent;
    stroke: var(--accent);
    stroke-width: 1.5;
    transition: fill 0.3s ease;
}

.rubric-tile:hover .rubric-symbol path,
.rubric-tile:hover .rubric-symbol circle,
.rubric-tile:hover .rubric-symbol polygon {
    fill: rgba(200, 155, 92, 0.2);
}

.rubric-name {
    display: block;
    font-family: var(--display);
    font-size: 1.15rem;
    letter-spacing: 0.14em;
    text-transform: lowercase;
}

.rubric-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.rubric-tile:hover .rubric-desc,
.rubric-tile:focus .rubric-desc {
    max-height: 10rem;
    opacity: 1;
    margin-top: 0.9rem;
}

.front-cta {
    margin-top: 3rem;
    text-align: center;
}

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

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

.sidebar .widget {
    margin-bottom: 2.2rem;
}

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

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

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

.widget li {
    margin-bottom: 0.85rem;
    padding-left: 1.1rem;
    position: relative;
    line-height: 1.55;
}

.widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 5px;
    height: 5px;
    border: 1px solid var(--accent);
}

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

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

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

.sidebar .widget .post-date,
.sidebar .widget .rss-date {
    display: block;
    color: var(--rust);
    font-variant-caps: small-caps;
    letter-spacing: 0.12em;
    font-size: 0.82rem;
}

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

.site-bottom {
    margin-top: 4rem;
    background: var(--panel);
    border-top: 1px solid var(--line);
    color: #C3CDD8;
}

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

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

.site-bottom .widget-title {
    color: var(--text);
    border-bottom-color: var(--line);
}

.site-bottom .widget,
.site-bottom .widget p,
.site-bottom .widget li {
    color: #C3CDD8;
}

.site-bottom .widget a {
    color: #C3CDD8;
    text-decoration: none;
}

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

.site-bottom .widget .post-date {
    color: var(--rust);
}

.footer-note {
    padding: 1.4rem 0 2.4rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.87rem;
    letter-spacing: 0.06em;
}

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

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 3rem 0 1rem;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--text);
    font-family: var(--display);
    font-size: 0.92rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

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

.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #12181C;
}

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

/* ------------------------------------------------------------------
   11. Запись, страница, комментарии, поиск
   ------------------------------------------------------------------ */

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

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

.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    filter: grayscale(1) contrast(1.15) sepia(0.14);
}

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

.entry-tags {
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--muted);
}

.entry-tags a {
    color: var(--accent);
    text-decoration: none;
    margin-right: 0.6rem;
}

.comments-area {
    margin-top: 3.4rem;
    padding: 2rem 2.1rem;
    border: 1px solid var(--line);
    background: var(--bg-alt);
}

.comments-title {
    margin-top: 0;
    font-size: 1.35rem;
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

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

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

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

.comment-head {
    margin-bottom: 0.5rem;
}

.comment-author {
    font-family: var(--display);
    letter-spacing: 0.08em;
    margin-right: 0.8rem;
}

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

.comment-form label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.88rem;
    letter-spacing: 0.08em;
}

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

.comment-form input:focus,
.comment-form textarea:focus,
.search-field:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-form .submit,
.search-submit {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.7rem 1.6rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    background: transparent;
    color: var(--accent);
    font-family: var(--display);
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.comment-form .submit:hover,
.search-submit:hover {
    background: var(--accent);
    color: #12181C;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: flex-start;
}

.search-form .search-field-wrap {
    flex: 1 1 220px;
    min-width: 0;
}

.search-submit {
    margin-top: 0;
}

.no-results {
    padding: 2rem 2.1rem;
    border: 1px solid var(--line);
    background: var(--bg-alt);
}

.error-404 {
    padding: 3rem 2.6rem;
    border: 1px solid var(--line);
    background: var(--bg-alt);
}

.error-404 .code {
    display: block;
    font-family: var(--display);
    font-size: 5rem;
    line-height: 1;
    color: var(--rust);
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.error-404 .search-form {
    margin: 2rem 0;
    max-width: 520px;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.1rem 1.6rem;
    background: var(--panel);
    border-top: 1px solid var(--accent);
    color: #C3CDD8;
    font-size: 0.9rem;
}

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

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

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

@media (max-width: 960px) {
    .layout-with-sidebar {
        display: block;
    }

    .sidebar {
        margin-top: 3rem;
    }

    .layout-single {
        width: 100%;
    }

    .fs-quote {
        width: 100%;
    }

    .fs-quote-text {
        font-size: 2.2rem;
    }

    .front-section {
        padding: 80px 0;
    }

    .hero {
        min-height: 78vh;
    }
}

@media (max-width: 782px) {
    .nav-toggle {
        display: inline-block;
    }

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

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

    .primary-nav ul {
        flex-direction: column;
        gap: 0.9rem;
        padding-top: 0.8rem;
        border-top: 1px solid var(--line);
    }
}

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

    h1 {
        font-size: 2.1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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

    .section-title {
        margin-left: 0;
        font-size: 1.45rem;
    }

    .section-lead {
        margin-left: 1.3rem;
    }

    .front-section {
        padding: 64px 0;
    }

    .fs-quote {
        padding: 1.9rem 1.5rem;
        border-left-width: 6px;
    }

    .fs-quote-text {
        font-size: 1.65rem;
    }

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

    .rubric-tile {
        padding: 2rem 1.5rem;
    }

    .rubric-desc {
        max-height: 12rem;
        opacity: 1;
        margin-top: 0.9rem;
    }

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

    .stage-list {
        padding-left: 2.6rem;
    }

    .stage-item::before {
        left: -2.3rem;
    }

    .comments-area,
    .no-results,
    .error-404 {
        padding: 1.6rem 1.3rem;
    }

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

    .card-body {
        padding: 1.4rem 1.3rem;
    }

    body::after {
        width: 220px;
        height: 220px;
    }
}

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

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