/*
Theme Name: dds_airportsdetail.com
Theme URI: https://airportsdetail.com/
Author: Илья Корнеев
Author URI: https://airportsdetail.com/
Description: Экспертная тема для русскоязычного ресурса о строительстве и модернизации аэропортов и транспортной инфраструктуры. Высокотехнологичный визуальный язык, инженерная строгость, ориентация на профессиональную аудиторию.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dds_airportsdetail
*/

/* ============================================================
   1. БАЗА — переменные, ресет, контейнер
   ============================================================ */

:root {
    --bg-deep: #0F1217;
    --bg-panel: #1A1F26;
    --bg-elev: #20262E;
    --border-soft: #2A313C;
    --grid-line: #252C35;
    --accent-steel: #2D7A9E;
    --accent-steel-dark: #1E5A78;
    --accent-copper: #C97B5C;
    --accent-ochre: #BFA46B;
    --text-heading: #F0F3F8;
    --text-body: #B0B8C5;
    --text-muted: #8C95A3;
    --font-sans: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", "Roboto Mono", "SFMono-Regular", Consolas, monospace;
    --shell: min(92%, 1180px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    background: var(--bg-deep);
    color: var(--text-body);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 1.4em 0 0.6em;
}

h1 { font-size: 2.1rem; font-weight: 500; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

a {
    color: var(--accent-steel);
    text-decoration: none;
    transition: color 0.18s ease;
}
a:hover { color: var(--accent-copper); }

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

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

pre {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    padding: 14px 16px;
    overflow-x: auto;
    color: var(--text-heading);
    font-size: 0.92rem;
}

code {
    background: var(--bg-panel);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.92em;
    color: var(--accent-ochre);
}
pre code { background: none; padding: 0; color: inherit; }

blockquote {
    margin: 1.6em 0;
    padding: 14px 20px;
    border-left: 3px solid var(--accent-ochre);
    background: var(--bg-panel);
    color: var(--text-heading);
    font-style: normal;
}

hr {
    border: 0;
    height: 1px;
    background: var(--grid-line);
    margin: 2em 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--border-soft);
}
th, td {
    border: 1px solid var(--border-soft);
    padding: 10px 14px;
    text-align: left;
}
th {
    background: var(--bg-elev);
    color: var(--text-heading);
    font-weight: 500;
}

.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* ============================================================
   2. ШАПКА
   ============================================================ */

.site-header {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-soft);
    padding: 18px 0;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.brand-logo {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
}

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

.brand-title {
    display: block;
    color: var(--text-heading);
    font-size: 0.95rem;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: -0.005em;
}
.brand-title:hover { color: var(--accent-steel); }

.brand-tagline {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 4px;
    letter-spacing: 0.02em;
}

.expert-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 40px;
    background: transparent;
    color: var(--text-body);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.18s ease;
}
.expert-toggle:hover { border-color: var(--accent-steel); color: var(--text-heading); }
.expert-toggle.is-active { border-color: var(--accent-copper); color: var(--accent-copper); }
.expert-toggle .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--border-soft);
    transition: background 0.18s ease;
}
.expert-toggle.is-active .dot { background: var(--accent-copper); }

/* Главное меню */
.primary-nav {
    background: var(--bg-deep);
    border-bottom: 1px solid var(--grid-line);
}
.primary-nav .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-heading);
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
}
.menu-toggle:hover { border-color: var(--accent-steel); }

.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    min-width: 0;
}
.primary-nav li { min-width: 0; }
.primary-nav a {
    display: block;
    padding: 12px 16px;
    color: var(--text-body);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-bottom: 2px solid transparent;
    transition: all 0.18s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
    color: var(--text-heading);
    border-bottom-color: var(--accent-steel);
}

/* ============================================================
   3. ХЛЕБНЫЕ КРОШКИ
   ============================================================ */

.breadcrumbs {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 14px 0;
    border-bottom: 1px solid var(--grid-line);
    margin-bottom: 24px;
}
.breadcrumbs a { color: var(--text-body); }
.breadcrumbs a:hover { color: var(--accent-steel); }
.breadcrumbs .sep {
    color: var(--accent-steel);
    margin: 0 6px;
    opacity: 0.7;
}

