/*
Theme Name: dds_nagm.ru
Author: Артём Нагибин
Description: Тёмная тема «digital workshop» для образовательной платформы по разработке мобильных игр: графитовый фон с сеткой, неоново-бирюзовые и лаймовые акценты.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
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: nagm
*/

/* ==========================================================
   Токены
   ========================================================== */
:root {
    --bg: #12151c;
    --bg-alt: #181d27;
    --head: #0d1017;
    --foot: #0a0d12;
    --side: #161b24;
    --line: #2a3140;
    --grid: #1e2430;
    --grid-alt: #232a38;
    --chip: #1e2430;
    --text: #e8edf5;
    --text-soft: #c3cbd8;
    --muted: #7a8599;
    --accent: #2ee6c8;
    --accent-hi: #5cf0d8;
    --lime: #a3e635;
    --f-head: "Unbounded", "Space Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --f-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --r-card: 12px;
    --r-btn: 8px;
}

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

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

body {
    margin: 0;
    position: relative;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text);
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Полоса-«индикатор загрузки» по верхнему краю */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2ee6c8, #a3e635);
    z-index: 60;
}

/* Силуэт контроллера в правом нижнем углу */
body::after {
    content: "";
    position: fixed;
    right: 2%;
    bottom: 3%;
    width: min(420px, 42%);
    aspect-ratio: 3 / 2;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 200' fill='none' stroke='%23e8edf5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M78 40h144c34 0 56 26 64 70l8 44c4 24-14 40-34 34-12-4-20-14-30-28l-14-18H84l-14 18c-10 14-18 24-30 28-20 6-38-10-34-34l8-44c8-44 30-70 64-70z'/%3E%3Cpath d='M70 82v36M52 100h36'/%3E%3Ccircle cx='222' cy='84' r='9'/%3E%3Ccircle cx='246' cy='106' r='9'/%3E%3Ccircle cx='198' cy='106' r='9'/%3E%3Ccircle cx='222' cy='128' r='9'/%3E%3Ccircle cx='120' cy='132' r='16'/%3E%3Ccircle cx='180' cy='132' r='16'/%3E%3Cpath d='M136 72h28'/%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.03;
    pointer-events: none;
    z-index: 5;
}

.site {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

img,
svg,
video {
    max-width: 100%;
}

img {
    height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--f-head);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 1.6em 0 0.6em;
    overflow-wrap: break-word;
    hyphens: auto;
}

h1 {
    font-size: 2.1rem;
    line-height: 1.1;
}

h2 {
    font-size: 1.6rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.08rem;
}

p {
    margin: 0 0 1.1em;
}

p,
li,
dd,
blockquote,
figcaption {
    overflow-wrap: break-word;
    hyphens: auto;
}

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

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

[tabindex="-1"]:focus {
    outline: none;
}

/* Текстовые ссылки: подчёркивание растёт снизу вверх + свечение */
.text-link,
.entry-content a:not(.btn):not(.chip),
.card-title a,
.card-more,
.breadcrumbs a,
.widget a,
.comment-notes a,
.logged-in-as a,
.must-log-in a,
.archive-desc a {
    background-image: linear-gradient(#2ee6c8, #2ee6c8);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 0;
    padding-bottom: 2px;
    transition: background-size 0.25s ease, text-shadow 0.25s ease, color 0.2s ease;
}

.text-link:hover,
.entry-content a:not(.btn):not(.chip):hover,
.card-title a:hover,
.card-more:hover,
.breadcrumbs a:hover,
.widget a:hover,
.comment-notes a:hover,
.logged-in-as a:hover,
.must-log-in a:hover,
.archive-desc a:hover {
    background-size: 100% 2px;
    color: var(--accent);
    text-shadow: 0 0 8px rgba(46, 230, 200, 0.45);
}

.text-link {
    font-weight: 600;
}

.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;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 200;
    background: var(--accent);
    color: #12151c;
    padding: 0.6rem 1rem;
    border-radius: var(--r-btn);
    font-weight: 600;
}

