/*
Theme Name: dds_thealgorithmicminds.com
Theme URI: https://thealgorithmicminds.com
Author: Илья Воронцов
Author URI: https://thealgorithmicminds.com
Description: Тема для информационно-образовательного сообщества о аналитике данных, машинном обучении и практическом применении искусственного интеллекта. Минималистичный техно-премиум стиль с акцентом на читаемость и функциональность.
Version: 1.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tam
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ===== Базовые настройки ===== */
:root {
    --bg-primary: #0F1117;
    --bg-card: #1A1D24;
    --bg-elevated: #252A34;
    --border-subtle: #2A2F3A;
    --accent-primary: #2A7FFF;
    --accent-primary-dark: #1E5FD9;
    --accent-secondary: #A855F7;
    --accent-cyan: #00E5FF;
    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-heading: #FFFFFF;
    --danger: #FF4D4D;
    --radius-sm: 6px;
    --radius-pill: 30px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'JetBrains Mono', 'Geist Mono', ui-monospace, monospace;
    color: var(--text-heading);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 1.4em 0 0.6em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1em; line-height: 1.7; }

a { color: var(--accent-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-cyan); }

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

code, pre {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.92em;
}

code {
    background: var(--bg-elevated);
    color: var(--accent-secondary);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}

pre {
    background: #0B0D13;
    color: var(--text-primary);
    padding: 1em 1.25em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
}
pre code { background: none; border: none; color: inherit; padding: 0; }

blockquote {
    border-left: 3px solid var(--accent-primary);
    margin: 1.5em 0;
    padding: 0.5em 1.25em;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-style: italic;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
}
th, td {
    padding: 0.7em 1em;
    border: 1px solid var(--border-subtle);
    text-align: left;
}
th { background: var(--bg-elevated); color: var(--text-heading); font-weight: 600; }

ul, ol { padding-left: 1.5em; line-height: 1.7; }
li { margin-bottom: 0.3em; }

/* ===== Структурные контейнеры ===== */
.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-area {
    padding: 2em 0 3em;
}

.layout-with-sidebar {
    display: flex;
    gap: 2.5%;
    align-items: flex-start;
}
.layout-with-sidebar .content-col { width: 67%; }
.layout-with-sidebar .sidebar-col { width: 27%; }

.layout-wide .content-col { width: 85%; margin: 0 auto; }

@media (max-width: 960px) {
    .layout-with-sidebar { flex-direction: column; gap: 2em; }
    .layout-with-sidebar .content-col,
    .layout-with-sidebar .sidebar-col { width: 100%; }
    .layout-wide .content-col { width: 100%; }
}

/* ===== Шапка ===== */
.site-topbar {
    background: linear-gradient(180deg, #14171F 0%, #0F1117 100%);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.1em 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 1.8em;
    flex-wrap: wrap;
}

.brand-zone {
    display: flex;
    align-items: center;
    gap: 0.9em;
    flex: 1;
    min-width: 260px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    display: block;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

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

.brand-name {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-heading);
    display: block;
    line-height: 1.3;
    margin-bottom: 0.15em;
}
.brand-name a { color: inherit; }
.brand-name a:hover { color: var(--accent-primary); }

.brand-tag {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
    display: block;
    max-width: 640px;
}

/* ===== Навигация ===== */
.primary-nav {
    flex-shrink: 0;
}

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

.primary-nav li a {
    display: inline-block;
    padding: 0.55em 1em;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.primary-nav li a:hover,
.primary-nav li.current-menu-item a,
.primary-nav li.current_page_item a {
    background: rgba(42, 127, 255, 0.12);
    color: var(--accent-primary);
}

.burger-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
}
.burger-btn svg { display: block; }

@media (max-width: 960px) {
    .burger-btn { display: inline-flex; }
    .primary-nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 0.5em;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; gap: 0.2em; }
    .primary-nav li a {
        display: block;
        padding: 0.85em 1em;
        min-height: 48px;
    }
}

/* ===== Подвал ===== */
.site-base {
    background: #0B0D13;
    border-top: 1px solid var(--border-subtle);
    padding: 2.5em 0 1.5em;
    margin-top: 3em;
}

.base-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    margin-bottom: 2em;
}

.base-col h2, .base-col h3, .base-col .widget-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    margin: 0 0 0.9em;
}

.base-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.base-col li { margin-bottom: 0.4em; }
.base-col a { color: var(--text-secondary); }
.base-col a:hover { color: var(--accent-primary); }

.copyright-line {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.2em;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 960px) {
    .base-cols { grid-template-columns: 1fr; gap: 1.5em; }
}

