/*
Theme Name: dds_apikod.com
Author: Алексей Комаров
Description: Тёмная адаптивная тема для независимого информационно-аналитического ресурса о технологиях, искусственном интеллекте и цифровых инструментах для бизнеса. Глубокий тёмно-серый фон, индиго-синий акцент, карточки статей с микро-взаимодействиями.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: apikod
*/

/* ====================================================================
   Переменные
   ==================================================================== */
:root {
    --bg:        #0F1117;
    --panel:     #1A1D27;
    --border:    #2A2F3F;
    --accent:    #3B82F6;
    --accent-2:  #14B8A6;
    --text-h:    #F1F5F9;
    --text:      #CBD5E1;
    --text-dim:  #7E8A98;
    --danger:    #E11D48;
    --radius:    14px;
    --pill:      40px;
    --shell:     1180px;
    --mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .18s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--text-h);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 .6em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p {
    margin: 0 0 1.1em;
}

ul, ol {
    margin: 0 0 1.1em;
    padding-left: 1.4em;
}

blockquote {
    margin: 1.6em 0;
    padding: 1.1em 1.3em;
    background: #14161F;
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--mono);
    font-size: .96rem;
    color: var(--text-h);
}

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

blockquote::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: -2px;
    background: var(--accent-2);
    animation: apikod-caret 1.1s steps(1) infinite;
}

@keyframes apikod-caret {
    0%, 50%  { opacity: 1; }
    51%,100% { opacity: 0; }
}

code, pre {
    font-family: var(--mono);
    font-size: .92em;
}

pre {
    background: #14161F;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1em 1.3em;
    overflow-x: auto;
    color: var(--text-h);
}

:not(pre) > code {
    background: #14161F;
    border: 1px solid var(--border);
    padding: .12em .4em;
    border-radius: 6px;
    color: var(--accent-2);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid var(--border);
}

th, td {
    border: 1px solid var(--border);
    padding: .65em .9em;
    text-align: left;
}

th {
    background: #14161F;
    color: var(--text-h);
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

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

/* ====================================================================
   Контейнер и раскладки
   ==================================================================== */
.shell {
    width: min(92%, var(--shell));
    margin-inline: auto;
}

.site-main {
    padding: 2.4rem 0 3.4rem;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2.45fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: start;
}

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

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

/* ====================================================================
   Кнопки
   ==================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: .7em 1.5em;
    border-radius: var(--pill);
    font-weight: 600;
    font-size: .98rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .2s ease, background-position .35s ease, background-color .2s ease;
    line-height: 1;
}

.btn-primary {
    color: #fff;
    background-image: linear-gradient(90deg, #4F46E5 0%, var(--accent) 55%, #2563EB 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
}

.btn-primary:hover {
    color: #fff;
    background-position: 0 0;
}

.btn-secondary {
    color: var(--text-h);
    background: transparent;
    border-color: rgba(255, 255, 255, .35);
}

.btn-secondary:hover {
    color: var(--text-h);
    background: rgba(255, 255, 255, .1);
}

/* ====================================================================
   Шапка
   ==================================================================== */
.site-header {
    background: rgba(15, 17, 23, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.05rem 0;
}

.branding {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.brand-logo,
.brand-logo-svg {
    display: block;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 12px;
}

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

.brand-name {
    display: block;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 1.18rem;
    color: var(--text-h);
    text-transform: lowercase;
    letter-spacing: -.01em;
}

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

.brand-desc {
    display: block;
    font-size: .82rem;
    color: var(--text-dim);
    line-height: 1.45;
    margin-top: 2px;
    max-width: 46ch;
}

/* Навигация в шапке */
.header-nav ul {
    list-style: none;
    display: flex;
    gap: .4rem;
    margin: 0;
    padding: 0;
}

.header-nav a {
    display: block;
    padding: .5em .95em;
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: .97rem;
}

.header-nav a:hover,
.header-nav .current-menu-item > a {
    color: var(--text-h);
    background: rgba(59, 130, 246, .14);
}

/* Бургер */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    cursor: pointer;
    padding: 0;
    flex: 0 0 auto;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-h);
    margin: 0 auto;
    position: relative;
    transition: transform .25s ease, opacity .2s ease;
}

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

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

/* ====================================================================
   Мобильное меню — полноэкранное затемнение
   ==================================================================== */
.mobile-menu[hidden] {
    display: none !important;
}

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(11, 12, 17, .97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 5rem 1.4rem 2rem;
    overflow-y: auto;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text-h);
    font-size: 1.3rem;
    cursor: pointer;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .8rem;
}