/* ============================================================
   4. ОСНОВНОЙ ЛЕЙАУТ
   ============================================================ */

.site-main {
    padding: 28px 0 56px;
    min-height: 60vh;
}

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

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
}

.layout-with-sidebar > .content-area,
.layout-with-sidebar > .sidebar-area { min-width: 0; }

/* ============================================================
   5. КАРТОЧКИ ЗАПИСЕЙ
   ============================================================ */

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--accent-steel); }

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

.card-body {
    flex: 1;
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.card-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 40px;
    background: var(--bg-elev);
    color: var(--text-body);
    border: 1px solid var(--border-soft);
}
.card-tag.is-engineering { color: var(--accent-copper); border-color: rgba(201, 123, 92, 0.3); }
.card-tag.is-digital { color: var(--accent-steel); border-color: rgba(45, 122, 158, 0.3); }
.card-tag.is-transport { color: var(--accent-ochre); border-color: rgba(191, 164, 107, 0.3); }

.card-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: 500;
}
.card-title a {
    color: var(--text-heading);
    text-decoration: none;
}
.card-title a:hover { color: var(--accent-steel); }

.card-meta {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}
.card-meta .meta-sep { color: var(--border-soft); margin: 0 6px; }

.card-excerpt {
    color: var(--text-body);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 14px;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt p:last-child { margin-bottom: 0; }

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

/* Сетка карточек */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin: 24px 0 36px;
}

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

.posts-list { display: flex; flex-direction: column; gap: 22px; margin: 24px 0 36px; }

/* ============================================================
   6. КНОПКИ
   ============================================================ */

.btn,
.wp-block-button__link,
button.read-more,
.read-more,
input[type="submit"] {
    display: inline-block;
    background: var(--accent-steel);
    color: #fff;
    border: 1px solid var(--accent-steel);
    padding: 10px 20px;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    letter-spacing: 0.01em;
}
.btn:hover,
.wp-block-button__link:hover,
button.read-more:hover,
.read-more:hover,
input[type="submit"]:hover {
    background: var(--accent-steel-dark);
    border-color: var(--accent-steel-dark);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-steel);
    border-color: var(--accent-steel);
}
.btn-secondary:hover {
    background: rgba(45, 122, 158, 0.1);
    color: var(--text-heading);
}

.btn-pill {
    border-radius: 40px;
    background: var(--bg-elev);
    color: var(--text-body);
    border-color: var(--border-soft);
    padding: 7px 16px;
    font-size: 0.82rem;
}
.btn-pill:hover,
.btn-pill.is-active {
    background: var(--accent-copper);
    border-color: var(--accent-copper);
    color: #fff;
}

/* ============================================================
   7. ГЛАВНАЯ СТРАНИЦА
   ============================================================ */

.hero-block {
    padding: 40px 30px;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
}
.hero-block::before {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    background: linear-gradient(135deg, transparent 50%, rgba(45,122,158,0.08) 50%);
    pointer-events: none;
}
.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-copper);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}
.hero-block h1 { margin: 0 0 14px; }
.hero-block p { max-width: 70ch; color: var(--text-body); }

.section-block {
    margin: 48px 0;
    padding: 32px 28px;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
}
.section-block .section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--grid-line);
    padding-bottom: 14px;
    margin-bottom: 22px;
    gap: 16px;
    flex-wrap: wrap;
}
.section-block h2 { margin: 0; }
.section-block .section-note {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.feature-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}
.feature-cols > div { min-width: 0; }

