/*
Theme Name: dds_ernest-nsk.ru
Theme URI: https://ernest-nsk.ru/
Author: Елена Воронцова
Description: Тема информационно-образовательного портала о дизайне одежды и аксессуаров: учебные заведения, профессии, интервью, гид по обучению и карьере. Стиль «Ателье-графика».
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ernest
*/

/* ===== Токены ===== */
:root {
    --paper: #FDFBF7;
    --mint: #EAF6F6;
    --deep: #0E3B43;
    --sand: #F4F0EA;
    --sand-strong: #E3CFAE;
    --ink: #1C2B2D;
    --coral: #FF6B4A;
    --teal: #00A8A8;
    --teal-text: #007C80;
    --teal-light: #7EDCDC;
    --muted: #6B7B7D;
    --serif: "Prata", "Playfair Display", Georgia, "Times New Roman", serif;
    --sans: "Golos Text", "Segoe UI", Roboto, Arial, sans-serif;
    --cut: 10px;
}

/* ===== Сброс и база ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    background-color: var(--paper);
    background-image: repeating-linear-gradient(45deg, var(--mint) 0, var(--mint) 1px, transparent 1px, transparent 20px);
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Силуэт швейной машины в правом нижнем углу */
body::after {
    content: "";
    position: fixed;
    right: 24px;
    bottom: 16px;
    width: 300px;
    height: 220px;
    pointer-events: none;
    z-index: -1;
    opacity: .04;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 220'%3E%3Cg fill='%230E3B43'%3E%3Cpath d='M40 40h190c22 0 40 18 40 40v100h-40V92c0-6-4-10-10-10H120v28h-30V82H60c-11 0-20-9-20-20z'/%3E%3Crect x='86' y='108' width='38' height='22' rx='3'/%3E%3Crect x='100' y='130' width='6' height='36'/%3E%3Crect x='10' y='176' width='280' height='20' rx='4'/%3E%3Ccircle cx='250' cy='60' r='26'/%3E%3Crect x='150' y='20' width='14' height='22' rx='3'/%3E%3C/g%3E%3C/svg%3E");
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.2;
    color: var(--ink);
    margin: 1.6em 0 .6em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: .35em; }

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

table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; border: 2px solid var(--deep); }
th, td { border: 1px solid var(--deep); padding: .6em .8em; text-align: left; vertical-align: top; }
th { background: var(--mint); font-weight: 600; }

pre { overflow-x: auto; background: var(--sand); padding: 1em 1.2em; border-radius: 4px; }
code { font-size: .92em; }
hr { border: 0; border-top: 2px dashed var(--teal); margin: 2.5em 0; }

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

.skip-to {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    background: var(--coral);
    color: #fff;
    padding: .6em 1em;
    border-radius: 4px;
}
.skip-to:focus { top: 12px; }

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

/* ===== Контейнер ===== */
.shell { width: min(92%, 1180px); margin-inline: auto; }
.shell-front { width: min(85%, 1240px); }

/* ===== Анимированное подчёркивание ссылок ===== */
.entry-content a,
.page-intro a,
.crumbs a,
.sidebar .widget a,
.notes a,
.lost a:not(.btn),
.empty-state a:not(.btn),
.card-title a,
.card-more,
.post-step,
.colophon .widget a {
    background-image: linear-gradient(var(--coral), var(--coral));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size .3s ease, color .2s ease;
    padding-bottom: 2px;
}
.entry-content a:hover,
.page-intro a:hover,
.crumbs a:hover,
.sidebar .widget a:hover,
.notes a:hover,
.lost a:not(.btn):hover,
.empty-state a:not(.btn):hover,
.card-title a:hover,
.card-more:hover,
.post-step:hover,
.colophon .widget a:hover {
    background-size: 100% 2px;
}

/* ===== Полоса-тесьма сверху ===== */
.tape {
    height: 6px;
    background: repeating-linear-gradient(90deg,
        var(--coral) 0 48px,
        var(--teal) 48px 96px,
        var(--sand-strong) 96px 144px,
        var(--deep) 144px 192px);
}

/* ===== Шапка ===== */
.masthead {
    background-color: var(--deep);
    color: #fff;
    border-bottom: 2px dashed rgba(126, 220, 220, .35);
}
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    color: #fff;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 760px;
}
.brand-mark { flex: 0 0 56px; }
.brand-logo { width: 56px; height: 56px; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.3;
    color: #fff;
}
.brand-desc {
    font-size: .78rem;
    line-height: 1.4;
    color: var(--teal-light);
    margin-top: .25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.4rem;
}
.site-nav-list li { margin: 0; }
.site-nav-list a {
    display: inline-block;
    color: #fff;
    font-weight: 500;
    padding: .35em 0;
    background-image: linear-gradient(var(--coral), var(--coral));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size .3s ease;
}
.site-nav-list a:hover,
.site-nav-list .current-menu-item > a { background-size: 100% 2px; }