.mobile-menu a {
    display: block;
    padding: 1.15rem 1.2rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-h);
    font-size: 1.15rem;
    font-weight: 600;
}

.mobile-menu a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ====================================================================
   Хлебные крошки
   ==================================================================== */
.breadcrumbs {
    font-size: .86rem;
    color: var(--text-dim);
    padding: 1.1rem 0 .2rem;
}

.breadcrumbs a {
    color: var(--text-dim);
}

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

.breadcrumbs .sep {
    margin: 0 .3em;
    color: #3A4150;
}

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

.card {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity .22s ease;
    z-index: 2;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .85);
    border-color: #353B4D;
}

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

.card-thumb {
    display: block;
}

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

.card-thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 30% 30%, rgba(59, 130, 246, .25), transparent 60%),
        radial-gradient(circle at 75% 70%, rgba(20, 184, 166, .2), transparent 55%),
        #14161F;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}

.card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .6rem;
}

.card-cats a {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .25em .65em;
    border-radius: 6px;
    background: rgba(59, 130, 246, .12);
    color: var(--accent);
}

.card-title {
    font-size: 1.16rem;
    margin: 0 0 .5rem;
}

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

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

.card-excerpt {
    color: var(--text);
    font-size: .95rem;
    margin-bottom: 1rem;
}

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

.card-excerpt p:last-child {
    margin-bottom: 0;
}

.card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Чипы метаданных */
.meta-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    font-size: .78rem;
    color: var(--text-dim);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    padding: .25em .6em;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
}

.chip::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-2);
}

/* Ссылка «читать далее» */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    font-weight: 600;
    font-size: .9rem;
    color: var(--accent);
}

.read-more .arrows {
    display: inline-block;
    transition: transform .2s ease;
}

.read-more:hover .arrows {
    transform: translateX(5px);
}

/* ====================================================================
   Одиночная запись / страница
   ==================================================================== */
.entry {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.2rem 2.4rem;
    min-width: 0;
}

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

.entry-title {
    font-size: 2.1rem;
    margin-bottom: .7rem;
}

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

.entry-thumb img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
}

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