.feature-tile {
    padding: 22px;
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
}
.feature-tile-num {
    font-family: var(--font-mono);
    color: var(--accent-copper);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.feature-tile h3 { margin: 0 0 10px; font-size: 1.05rem; }
.feature-tile p { margin: 0; font-size: 0.9rem; color: var(--text-body); }

.spec-table {
    width: 100%;
    border-collapse: collapse;
}
.spec-table tr {
    border-top: 1px solid var(--grid-line);
}
.spec-table tr:last-child { border-bottom: 1px solid var(--grid-line); }
.spec-table td {
    padding: 12px 8px;
    border: none;
}
.spec-table td:first-child {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.spec-table td:last-child {
    font-family: var(--font-mono);
    color: var(--text-heading);
    text-align: right;
    font-size: 0.92rem;
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    counter-reset: step;
}
.steps-list > div {
    min-width: 0;
    padding: 20px 22px 20px 50px;
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    position: relative;
}
.steps-list > div::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: 18px; left: 20px;
    font-family: var(--font-mono);
    color: var(--accent-steel);
    font-size: 0.95rem;
}
.steps-list h4 { margin: 0 0 8px; font-size: 1rem; }
.steps-list p { margin: 0; font-size: 0.88rem; }

/* ============================================================
   8. САЙДБАР И ВИДЖЕТЫ
   ============================================================ */

.sidebar-area {
    font-size: 0.92rem;
}

.widget {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    padding: 18px 20px;
    margin-bottom: 22px;
    color: var(--text-body);
}

.widget-title,
.widget h2,
.widget h3 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--grid-line);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
}

.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li {
    padding: 8px 0;
    border-bottom: 1px dotted var(--grid-line);
    color: var(--text-body);
}
.widget li:last-child { border-bottom: none; }
.widget li a {
    color: var(--text-body);
    display: block;
    line-height: 1.45;
}
.widget li a:hover { color: var(--accent-steel); }

.widget .post-date,
.widget .rss-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
    letter-spacing: 0.02em;
}

.widget select {
    width: 100%;
    background: var(--bg-elev);
    color: var(--text-body);
    border: 1px solid var(--border-soft);
    padding: 8px 10px;
    border-radius: 4px;
    font-family: inherit;
}

/* ============================================================
   9. ПОДВАЛ
   ============================================================ */

.site-footer {
    background: #0A0D11;
    border-top: 1px solid var(--border-soft);
    padding: 44px 0 0;
    margin-top: 60px;
    color: var(--text-body);
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    padding-bottom: 36px;
}
.footer-cols > div { min-width: 0; }

/* В футере виджеты выводятся как колонки — индивидуальный стиль */
.site-footer .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}
.site-footer .widget-title,
.site-footer .widget h2,
.site-footer .widget h3 {
    color: var(--text-heading);
    border-bottom-color: var(--border-soft);
}
.site-footer .widget li {
    border-bottom-color: var(--grid-line);
}
.site-footer .widget li a {
    color: var(--text-body);
}
.site-footer .widget li a:hover { color: var(--accent-copper); }
.site-footer .widget p { color: var(--text-body); }
.site-footer .widget .post-date { color: var(--text-muted); }

.footer-stamp {
    border-top: 1px solid var(--border-soft);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.footer-stamp .stamp-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-stamp .stamp-label { color: var(--text-muted); }
.footer-stamp .stamp-value { color: var(--text-heading); margin-left: 6px; }
.footer-copy { color: var(--text-muted); }

/* ============================================================
   10. ПАГИНАЦИЯ
   ============================================================ */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 32px 0;
    justify-content: center;
    font-family: var(--font-mono);
}
.pagination a,
.pagination span {
    display: inline-block;
    min-width: 38px;
    text-align: center;
    padding: 8px 12px;
    border: 1px solid var(--border-soft);
    background: var(--bg-panel);
    color: var(--text-body);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.18s ease;
}
.pagination a:hover {
    border-color: var(--accent-steel);
    color: var(--text-heading);
}
.pagination .current {
    background: var(--accent-steel);
    border-color: var(--accent-steel);
    color: #fff;
}

/* ============================================================
   11. ПОИСК
   ============================================================ */

.search-form {
    display: flex;
    gap: 0;
    margin: 20px 0;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    background: var(--bg-elev);
    color: var(--text-heading);
    border: 1px solid var(--border-soft);
    border-right: none;
    padding: 10px 14px;
    border-radius: 6px 0 0 6px;
    font-family: inherit;
    font-size: 0.92rem;
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent-steel);
}
.search-form button,
.search-form input[type="submit"] {
    border-radius: 0 6px 6px 0;
}

.widget .search-form input[type="search"] { padding: 8px 10px; font-size: 0.85rem; }
.widget .search-form button { padding: 8px 14px; font-size: 0.85rem; }

