/*
Theme Name: Frontline Dispatch
Theme URI: https://example.com/
Description: Military & defense news portal theme. Dark tactical design, SEO-first markup (NewsArticle, Google News sitemap, Discover-ready images), no external requests, minimal JavaScript.
Version: 2.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: frontline-dispatch
*/

/* ---------- Tokens: тёмная тема по умолчанию, светлая через [data-theme="light"] ---------- */
:root {
    --bg: #0b0e0c;
    --card: #141913;
    --card-2: #1b211a;
    --ink: #e9ece3;
    --muted: #8f998a;
    --line: #28312a;
    --accent: #c9a64f;          /* coyote tan */
    --accent-text: #d8b966;     /* акцент для текста/ссылок на фоне --bg */
    --accent-ink: #12150f;      /* текст на акценте */
    --olive: #5d6b3a;
    --red: #cf1f2e;
    --red-dark: #a3141f;
    --r: 2px;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
    --font-head: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, system-ui, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-read: Georgia, "Times New Roman", Times, serif;
    color-scheme: dark;
}
:root[data-theme="light"] {
    --bg: #e9ebe4;
    --card: #ffffff;
    --card-2: #f3f4ee;
    --ink: #141813;
    --muted: #5c6657;
    --line: #d0d4c6;
    --accent-text: #7a5f12;
    --shadow: 0 1px 2px rgba(20, 24, 16, .08);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font-body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-text); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--font-head); }
ul, ol { margin: 0; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.screen-reader-text:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 999; }

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 100; background: #080a08; color: #e9ece3; border-top: 4px solid var(--olive); border-bottom: 3px solid var(--accent); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header a:hover { color: var(--accent); }