.nav-toggle {
    display: none;
    align-items: center;
    gap: .55rem;
    background: transparent;
    border: 2px solid var(--teal);
    border-radius: 4px;
    color: #fff;
    padding: .5em .8em;
    font: 600 .95rem var(--sans);
    cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ===== Кнопки: скошенный правый верхний угол ===== */
.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .85em 1.6em;
    font: 600 1rem/1.2 var(--sans);
    color: #fff;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: center;
    transition: transform .2s ease;
}
.btn::before,
.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 4px;
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.btn::before { z-index: -1; background: var(--coral); }
.btn::after {
    z-index: -2;
    background: var(--coral);
    opacity: 0;
    transform: translate(0, 0);
    transition: opacity .2s ease, transform .2s ease;
}
.btn:hover { transform: translate(2px, -2px); }
.btn:hover::after { opacity: 1; transform: translate(-4px, 4px); }

.btn-fill { color: #fff; }

.btn-line { color: var(--teal-text); }
.btn-line::before,
.btn-line::after {
    background: linear-gradient(225deg, transparent 0 7px, var(--teal) 7px 9px, transparent 9px);
    border: 2px solid var(--teal);
}
.btn-line::after { background-color: transparent; }
.btn-on-dark { color: #fff; }

.btn-dark { color: #fff; }
.btn-dark::before,
.btn-dark::after { background: var(--deep); }

/* ===== Пунктир с пуговицами ===== */
.stitch {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2.2rem 0;
}
.stitch::before,
.stitch::after {
    content: "";
    flex: 1 1 auto;
    border-top: 2px dashed var(--teal);
}
.stitch i {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 50%, var(--paper) 0 1.4px, transparent 1.6px),
        radial-gradient(circle at 65% 50%, var(--paper) 0 1.4px, transparent 1.6px),
        var(--coral);
}
.stitch-light::before,
.stitch-light::after { border-top-color: rgba(126, 220, 220, .55); }
.stitch-light i {
    background:
        radial-gradient(circle at 35% 50%, var(--deep) 0 1.4px, transparent 1.6px),
        radial-gradient(circle at 65% 50%, var(--deep) 0 1.4px, transparent 1.6px),
        var(--coral);
}

/* ===== Заголовки секций с точкой ===== */
.section-title {
    position: relative;
    font-size: 2.4rem;
    margin: 0 0 .5em;
    padding: 0;
}
.section-title::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: .42em;
    width: .9rem;
    height: .9rem;
    border-radius: 50%;
    background: var(--teal);
}
.section-title.dot-coral::before { background: var(--coral); }
.section-lead { color: var(--muted); max-width: 62ch; margin-bottom: 2.2rem; }

/* ===== H2/H3 в тексте: вертикальная «меловая» полоса ===== */
.entry-content h2,
.entry-content h3,
.notes-title,
.comment-reply-title {
    position: relative;
    padding-left: 1.2rem;
}
.entry-content h2::before,
.entry-content h3::before,
.notes-title::before,
.comment-reply-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: var(--coral);
    clip-path: polygon(0 6px, 100% 0, 100% 100%, 0 100%);
}
.entry-content h3::before { background: var(--teal); }

/* ===== Цитаты: кавычка-пуговица ===== */
blockquote,
.wp-block-quote {
    position: relative;
    margin: 2em 0;
    padding: 1.6rem 1.8rem 1.6rem 5.2rem;
    background: var(--mint);
    border: 2px solid var(--deep);
    border-radius: 4px;
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.55;
}
blockquote::before,
.wp-block-quote::before {
    content: "";
    position: absolute;
    left: 1.4rem;
    top: 1.5rem;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 38% 38%, var(--mint) 0 2.6px, transparent 3px),
        radial-gradient(circle at 62% 38%, var(--mint) 0 2.6px, transparent 3px),
        radial-gradient(circle at 38% 62%, var(--mint) 0 2.6px, transparent 3px),
        radial-gradient(circle at 62% 62%, var(--mint) 0 2.6px, transparent 3px),
        radial-gradient(circle, transparent 0 62%, rgba(14, 59, 67, .25) 63% 68%, transparent 69%),
        var(--coral);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; margin-top: .6em; font: 500 .9rem var(--sans); color: var(--muted); font-style: normal; }