/* ============================================================
   12. КОММЕНТАРИИ
   ============================================================ */

.comments-area {
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--border-soft);
}

.comments-title {
    font-size: 1.3rem;
    margin: 0 0 24px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}
.comment-list ol { list-style: none; }

.comment-body {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.comment-author { color: var(--text-heading); font-weight: 500; }
.comment-author cite { font-style: normal; }
.comment-meta {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.comment-meta a { color: var(--text-muted); }
.children { padding-left: 24px; border-left: 1px solid var(--grid-line); margin-top: 16px; }

.comment-reply-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    color: var(--accent-steel);
}

.comment-form {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    padding: 22px 24px;
}
.comment-form label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--bg-elev);
    color: var(--text-heading);
    border: 1px solid var(--border-soft);
    padding: 10px 12px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.92rem;
    margin-bottom: 14px;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-steel);
}
.comment-form .form-submit { margin: 0; }

/* ============================================================
   13. КОНТАКТЫ — статичные
   ============================================================ */

.contact-static {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin: 24px 0;
}
.contact-static > div { min-width: 0; }
.contact-static .contact-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.contact-static .contact-value a {
    color: var(--text-heading);
    font-size: 1.02rem;
}
.contact-static .contact-value a:hover { color: var(--accent-steel); }

/* ============================================================
   14. COOKIE-БАННЕР
   ============================================================ */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 720px;
    margin-inline: auto;
    background: var(--bg-panel);
    border: 1px solid var(--accent-steel);
    border-radius: 6px;
    padding: 16px 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.cookie-banner-text {
    flex: 1;
    min-width: 200px;
    font-size: 0.88rem;
    color: var(--text-body);
}
.cookie-banner-text a { color: var(--accent-steel); }

/* ============================================================
   15. ЭКСПЕРТНЫЙ РЕЖИМ — повышенный контраст
   ============================================================ */

body.expert-mode {
    --text-body: #D5DCE6;
    --text-heading: #FFFFFF;
}
body.expert-mode .mono,
body.expert-mode code,
body.expert-mode .card-meta,
body.expert-mode .spec-table td:last-child,
body.expert-mode .feature-tile-num,
body.expert-mode .breadcrumbs {
    color: var(--accent-copper);
}

/* ============================================================
   16. 404 / ПУСТЫЕ СОСТОЯНИЯ
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
}
.empty-state .code {
    font-family: var(--font-mono);
    font-size: 4rem;
    color: var(--accent-steel);
    margin: 0 0 12px;
    letter-spacing: 0.04em;
}
.empty-state h1 { margin-top: 0; }

/* ============================================================
   17. АДАПТИВ
   ============================================================ */

@media (max-width: 960px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .section-block { padding: 22px 18px; }
}

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

    .header-row { gap: 14px; }
    .brand-title { font-size: 0.85rem; }
    .brand-tagline { font-size: 0.72rem; }
    .brand-logo { width: 40px; height: 40px; flex-basis: 40px; }

    .menu-toggle { display: inline-block; }

    .primary-nav .shell {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0;
    }
    .primary-nav ul {
        flex-direction: column;
        gap: 0;
        display: none;
        border-top: 1px solid var(--grid-line);
        margin-top: 10px;
    }
    .primary-nav ul.is-open { display: flex; }
    .primary-nav a { padding: 12px 4px; }

    .layout-default { width: 92%; }

    .hero-block { padding: 28px 20px; }
    .section-block { padding: 20px 16px; margin: 32px 0; }

    .card-horizontal { flex-direction: column; }
    .card-horizontal .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-horizontal .card-thumb-wrap a {
        position: static;
    }
    .card-horizontal .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

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

    .footer-cols { gap: 24px; }
    .footer-stamp { font-size: 0.72rem; }

    .cookie-banner {
        bottom: 0; left: 0; right: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
}

/* WordPress core classes */
.alignleft { float: left; margin: 0 1.4em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.4em; }
.aligncenter { display: block; margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 6px;
}
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px,1px,1px,1px);
}
.sticky { /* required class */ }
.gallery-caption { /* required class */ }
.bypostauthor { /* required class */ }