.header-inner { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.site-logo { flex: none; }
.logo-text { display: inline-flex; align-items: center; gap: 10px; font: 900 28px/1 var(--font-head); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; color: #fff; }
.logo-text:hover { color: var(--accent); }
.logo-mark { flex: none; width: 14px; height: 28px; background: linear-gradient(180deg, var(--accent) 0 33%, var(--olive) 33% 66%, var(--red) 66%); clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%); }
.custom-logo { max-height: 44px; width: auto; }
.header-date { margin-right: auto; padding-left: 16px; border-left: 1px solid #2a332b; color: #9ba596; font: 600 12px/1.2 var(--font-head); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

.header-search { position: relative; display: flex; align-items: center; background: #11160f; border: 1px solid #2a332b; border-radius: var(--r); width: 100%; max-width: 300px; }
.header-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; padding: 9px 12px; color: #e9ece3; }
.header-search input::placeholder { color: #7d8778; }
.header-search input:focus-visible { outline: none; }
.header-search:focus-within { border-color: var(--accent); }
.header-search button { flex: none; width: 38px; height: 38px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; }
.header-search button:hover { background: #ddbc66; }

.header-tools { display: flex; align-items: center; gap: 6px; }
.theme-toggle, .bne-bell, .menu-toggle, .search-toggle { flex: none; position: relative; width: 40px; height: 40px; padding: 0; border: 1px solid #2a332b; border-radius: var(--r); background: #11160f; color: #e9ece3; cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s; }
.theme-toggle:hover, .bne-bell:hover, .menu-toggle:hover, .search-toggle:hover, .menu-toggle[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="light"] .theme-toggle .ic-moon { display: none; }
:root[data-theme="light"] .theme-toggle .ic-sun { display: block; }
.menu-toggle, .search-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Навигация: полоса на десктопе, панель на мобильных ---------- */
.menu-panel { background: #0f130e; border-top: 1px solid #1f271f; }
.menu-panel-inner { display: flex; align-items: center; }
.panel-search { display: none; }
.menu-list, .menu-list ul { list-style: none; margin: 0; padding: 0; }
.menu-list { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.menu-list::-webkit-scrollbar { display: none; }
.menu-list a { display: block; padding: 11px 16px; font: 700 14px/1 var(--font-head); letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; color: #d4d9cc; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.menu-list a:hover, .menu-list .current-menu-item > a, .menu-list .current-menu-ancestor > a, .menu-list .current-cat > a { color: var(--accent); border-bottom-color: var(--accent); }
.menu-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .65); }

/* ---------- BREAKING ---------- */
.breaking-bar { background: var(--red); color: #fff; }
.breaking-bar[hidden] { display: none; }
.breaking-inner { display: flex; align-items: center; gap: 12px; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
.breaking-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: bn-pulse 1.4s ease-in-out infinite; }
.breaking-label { flex: none; padding: 2px 8px; background: #fff; color: var(--red-dark); font: 900 12px/1.4 var(--font-head); letter-spacing: .12em; text-transform: uppercase; }
.breaking-link { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: #fff; }
.breaking-link:hover { color: #fff; text-decoration: underline; }
.breaking-close { flex: none; width: 26px; height: 26px; padding: 0; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.breaking-close:hover { background: rgba(255, 255, 255, .34); }
@keyframes bn-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.75); } }

@media (max-width: 959px) {
    .menu-toggle, .search-toggle { display: grid; }
    .header-date, .header-inner > .header-search { display: none; }
    .header-inner .site-logo { margin-right: auto; }
    .header-inner { gap: 8px; }
    .site-logo { min-width: 0; }
    .logo-text { font-size: 18px; letter-spacing: .02em; gap: 7px; }
    .logo-mark { width: 11px; height: 22px; }
    .menu-panel { position: absolute; left: 0; right: 0; top: 100%; display: none; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; border-bottom: 3px solid var(--accent); }
    .menu-panel.is-open { display: block; }
    .menu-panel-inner { flex-direction: column; align-items: stretch; gap: 14px; padding-top: 16px; padding-bottom: 18px; }
    .panel-search { display: flex; max-width: none; }
    .menu-list { flex-direction: column; overflow: visible; }
    .menu-list a { padding: 13px 4px; border-bottom: 1px solid #1f271f; margin: 0; }
}

/* =====================================================================
   BASE COMPONENTS
   ===================================================================== */
.cat-label { display: inline-block; background: var(--accent); color: var(--accent-ink); font: 800 11px/1.5 var(--font-head); letter-spacing: .1em; text-transform: uppercase; padding: 2px 9px; }
a.cat-label:hover { background: #ddbc66; color: var(--accent-ink); }
.thumb-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #1d241c, #131712); }
:root[data-theme="light"] .thumb-ph { background: linear-gradient(135deg, #dfe2d6, #cdd2c2); }

/* ---------- Секции ---------- */
.home { padding-top: 20px; padding-bottom: 28px; }
.box { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 20px; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--card-2); }
.box-title { position: relative; padding-left: 14px; font-size: 18px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.box-title::before { content: ""; position: absolute; left: 0; top: 1px; bottom: 1px; width: 5px; background: var(--accent); }
.box-link { font: 700 12px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.box-link::after { content: " »"; }
.box-link:hover { color: var(--accent-text); }
.box-body { padding: 16px; }
.box-missing { border: 2px dashed var(--red); color: var(--red); font-size: 14px; padding: 12px 16px; margin-bottom: 20px; }

/* ---------- Hero-карточки с заголовком поверх картинки ---------- */
.hero-card { position: relative; display: block; overflow: hidden; background: #10140f; isolation: isolate; min-height: 220px; border-bottom: 3px solid var(--accent); }
.hero-card img, .hero-card .thumb-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.hero-card:hover img { transform: scale(1.035); }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 6, 4, .94) 0%, rgba(4, 6, 4, .45) 42%, rgba(4, 6, 4, 0) 72%); z-index: 0; }
.hero-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 16px 18px 18px; color: #fff; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hero-title { font: 800 17px/1.22 var(--font-head); letter-spacing: .01em; text-transform: uppercase; }
.hero-card:hover, .hero-card:hover .hero-title { color: #fff; }
.hero-card:hover .hero-title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.hero-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #c4cabc; letter-spacing: .04em; }
.hero-views { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Top Stories / витрина рубрики: 1 + 4 ---------- */
.hero-slider { position: relative; margin: 0 0 20px; }
.hero { display: grid; grid-template-columns: 1.55fr 1fr; gap: 4px; }
.hero--solo { grid-template-columns: 1fr; }
.hero-main { min-height: 480px; }
.hero-main .hero-body { padding: 26px 28px 28px; gap: 12px; }
.hero-main .hero-title { font-size: clamp(24px, 3vw, 38px); line-height: 1.12; }
.hero-side { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 4px; }
.hero-side .hero-card { min-height: 0; }
.hero-side .hero-title { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hero-side .hero-body { padding: 12px 14px 14px; }
.container > .archive-header { margin-top: 24px; }
.hero-slider .slider-btn { display: none; }

/* ---------- Слайдеры ---------- */
.slider { position: relative; }
.slider-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track > * { flex: 0 0 100%; scroll-snap-align: start; }
.slider-cards .slider-track > * { flex-basis: calc((100% - 24px) / 3); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border: 0; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; }
.slider-btn:hover { background: #fff; }
.slider-prev { left: 8px; }
.slider-next { right: 8px; }
.slider.is-static .slider-btn { display: none; }
.slider-dots { position: absolute; z-index: 3; top: 12px; right: 12px; display: flex; gap: 6px; align-items: center; background: rgba(0, 0, 0, .55); padding: 7px 10px; }
.slider-dots:empty { display: none; }
.slider-dots button { width: 8px; height: 8px; padding: 0; border: 0; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .2s, background .2s; }
.slider-dots button.is-active { width: 22px; background: var(--accent); }
.slide-sm { min-height: 0; aspect-ratio: 3 / 2; }
.slide-lg { min-height: 0; aspect-ratio: 16 / 10; }
.slide-card .hero-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide-lg .hero-body { padding: 22px 26px 24px; gap: 10px; }
.slide-lg .hero-title { font-size: clamp(20px, 2.4vw, 30px); }
.tag-slider .slide-lg { aspect-ratio: 16 / 9; }

/* ---------- Каркас страницы ---------- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; margin: 24px 0 48px; align-items: start; }
.sidebar { position: sticky; top: 130px; }
.admin-bar .sidebar { top: 162px; }
.archive-header { margin-bottom: 20px; }
.archive-title, .section-title { font-size: clamp(26px, 3.2vw, 38px); font-weight: 900; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 14px; padding-left: 16px; border-left: 6px solid var(--accent); line-height: 1.05; }
.section-title { font-size: 24px; }
.archive-header .archive-title { margin-bottom: 8px; }
.archive-desc { color: var(--muted); max-width: 70ch; }
.archive-desc p { margin: 0; }
.empty { background: var(--card); border: 1px solid var(--line); padding: 28px; color: var(--muted); }

/* ---------- Список новостей ---------- */
.news-item { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; background: var(--card); border: 1px solid var(--line); padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.news-thumb, .card-thumb, .popular-thumb, .mini-thumb { position: relative; display: block; overflow: hidden; background: #10140f; }
.news-thumb { aspect-ratio: 16 / 10; }
.news-thumb img, .card-thumb img, .popular-thumb img, .mini-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.news-thumb:hover img, .card-thumb:hover img { transform: scale(1.05); }
.news-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 2px 4px 2px 0; min-width: 0; }
.news-title { font-size: 22px; font-weight: 800; line-height: 1.2; }
.news-excerpt { color: var(--muted); font-size: 15px; }
.news-excerpt p { margin: 0; }
.news-meta { margin-top: auto; color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Вертикальные карточки ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; }
.card-thumb { aspect-ratio: 16 / 10; border-bottom: 3px solid var(--accent); }
.card-title { font-size: 18px; font-weight: 800; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.related { margin-top: 32px; }
.related .card-grid { margin-top: 12px; }

/* ---------- Плашки рубрика + дата ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 8px; margin-top: auto; }
.chip { display: inline-block; color: var(--muted); font: 700 11px/1.4 var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
a.chip { color: var(--accent-text); }
a.chip:hover { color: var(--ink); }

/* ---------- Сайдбар ---------- */
.widget { background: var(--card); border: 1px solid var(--line); padding: 0 16px 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.widget-title { margin: 0 -16px 14px; padding: 11px 16px 11px 30px; position: relative; font-size: 17px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--card-2); border-bottom: 1px solid var(--line); }
.widget-title::before { content: ""; position: absolute; left: 16px; top: 12px; bottom: 12px; width: 5px; background: var(--accent); }
.popular-list, .cat-list { list-style: none; margin: 0; padding: 0; counter-reset: pop; }
.popular-list li { counter-increment: pop; }
.popular-list li + li { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.popular-item { display: flex; gap: 12px; align-items: flex-start; }
.popular-thumb { flex: none; width: 84px; height: 64px; }
.popular-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.popular-title { font: 700 15px/1.25 var(--font-head); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.popular-title::before { content: counter(pop) ". "; color: var(--accent-text); }
.popular-date { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.cat-list li { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { color: var(--ink); font: 700 14px/1.2 var(--font-head); letter-spacing: .06em; text-transform: uppercase; }
.cat-list a:hover, .cat-list .current-cat > a { color: var(--accent-text); }

/* ---------- Пагинация ---------- */
.pagination { margin-top: 24px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { min-width: 42px; height: 42px; padding: 0 14px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font: 800 15px/1 var(--font-head); }
.pagination a.page-numbers:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pagination .page-numbers.current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pagination .dots { background: transparent; border-color: transparent; }

/* ---------- Home layout ---------- */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: stretch; margin-bottom: 20px; }
.home-main > .box:last-child { margin-bottom: 0; }
.home-latest { position: relative; min-height: 560px; }
.latest-box { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; }
.latest-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 8px; scrollbar-width: thin; scrollbar-color: #3a443a transparent; overscroll-behavior: contain; }
.latest-list::-webkit-scrollbar { width: 6px; }
.latest-list::-webkit-scrollbar-thumb { background: #3a443a; }
.latest-list .mini-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.latest-list .mini-item:last-child { border-bottom: 0; }

.mini-item { display: flex; gap: 12px; align-items: flex-start; }
.mini-thumb { flex: none; width: 76px; height: 64px; }
.mini-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mini-title { font: 700 15px/1.25 var(--font-head); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mini-item .chips { justify-content: flex-start; gap: 4px 12px; margin-top: 0; }
.tg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; padding: 16px; }
.tg-grid .mini-thumb { width: 104px; height: 78px; }

/* ---------- Video ---------- */
.video-band { background: #060806; border: 1px solid var(--line); border-top: 4px solid var(--red); padding: 0 16px 20px; margin-bottom: 20px; color: #e9ece3; }
.video-band .box-head { padding: 12px 0; border-bottom-color: #232b23; background: transparent; margin-bottom: 16px; }
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.video-card { display: flex; flex-direction: column; gap: 10px; }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video-thumb img, .video-thumb .thumb-ph { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.video-thumb:hover img { transform: scale(1.04); }
.video-play { position: absolute; left: 50%; top: 50%; width: 60px; height: 42px; margin: -21px 0 0 -30px; background: var(--red); display: grid; place-items: center; transition: transform .2s; }
.video-play::after { content: ""; margin-left: 4px; border-left: 15px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.video-thumb:hover .video-play { transform: scale(1.1); }
.video-title { font: 800 17px/1.22 var(--font-head); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.video-title a:hover { color: var(--accent); }

/* ---------- Breadcrumbs / byline / author ---------- */
.breadcrumbs { margin: 18px 0 0; font: 600 12px/1.4 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.content-main > .breadcrumbs { margin: 0 0 14px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { display: flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; opacity: .6; }
.breadcrumbs a:hover { color: var(--accent-text); }
.breadcrumbs [aria-current] { display: block; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs + .archive-header { margin-top: 12px; }
.byline { color: var(--ink); font-weight: 700; }
.byline a:hover { color: var(--accent-text); }
.author-card { display: flex; align-items: center; gap: 22px; margin: 16px 0 20px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--accent); }
.author-card .author-avatar { flex: none; width: 88px; height: 88px; object-fit: cover; }
.author-info { min-width: 0; }
.author-info .archive-title { margin-bottom: 6px; border: 0; padding: 0; }
.author-bio { color: var(--muted); margin-bottom: 8px; }
.author-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.author-meta a { color: var(--accent-text); }

/* ---------- Single ---------- */
.single-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--accent); padding: 32px; box-shadow: var(--shadow); }
.single-header { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.single-title { font-size: clamp(28px, 3.8vw, 46px); font-weight: 900; line-height: 1.08; letter-spacing: .005em; }
.single-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font: 600 12px/1.4 var(--font-head); letter-spacing: .08em; text-transform: uppercase; }
.single-meta .byline { text-transform: none; letter-spacing: 0; font-size: 14px; }
.single-thumb { margin: 0 0 24px; }
.single-thumb img { width: 100%; }
.single-thumb figcaption, .entry-content figcaption, .wp-caption-text { color: var(--muted); font-size: 13px; margin-top: 8px; }
.entry-content { font: 19px/1.7 var(--font-read); max-width: 70ch; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content h2 { font-size: 28px; margin: 1.6em 0 .6em; text-transform: uppercase; letter-spacing: .03em; }
.entry-content h3 { font-size: 22px; margin: 1.4em 0 .5em; }
.entry-content a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--ink); }
.entry-content img, .entry-content video, .entry-content iframe { max-width: 100%; }
.entry-content iframe { aspect-ratio: 16 / 9; width: 100%; height: auto; border: 0; }
.entry-content figure { margin: 1.4em 0; }
.entry-content img { margin-left: auto; margin-right: auto; }
.entry-content blockquote { margin: 1.4em 0; padding: 6px 0 6px 20px; border-left: 5px solid var(--accent); font-size: 21px; font-style: italic; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin-bottom: 1.1em; }
.entry-content table { width: 100%; border-collapse: collapse; font: 15px/1.4 var(--font-body); margin: 1.4em 0; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.entry-content th { background: var(--card-2); }
.entry-content .alignleft { float: left; margin: 0 1.2em 1em 0; }
.entry-content .alignright { float: right; margin: 0 0 1em 1.2em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: block; clear: both; }
.single-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.single-tags a, .tag-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--card-2); border: 1px solid var(--line); padding: 6px 12px; font: 700 12px/1.2 var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.single-tags a:hover, .tag-chip:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tag-chip span { font-size: 11px; color: var(--muted); }
.tag-chip:hover span { color: var(--accent-ink); }

/* ---------- Key Points ---------- */
.summary-card { margin: 0 0 24px; padding: 14px 20px 16px; border: 1px solid var(--line); border-left: 5px solid var(--accent); background: var(--card-2); }
.summary-title { margin: 0 0 8px; font: 900 13px/1.2 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); }
.summary-list { margin: 0; padding-left: 1.2em; font-size: 17px; line-height: 1.55; }
.summary-list li + li { margin-top: 6px; }

/* ---------- Reactions ---------- */
.reaction-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.reaction-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 14px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); font: 700 15px/1 var(--font-head); cursor: pointer; transition: border-color .15s, background .15s; }
.reaction-btn:hover { border-color: var(--accent); }
.reaction-btn:active { transform: scale(.96); }
.reaction-btn.is-mine { border-color: var(--accent); background: rgba(201, 166, 79, .16); }
.re-emoji { font-size: 22px; line-height: 1; }
.re-count { min-width: 1ch; font-variant-numeric: tabular-nums; }
.re-count:empty { display: none; }

/* ---------- Search suggestions ---------- */
.sg-box { position: absolute; top: calc(100% + 6px); right: 0; z-index: 130; width: min(440px, 92vw); max-height: 70vh; overflow-y: auto; padding: 8px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--accent); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.sg-box[hidden] { display: none; }
.panel-search .sg-box, .search-big .sg-box { left: 0; right: auto; width: 100%; }
.sg-label { padding: 8px 10px 4px; font: 800 11px/1.2 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 8px 8px; }
.sg-chip { padding: 5px 11px; background: var(--card-2); border: 1px solid var(--line); font: 700 13px/1.2 var(--font-head); letter-spacing: .06em; text-transform: uppercase; }
.sg-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; }
.sg-thumb { flex: none; width: 60px; height: 46px; object-fit: cover; }
.sg-text { display: flex; flex-direction: column; min-width: 0; }
.sg-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 700 15px/1.25 var(--font-head); }
.sg-date { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sg-all { display: block; margin-top: 4px; padding: 10px; border-top: 1px solid var(--line); text-align: center; font: 800 12px/1.2 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.sg-empty { padding: 14px 10px; color: var(--muted); }
.sg-item:hover, .sg-item.is-active, .sg-all:hover, .sg-all.is-active { background: var(--card-2); color: var(--accent-text); }
.sg-chip:hover, .sg-chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.search-big { max-width: none; margin: 6px 0 12px; background: var(--card); border-color: var(--line); }
.search-big input { font-size: 17px; padding: 12px 16px; color: var(--ink); }
.search-big button { width: 50px; height: 50px; }
.search-count { margin: 0; color: var(--muted); }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; }
.chip-cloud--flat { padding: 4px 0 0; }
.tag-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.tag-header .archive-title { margin: 0; }
.container > .tag-header { margin-bottom: 16px; }

/* ---------- Tiles / tag page ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.tile-grid .hero-card { min-height: 0; aspect-ratio: 4 / 3; }
.tile-grid .hero-body { gap: 8px; padding: 14px 16px 16px; }
.tile-grid .hero-title { font-size: 17px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tag-about { margin-top: 28px; }
.tag-about-body { padding: 18px 22px 22px; line-height: 1.7; color: var(--muted); }
.tag-about-body > :first-child { margin-top: 0; }
.tag-about-body > :last-child { margin-bottom: 0; }
.tag-about-body p { margin: 0 0 1em; }

/* ---------- Read Also (внутри статьи) ---------- */
.read-also { margin: 32px 0; padding: 0 22px 22px; background: var(--card-2); border: 1px solid var(--line); border-top: 4px solid var(--olive); font: 16px/1.5 var(--font-body); clear: both; }
.read-also .read-also-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 -22px 18px; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.read-also .read-also-title { margin: 0; font: 900 18px/1.2 var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.read-also .read-also-nav { display: flex; align-items: center; gap: 10px; }
.read-also.is-static .read-also-nav { display: none; }
.read-also .slider-dots { position: static; background: none; padding: 0; }
.read-also .slider-dots button { background: #3a443a; }
.read-also .slider-dots button.is-active { background: var(--accent); }
.read-also .ra-btn { flex: none; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.read-also .ra-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.read-also .slider-track { gap: 24px; }
.read-also .ra-slide { display: grid; grid-template-columns: minmax(0, 1fr) 40%; gap: 24px; align-items: center; }
.read-also .ra-slide--noimg { grid-template-columns: 1fr; }
.read-also .ra-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.read-also .ra-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.read-also .ra-views { display: inline-flex; align-items: center; gap: 5px; }
.read-also .ra-title { margin: 0; font: 800 21px/1.22 var(--font-head); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.read-also .ra-title a { color: inherit; text-decoration: none; }
.read-also .ra-title a:hover { color: var(--accent-text); }
.read-also .ra-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #10140f; }
.read-also .ra-thumb img { width: 100%; height: 100%; margin: 0; object-fit: cover; }

/* ---------- After post ---------- */
.after-post { margin-top: 20px; }
.after-card { background: var(--card); border: 1px solid var(--line); margin-bottom: 20px; overflow: hidden; }
.after-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--card-2); font: 800 13px/1.2 var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.after-head .ic { flex: none; width: 18px; height: 18px; color: var(--accent-text); }
.share-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
.share-btn { position: relative; width: 46px; height: 46px; padding: 0; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s; }
.share-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.share-btn .ic { width: 21px; height: 21px; }
.share-hint { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 5px 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.share-btn.is-done .share-hint { opacity: 1; }
.after-banner { padding: 10px; }
.ad-link { display: block; }
.ad-img { display: block; width: 100%; height: auto; }
.promo-rotator { display: grid; margin-bottom: 20px; }
.promo { grid-area: 1 / 1; display: flex; align-items: center; gap: 18px; min-height: 80px; padding: 14px 20px; color: #fff; border-left: 6px solid rgba(255, 255, 255, .5); opacity: 0; visibility: hidden; }
.promo-rotator.is-ready .promo { transition: opacity .5s ease, visibility .5s; }
.promo.is-active { opacity: 1; visibility: visible; }
.promo:hover { color: #fff; filter: brightness(1.1); }
.promo-ico { flex: none; width: 48px; height: 48px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.promo-ico .ic { width: 28px; height: 28px; }
.promo-text { min-width: 0; }
.promo-title { display: block; font: 800 19px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: .04em; }
.promo-sub { display: block; margin-top: 3px; font-size: 14px; opacity: .88; }
.promo--telegram { background: #2b6f9e; }
.promo--facebook { background: #1c4fa0; }
.promo--youtube  { background: #a31414; }
.promo--threads, .promo--x { background: #1a1d19; }

/* ---------- 404 / button ---------- */
.error-404 { margin: 40px 0 60px; }
.error-card { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.error-card p { margin: 0; color: var(--muted); }
.error-card .header-search { max-width: none; background: var(--card-2); }
.error-card .header-search input { color: var(--ink); }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font: 800 14px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; padding: 14px 26px; }
.btn:hover { background: #fff; color: var(--accent-ink); }

/* ---------- Footer ---------- */
.site-footer { background: #060806; color: #a9b2a3; padding: 32px 0 36px; margin-top: 24px; border-top: 4px solid var(--olive); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.site-footer .logo-text { font-size: 24px; }
.footer-tag { margin: 10px 0 0; color: #d4d9cc; font: 600 13px/1.4 var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.footer-copy { margin: 10px 0 0; font-size: 13px; max-width: 52ch; }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 700 13px/1.2 var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.footer-list a:hover { color: var(--accent); }

/* ---------- Dark: мелочи ---------- */
:root:not([data-theme="light"]) .entry-content img, :root:not([data-theme="light"]) .single-thumb img { filter: brightness(.94); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
    .slider-cards .slider-track > * { flex-basis: calc((100% - 12px) / 2); }
}
@media (max-width: 959px) {
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .hero { grid-template-columns: 1fr; }
    .hero-main { min-height: 360px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .home-layout { grid-template-columns: 1fr; }
    .home-latest { position: static; min-height: 0; }
    .latest-box { position: static; }
    .latest-list { max-height: 520px; }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .container { padding: 0 16px; }
    /* Top Stories / витрина рубрики превращается в карусель */
    .hero-slider > .hero { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
    .hero-slider > .hero::-webkit-scrollbar { display: none; }
    .hero-slider .hero-side { display: contents; }
    .hero-slider .hero-card { flex: 0 0 86%; min-height: 0; aspect-ratio: 3 / 2; scroll-snap-align: start; }
    .hero-slider .hero--solo .hero-card { flex-basis: 100%; }
    .hero-slider .hero-body, .hero-slider .hero-main .hero-body { padding: 14px 16px 16px; }
    .hero-slider .hero-title, .hero-slider .hero-main .hero-title { font-size: 17px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .hero-slider .hero-meta { display: none; }
    .slider-cards .slider-track > * { flex-basis: 85%; }
    .slide-lg { aspect-ratio: 4 / 3; }
    .slide-lg .hero-body { padding: 14px 16px 16px; }
    .slider-btn { width: 34px; height: 34px; }
    .slider-cards .slider-btn { display: none; }
    .tg-grid { grid-template-columns: 1fr; padding: 14px; }
    .video-grid { grid-template-columns: 1fr; }
    .news-item { grid-template-columns: 1fr; gap: 12px; }
    .news-body { padding: 0 2px 2px; }
    .news-title { font-size: 20px; }
    .single-card { padding: 20px 16px; }
    .entry-content { font-size: 18px; }
    .card-grid { grid-template-columns: 1fr; }
    .author-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
    .read-also { padding: 0 16px 16px; }
    .read-also .read-also-head { margin: 0 -16px 14px; padding: 10px 16px; }
    .read-also .ra-slide { grid-template-columns: 1fr; gap: 14px; }
    .read-also .ra-thumb { order: -1; aspect-ratio: 16 / 10; }
    .share-btn { width: 42px; height: 42px; }
    .promo { gap: 14px; padding: 12px 14px; }
    .promo-title { font-size: 16px; }
    .tile-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
    .site-header, .menu-backdrop, .site-footer, .sidebar, .after-post, .related, .read-also, .slider-btn, .breadcrumbs { display: none !important; }
    body { background: #fff; color: #000; }
    .content-layout { display: block; }
    .single-card { border: 0; box-shadow: none; padding: 0; background: #fff; }
    .entry-content { max-width: none; font-size: 12pt; color: #000; }
    a { color: inherit; text-decoration: none; }
}
