/*
Theme Name: NitroSpeed
Theme URI: https://nitrospeed.ru
Author: NitroSpeed
Description: Спортивный журнал о закиси азота (N₂O) в автоспорте. Чёрная тема с красным акцентом без сайдбаров: поул-позиция, протокол заезда вместо ленты, виджеты в нижней пит-полосе, AJAX-подгрузка и автоматический демо-контент.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nitrospeed
Tags: news, blog, dark, red, one-column, custom-menu, translation-ready
*/

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

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

body {
	margin: 0;
	background-color: var(--bg);
	background-image:
		linear-gradient(var(--grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: 40px 40px;
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; transition: var(--t); }
a:hover { color: var(--accent-hi); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; color: var(--ink); }

p { margin: 0 0 1.2em; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

button { font: inherit; cursor: pointer; }

input, textarea, select {
	font: inherit; color: var(--ink);
	background: var(--surface2); border: 1px solid var(--border);
	border-radius: var(--r); padding: 10px 12px; width: 100%;
	transition: var(--t);
}
input:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--ink-ghost); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--accent); color: var(--on-accent); padding: 8px 14px; font-weight: 700;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

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

/* ==========================================================================
   3. Прогресс чтения
   ========================================================================== */
.reading-progress {
	position: fixed; top: 0; left: 0; height: 3px; width: 0;
	background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-hi));
	z-index: 300; box-shadow: 0 0 10px var(--accent-line);
}

/* ==========================================================================
   4. Тикер
   ========================================================================== */