.skip-link:focus {
    top: 1rem;
}

/* Контейнер ширины — единственное место ограничения */
.shell {
    width: min(92%, 1240px);
    margin-inline: auto;
}

.shell--front {
    width: 92%;
}

/* ==========================================================
   Кнопки
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.8rem 1.4rem;
    border: 1.5px solid transparent;
    border-radius: var(--r-btn);
    font-family: var(--f-body);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn--fill {
    background: #2ee6c8;
    border-color: #2ee6c8;
    color: #12151c;
}

.btn--fill:hover,
.btn--fill:focus-visible {
    background: #5cf0d8;
    border-color: #5cf0d8;
    color: #12151c;
    box-shadow: 0 0 12px rgba(46, 230, 200, 0.4);
}

.btn--ghost {
    background: transparent;
    border-color: #2ee6c8;
    color: #2ee6c8;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
    background: #2ee6c8;
    color: #12151c;
}

/* Чипы рубрик */
.chip {
    display: inline-block;
    padding: 0.16rem 0.55rem;
    border-radius: 4px;
    background: var(--chip);
    color: var(--lime);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a.chip:hover,
a.chip:focus-visible {
    background: #2ee6c8;
    color: #12151c;
}

.chip--pin {
    color: var(--accent);
}

/* ==========================================================
   Шапка
   ========================================================== */
.masthead {
    position: relative;
    background: var(--head);
    border-bottom: 1px solid var(--line);
}

.masthead-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: 1.15rem 0;
}

.brand {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    flex: 1 1 0;
    min-width: 0;
}

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

.brand-svg {
    display: block;
    width: 44px;
    height: 44px;
}

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

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

.brand-name {
    display: block;
    font-family: var(--f-head);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    overflow-wrap: break-word;
    hyphens: auto;
}

.brand-name:hover {
    color: var(--accent);
}

.brand-tagline {
    display: none;
    margin: 0.35rem 0 0;
    max-width: 78ch;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--muted);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-btn);
    background: transparent;
    color: var(--text);
    font: 600 0.9rem/1 var(--f-body);
    cursor: pointer;
}

.nav-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.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;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

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

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

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0 0.2rem;
    border-top: 1px solid var(--line);
}

.primary-menu a {
    display: block;
    padding: 0.7rem 0;
    color: var(--text);
    font-weight: 500;
    font-size: 0.98rem;
    border-bottom: 1px dashed var(--line);
}

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

/* ==========================================================
   Хлебные крошки, раскладки
   ========================================================== */
.page-wrap {
    padding-bottom: 80px;
}

.breadcrumbs {
    padding: 1.6rem 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--muted);
    overflow-wrap: break-word;
}

.breadcrumbs .sep {
    color: var(--lime);
    margin: 0 0.25rem;
}

.breadcrumbs .current {
    color: var(--text-soft);
}

.layout-with-sidebar,
.layout-single {
    padding-top: 2rem;
}

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

.sidebar {
    min-width: 0;
    margin-top: 3rem;
    padding: 1.6rem 1.5rem;
    background: var(--side);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.45);
    color: var(--text-soft);
}

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

.sec-mark {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--lime);
    margin: 0 0 0.9rem;
}

.page-title {
    margin: 0;
    padding-left: 16px;
    border-left: 4px solid var(--accent);
}

.archive-desc {
    margin-top: 1rem;
    color: var(--muted);
}

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

/* ==========================================================
   Главная: секции
   ========================================================== */
.fs {
    position: relative;
    padding: 80px 0;
}

.fs + .fs::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: var(--line);
}

.fs--alt {
    background-color: var(--bg-alt);
    background-image:
        radial-gradient(560px circle at 6% 0%, rgba(46, 230, 200, 0.06), transparent 70%),
        linear-gradient(var(--grid-alt) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-alt) 1px, transparent 1px);
    background-size: auto, 24px 24px, 24px 24px;
}

