/*
Theme Name: dds_deeppquiz.ru
Author: Алексей Князев
Description: Тема медийно-обучающего портала о веб-разработке, интерактивных решениях и digital-карьере.
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: dpquiz
*/

:root {
    --bg: #F7F9FB;
    --alt: #EAF4F6;
    --dark: #0E2A33;
    --white: #FFFFFF;
    --text: #1A2E35;
    --accent: #00B8A9;
    --coral: #FF6B5A;
    --muted: #6B8A94;
    --line: #D9E8EC;
    --soft: #3C5560;
    --head: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20'%3E%3Cpath d='M0 15 L20 5 L40 15' fill='none' stroke='%23FF6B5A' stroke-opacity='0.04' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* ---------- Скрытие элементов, управляемых JS ---------- */
.cookie-banner[hidden] { display: none !important; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--alt) 0.5px, transparent 0.5px),
        linear-gradient(90deg, var(--alt) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    color: var(--text);
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.7;
    overflow-wrap: break-word;
}

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--head);
    color: var(--text);
    line-height: 1.25;
    margin: 1.6em 0 0.6em;
    font-weight: 700;
    overflow-wrap: break-word;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

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

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

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

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link:focus {
    clip: auto;
    width: auto; height: auto;
    left: 1rem; top: 1rem;
    z-index: 1000;
    background: var(--white);
    color: var(--text);
    padding: 0.6rem 1rem;
    border-radius: 12px;
}

/* Анимированное подчёркивание текстовых ссылок */
.entry-content a,
.breadcrumbs a,
.widget a,
.comment-content a,
.archive-desc a,
.card-more,
.text-link,
.comment-reply a,
.logged-in-as a,
.must-log-in a {
    background-image: linear-gradient(var(--coral), var(--coral));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1.5px;
    padding-bottom: 1px;
    transition: background-size 0.3s ease, color 0.2s ease;
}
.entry-content a:hover,
.breadcrumbs a:hover,
.widget a:hover,
.comment-content a:hover,
.archive-desc a:hover,
.card-more:hover,
.text-link:hover,
.comment-reply a:hover,
.logged-in-as a:hover,
.must-log-in a:hover {
    background-size: 100% 1.5px;
}

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

/* ---------- Полоса сверху ---------- */
.topline {
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--coral));
}

/* ---------- Шапка ---------- */
.site-header {
    background: var(--dark);
    color: #E3F1F4;
}
.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1 1 260px;
    min-width: 0;
    color: var(--white);
}
.brand-mark {
    flex: 0 0 auto;
    display: block;
}
.brand-mark svg { display: block; width: 48px; height: 48px; }
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-text { min-width: 0; display: block; }
.brand-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--head);
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.35;
    color: var(--white);
    max-width: 52ch;
}
.brand-desc {
    display: none;
    margin-top: 0.3rem;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #9FC1C9;
    max-width: 64ch;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nav-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--white);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 0.5rem 0.95rem;
    font: 600 0.9rem/1.2 var(--head);
    cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    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; }

.main-nav {
    flex-basis: 100%;
    display: none;
}
.main-nav.is-open { display: block; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0 0.6rem;
}
.main-nav li { margin: 0; }
.main-nav a {
    display: block;
    padding: 0.6rem 0;
    color: #E3F1F4;
    font: 600 0.95rem/1.3 var(--head);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--coral); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--accent); }
.main-nav .sub-menu { padding: 0 0 0 1rem; }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    padding: 1.4rem 0 0;
    font-size: 0.86rem;
    color: var(--muted);
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs .sep { margin: 0 0.35rem; color: var(--coral); }
.breadcrumbs .current { color: var(--text); }