.ticker {
	display: flex; align-items: stretch; height: 34px;
	background: var(--deep); border-bottom: 1px solid var(--border);
	font-family: var(--font-mono); font-size: .75rem; overflow: hidden;
}
.ticker-badge {
	flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
	padding: 0 16px; background: var(--accent); color: var(--on-accent);
	font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.ticker-badge::before {
	content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--on-accent);
	animation: ns-blink 1.2s steps(2, start) infinite;
}
.ticker-wrap { flex: 1; overflow: hidden; display: flex; align-items: center;
	mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-text { display: inline-flex; gap: 40px; white-space: nowrap; padding-left: 24px; animation: ns-ticker 40s linear infinite; }
.ticker-text span { display: inline-flex; align-items: center; gap: 10px; }
.ticker-text span::before { content: '▸'; color: var(--accent); }
.ticker-text a { color: var(--ink-mid); }
.ticker-text a:hover { color: var(--accent); }
.ticker:hover .ticker-text { animation-play-state: paused; }

@keyframes ns-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ns-blink { to { visibility: hidden; } }

/* ==========================================================================
   5. Шапка
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 200;
	background: var(--header-bg);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.site-logo { display: flex; align-items: center; gap: 12px; color: var(--ink); flex: 0 0 auto; }
.site-logo:hover { color: var(--ink); }
.site-logo svg { width: 36px; height: 36px; }
.logo-text { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.logo-text b { color: var(--accent); font-weight: 700; }
.logo-sub { display: block; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-ghost); margin-top: 4px; font-weight: 400; }
.custom-logo { max-height: 44px; width: auto; }

.header-nav { flex: 1; min-width: 0; }
.nav-list, .header-nav ul.menu { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav-list li, .header-nav ul.menu li { list-style: none; }
.nav-list li a, .header-nav ul.menu li a {
	display: block; padding: 8px 12px; color: var(--ink-mid);
	font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase;
	border: 1px solid transparent; border-radius: var(--r);
}
.nav-list li a:hover, .header-nav ul.menu li a:hover { color: var(--ink); border-color: var(--border-hi); }
.nav-list li.current-menu-item > a, .nav-list li.current-cat > a,
.header-nav ul.menu li.current-menu-item > a { color: var(--accent); border-color: var(--accent-line); background: var(--accent-light); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0;
	background: transparent; color: var(--ink); border: 1px solid var(--border); border-radius: var(--r);
	transition: var(--t);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

/* Бургер */
.btn-hamburger { display: none; flex-direction: column; gap: 5px; }
.btn-hamburger span { display: block; width: 18px; height: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.btn-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.btn-hamburger.is-active span:nth-child(2) { opacity: 0; }
.btn-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Мобильное меню */
.mobile-nav {
	position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 86vw); z-index: 260;
	background: var(--surface); border-left: 1px solid var(--border);
	padding: 84px 24px 24px; overflow-y: auto;
	transform: translateX(100%); transition: transform .35s var(--ease);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav .nav-list, .mobile-nav ul.menu { flex-direction: column; gap: 0; list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid var(--border); }
.mobile-nav li a { display: block; padding: 14px 4px; color: var(--ink); font-family: var(--font-mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.mobile-nav li a:hover { color: var(--accent); }
.mobile-nav-label { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .16em; color: var(--ink-ghost); text-transform: uppercase; margin-bottom: 8px; }

.site-overlay {
	position: fixed; inset: 0; z-index: 250; background: var(--overlay);
	opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.site-overlay.open { opacity: 1; visibility: visible; }

/* Поиск-оверлей */
.search-overlay {
	position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-start; justify-content: center;
	padding: 18vh 24px 24px; background: var(--search-bg);
	opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-overlay-inner { width: 100%; max-width: 720px; }
.search-overlay-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.search-overlay .search-form input[type="search"] { font-size: 1.4rem; padding: 18px 20px; }
.search-close { position: absolute; top: 24px; right: 24px; }

/* Форма поиска */
.search-form { display: flex; gap: 0; }
.search-form label { flex: 1; }
.search-form input[type="search"] { border-right: 0; border-radius: var(--r) 0 0 var(--r); }
.search-form .search-submit {
	flex: 0 0 auto; padding: 0 20px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
	font-family: var(--font-mono); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	border-radius: 0 var(--r) var(--r) 0; transition: var(--t);
}
.search-form .search-submit:hover { background: var(--accent-hi); }

/* ==========================================================================
   6. Общие элементы
   ========================================================================== */
.cat-badge {
	--cat: var(--accent);
	display: inline-flex; align-items: center; gap: 7px;
	font-family: var(--font-mono); font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
	color: var(--cat); padding: 3px 9px; border: 1px solid currentColor; border-radius: var(--r);
	line-height: 1.4; white-space: nowrap;
}
.cat-badge::before { content: ''; width: 6px; height: 6px; background: currentColor; }
a.cat-badge:hover { background: var(--accent-light); color: var(--cat); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 12px 22px; border: 1px solid var(--accent); border-radius: var(--r);
	background: var(--accent); color: var(--on-accent);
	font-family: var(--font-mono); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
	transition: var(--t);
}
.btn:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-light); color: var(--accent-hi); }
.btn[disabled] { opacity: .5; cursor: wait; }

.section-head {
	display: flex; align-items: center; gap: 16px; margin: 0 0 24px;
	font-family: var(--font-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mid);
}
.section-head::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-head b { color: var(--accent); font-weight: 600; }


/* SVG-иллюстрации */
.ns-svg { width: 100%; height: auto; }
.ns-svg .s-a { stroke: var(--accent); fill: none; }
.ns-svg .s-m { stroke: var(--border-hi); fill: none; }
.ns-svg .s-i { stroke: var(--ink-mid); fill: none; }
.ns-svg .f-a { fill: var(--accent); }
.ns-svg .f-al { fill: var(--accent-light); }
.ns-svg .f-s { fill: var(--surface3); }
.ns-svg .f-b { fill: var(--surface2); }
.ns-svg .t { fill: var(--ink-ghost); font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; }
.ns-svg .t-a { fill: var(--accent); font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.ns-svg .t-big { fill: var(--ink); font-family: var(--font-sans); font-size: 26px; font-weight: 700; }
.ns-svg .gridpat { stroke: var(--grid-line); }

.media-svg { background: var(--surface2); }

/* ==========================================================================
   7. Раскладка
   ========================================================================== */
.site-main-wrap { padding: 40px 0 72px; }
.site-body { display: grid; grid-template-columns: minmax(0, 1fr) var(--sidebar-w); gap: var(--gap); align-items: start; }
.site-body.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.content-area { min-width: 0; }

/* Анимация появления */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease), border-color var(--dur) var(--ease); }
.js .reveal.revealed { opacity: 1; transform: none; }
.js .card.reveal.revealed:hover { transform: translateY(-3px); }

/* Load more + пагинация */
.load-more-wrap { display: flex; justify-content: center; margin-top: 36px; }
.pagination-wrap { margin-top: 28px; }
.pagination-wrap .page-numbers-list, .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px;
	border: 1px solid var(--border); border-radius: var(--r); background: var(--surface);
	font-family: var(--font-mono); font-size: .78rem; font-weight: 600; color: var(--ink-mid);
}
a.page-numbers:hover, .page-numbers.current { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.page-numbers.dots { border-color: transparent; background: transparent; }
.js .pagination-wrap.has-loadmore { display: none; }

/* ==========================================================================
   10. Сайдбар
   ========================================================================== */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: calc(var(--header-h) + 20px); }
.widget { background: var(--surface); border: 1px solid var(--border); padding: 20px; }
.widget-title {
	display: flex; align-items: center; gap: 10px; margin: -20px -20px 18px; padding: 12px 20px;
	border-bottom: 1px solid var(--border); background: var(--surface2);
	font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
}
.widget-title::before { content: ''; width: 8px; height: 8px; background: var(--accent); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget li a { color: var(--ink); }
.widget li a:hover { color: var(--accent); }

.w-cats li { display: flex; justify-content: space-between; gap: 10px; }
.w-cats .count { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-ghost); }
.w-cats li a { display: flex; align-items: center; gap: 9px; }
.w-cats li a::before { content: ''; width: 6px; height: 6px; background: var(--cat, var(--accent)); flex: 0 0 auto; }

.w-recent li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.w-recent .num { font-family: var(--font-mono); font-size: .78rem; color: var(--accent); padding-top: 2px; }
.w-recent time { display: block; font-family: var(--font-mono); font-size: .68rem; color: var(--ink-ghost); margin-top: 2px; }

.w-facts .fact { display: none; }
.w-facts .fact.active { display: block; animation: ns-fade .4s var(--ease); }
.w-facts .fact-val { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 600; color: var(--accent); line-height: 1.1; }
.w-facts .fact-label { font-size: .9rem; color: var(--ink-mid); margin-top: 8px; }
.w-facts-nav { display: flex; gap: 6px; margin-top: 16px; }
.w-facts-nav button { width: 22px; height: 4px; padding: 0; border: 0; background: var(--border-hi); }
.w-facts-nav button.active { background: var(--accent); }
@keyframes ns-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.w-calc label { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-ghost); margin-bottom: 6px; }
.w-calc .row { margin-bottom: 14px; }
.w-calc input[type="range"] { padding: 0; height: 4px; accent-color: var(--accent); background: transparent; border: 0; }
.w-calc .val { float: right; color: var(--accent); }
.w-calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 6px; }
.w-calc-out div { background: var(--surface2); padding: 12px; }
.w-calc-out b { display: block; font-family: var(--font-mono); font-size: 1.25rem; color: var(--ink); font-weight: 600; }
.w-calc-out small { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; color: var(--ink-ghost); text-transform: uppercase; }
.w-calc-note { font-size: .74rem; color: var(--ink-ghost); margin: 10px 0 0; }