.sec-head {
    margin: 0 0 2.6rem;
}

.sec-title {
    margin: 0;
    padding-left: 16px;
    border-left: 4px solid var(--accent);
    font-size: 1.6rem;
    line-height: 1.2;
}

.sec-sub {
    margin: 0.9rem 0 0;
    padding-left: 20px;
    max-width: 62ch;
    color: var(--muted);
}

.fs:hover .sec-mark,
.page-head:hover .sec-mark {
    animation: nagmPulse 1.4s ease-in-out infinite;
}

@keyframes nagmPulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.25;
    }
}

/* Hero */
.fs-hero {
    display: flex;
    align-items: center;
    min-height: clamp(520px, 82vh, 780px);
    padding: 0;
    overflow: hidden;
    background: var(--head);
}

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

.hero-shade {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background:
        linear-gradient(0deg, #12151c 0%, rgba(18, 21, 28, 0) 45%),
        linear-gradient(90deg, rgba(18, 21, 28, 0.95) 0%, rgba(18, 21, 28, 0.82) 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 88px 0;
}

.hero-copy {
    max-width: 700px;
}

.hero-title {
    margin: 0 0 1.2rem;
    font-size: 2.1rem;
    line-height: 1.1;
}

.hero-lead {
    max-width: 58ch;
    margin: 0;
    font-size: 1.08rem;
    color: var(--text-soft);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2rem;
}

.pixel-arrow {
    position: absolute;
    right: 6%;
    bottom: 32px;
    z-index: 2;
    display: block;
    line-height: 0;
    animation: nagmBlink 2s steps(1, end) infinite;
}

.pixel-arrow svg {
    display: block;
    width: 32px;
    height: 38px;
    filter: drop-shadow(0 0 6px rgba(46, 230, 200, 0.55));
}

@keyframes nagmBlink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.12;
    }
}

/* Статистика */
.fs-stats {
    z-index: 2;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
    padding: 1.8rem 1.1rem;
}

.stat:nth-child(even) {
    border-left: 1px solid var(--line);
}

.stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
}

.stat-num {
    font-family: var(--f-head);
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1;
    color: #2ee6c8;
    text-shadow: 0 0 18px rgba(46, 230, 200, 0.25);
    white-space: nowrap;
}

.stat-cap {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--muted);
}

/* След сканирования под 15° — один раз на главной */
.scan-trace {
    position: absolute;
    right: 8%;
    bottom: -48px;
    width: min(440px, 55%);
    height: 1px;
    background: linear-gradient(90deg, transparent, #2ee6c8 45%, #a3e635 75%, transparent);
    box-shadow: 0 0 10px rgba(46, 230, 200, 0.55);
    transform: rotate(-15deg);
    transform-origin: right center;
    opacity: 0.8;
    pointer-events: none;
}

/* Сетка записей */
.post-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
}

.latest-foot {
    margin-top: 2.4rem;
}

/* Чередующиеся строки */
.zz {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.zz-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

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

.zz-text p {
    color: var(--text-soft);
}

.zz-title {
    margin: 0 0 1rem;
    padding-left: 16px;
    border-left: 4px solid var(--accent);
    font-size: 1.3rem;
}

.zz-media {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: var(--head);
}

.zz-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/* FAQ */
.faq {
    max-width: 880px;
}

.faq-item {
    border-bottom: 1px dashed var(--line);
}

.faq-item:first-child {
    border-top: 1px dashed var(--line);
}

.faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.3rem 0;
    list-style: none;
    cursor: pointer;
    font-family: var(--f-head);
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.4;
    color: #e8edf5;
}

.faq-q::-webkit-details-marker {
    display: none;
}

.faq-q::marker {
    content: "";
}

.faq-q > span:first-child {
    min-width: 0;
}

.faq-q:hover {
    color: var(--accent);
}

.faq-icon {
    position: relative;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1.5px solid #2ee6c8;
    border-radius: 50%;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-icon::before,
.faq-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: #2ee6c8;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-icon {
    background: #2ee6c8;
    box-shadow: 0 0 12px rgba(46, 230, 200, 0.4);
}