/* ---------- Раскладки внутренних страниц ---------- */
.page-wrap { padding: 0 0 80px; }
.layout-single,
.layout-with-sidebar { margin-top: 1.6rem; }
.layout-single .content-area {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.content-area { min-width: 0; }
.sidebar { min-width: 0; margin-top: 2.5rem; }

/* ---------- Запись и страница ---------- */
.entry {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.8rem 1.3rem;
    box-shadow: 0 2px 8px rgba(14, 42, 51, 0.06);
}
.entry-header { margin-bottom: 1.4rem; }
.entry-title { margin: 0 0 0.7rem; line-height: 1.15; }
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.86rem;
    color: var(--muted);
}
.entry-meta .meta-cat { color: var(--coral); font-weight: 600; }
.entry-thumb { margin: 0 0 1.8rem; border-radius: 12px; overflow: hidden; }
.entry-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.entry-content { font-size: 1.04rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p,
.entry-content li { hyphens: auto; }
.entry-content h2 {
    position: relative;
    padding-left: 1.15rem;
}
.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}
.entry-content h2:hover::before { animation: dpq-pulse 1.2s ease-in-out infinite; }
.entry-content ul,
.entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content li::marker { color: var(--accent); }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.4rem;
    background: var(--alt);
    border-left: 4px solid var(--coral);
    border-radius: 0 12px 12px 0;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content code {
    background: var(--alt);
    border-radius: 6px;
    padding: 0.1em 0.4em;
    font-size: 0.92em;
}
.entry-content pre {
    background: var(--dark);
    color: #E3F1F4;
    padding: 1.2rem 1.3rem;
    border-radius: 12px;
    overflow-x: auto;
}
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content img { border-radius: 10px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--line);
    font-size: 0.95rem;
}
th, td {
    border: 1px solid var(--line);
    padding: 0.6rem 0.8rem;
    text-align: left;
    vertical-align: top;
}
th { background: var(--alt); font-family: var(--head); font-weight: 600; }
.table-scroll, .wp-block-table { overflow-x: auto; }

.entry-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.entry-tags a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 0.82rem;
    color: var(--text);
    transition: border-color 0.2s, color 0.2s;
}
.entry-tags a:hover { border-color: var(--coral); color: var(--coral); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 12px;
    font: 600 0.95rem/1.25 var(--head);
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--coral);
    border-color: var(--coral);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 169, 0.25);
}
.btn-ghost {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}
.btn-ghost:hover {
    border-color: var(--coral);
    color: var(--coral);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 169, 0.25);
}

/* ---------- Карточки записей ---------- */
.cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(14, 42, 51, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 184, 169, 0.12);
    border-color: var(--accent);
}
.card-thumb { overflow: hidden; }
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background-color: var(--dark);
    background-image: var(--chevron), radial-gradient(circle at 80% 20%, rgba(0, 184, 169, 0.28), transparent 55%);
}
.card-thumb-ph svg { display: block; width: 72px; height: auto; }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.3rem 1.4rem 1.5rem;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    color: var(--muted);
}
.card-tag { color: var(--coral); font-weight: 600; }
.card-pin {
    background: var(--coral);
    color: var(--white);
    border-radius: 6px;
    padding: 0.05rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
}
.card-title {
    margin: 0 0 0.6rem;
    font-size: 1.14rem;
    line-height: 1.35;
}
.card-title a { color: var(--text); transition: color 0.2s ease; }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
    flex: 1;
    font-size: 0.95rem;
    color: var(--soft);
    hyphens: auto;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: var(--accent); }
.card-more {
    align-self: flex-start;
    margin-top: 0.8rem;
    font: 600 0.9rem/1.3 var(--head);
    color: var(--accent);
}

/* ---------- Главная: секции ---------- */
.front-page { position: relative; overflow: hidden; }
.front-blob {
    position: absolute;
    top: -140px;
    right: -160px;
    width: 560px;
    height: 520px;
    background: var(--accent);
    opacity: 0.06;
    filter: blur(48px);
    border-radius: 42% 58% 63% 37% / 45% 39% 61% 55%;
    pointer-events: none;
    z-index: 1;
}
.fs {
    position: relative;
    padding: 80px 0;
}
.fs--alt { background-color: var(--alt); }
.fs--dark {
    background-color: var(--dark);
    background-image: var(--chevron);
    color: #DDEDF0;
}
.fs + .fs::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, 60%);
    height: 4px;
    background-image: radial-gradient(circle, var(--accent) 1.5px, transparent 2px);
    background-size: 8px 4px;
    background-repeat: repeat-x;
    z-index: 2;
}
.front-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.sec-title {
    position: relative;
    margin: 0 0 0.8rem;
    padding-left: 1.25rem;
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
    font-weight: 800;
}
.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}
.fs:hover .sec-title::before { animation: dpq-pulse 1.2s ease-in-out infinite; }
.fs--dark .sec-title { color: var(--white); }
.fs--dark .sec-title::before { background: var(--coral); }
.sec-lead {
    max-width: 62ch;
    margin: 0 0 2.6rem;
    color: var(--muted);
}

@keyframes dpq-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.7); }
}