/* ===== Теги ===== */
.tag {
    display: inline-block;
    padding: .2em .65em;
    font: 600 .78rem/1.4 var(--sans);
    color: #fff;
    background: var(--teal-text);
    border-radius: 3px;
}
.tag-coral { background: #E14E2D; }
.tag-teal { background: var(--teal-text); }
.tag-ghost { background: transparent; color: var(--teal-text); border: 2px solid var(--teal); }
.tone-coral .card-meta .tag { background: #E14E2D; }

/* ===== Hero ===== */
.hero {
    background-color: var(--deep);
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1.2px, transparent 1.6px);
    background-size: 12px 12px;
    color: #fff;
    padding: 4.5rem 0 .5rem;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}
.hero-copy { min-width: 0; }
.hero-title {
    font-size: 3.5rem;
    line-height: 1.08;
    color: #fff;
    margin: 0 0 1.2rem;
    letter-spacing: -.01em;
}
.hero-sub {
    color: var(--coral);
    font-size: 1.2rem;
    line-height: 1.55;
    max-width: 38ch;
    margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.2rem; }
.hero-art { min-width: 0; justify-self: center; width: 100%; max-width: 440px; }
.hero-art svg { width: 100%; height: auto; display: block; }
.hero .stitch { margin: 3rem 0 1.5rem; }

/* ===== Секции главной ===== */
.front-section { padding: 4.5rem 0; }
.paths { background-color: var(--mint); }
.latest { padding-top: 1rem; }
.facts { background-color: var(--mint); }
.latest-all { margin: 2.4rem 0 0; }

/* Карточки направлений */
.path-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.path-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 2px solid var(--deep);
    border-radius: 4px;
    box-shadow: 6px 6px 0 var(--teal);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.path-card.tone-coral { box-shadow: 6px 6px 0 var(--coral); }
.path-card:hover { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--teal); }
.path-card.tone-coral:hover { box-shadow: 10px 10px 0 var(--coral); }
.path-thumb img {
    width: 100%;
    aspect-ratio: 5 / 3;
    object-fit: cover;
    display: block;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
}
.path-body { flex: 1; padding: 1rem 1.4rem 1.5rem; min-width: 0; }
.path-title { font-size: 1.3rem; margin: .7rem 0 .5rem; }
.path-body p { color: var(--muted); font-size: .97rem; margin: 0; }