.tagcloud a, .tag-list a {
	display: inline-block; margin: 0 4px 6px 0; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r);
	font-family: var(--font-mono); font-size: .72rem !important; color: var(--ink-mid);
}
.tagcloud a:hover, .tag-list a:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   11. Статья
   ========================================================================== */
.breadcrumbs { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--ink-ghost); margin-bottom: 22px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: '/'; margin-right: 6px; color: var(--accent); }
.breadcrumbs a { color: var(--ink-mid); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current] { color: var(--ink-ghost); }

.entry-header { margin-bottom: 28px; }
.entry-header .cat-badge { margin-bottom: 18px; }
.entry-title { font-size: clamp(1.8rem, 3.6vw, 2.75rem); margin-bottom: 18px; }
.entry-lead { font-size: 1.12rem; color: var(--ink-mid); font-style: italic; border-left: 2px solid var(--accent); padding-left: 18px; margin-bottom: 26px; }

.byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.byline img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-hi); }
.byline-name { font-weight: 600; }
.byline-name a { color: var(--ink); }
.byline-role { display: block; font-family: var(--font-mono); font-size: .66rem; color: var(--ink-ghost); text-transform: uppercase; letter-spacing: .1em; }
.byline-meta { margin-left: auto; display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-mid); }
.byline-meta span b { color: var(--accent); font-weight: 600; }

