/* ============================================================
   Тактический стиль RED — общий дизайн-базис
   Референс: канвас «Главная RED — редизайн», направление «Тактический минимум».
   Подключается на страницах, переведённых на новый стиль; классы с префиксом
   .t- переиспользуются при модернизации остальных страниц.
   Бренд: слово «RED» и буква-логотип «R» — всегда шрифтом 'Future Z'.
   ============================================================ */

/* --- Шрифты (локальные, subsets latin+cyrillic) --- */
@font-face {
  font-family: 'Future Z';
  src: url('/Fonts/Future Z.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/Fonts/jetbrainsmono-400-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/Fonts/jetbrainsmono-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/Fonts/jetbrainsmono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/Fonts/jetbrainsmono-500-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/Fonts/jetbrainsmono-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/Fonts/jetbrainsmono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/Fonts/ptsans-400-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/Fonts/ptsans-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/Fonts/ptsans-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/Fonts/ptsans-700-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/Fonts/ptsans-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/Fonts/ptsans-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Russo One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/Fonts/russoone-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Russo One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/Fonts/russoone-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Токены --- */
:root {
  --t-bg: #0c0e10;
  --t-grid-line: rgba(255, 255, 255, 0.028);
  --t-grid-size: 36px;
  --t-panel-bg: rgba(23, 24, 29, 0.85);
  --t-panel-border: rgba(255, 255, 255, 0.12);
  --t-line: rgba(255, 255, 255, 0.1);
  --t-red: #dc3545;
  --t-red-bright: #ff4d4d;
  --t-red-logo: #e90303;
  --t-green: #2ecc71;
  --t-text: #e8eaef;
  --t-text-muted: #9ca3af;
  --t-text-faint: #6b7280;
  --t-font-display: 'Russo One', 'Arial Black', sans-serif;
  --t-font-body: 'PT Sans', Arial, sans-serif;
  --t-font-mono: 'JetBrains Mono', Consolas, monospace;
  --t-font-brand: 'Future Z', 'Russo One', sans-serif;
}

/* --- Скроллбары: тонкие и в палитре, глобально ---
   Раньше их стилизовали вразнобой в отдельных файлах, часть правил
   потерялась при переписывании — и в панелях с прокруткой полезли
   широкие системные полосы. Одно правило на весь сайт: полоса почти
   не видна, палец подсвечивается красным при наведении. */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 0;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 53, 69, 0.65);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* --- Нормализация: атрибут hidden сильнее раскладочных display ---
   Панели стиля объявляют display: flex/grid, что перебивает [hidden]
   и оставляет свёрнутые блоки на экране. Правило возвращает семантику
   атрибута; страницы, которым нужно иное, переопределяют его явно. */
[hidden] {
  display: none !important;
}

/* --- Глобальный фон: тактическое стекло поверх ротации фото --- */
body {
  background-color: var(--t-bg);
}

/* Фотографии background.ejs живут на z -2; этот слой затемняет их и рисует
   HUD-сетку с виньеткой — фото просвечивает, контент читается. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: rgba(12, 14, 16, 0.74);
  background-image:
    radial-gradient(ellipse at center, transparent 40%, rgba(6, 7, 9, 0.6) 100%),
    linear-gradient(var(--t-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--t-grid-line) 1px, transparent 1px);
  background-size: 100% 100%, var(--t-grid-size) var(--t-grid-size), var(--t-grid-size) var(--t-grid-size);
  z-index: -1;
  pointer-events: none;
}

/* --- Бренд: слово «RED» / буква «R» --- */
.t-brand {
  font-family: var(--t-font-brand);
  font-weight: normal;
  color: var(--t-red-logo);
  letter-spacing: 1px;
}

/* --- Панель с фоном и рамкой --- */
.t-panel {
  background: var(--t-panel-bg);
  border: 1px solid var(--t-panel-border);
  border-radius: 0;
}

/* --- Уголки-кронштейны на ключевых панелях --- */
.t-bracket {
  position: relative;
}
.t-bracket::before,
.t-bracket::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.t-bracket::before {
  top: 0;
  left: 0;
  border-top: 2px solid var(--t-red);
  border-left: 2px solid var(--t-red);
}
.t-bracket::after {
  bottom: 0;
  right: 0;
  border-bottom: 2px solid var(--t-red);
  border-right: 2px solid var(--t-red);
}

/* --- HUD-подпись (моноширинный uppercase-микротекст) --- */
.t-hud {
  font-family: var(--t-font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--t-text-faint);
}
.t-hud--accent { color: var(--t-red-bright); }
.t-hud--light { color: var(--t-text-muted); }

/* --- Секционный заголовок: номер, подпись, линия-заполнитель --- */
.t-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--t-font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--t-text-faint);
}
.t-section-head .t-section-num { color: var(--t-red-bright); }
.t-section-head .t-section-line {
  flex-grow: 1;
  height: 1px;
  background: var(--t-line);
}
.t-section-head a {
  color: var(--t-text-muted);
  text-decoration: none;
  letter-spacing: 2px;
  transition: color 0.18s ease;
}
.t-section-head a:hover { color: var(--t-red-bright); }

/* --- Кнопки --- */
.t-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 0;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.t-btn--primary {
  background: var(--t-red);
  color: #ffffff;
  font-family: var(--t-font-display);
  font-size: 14px;
  letter-spacing: 2px;
  border: none;
}
.t-btn--primary:hover { background: #e63946; color: #ffffff; }
.t-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--t-text);
  background: transparent;
  font-family: var(--t-font-mono);
  font-size: 13px;
  letter-spacing: 2px;
}
.t-btn--ghost:hover { border-color: var(--t-red-bright); color: var(--t-red-bright); }

/* --- Заголовки --- */
.t-title {
  font-family: var(--t-font-display);
  font-weight: 400;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
}