/* Статистика */
.facts-row {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fact {
    margin: 0;
    padding: .6rem 1.6rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.fact + .fact { border-left: 2px dashed var(--teal); }
.fact:first-child { padding-left: 0; }
.fact-num {
    font-family: var(--serif);
    font-size: 3.6rem;
    line-height: 1;
    color: var(--coral);
}
.fact-label { color: var(--muted); font-size: 1rem; line-height: 1.4; }

/* CTA */
.cta-wrap { padding-top: 5rem; }
.cta {
    position: relative;
    overflow: hidden;
    background-color: var(--coral);
    border-radius: 4px;
    padding: 3.6rem 2.4rem;
    text-align: center;
}
.cta-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.cta-title { color: #fff; font-size: 2.6rem; margin: 0 0 .8rem; }
.cta-sub { color: var(--deep); font-size: 1.12rem; font-weight: 500; margin-bottom: 2rem; }
.cta-deco { position: absolute; width: 130px; height: 130px; opacity: .85; pointer-events: none; }
.cta-deco-left { left: 1.6rem; bottom: 1.2rem; }
.cta-deco-right { right: 1.6rem; top: 1.2rem; }
.cta .btn-dark:hover::after { transform: translate(-4px, 4px); }

/* ===== Карточки записей ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}
.card-grid-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 2px solid var(--deep);
    border-radius: 4px;
    box-shadow: 6px 6px 0 var(--teal);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.card.tone-coral { box-shadow: 6px 6px 0 var(--coral); }
.card:hover { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--teal); }
.card.tone-coral:hover { box-shadow: 10px 10px 0 var(--coral); }
.card.sticky { outline: 3px dashed var(--coral); outline-offset: 5px; }

.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: .9rem 1.4rem 1.5rem;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .8rem;
    font-size: .85rem;
    color: var(--muted);
}
.card-meta .tag { color: #fff; }
.card-title { font-size: 1.3rem; margin: .7rem 0 .55rem; }
.card-title a { color: var(--ink); }
.card-excerpt { color: #3E4F51; font-size: .97rem; flex: 1; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more { align-self: flex-start; margin-top: .6rem; font-weight: 600; color: var(--teal-text); }

/* ===== Внутренние страницы ===== */
.page-wrap { padding: 2rem 0 4.5rem; }

.crumbs {
    font-size: .9rem;
    color: var(--muted);
    margin: 0 0 2rem;
}
.crumbs-sep { color: var(--coral); margin: 0 .35em; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.layout-single { display: block; }
.layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 2.2rem; }
.page-title { font-size: 2.6rem; margin: 0 0 .5rem; }
.page-intro { color: var(--muted); font-size: 1.1rem; max-width: 62ch; }

.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; color: var(--muted); font-size: .92rem; }
.entry-cover { margin: 0 0 2rem; }
.entry-cover img {
    width: 100%;
    border: 2px solid var(--deep);
    border-radius: 4px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}
.entry-content { font-size: 1.08rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 4px; }
.entry-content ul li::marker { color: var(--coral); }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { font-size: .88rem; color: var(--muted); margin-top: .5em; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.entry-tags .tag-ghost { padding: .25em .7em; background-image: none; }

.post-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
    margin: 3rem 0;
}
.post-step {
    display: block;
    padding: 1.1rem 1.3rem;
    border: 2px solid var(--deep);
    border-radius: 4px;
    background-color: #fff;
    color: var(--ink);
    font-family: var(--serif);
    min-width: 0;
    background-position: 1.3rem calc(100% - .8rem);
}
.post-step:hover { background-size: 40% 2px; }
.post-step span { display: block; font: 600 .8rem var(--sans); color: var(--teal-text); margin-bottom: .3rem; }
.post-step-next { text-align: right; grid-column: 2; }

/* ===== Сайдбар ===== */
.sidebar {
    background-color: var(--sand);
    border: 2px solid var(--deep);
    border-radius: 4px;
    padding: 1.6rem 1.5rem;
    min-width: 0;
    color: var(--ink);
}
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.widget-title {
    position: relative;
    font-size: 1.25rem;
    margin: 0 0 1rem;
    padding-left: 1rem;
}
.widget-title::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 8px;
    background: var(--coral);
    clip-path: polygon(0 5px, 100% 0, 100% 100%, 0 100%);
}
.sidebar .widget-title { color: var(--ink); }
.sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar .widget li {
    padding: .55rem 0;
    border-bottom: 2px dashed rgba(0, 168, 168, .35);
    margin: 0;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: #005F63; font-weight: 500; }
.sidebar .widget .post-date,
.sidebar .widget .rss-date { display: block; color: var(--muted); font-size: .82rem; }
.sidebar .widget p { color: var(--ink); }
.sidebar .search-form { flex-wrap: wrap; }

/* ===== Подвал ===== */
.colophon {
    background-color: var(--deep);
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1.2px, transparent 1.6px);
    background-size: 12px 12px;
    color: #DCEFEF;
    padding: 1rem 0 0;
    margin-top: 0;
}
.colophon .stitch { width: min(92%, 1180px); margin: 1.4rem auto 2.6rem; }
.colophon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1.6rem; }
.colophon .widget-title { color: #fff; }
.colophon .widget p,
.colophon .widget li,
.colophon .textwidget { color: #DCEFEF; font-size: .96rem; }
.colophon .widget a { color: var(--teal-light); }
.colophon .widget ul { list-style: none; padding: 0; margin: 0; }
.colophon .widget li { margin-bottom: .55rem; }
.colophon .widget .post-date { color: #A9C8C8; }
.colophon-copy {
    border-top: 2px dashed rgba(126, 220, 220, .3);
    padding: 1.2rem 0 1.6rem;
    font-size: .88rem;
    color: #A9C8C8;
}
.colophon-copy p { margin: 0; }

/* ===== Пагинация (type => plain) ===== */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    margin: 3rem 0 0;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    height: 2.7rem;
    padding: 0 .9rem;
    border: 2px solid var(--deep);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease;
}
.pager a.page-numbers:hover { transform: translate(2px, -2px); box-shadow: -4px 4px 0 var(--teal); }
.pager .page-numbers.current { background: var(--coral); border-color: var(--coral); color: #fff; }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 .2rem; }

/* ===== Поиск ===== */
.search-form { display: flex; gap: .6rem; margin: 1.4rem 0; max-width: 520px; }
.search-field {
    flex: 1 1 auto;
    min-width: 0;
    padding: .8em 1em;
    border: 2px solid var(--deep);
    border-radius: 4px;
    background: #fff;
    font: 1rem var(--sans);
    color: var(--ink);
}
.search-field:focus { outline: 3px solid var(--teal); outline-offset: 1px; }

/* ===== 404 и пустые состояния ===== */
.lost { text-align: left; }
.lost-code {
    font-family: var(--serif);
    font-size: 7rem;
    line-height: 1;
    color: var(--coral);
    margin: 0 0 .5rem;
    text-shadow: 6px 6px 0 var(--mint);
}
.empty-state { padding: 1.6rem 1.8rem; background: #fff; border: 2px dashed var(--teal); border-radius: 4px; }

/* ===== Комментарии ===== */
.notes { margin-top: 3rem; padding-top: 2rem; border-top: 2px dashed var(--teal); }
.notes-list, .notes-list .children { list-style: none; padding: 0; margin: 0; }
.notes-list .children { margin-left: 2rem; }
.note-body {
    background: #fff;
    border: 2px solid var(--deep);
    border-radius: 4px;
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.2rem;
}
.note-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.note-head img { border-radius: 50%; }
.note-author { display: block; }
.note-date { font-size: .82rem; color: var(--muted); }
.note-wait { color: #C2411F; font-size: .9rem; }
.note-reply a { font-weight: 600; }
.comment-respond { margin-top: 2rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .75em .9em;
    border: 2px solid var(--deep);
    border-radius: 4px;
    font: 1rem var(--sans);
    background: #fff;
}
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form .submit {
    padding: .85em 1.6em;
    border: 0;
    border-radius: 4px;
    background: var(--coral);
    color: #fff;
    font: 600 1rem var(--sans);
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
    transition: transform .2s ease;
}
.comment-form .submit:hover { transform: translate(2px, -2px); }

/* ===== WordPress-классы ===== */
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .88rem; color: var(--muted); }
.bypostauthor > .note-body { border-color: var(--teal); }

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    max-width: 880px;
    margin: 0 auto;
    padding: 1.1rem 1.4rem;
    background: var(--deep);
    color: #fff;
    border: 2px solid var(--teal);
    border-radius: 4px;
    box-shadow: 6px 6px 0 var(--coral);
}
.cookie-text { margin: 0; font-size: .92rem; line-height: 1.5; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .masthead-row { flex-wrap: wrap; }
    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }
    .site-nav-list { flex-direction: column; gap: 0; padding: .6rem 0 .3rem; }
    .site-nav-list li { border-top: 1px dashed rgba(126, 220, 220, .35); }
    .site-nav-list a { display: block; padding: .7em 0; }

    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .hero-art { max-width: 340px; justify-self: start; }
    .hero-title { font-size: 2.8rem; }

    .path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

    .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
    .fact:nth-child(3) { border-left: 0; padding-left: 0; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 3rem; }
    .layout-single > .content-area { width: 100%; }

    .colophon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cta-deco { width: 90px; height: 90px; opacity: .6; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .shell-front { width: min(92%, 1240px); }
    .brand-desc { display: none; }
    .brand-name { font-size: .9rem; }
    .brand-mark { flex-basis: 44px; }
    .brand-logo { width: 44px; height: 44px; }

    .hero { padding-top: 3rem; }
    .hero-title { font-size: 2.15rem; }
    .hero-sub { font-size: 1.05rem; }

    .section-title { font-size: 1.85rem; padding-left: 1.3rem; }
    .section-title::before { left: 0; width: .7rem; height: .7rem; }

    .front-section { padding: 3rem 0; }
    .path-grid,
    .card-grid { grid-template-columns: minmax(0, 1fr); }

    .facts-row { grid-template-columns: minmax(0, 1fr); row-gap: 1.4rem; }
    .fact { padding: 0 0 1.4rem; border-left: 0; }
    .fact + .fact { border-left: 0; border-top: 2px dashed var(--teal); padding-top: 1.4rem; padding-left: 0; }
    .fact-num { font-size: 2.8rem; }

    .cta { padding: 2.6rem 1.4rem 4.4rem; }
    .cta-title { font-size: 1.85rem; }
    .cta-deco { width: 64px; height: 64px; }
    .cta-deco-left { left: .8rem; bottom: .8rem; }
    .cta-deco-right { right: .8rem; top: auto; bottom: .8rem; }

    .page-title { font-size: 2rem; }
    .colophon-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .post-steps { grid-template-columns: minmax(0, 1fr); }
    .post-step-next { grid-column: auto; }

    blockquote, .wp-block-quote { padding: 4.4rem 1.2rem 1.3rem; }
    blockquote::before, .wp-block-quote::before { left: 1.2rem; top: 1.2rem; }

    .search-form { flex-direction: column; }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.1rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
    body::after { width: 160px; height: 120px; }
}