/* ===== Кнопки ===== */
.btn {
    display: inline-block;
    padding: 0.75em 1.5em;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 0;
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}
.btn-ghost:hover {
    background: var(--accent-primary);
    color: #fff;
}

.btn-pill {
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    color: #CBD5E1;
    padding: 0.5em 1.2em;
    font-size: 0.88rem;
}
.btn-pill:hover, .btn-pill.is-active {
    background: var(--accent-primary);
    color: #fff;
}

/* ===== Главная: героическая секция ===== */
.hero-block {
    padding: 3em 2em;
    background:
        radial-gradient(circle at 15% 20%, rgba(42, 127, 255, 0.18), transparent 50%),
        radial-gradient(circle at 85% 80%, rgba(168, 85, 247, 0.15), transparent 55%),
        linear-gradient(135deg, #131620 0%, #0F1117 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 2.5em;
    text-align: left;
}
.hero-block h1 {
    font-size: 2.3rem;
    margin-top: 0;
    background: linear-gradient(90deg, #fff 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-block p.lead {
    font-size: 1.08rem;
    color: var(--text-primary);
    max-width: 720px;
    margin-bottom: 1.5em;
}

/* ===== Главная: тематические секции ===== */
.topic-section {
    margin: 3em 0;
    padding: 2em;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.topic-section > h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.6em;
}
.topic-section > h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 26px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
}

.topic-grid {
    display: grid;
    gap: 1.25em;
    margin-top: 1em;
}
.topic-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.topic-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
    .topic-grid.cols-3, .topic-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .topic-grid.cols-3, .topic-grid.cols-4 { grid-template-columns: 1fr; }
}

.topic-tile {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 1.25em;
    transition: transform 0.22s ease, border-color 0.22s ease;
}
.topic-tile:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
}
.topic-tile .tile-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 127, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 0.9em;
    color: var(--accent-primary);
}
.topic-tile h3 {
    font-size: 1.05rem;
    margin: 0 0 0.5em;
}
.topic-tile p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
}

/* Пошаговый блок */
.steps-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
    margin-top: 1em;
}
@media (max-width: 960px) {
    .steps-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .steps-row { grid-template-columns: 1fr; }
}
.step-item {
    position: relative;
    padding: 1.2em 1em 1em 3em;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.step-num {
    position: absolute;
    top: 1em;
    left: 1em;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-item h3 {
    font-size: 1rem;
    margin: 0 0 0.4em;
}
.step-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Callout / практический кейс */
.callout-box {
    background: linear-gradient(135deg, rgba(42, 127, 255, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid rgba(42, 127, 255, 0.3);
    border-radius: var(--radius-sm);
    padding: 1.75em;
    margin: 1.5em 0;
}
.callout-box h3 { margin-top: 0; color: var(--accent-cyan); }
.callout-box p:last-child { margin-bottom: 0; }

/* ===== Секция «Последние записи» ===== */
.latest-strip {
    margin: 3em 0;
}
.latest-strip > h2 {
    font-size: 1.7rem;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.latest-strip > h2 span.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-primary);
    margin-right: 0.5em;
}

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

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease;
}
.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
}

.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.05); }

.card-body {
    flex: 1;
    padding: 1.2em 1.3em 1.3em;
    display: flex;
    flex-direction: column;
}

.card-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.6em;
    display: flex;
    gap: 0.8em;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.15rem;
    margin: 0 0 0.6em;
    line-height: 1.35;
}
.card-title a {
    color: var(--text-heading);
}
.card-title a:hover { color: var(--accent-primary); }

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.6;
    margin-bottom: 1em;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
    color: inherit;
}
.card-excerpt p:last-child { margin-bottom: 0; }
.card-excerpt a { color: var(--accent-primary); }

.card-footer {
    margin-top: auto;
}

/* Горизонтальный вариант карточки — архивы, поиск */
.cards-list .card {
    flex-direction: row;
}
.cards-list .card .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.cards-list .card .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.cards-list .card .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: auto;
}