.faq-item[open] .faq-icon::before {
    background: #12151c;
}

.faq-item[open] .faq-icon::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg);
}

.faq-a {
    padding: 0 3.2rem 1.4rem 0;
    color: #7a8599;
}

.faq-a p {
    margin: 0;
}

/* ==========================================================
   Карточки записей
   ========================================================== */
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--side);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(232, 237, 245, 0.02);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: #2ee6c8;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 16px rgba(46, 230, 200, 0.2);
}

.card-thumb {
    position: relative;
    overflow: hidden;
    background: var(--head);
}

.card-thumb a {
    display: block;
}

.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-thumb img {
    transform: scale(1.03);
}

.card-thumb::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(13, 16, 23, 0.75), transparent);
    pointer-events: none;
}

.card-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background-color: #121722;
    background-image:
        linear-gradient(#1e2430 1px, transparent 1px),
        linear-gradient(90deg, #1e2430 1px, transparent 1px);
    background-size: 16px 16px;
}

.card-thumb-empty svg {
    display: block;
    width: 64px;
    height: 64px;
    opacity: 0.7;
}

.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.5rem 0.8rem;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    color: var(--muted);
}

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

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

.card-excerpt {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #b6bfcc;
}

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

.card-more {
    align-self: flex-start;
    margin-top: auto;
    font-size: 0.92rem;
    font-weight: 600;
}

/* ==========================================================
   Запись и страница
   ========================================================== */
.entry-head {
    margin-bottom: 1.8rem;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.entry-title {
    margin: 0;
}

.entry-cover {
    margin: 0 0 2rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
}

.entry-cover img {
    display: block;
    width: 100%;
}

.entry-content {
    color: var(--text-soft);
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content h2 {
    position: relative;
    padding-left: 16px;
    border-left: 4px solid var(--accent);
    margin-top: 2.2em;
}

.entry-content h2::before {
    content: "";
    position: absolute;
    left: -4px;
    top: -14px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--lime);
}

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

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

.entry-content ul li::marker {
    color: var(--lime);
}

.entry-content blockquote {
    margin: 1.8em 0;
    padding: 1.3rem 1.5rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--r-btn) var(--r-btn) 0;
    color: var(--text);
}

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

.entry-content code {
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: var(--head);
    color: var(--lime);
    font-size: 0.9em;
}

.entry-content pre {
    overflow-x: auto;
    padding: 1.2rem 1.4rem;
    background: var(--head);
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.55;
}

.entry-content pre code {
    padding: 0;
    background: none;
    color: inherit;
}

.entry-content img {
    display: block;
    border-radius: var(--r-btn);
}

.entry-content figure {
    margin: 1.8em 0;
}

.entry-content figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.entry-content hr {
    border: 0;
    height: 1px;
    margin: 2.4em 15%;
    background: var(--line);
}

.entry-content .wp-block-table,
.entry-content .table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    border: 1px solid var(--line);
    font-size: 0.95rem;
}

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

th {
    background: var(--bg-alt);
    color: var(--text);
    font-weight: 600;
}

.page-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-top: 2rem;
}

.page-links-label {
    color: var(--muted);
    margin-right: 0.3rem;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
}

.post-nav {
    margin-top: 2.6rem;
}

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

.post-nav a {
    display: block;
    height: 100%;
    padding: 1.1rem 1.3rem;
    background: var(--side);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    transition: border-color 0.2s ease;
}

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

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

.pn-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.pn-title {
    display: block;
    color: var(--text);
    font-weight: 600;
    overflow-wrap: break-word;
}

/* ==========================================================
   Пагинация (type => plain)
   ========================================================== */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    background: var(--side);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(46, 230, 200, 0.25);
}

.pager .page-numbers.current {
    background: #2ee6c8;
    border-color: #2ee6c8;
    color: #12151c;
}