.entry-cover { margin: 0 0 34px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.entry-cover img { width: 100%; }
.entry-cover .ns-svg { padding: 20px 40px; max-height: 380px; }
.entry-cover figcaption { padding: 10px 16px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: .68rem; color: var(--ink-ghost); letter-spacing: .06em; }

.entry-content { font-size: 1.06rem; line-height: 1.78; color: var(--body-ink); }
.entry-content > p:first-of-type::first-letter {
	float: left; font-family: var(--font-head); font-weight: 700; font-size: 3.4em; line-height: .9;
	margin: 6px 12px 0 0; color: var(--accent);
}
.entry-content h2 { font-size: 1.6rem; margin: 2em 0 .8em; padding-top: 18px; position: relative; }
.entry-content h2::before { content: ''; position: absolute; top: 0; left: 0; width: 56px; height: 3px; background: var(--accent); }
.entry-content h2::after { content: ''; position: absolute; top: 1px; left: 64px; right: 0; height: 1px; background: var(--border); }
.entry-content h3 { font-size: 1.22rem; margin: 1.7em 0 .7em; color: var(--accent-hi); }
.entry-content a { border-bottom: 1px solid var(--accent-line); }
.entry-content a:hover { border-color: var(--accent); }
.entry-content strong { color: var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.entry-content li { margin-bottom: .5em; }
.entry-content ul li::marker { color: var(--accent); }
.entry-content blockquote {
	margin: 2em 0; padding: 24px 28px 24px 30px; position: relative;
	background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
	font-size: 1.12rem; font-style: italic; color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: .92rem; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.entry-content th { background: var(--surface2); font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.entry-content td { background: var(--surface); }
.entry-content img { border: 1px solid var(--border); }
.entry-content code { font-family: var(--font-mono); font-size: .88em; background: var(--surface2); padding: 2px 6px; color: var(--accent-hi); }

.entry-footer { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.entry-footer-label { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-ghost); margin-right: 8px; }
.tag-list a { margin-bottom: 0; }
.share { display: flex; align-items: center; gap: 6px; }
.share a, .share button { width: 36px; height: 36px; }

.author-box { display: grid; grid-template-columns: 84px 1fr; gap: 20px; margin-top: 40px; padding: 24px; background: var(--surface); border: 1px solid var(--border); }
.author-box img { width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--accent); }
.author-box-label { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.author-box-name { font-size: 1.2rem; margin: 4px 0 8px; }
.author-box-name a { color: var(--ink); }
.author-box p { color: var(--ink-mid); font-size: .94rem; margin-bottom: 10px; }
.author-box-link { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.post-nav a { display: block; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); }
.post-nav a:hover { border-color: var(--accent); }
.post-nav small { display: block; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.post-nav .next { text-align: right; }
.post-nav span { font-weight: 600; line-height: 1.35; display: block; }

.related { margin-top: 52px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.related-grid .card-title { font-size: 1rem; }
.related-grid .card-excerpt { display: none; }

/* ==========================================================================
   12. Комментарии
   ========================================================================== */
.comments-area { margin-top: 52px; }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 28px; border-left: 1px dashed var(--border); }
.comment-body { padding: 18px 20px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); }
.comment-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comment-meta img { width: 40px; height: 40px; border-radius: 50%; }
.comment-author-name { font-weight: 600; }
.comment-date { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-ghost); display: block; }
.comment-content { color: var(--body-ink); font-size: .96rem; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-reply-link { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.comment-awaiting { font-family: var(--font-mono); font-size: .72rem; color: var(--accent); }
.comment-respond { padding: 24px; background: var(--surface); border: 1px solid var(--border); }
.comment-reply-title { font-size: 1.2rem; }
.comment-reply-title small { margin-left: 10px; font-family: var(--font-mono); font-size: .7rem; }
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-ghost); margin-bottom: 6px; }
.comment-form .required { color: var(--accent); }
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; }
.comment-form-cookies-consent input { width: auto; margin-top: 4px; }
.comment-form-cookies-consent label { text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: .86rem; }
.comment-notes, .logged-in-as { font-size: .86rem; color: var(--ink-ghost); }
.form-submit .submit { width: auto; padding: 12px 24px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-family: var(--font-mono); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.form-submit .submit:hover { background: var(--accent-hi); }
.no-comments { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-ghost); }

/* ==========================================================================
   13. Архивы / поиск / автор / 404 / страница
   ========================================================================== */
.archive-header {
	display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; align-items: center;
	padding: 30px 32px; margin-bottom: 36px; background: var(--surface); border: 1px solid var(--border);
}
.archive-kicker { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.archive-title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 10px; }
.archive-desc { color: var(--ink-mid); margin-bottom: 14px; }
.archive-desc p:last-child { margin: 0; }
.archive-count { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-ghost); }
.archive-count b { color: var(--accent); }
.archive-svg { opacity: .9; }

.empty-state { text-align: center; padding: 56px 32px; background: var(--surface); border: 1px solid var(--border); }
.empty-state h2 { font-size: 1.5rem; }
.empty-state p { color: var(--ink-mid); max-width: 460px; margin: 0 auto 24px; }
.empty-state .search-form { max-width: 460px; margin: 0 auto; }

.author-card { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: center; padding: 32px; margin-bottom: 36px; background: var(--surface); border: 1px solid var(--border); }
.author-card img { width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--accent); }
.author-badge { display: inline-block; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); padding: 3px 10px; margin-bottom: 10px; }
.author-card h1 { font-size: 2rem; margin-bottom: 8px; }
.author-card p { color: var(--ink-mid); margin-bottom: 18px; }
.author-stats { display: flex; flex-wrap: wrap; gap: 1px; background: var(--border); border: 1px solid var(--border); width: max-content; max-width: 100%; }
.author-stats div { background: var(--surface2); padding: 10px 18px; }
.author-stats b { display: block; font-family: var(--font-mono); font-size: 1.3rem; color: var(--accent); font-weight: 600; }
.author-stats small { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-ghost); }