/* Hero */
.hero { padding: 72px 0 84px; }
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}
.hero-text { min-width: 0; }
.hero-title {
    margin: 0 0 1.1rem;
    font-size: clamp(2.1rem, 1.3rem + 3vw, 3.2rem);
    font-weight: 800;
    line-height: 1.12;
    color: var(--white);
}
.hero-dot {
    display: inline-block;
    width: 0.3em;
    height: 0.3em;
    margin-left: 0.1em;
    border-radius: 50%;
    background: var(--coral);
}
.hero-sub {
    max-width: 52ch;
    margin: 0 0 2rem;
    font-size: 1.08rem;
    color: #B9D3D9;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-art { min-width: 0; }
.hero-art img {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

/* Таймлайн */
.tl {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tl::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 14px;
    width: 2px;
    background-image: linear-gradient(var(--coral) 55%, transparent 55%);
    background-size: 2px 12px;
}
.tl-item {
    position: relative;
    padding-left: 46px;
    margin-bottom: 1.6rem;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 1.75rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px var(--alt);
}
.tl-card {
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    box-shadow: 0 2px 8px rgba(14, 42, 51, 0.06);
}
.tl-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.55rem;
}
.tl-num {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    font: 700 0.95rem/1 var(--head);
}
.tl-title { margin: 0; font-size: 1.15rem; }
.tl-card p { margin: 0; color: var(--soft); }

/* Секция записей */
.fs-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 2.2rem;
}
.fs-head .sec-lead { margin-bottom: 0; }
.empty {
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: 16px;
    padding: 1.6rem 1.5rem;
    color: var(--muted);
}
.empty p:last-child { margin-bottom: 0; }

/* Статистика */
.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.2rem 1.5rem;
}
.stat { min-width: 0; }
.stat-num {
    display: inline-flex;
    align-items: flex-end;
    gap: 0.1em;
    font: 800 clamp(2.4rem, 1.8rem + 2vw, 3.4rem)/1 var(--head);
    color: var(--accent);
}
.stat-dot {
    display: inline-block;
    width: 0.2em;
    height: 0.2em;
    margin-bottom: 0.1em;
    border-radius: 50%;
    background: var(--coral);
}
.stat-label {
    display: block;
    margin-top: 0.7rem;
    font-size: 0.96rem;
    line-height: 1.45;
    color: var(--muted);
}

/* Карта тем */
.topics {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
}
.topic {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    color: var(--text);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.topic:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 184, 169, 0.12);
}
.topic-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    color: var(--accent);
    transition: color 0.25s ease;
}
.topic-icon svg { display: block; width: 44px; height: 44px; }
.topic:hover .topic-icon { color: var(--coral); }
.topic-text { min-width: 0; }
.topic-name {
    display: block;
    margin-bottom: 0.25rem;
    font: 700 1.1rem/1.3 var(--head);
    color: var(--text);
}
.topic-desc {
    display: block;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted);
}

/* ---------- Архивы ---------- */
.archive-head { margin-bottom: 1.8rem; }
.archive-head .page-title { margin: 0 0 0.5rem; }
.archive-desc { color: var(--muted); max-width: 70ch; }

/* ---------- Сайдбар ---------- */
.sidebar .widget {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.5rem 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    hyphens: auto;
}
.sidebar .widget-title {
    position: relative;
    margin: 0 0 1rem;
    padding-left: 1rem;
    font-size: 1.1rem;
    color: var(--text);
}
.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--line);
    line-height: 1.45;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--accent); font-weight: 500; }
.sidebar .widget a:hover { color: var(--coral); }
.sidebar .widget .post-date,
.sidebar .widget .rss-date { display: block; font-size: 0.8rem; color: var(--muted); }
.sidebar .widget p { color: var(--soft); }

/* ---------- Подвал ---------- */
.site-footer {
    background-color: var(--dark);
    background-image: var(--chevron);
    color: #C4DADF;
    padding: 64px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
}
.footer-col { min-width: 0; }
.site-footer .widget { color: #C4DADF; font-size: 0.94rem; hyphens: auto; }
.site-footer .widget p { color: #C4DADF; }
.site-footer .widget-title {
    position: relative;
    margin: 0 0 1rem;
    padding-left: 1rem;
    font-size: 1.05rem;
    color: var(--white);
}
.site-footer .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--coral);
}
.site-footer .widget li { padding: 0.3rem 0; }
.site-footer .widget a { color: #7FE0D7; }
.site-footer .widget a:hover { color: #FFB1A7; }
.site-footer .widget .post-date { color: #8FB0B8; }
.footer-bottom {
    margin-top: 48px;
    padding: 1.4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: #8FB0B8;
}

/* ---------- Пагинация ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.6rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--text);
    font: 600 0.92rem/1 var(--head);
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.pagination a.page-numbers:hover {
    border-color: var(--coral);
    color: var(--coral);
    transform: translateY(-2px);
}
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}
.pagination .page-numbers.dots {
    border: 0;
    background: none;
    min-width: 0;
    padding: 0 0.3rem;
}

/* ---------- Поиск ---------- */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-width: 560px;
}
.search-field {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--text);
    font: 400 1rem/1.3 var(--body);
}
.search-field:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.18); }
.sidebar .search-form { max-width: none; }