.entry-content img {
    border-radius: var(--radius);
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

.entry-tags {
    margin-top: 1.8rem;
    padding-top: 1.3rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.entry-tags a {
    font-size: .82rem;
    padding: .3em .8em;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
}

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

.partner-note {
    margin: 1.8rem 0;
    padding: 1.2rem 1.4rem;
    border: 1px dashed #38405A;
    border-radius: var(--radius);
    background: rgba(26, 29, 39, .6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-size: .9rem;
    color: var(--text-dim);
}

.partner-note strong {
    color: var(--accent-2);
}

/* ====================================================================
   Боковая колонка и виджеты
   ==================================================================== */
.sidebar {
    min-width: 0;
}

.widget {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

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

.widget-title {
    font-size: 1.02rem;
    color: var(--text-h);
    margin-bottom: .9rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border);
}

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

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

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

.widget ul li {
    padding: .42rem 0;
    border-bottom: 1px dashed var(--border);
    color: var(--text);
}

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

.widget .post-date {
    display: block;
    font-size: .78rem;
    color: var(--text-dim);
    margin-top: .15rem;
}

/* ====================================================================
   Подвал
   ==================================================================== */
.site-footer {
    border-top: 1px solid var(--border);
    background: #0C0D12;
    position: relative;
    margin-top: 2rem;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), #4F46E5, var(--accent));
    background-size: 300% 100%;
    animation: apikod-flow 9s linear infinite;
}

@keyframes apikod-flow {
    0%   { background-position: 0 0; }
    100% { background-position: 300% 0; }
}

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

.footer-cols .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: #AEB7C4;
}

.footer-cols .widget-title {
    color: var(--text-h);
}

.footer-cols .widget a {
    color: #AEB7C4;
}

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

.footer-cols .widget ul li {
    border-bottom-color: #20232E;
}

.footer-cols .widget .post-date {
    color: var(--text-dim);
}

.site-copy {
    border-top: 1px solid var(--border);
    padding: 1.3rem 0;
    font-size: .86rem;
    color: var(--text-dim);
    text-align: center;
}

/* ====================================================================
   Пагинация
   ==================================================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 2.2rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .7em;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    font-weight: 600;
    font-size: .92rem;
}

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

.pagination .page-numbers.current {
    background-image: linear-gradient(90deg, #4F46E5, var(--accent));
    border-color: transparent;
    color: #fff;
}

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

/* ====================================================================
   Форма поиска
   ==================================================================== */
.search-form {
    display: flex;
    gap: .5rem;
}

.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: .7em 1em;
    background: #14161F;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-h);
    font-family: var(--sans);
    font-size: .95rem;
}

.search-form .search-field::placeholder {
    color: var(--text-dim);
}

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

.search-form .search-submit {
    padding: .7em 1.3em;
    border: 0;
    border-radius: var(--pill);
    background-image: linear-gradient(90deg, #4F46E5, var(--accent));
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* ====================================================================
   Главная страница
   ==================================================================== */
.front {
    width: 85%;
    margin-inline: auto;
    padding: 2.6rem 0 3.5rem;
}

.front-block {
    margin-bottom: 2.6rem;
}

.front-block:last-child {
    margin-bottom: 0;
}

.block-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.4rem 2.2rem;
}

.block-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(59, 130, 246, .22), transparent 55%),
        radial-gradient(circle at 88% 82%, rgba(20, 184, 166, .18), transparent 55%),
        var(--panel);
}

.block-hero h1 {
    font-size: 2.5rem;
    max-width: 18ch;
}

.block-hero p {
    max-width: 56ch;
    color: var(--text);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-top: 1.6rem;
}

.section-head {
    margin-bottom: 1.6rem;
}

.section-head .eyebrow {
    display: inline-block;
    font-family: var(--mono);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--accent-2);
    margin-bottom: .5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
}

.feature {
    background: #14161F;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.4rem;
    min-width: 0;
}

.feature .ai-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(59, 130, 246, .12);
    margin-bottom: 1rem;
    transition: box-shadow .22s ease, border-color .22s ease;
    border: 1px solid transparent;
}

.feature:hover .ai-icon {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .18), 0 0 18px rgba(59, 130, 246, .35);
}

.feature .ai-icon svg {
    width: 24px;
    height: 24px;
}

.feature h3 {
    font-size: 1.08rem;
}

.feature p {
    font-size: .93rem;
    margin-bottom: 0;
    color: var(--text);
}

/* Шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.4rem;
    counter-reset: step;
}

.step {
    min-width: 0;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20, 184, 166, .14);
    color: var(--accent-2);
    font-family: var(--mono);
    font-weight: 500;
    margin-bottom: .8rem;
}

.step h3 {
    font-size: 1.05rem;
}

.step p {
    font-size: .92rem;
    color: var(--text);
    margin-bottom: 0;
}

/* Облако категорий */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1rem;
    align-items: baseline;
}

.tag-cloud a {
    color: var(--text);
    font-weight: 600;
    transition: color .18s ease, opacity .18s ease;
}