.page-article { background: var(--surface); border: 1px solid var(--border); padding: 40px; }

.error-404 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 48px; background: var(--surface); border: 1px solid var(--border); }
.error-code { font-family: var(--font-mono); font-size: clamp(5rem, 12vw, 8.5rem); font-weight: 600; line-height: 1; color: var(--accent); letter-spacing: -.04em; margin-bottom: 8px; }
.error-404 h1 { font-size: 1.6rem; }
.error-404 p { color: var(--ink-mid); }
.error-404 .search-form { margin: 24px 0 18px; }

/* ==========================================================================
   14. Подвал
   ========================================================================== */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--border); color: var(--ink-mid); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0 44px; }
.footer-col h3 { font-family: var(--font-mono); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; font-size: .9rem; }
.footer-col a { color: var(--footer-link); }
.footer-col a:hover { color: var(--accent); }
.footer-about p { font-size: .9rem; color: var(--footer-link); margin: 16px 0 18px; max-width: 340px; }
.footer-about .site-logo { color: #fff; }
.footer-data { font-family: var(--font-mono); font-size: .76rem; }
.footer-data li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--border); padding-bottom: 7px; }
.footer-data span { color: var(--ink-ghost); }
.footer-data b { color: var(--accent); font-weight: 500; }
.socials { display: flex; gap: 8px; }
.socials a { color: var(--footer-link); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 18px 0; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: .7rem; color: var(--ink-ghost); }
.footer-bottom b { color: var(--accent); font-weight: 500; }

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 150; opacity: 0; visibility: hidden; transform: translateY(10px); background: var(--surface); transition: var(--t); }
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* ==========================================================================
   15. WordPress
   ========================================================================== */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1.5em; }