.pager .page-numbers.dots {
    min-width: auto;
    padding: 0 0.3rem;
    border: 0;
    background: none;
    color: var(--muted);
}

/* ==========================================================
   Формы: поиск, комментарии
   ========================================================== */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 520px;
}

.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    min-width: 0;
    padding: 0.75rem 1rem;
    background: var(--head);
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    color: var(--text);
    font: inherit;
    font-size: 0.98rem;
}

.search-field {
    flex: 1;
}

.search-field::placeholder {
    color: var(--muted);
}

.search-field:focus,
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 230, 200, 0.2);
}

.search-submit {
    flex: 0 0 auto;
}

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

.comments-title,
.comment-reply-title {
    margin: 0 0 1.4rem;
    font-size: 1.3rem;
}

.comment-reply-title small {
    margin-left: 0.6rem;
    font-family: var(--f-body);
    font-size: 0.85rem;
    font-weight: 500;
}

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

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

.cmt {
    margin-bottom: 1.2rem;
    padding: 1.2rem 1.3rem;
    background: var(--side);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
}

.cmt-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.cmt-avatar {
    display: block;
    border-radius: 50%;
}

.cmt-author {
    display: block;
    font-weight: 600;
    color: var(--text);
}

.cmt-date {
    font-size: 0.8rem;
    color: var(--muted);
}

.cmt-text {
    color: var(--text-soft);
}

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

.cmt-moderation {
    color: var(--lime);
    font-size: 0.9rem;
}

.cmt-reply {
    margin-top: 0.6rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.comment-respond {
    margin-top: 2rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-soft);
}

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

.comment-form .comment-form-cookies-consent label {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.comment-form .comment-form-cookies-consent input {
    margin-top: 0.3rem;
    accent-color: #2ee6c8;
}

.comment-notes,
.logged-in-as,
.must-log-in,
.comments-closed {
    font-size: 0.88rem;
    color: var(--muted);
}

.req {
    color: var(--lime);
}

/* ==========================================================
   Виджеты (цвета задаются для каждой области)
   ========================================================== */
.widget {
    margin-bottom: 2rem;
}

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

.widget-title {
    position: relative;
    margin: 0 0 1rem;
    padding-left: 18px;
    font-size: 0.98rem;
    line-height: 1.35;
}

.widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--lime);
}

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

.widget li {
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--line);
    line-height: 1.45;
}

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

.widget .post-date {
    display: block;
    font-size: 0.8rem;
}

.sidebar .widget-title {
    color: #e8edf5;
}

.sidebar .widget,
.sidebar .widget p {
    color: #c3cbd8;
}

.sidebar .widget a {
    color: #e8edf5;
}

.sidebar .widget a:hover {
    color: #2ee6c8;
}

.sidebar .widget .post-date {
    color: #7a8599;
}

.sidebar .search-form {
    flex-wrap: wrap;
}

/* ==========================================================
   Подвал
   ========================================================== */
.colophon {
    position: relative;
    margin-top: auto;
    background: var(--foot);
    border-top: 1px solid var(--line);
    color: #aab3c2;
}

.foot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
    padding: 64px 0 44px;
}

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

.colophon .widget-title {
    color: #e8edf5;
}

.colophon .widget,
.colophon .widget p {
    color: #aab3c2;
    font-size: 0.94rem;
}

.colophon .widget a {
    color: #2ee6c8;
}

.colophon .widget a:hover {
    color: #5cf0d8;
}

.colophon .widget .post-date {
    color: #7a8599;
}

.foot-bottom {
    padding: 1.3rem 0;
    border-top: 1px solid var(--line);
}

.copyright {
    margin: 0;
    font-size: 0.84rem;
    color: #7a8599;
}

/* ==========================================================
   404
   ========================================================== */
.nf {
    padding: 2rem 0 1rem;
}

.nf-code {
    margin: 0 0 0.6rem;
    font-family: var(--f-head);
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1;
    color: #2ee6c8;
    text-shadow: 0 0 22px rgba(46, 230, 200, 0.35);
}