.tag-cloud a:hover {
    color: var(--accent);
    opacity: 1 !important;
}

/* Подписка / акцентная полоса (без формы — статичный блок) */
.subscribe-block {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.4rem 2.2rem;
    background:
        linear-gradient(120deg, rgba(79, 70, 229, .25), rgba(20, 184, 166, .2), rgba(59, 130, 246, .25));
    background-size: 220% 220%;
    animation: apikod-grad 12s ease infinite;
}

@keyframes apikod-grad {
    0%   { background-position: 0 0; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0 0; }
}

.subscribe-block h2 {
    margin-bottom: .5rem;
}

.subscribe-block p {
    color: var(--text-h);
    max-width: 52ch;
}

/* Лента записей на главной */
.front-posts {
    margin-bottom: 2.6rem;
}

/* Слайдер инсайтов */
.insight-slider {
    margin-top: 1.4rem;
}

.insight-slider .slides {
    position: relative;
}

.insight-slider .slide {
    display: none;
    margin: 0;
}

.insight-slider .slide.is-active {
    display: block;
}

.slider-dots {
    display: flex;
    gap: .5rem;
    margin-top: .9rem;
}

.slider-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.slider-dot.is-active {
    background: var(--accent);
    transform: scale(1.2);
}

/* ====================================================================
   Комментарии
   ==================================================================== */
.comments-area {
    margin-top: 2rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem 2rem;
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
}

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

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

.comment-item {
    margin-bottom: 1.2rem;
}

.comment-inner {
    background: #14161F;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .6rem;
}

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

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

.comment-date {
    font-size: .78rem;
    color: var(--text-dim);
}

.comment-text {
    font-size: .95rem;
}

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

.comment-pending {
    font-size: .85rem;
    color: var(--accent-2);
}

.comment-reply {
    margin-top: .5rem;
    font-size: .85rem;
}

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

.comment-respond label {
    display: block;
    font-size: .88rem;
    color: var(--text-dim);
    margin: .8rem 0 .3rem;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    padding: .65em .9em;
    background: #14161F;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-h);
    font-family: var(--sans);
    font-size: .95rem;
}

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

.comment-respond .form-submit {
    margin-top: 1rem;
}

.comment-respond .submit {
    padding: .7em 1.6em;
    border: 0;
    border-radius: var(--pill);
    background-image: linear-gradient(90deg, #4F46E5, var(--accent));
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* ====================================================================
   404
   ==================================================================== */
.error-404 {
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
}

.error-404 .big {
    font-family: var(--mono);
    font-size: 4.5rem;
    color: var(--accent);
    margin-bottom: .3rem;
}

.error-404 .search-form {
    max-width: 420px;
    margin: 1.6rem auto 1.2rem;
}

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 1rem 1.4rem;
    background: rgba(20, 22, 31, .97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
}

.cookie-banner p {
    margin: 0;
    font-size: .88rem;
    color: var(--text);
    max-width: 70ch;
}

.cookie-banner .btn {
    flex: 0 0 auto;
}

/* ====================================================================
   Заголовок архива / страницы списка
   ==================================================================== */
.list-header {
    margin-bottom: 1.6rem;
}

.list-header h1 {
    margin-bottom: .3rem;
}

.list-header .list-desc {
    color: var(--text-dim);
}

/* ====================================================================
   Адаптив
   ==================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .layout-single,
    .front {
        width: 100%;
    }

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

    .header-nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .block-hero h1 {
        font-size: 2rem;
    }

    .entry,
    .block-panel,
    .subscribe-block {
        padding: 1.6rem 1.4rem;
    }
}

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

    h1 { font-size: 1.7rem; }

    .entry-title,
    .block-hero h1 {
        font-size: 1.65rem;
    }

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

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

    .brand-desc {
        display: none;
    }

    .comments-area,
    .entry {
        padding: 1.3rem 1.1rem;
    }
}