.wp-caption, .wp-block-image figcaption { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-ghost); }
.wp-caption-text { margin-top: 6px; }
.sticky .card-strip { background: var(--accent-light); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bypostauthor > .comment-body { border-color: var(--accent-line); }

/* ==========================================================================
   16. Адаптив
   ========================================================================== */
@media (max-width: 1100px) {
	:root { --sidebar-w: 280px; --gap: 28px; }
	.nav-list li a, .header-nav ul.menu li a { padding: 8px 9px; font-size: .7rem; }
}

@media (max-width: 900px) {
	.header-nav { display: none; }
	.btn-hamburger { display: inline-flex; }
	.site-body { grid-template-columns: minmax(0, 1fr); }
	.sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.related-grid { grid-template-columns: 1fr 1fr; }
	.related-grid .card:nth-child(3) { display: none; }
	.error-404 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	body { font-size: 15px; }
	.container { padding: 0 16px; }
	.site-main-wrap { padding: 24px 0 48px; }
	.logo-sub { display: none; }
	.ticker-badge { padding: 0 10px; }
	.sidebar { grid-template-columns: 1fr; }
	.archive-header { grid-template-columns: 1fr; padding: 22px 20px; }
	.archive-svg { display: none; }
	.byline-meta { margin-left: 0; width: 100%; }
	.entry-cover .ns-svg { padding: 12px; }
	.entry-content { font-size: 1rem; }
	.author-box { grid-template-columns: 1fr; }
	.author-card { grid-template-columns: 1fr; text-align: center; padding: 24px 20px; }
	.author-card img { margin: 0 auto; }
	.author-stats { margin: 0 auto; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav .next { text-align: left; }
	.related-grid { grid-template-columns: 1fr; }
	.related-grid .card:nth-child(3) { display: flex; }
	.footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 28px; }
	.page-article, .error-404 { padding: 24px 20px; }
	.entry-footer { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   17. Сниженная анимация
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.ticker-text { animation: none; }
	.ticker-wrap { overflow-x: auto; }
	.js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   NitroSpeed — переменные и уникальные стили
   ========================================================================== */
:root {
	--bg: #0a0a0a;
	--surface: #141414;
	--surface2: #1c1c1c;
	--surface3: #262626;
	--border: #2a2a2a;
	--border-hi: #3f3f3f;

	--accent: #dc2626;
	--accent-dark: #991b1b;
	--accent-hi: #ef4444;
	--accent-light: rgba(220, 38, 38, .16);
	--accent-line: rgba(220, 38, 38, .45);
	--on-accent: #ffffff;

	--ink: #f5f5f5;
	--ink-mid: #b3b3b3;
	--ink-ghost: #737373;
	--body-ink: #e5e5e5;

	--grid-line: transparent;
	--header-bg: rgba(10, 10, 10, .94);
	--deep: #000000;
	--footer-bg: #000000;
	--footer-link: rgba(245, 245, 245, .55);
	--search-bg: rgba(0, 0, 0, .96);
	--overlay: rgba(0, 0, 0, .7);

	--font-head: 'Barlow Condensed', 'Roboto Condensed', 'Arial Narrow', sans-serif;
	--font-sans: 'Barlow Condensed', 'Roboto Condensed', 'Arial Narrow', sans-serif;
	--font-mono: 'Roboto Mono', ui-monospace, monospace;

	--container: 1120px;
	--sidebar-w: 0px;
	--gap: 32px;
	--r: 0;
	--r-md: 0;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--dur: .18s;
	--t: all var(--dur) var(--ease);
	--header-h: 64px;
}

body { font-size: 18px; letter-spacing: .01em; }
h1, h2, h3, h4 { text-transform: uppercase; font-style: italic; font-weight: 800; letter-spacing: -.005em; }

/* Шапка */
.site-header { border-bottom: 3px solid var(--accent); }
.header-inner { justify-content: space-between; }
.site-logo svg { width: 44px; height: 36px; }
.logo-text { font-family: var(--font-head); font-size: 1.9rem; font-style: italic; font-weight: 800; text-transform: uppercase; }
.header-nav { display: flex; justify-content: center; }
.nav-list li a, .header-nav ul.menu li a { font-family: var(--font-head); font-size: .98rem; font-weight: 700; font-style: italic; letter-spacing: .03em; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 18px 12px 15px; }
.nav-list li a:hover, .header-nav ul.menu li a:hover { border-color: var(--ink); }
.nav-list li.current-menu-item > a, .nav-list li.current-cat > a { border-color: var(--accent); background: transparent; color: var(--ink); }
.ticker-badge { font-family: var(--font-head); font-style: italic; font-size: .95rem; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); padding-right: 26px; }
.ticker-badge::before { border-radius: 0; background: #fff; }
.cat-badge { font-family: var(--font-head); font-style: italic; font-size: .82rem; border: 0; background: var(--cat); color: #0a0a0a; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); padding: 2px 12px; }
.cat-badge::before { display: none; }
a.cat-badge:hover { background: #fff; color: #0a0a0a; }
.btn { font-family: var(--font-head); font-size: 1rem; font-style: italic; font-weight: 800; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); padding: 12px 28px; }

/* Одна колонка по центру */
.site-body.no-sidebar .content-area { max-width: 980px; width: 100%; margin: 0 auto; }
.single .site-body.no-sidebar .content-area, .page .site-body.no-sidebar .content-area { max-width: 820px; }

/* Поул-позиция */
.pole { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); margin-bottom: 56px; background: linear-gradient(115deg, var(--surface) 0 62%, var(--accent) 62% 62.6%, var(--surface2) 62.6%); border-left: 6px solid var(--accent); overflow: hidden; }
.pole-num { position: absolute; right: 18px; top: -26px; font-family: var(--font-head); font-size: 11rem; font-weight: 800; font-style: italic; line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .09); pointer-events: none; }
.pole-body { position: relative; padding: 40px 36px; display: flex; flex-direction: column; gap: 16px; }
.pole-flag { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-hi); }
.pole-title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: .95; margin: 0; }
.pole-title a { color: var(--ink); }
.pole-title a:hover { color: var(--accent-hi); }
.pole-excerpt { color: var(--ink-mid); font-size: 1.15rem; margin: 0; }
.pole-stats { display: flex; gap: 0; margin: 4px 0 8px; }
.pole-stats div { padding: 0 20px; border-left: 1px solid var(--border-hi); }
.pole-stats div:first-child { padding-left: 0; border-left: 0; }
.pole-stats dt { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-ghost); }
.pole-stats dd { margin: 0; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; font-style: italic; }
.pole .btn { align-self: flex-start; }
.pole-media { display: flex; align-items: center; justify-content: center; padding: 20px; }
.pole-media img { width: 100%; height: 100%; object-fit: cover; }