/* ---------- 404 ---------- */
.page-404 { text-align: left; }
.code-404 {
    display: inline-flex;
    align-items: flex-end;
    gap: 0.06em;
    margin: 0 0 0.4rem;
    font: 800 clamp(4rem, 3rem + 5vw, 7rem)/1 var(--head);
    color: var(--accent);
}
.code-404 .stat-dot { width: 0.16em; height: 0.16em; }
.page-404 .search-form { margin: 1.6rem 0; }

/* ---------- Комментарии ---------- */
.comments {
    margin-top: 2.4rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.8rem 1.3rem;
}
.comments-title { margin: 0 0 1.2rem; font-size: 1.4rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: 1.2rem; border-left: 2px solid var(--alt); margin-left: 0.6rem; }
.comment-card {
    padding: 1.1rem 0;
    border-bottom: 1px dashed var(--line);
}
.comment-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.comment-head img { display: block; border-radius: 50%; }
.comment-who { display: flex; flex-direction: column; min-width: 0; }
.comment-author-name { font: 600 0.95rem/1.3 var(--head); color: var(--text); }
.comment-author-name a { color: var(--text); }
.comment-who time { font-size: 0.8rem; color: var(--muted); }
.comment-await { font-size: 0.86rem; color: var(--coral); }
.comment-content p:last-child { margin-bottom: 0.4rem; }
.comment-reply a { font: 600 0.85rem/1.3 var(--head); color: var(--accent); }
.comment-respond { margin-top: 1.6rem; }
.comment-reply-title { font-size: 1.3rem; margin: 0 0 0.8rem; }
.comment-reply-title small { margin-left: 0.6rem; font-size: 0.8rem; }
.comment-notes, .logged-in-as, .must-log-in { font-size: 0.88rem; color: var(--muted); }
.comment-form label { display: block; margin-bottom: 0.3rem; font: 600 0.9rem/1.3 var(--head); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.5 var(--body);
}
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.18); }
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font: 400 0.86rem/1.4 var(--body); color: var(--muted); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.comments-closed { color: var(--muted); }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 999;
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.4rem;
    padding: 1.1rem 1.4rem;
    background: var(--dark);
    color: #DDEDF0;
    border-top: 3px solid var(--accent);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(14, 42, 51, 0.3);
}
.cookie-banner p {
    flex: 1 1 280px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* WordPress-классы */
.alignleft { float: left; margin: 0.3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: 0.3rem 0 1rem 1.4rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 0.85rem; color: var(--muted); }
.sticky { position: relative; }
.bypostauthor { position: relative; }
.gallery-caption { font-size: 0.85rem; }

/* ---------- ≥ 600px ---------- */
@media (min-width: 600px) {
    .brand-desc { display: -webkit-box; }
    .entry { padding: 2.6rem 2.6rem; }
    .comments { padding: 2rem 2.2rem; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .front-inner { width: 92%; }
}

/* ---------- ≥ 960px ---------- */
@media (min-width: 960px) {
    .nav-toggle { display: none; }
    .main-nav { display: block; flex-basis: auto; }
    .main-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem 1.6rem;
        padding: 0;
    }
    .main-nav a {
        position: relative;
        padding: 0.4rem 0;
        border-bottom: 0;
    }
    .main-nav .current-menu-item > a::after,
    .main-nav .current_page_item > a::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -2px;
        height: 2px;
        border-radius: 2px;
        background: var(--accent);
    }
    .main-nav .sub-menu { display: none; }

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

    .front-inner { width: 85%; }
    .sec-title { margin-left: -2rem; padding-left: 1.25rem; }
    .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .hero { padding: 96px 0 104px; }
    .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3rem; }

    .tl::before { left: 50%; transform: translateX(-1px); }
    .tl-item { width: 50%; padding-left: 0; margin-bottom: 1.2rem; }
    .tl-item:nth-child(odd) { margin-left: 50%; padding-left: 44px; }
    .tl-item:nth-child(even) { padding-right: 44px; }
    .tl-item:nth-child(odd)::before { left: -8px; }
    .tl-item:nth-child(even)::before { left: auto; right: -8px; }

    .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Мобильные отступы плашек ---------- */
@media (max-width: 599px) {
    .fs { padding: 64px 0; }
    .entry { padding: 1.6rem 1.2rem; }
    .tl-card { padding: 1.2rem 1.2rem; }
    .topic { padding: 1.2rem 1.2rem; }
    .cookie-banner { padding: 1rem 1.2rem; }
    .cookie-banner .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