@media (max-width: 600px) {
    .cards-list .card { flex-direction: column; }
    .cards-list .card .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .cards-list .card .card-thumb-wrap a { position: static; }
    .cards-list .card .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ===== Хлебные крошки ===== */
.breadcrumbs-bar {
    padding: 1em 0 0.25em;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}
.breadcrumbs-bar a { color: var(--text-secondary); }
.breadcrumbs-bar a:hover { color: var(--accent-primary); }
.breadcrumbs-bar .sep {
    margin: 0 0.5em;
    color: var(--border-subtle);
}
.breadcrumbs-bar .current { color: var(--text-primary); }

/* ===== Пагинация ===== */
.pager-bar {
    margin: 2.5em 0 1em;
    display: flex;
    justify-content: center;
    gap: 0.35em;
    flex-wrap: wrap;
}
.pager-bar a, .pager-bar span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75em;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}
.pager-bar a:hover {
    background: rgba(42, 127, 255, 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
.pager-bar .current {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}
.pager-bar .dots {
    background: transparent;
    border: 0;
}

/* ===== Сайдбар / Виджеты ===== */
.sidebar-col .widget-block,
.sidebar-col .widget {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 1.25em;
    margin-bottom: 1.25em;
}
.sidebar-col .widget-title,
.sidebar-col h2.widget-title,
.sidebar-col h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    margin: 0 0 0.9em;
}
.sidebar-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-col li {
    padding: 0.4em 0;
    border-bottom: 1px dashed var(--border-subtle);
    margin: 0;
}
.sidebar-col li:last-child { border-bottom: 0; }
.sidebar-col li a { color: var(--text-primary); }
.sidebar-col li a:hover { color: var(--accent-primary); }

.widget_search input[type="search"] {
    width: 100%;
    padding: 0.65em 0.9em;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}
.widget_search input[type="submit"] {
    margin-top: 0.5em;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    color: #fff;
    border: 0;
    padding: 0.6em 1.2em;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* ===== Комментарии ===== */
.comments-zone {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid var(--border-subtle);
}
.comments-zone h2 {
    font-size: 1.3rem;
}
.comments-zone .comment-list {
    list-style: none;
    padding: 0;
}
.comments-zone .comment-list .comment {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 1.25em;
    margin-bottom: 1em;
}
.comments-zone .comment-list .children {
    list-style: none;
    padding-left: 2em;
    margin-top: 1em;
}
.comments-zone .comment-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.6em;
}
.comment-respond {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 1.5em;
    margin-top: 2em;
}
.comment-form label {
    display: block;
    margin-bottom: 0.4em;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7em 0.9em;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 0.9em;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .submit,
.comment-form input[type="submit"] {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    color: #fff;
    border: 0;
    padding: 0.8em 1.6em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform 0.18s ease, filter 0.18s ease;
}
.comment-form .submit:hover,
.comment-form input[type="submit"]:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

/* ===== Форма поиска ===== */
.search-form {
    display: flex;
    gap: 0.5em;
    margin: 1em 0;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 0.7em 1em;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent-primary);
}
.search-form button,
.search-form input[type="submit"] {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    color: #fff;
    border: 0;
    padding: 0.7em 1.4em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

/* ===== Отдельная запись ===== */
.post-hero {
    margin-bottom: 1.5em;
}
.post-hero .post-title {
    font-size: 2rem;
    margin: 0.4em 0;
}
.post-hero-meta {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    margin-bottom: 1em;
}
.post-cover {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    margin-bottom: 1.5em;
}
.post-cover img { display: block; width: 100%; }

.post-content {
    font-size: 1.02rem;
    line-height: 1.8;
}
.post-content img {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    margin: 1em 0;
}

.post-tags-row {
    margin: 2em 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 0.4em;
    flex-wrap: wrap;
    align-items: center;
}
.post-tags-row .label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-right: 0.5em;
}
.post-tags-row a {
    display: inline-block;
    padding: 0.35em 0.9em;
    background: var(--bg-elevated);
    color: #CBD5E1;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    border: 1px solid var(--border-subtle);
}
.post-tags-row a:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* ===== Страница 404 ===== */
.error-screen {
    padding: 3em 2em;
    text-align: center;
}
.error-screen .error-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin: 0;
}
.error-screen h1 { margin: 0.5em 0; }
.error-screen .search-form {
    max-width: 500px;
    margin: 1.5em auto;
}

/* ===== Cookie-баннер ===== */
.cookie-tray {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 9999;
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    padding: 1em 1.25em;
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 720px;
    margin: 0 auto;
}
.cookie-tray p {
    margin: 0;
    flex: 1;
    min-width: 240px;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.cookie-tray button {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    color: #fff;
    border: 0;
    padding: 0.65em 1.4em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: transform 0.18s ease, filter 0.18s ease;
}
.cookie-tray button:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}
.cookie-tray.is-hidden { display: none; }

/* ===== Утилиты ===== */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.alignleft { float: left; margin: 0.5em 1.5em 1em 0; }
.alignright { float: right; margin: 0.5em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* Анимация появления при скролле */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Адаптив (общий) ===== */
@media (max-width: 600px) {
    body { font-size: 15px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .hero-block { padding: 2em 1.25em; }
    .hero-block h1 { font-size: 1.7rem; }
    .topic-section { padding: 1.25em; }
    .wrap { padding: 0 16px; }
    .btn { min-height: 48px; display: inline-flex; align-items: center; }
}