/* Протокол заезда */
.timing-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.timing-title h2 { font-size: 2.2rem; margin: 0; }
.timing-title h2::before { content: ''; display: inline-block; width: 14px; height: 28px; margin-right: 12px; background: var(--accent); transform: skewX(-18deg); vertical-align: -3px; }
.timing-title span { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-ghost); text-transform: uppercase; letter-spacing: .1em; }
.timing-head, .lap { display: grid; grid-template-columns: 74px minmax(0, 1fr) 190px 90px; align-items: center; gap: 18px; }
.timing-head { padding: 8px 16px; background: var(--accent); font-family: var(--font-mono); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.timing { counter-reset: pos 1; }
.lap { position: relative; padding: 18px 16px; border-bottom: 1px solid var(--border); background: var(--surface); transition: background var(--dur), transform var(--dur); }
.lap:nth-child(even) { background: var(--bg); }
.lap::before { counter-increment: pos; content: counter(pos, decimal-leading-zero); font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; font-style: italic; line-height: 1; color: var(--ink); }
.lap::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat, var(--accent)); }
.lap:hover { background: var(--surface2); }
.lap-title { font-size: 1.45rem; line-height: 1.05; margin: 0 0 4px; }
.lap-title a { color: var(--ink); }
.lap-title a:hover { color: var(--accent-hi); }
.lap-excerpt { margin: 0; color: var(--ink-ghost); font-size: .98rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lap-time { text-align: right; font-family: var(--font-mono); }
.lap-time b { display: block; font-size: 1.15rem; color: var(--accent-hi); }
.lap-time time { font-size: .72rem; color: var(--ink-ghost); }
.js .lap.reveal { transform: translateX(-24px); }
.js .lap.reveal.revealed { transform: none; }
.related-grid { display: block; }

/* Пит-полоса */
.widget-band { background: var(--surface); border-top: 3px solid var(--accent); padding: 44px 0; }
.widget-band .sidebar { position: static; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.widget { background: var(--bg); border: 0; border-top: 3px solid var(--border-hi); }
.widget-title { background: transparent; border: 0; margin: -20px -20px 14px; font-family: var(--font-head); font-size: 1.15rem; font-style: italic; letter-spacing: .02em; }
.widget-title::before { width: 10px; height: 18px; transform: skewX(-18deg); }
.w-conv select, .w-conv input { margin-bottom: 10px; font-family: var(--font-mono); }
.w-conv-out { padding: 12px; background: var(--accent); color: #fff; font-family: var(--font-mono); }
.w-conv-out b { font-size: 1.6rem; }

/* Статья */
.entry-title { line-height: .98; }
.entry-content h2 { font-size: 1.9rem; }
.entry-content h2::before { height: 6px; transform: skewX(-25deg); }
.entry-content h3 { color: var(--accent-hi); font-style: italic; }
.entry-content blockquote { border-left-width: 6px; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; text-transform: uppercase; }
.entry-content > p:first-of-type::first-letter { font-style: italic; color: var(--accent); }
.page-numbers { font-family: var(--font-head); font-size: 1.1rem; font-style: italic; }

@media (max-width: 900px) {
	.pole { grid-template-columns: 1fr; background: var(--surface); }
	.pole-media { order: -1; border-bottom: 3px solid var(--accent); }
	.widget-band .sidebar { grid-template-columns: 1fr 1fr; }
	.timing-head, .lap { grid-template-columns: 56px minmax(0, 1fr) 80px; }
	.timing-head span:nth-child(3), .lap-cat { display: none; }
	.header-inner { justify-content: space-between; }
}
@media (max-width: 640px) {
	.pole-body { padding: 24px 20px; }
	.pole-num { font-size: 7rem; }
	.pole-stats { flex-wrap: wrap; row-gap: 10px; }
	.lap::before { font-size: 1.9rem; }
	.lap-excerpt { display: none; }
	.widget-band .sidebar { grid-template-columns: 1fr; }
	.timing-title { flex-direction: column; gap: 4px; }
}