.nf .page-title {
    margin-bottom: 1.2rem;
}

.nf-text {
    max-width: 60ch;
    color: var(--text-soft);
    margin-bottom: 1.6rem;
}

.nf-home {
    margin-top: 1.6rem;
}

/* ==========================================================
   Cookie-баннер
   ========================================================== */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(13, 16, 23, 0.97);
    border-top: 1px solid #2ee6c8;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.5);
}

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

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

/* ==========================================================
   Адаптив
   ========================================================== */
@media (min-width: 600px) {
    .brand-tagline {
        display: block;
    }

    .brand-svg {
        width: 48px;
        height: 48px;
    }

    .brand-name {
        font-size: 0.92rem;
    }

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

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

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

    .post-nav .nav-next:only-child {
        grid-column: 2;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .stat-num {
        font-size: 2.6rem;
    }

    .faq-q {
        font-size: 1.12rem;
    }
}

@media (max-width: 599px) {
    .search-form {
        flex-wrap: wrap;
    }

    .search-submit {
        width: 100%;
    }

    .faq-a {
        padding-right: 0;
    }

    .sidebar {
        padding: 1.4rem 1.2rem;
    }

    .cmt {
        padding: 1rem 1.05rem;
    }

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

    .cookie-accept {
        width: 100%;
    }
}

@media (min-width: 960px) {
    .shell--front {
        width: min(85%, 1320px);
    }

    .masthead-row {
        flex-wrap: nowrap;
    }

    .nav-toggle {
        display: none;
    }

    .primary-nav,
    .primary-nav.is-open {
        display: block;
        flex: 0 0 auto;
        flex-basis: auto;
    }

    .primary-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.2rem 1.6rem;
        padding: 0;
        border-top: 0;
    }

    .primary-menu a {
        position: relative;
        padding: 0.4rem 0;
        border-bottom: 0;
        font-size: 0.95rem;
    }

    .primary-menu a::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -2px;
        height: 2px;
        background: #2ee6c8;
        transform: scaleY(0);
        transform-origin: bottom;
        transition: transform 0.2s ease;
    }

    .primary-menu a:hover::after,
    .primary-menu .current-menu-item > a::after,
    .primary-menu .current_page_item > a::after {
        transform: scaleY(1);
    }

    h1 {
        font-size: 3.2rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .sec-title {
        font-size: 2.1rem;
    }

    .zz-title {
        font-size: 1.5rem;
    }

    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67%) minmax(0, 27%);
        justify-content: space-between;
        align-items: start;
    }

    .layout-with-sidebar .sidebar {
        margin-top: 0;
    }

    .layout-single .content-area {
        width: 85%;
        margin-left: auto;
        margin-right: auto;
    }

    .layout-single .post-grid,
    .post-grid--front {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .hero-shade {
        background:
            linear-gradient(0deg, #12151c 0%, rgba(18, 21, 28, 0) 40%),
            linear-gradient(90deg, #12151c 0%, rgba(18, 21, 28, 0.9) 38%, rgba(18, 21, 28, 0.35) 78%, rgba(18, 21, 28, 0) 100%);
    }

    .hero-inner {
        padding: 110px 0;
    }

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

    .stat {
        padding: 2.2rem 1.6rem;
    }

    .stat:nth-child(n + 3) {
        border-top: 0;
    }

    .stat + .stat {
        border-left: 1px solid var(--line);
    }

    .stat-num {
        font-size: 3.2rem;
    }

    .zz-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        gap: 4rem;
    }

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

    .nf-code {
        font-size: 7rem;
    }
}

@media (min-width: 960px) and (max-width: 1199px) {
    .layout-with-sidebar .entry-title,
    .layout-with-sidebar .page-title {
        font-size: 2.6rem;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    body::before,
    body::after,
    .cookie-banner,
    .nav-toggle,
    .sidebar,
    .colophon {
        display: none !important;
    }
}
