/* TZ: CSS variables */
:root {
  --green-primary: #00ff88;
  --green-secondary: #00cc6a;
  --green-glow: rgba(0, 255, 136, 0.15);
  --red-error: #ff3366;
  --bg-dark: #000000;
  --bg-card: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-muted: #444444;
}

/* TZ: Fonts — Fixedsys заголовки, JetBrains Mono терминал */
@font-face {
  font-family: 'Fixedsys';
  src: url('/fonts/Fixedsys.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Light.ttf') format('truetype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Thin.ttf') format('truetype');
  font-weight: 100;
  font-display: swap;
}

* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100%;
}

/* TZ: grid-bg — сетка фона */
.grid-bg {
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* TZ: text-gradient */
.text-gradient {
  background: linear-gradient(135deg, #00ff88 0%, #00ffcc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* TZ: glow-green, glow-text */
.glow-green {
  box-shadow: 0 0 20px var(--green-glow), 0 0 40px var(--green-glow);
}
.glow-text {
  text-shadow: 0 0 10px var(--green-glow), 0 0 20px var(--green-glow);
}

/* TZ: glass */
.glass {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Layout: только контентный блок по центру */
.app {
  min-height: 100vh;
  min-height: 100dvh;
}
.terminal-column {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  min-width: 0;
}
#header-block.terminal-block {
  padding-bottom: 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 136, 0.08);
}
#header-block.terminal-block .line::before {
  content: none !important;
}
#header-block .main-title {
  font-size: clamp(1.875rem, 6vw, 2.4rem);
}
#header-block .subtitle-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#header-block .blink-square {
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  background: var(--green-primary);
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0.2; }
}

.terminal-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(13px, 2.6vw, 15px);
  line-height: 1.65;
  color: var(--text-primary);
}
.terminal-block .line {
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0.36em; /* ×1.5 между абзацами */
}
.terminal-block .line:last-child {
  margin-bottom: 0;
}
.terminal-block .line::before {
  content: '# ';
  color: var(--green-secondary);
}
/* Заголовок фазы — крупный Fixedsys, зелёный (ТЗ); без # */
.terminal-block .phase-title {
  font-family: 'Fixedsys', monospace;
  color: var(--green-primary);
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  letter-spacing: 0.02em;
  margin-bottom: 1.08rem; /* ×1.5 между абзацами */
  margin-top: 2.25rem; /* ×1.5 между абзацами */
  text-shadow: 0 0 12px var(--green-glow);
}
.terminal-block .phase-title:first-child {
  margin-top: 0;
}
.terminal-block .phase-title::before {
  content: '# ';
  color: var(--green-primary);
}
/* Подзаголовок секции — жирный, вторичный зелёный */
.terminal-block .section-title {
  color: var(--green-secondary);
  font-weight: 600;
  font-size: 1.05em;
  margin-top: 1.8rem; /* ×1.5 между абзацами */
  margin-bottom: 0.63rem; /* ×1.5 между абзацами */
}
.terminal-block .section-title::before {
  content: '# ';
  color: var(--green-secondary);
}
/* Пункты списка — обычный текст, приглушённый # */
.terminal-block .line:not(.phase-title):not(.section-title):not(.terminal-item)::before {
  color: var(--text-muted);
}

/* Блок-терминал: шапка с названием фазы (sticky), тело с # и >> */
.phase-section {
  margin-top: 1.8rem; /* ×1.5 между абзацами */
  margin-bottom: 2.7rem; /* ×1.5 между абзацами */
}
.phase-section:first-child {
  margin-top: 0;
}
.terminal-console {
  font-family: 'JetBrains Mono', monospace;
  background: #0a0d0a;
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-top: none;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    inset 0 2px 0 rgba(0, 255, 136, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.4);
}
.terminal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  font-family: 'Fixedsys', monospace;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--green-primary);
  background: linear-gradient(180deg, rgba(0, 40, 24, 0.9) 0%, rgba(0, 24, 14, 0.95) 100%);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 6px 6px 0 0;
  border-bottom: 1px solid rgba(0, 255, 136, 0.35);
  padding: 0.5rem 1rem;
  text-shadow: 0 0 8px var(--green-glow);
  box-shadow: inset 0 1px 0 rgba(0, 255, 136, 0.1);
}
.terminal-body {
  padding: 1rem 1.25rem;
  background: #070907;
  min-height: 2em;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
}
.terminal-console .terminal-body .section-title::before {
  content: '# ';
  color: var(--green-secondary);
}
.terminal-console .terminal-body .terminal-item::before {
  content: '>> ';
  color: var(--text-secondary);
}
.terminal-console .terminal-body .terminal-item {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 100;
}
.terminal-console .terminal-body .line {
  margin-bottom: 0.45em; /* ×1.5 между абзацами */
}
.terminal-console .terminal-body .section-title {
  font-weight: 400;
  margin-top: 2.03rem; /* ×1.5 между абзацами */
  margin-bottom: 0.54em; /* ×1.5 между абзацами */
}
.terminal-console .terminal-body .section-title:first-child {
  margin-top: 0;
}

/* Landing — один экран с кнопкой «Открыть QA starter pack» */
.landing-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
  text-align: center;
  background: var(--bg-dark);
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.landing-screen h1 {
  font-family: 'Fixedsys', monospace;
  font-size: clamp(2rem, 8vw, 4rem);
  color: var(--green-primary);
  margin-bottom: 1rem;
}
.landing-screen p {
  font-size: clamp(1rem, 4vw, 2rem);
  color: var(--text-secondary);
  margin-bottom: 2.7rem; /* ×1.5 между абзацами */
}
.landing-screen .btn-primary {
  display: inline-block;
  padding: 1.5rem 3rem;
  font-size: clamp(1rem, 4vw, 2rem);
  background: var(--green-primary);
  color: var(--bg-dark);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.landing-screen .btn-primary:hover {
  box-shadow: 0 0 20px var(--green-glow);
}

/* Subscribe screen — TZ: grid-bg, те же шрифты */
.subscribe-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
  text-align: center;
  background: var(--bg-dark);
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.subscribe-screen h1 {
  font-family: 'Fixedsys', monospace;
  font-size: clamp(2rem, 8vw, 4rem);
  color: var(--green-primary);
  margin-bottom: 1rem;
}
.subscribe-screen p {
  font-size: clamp(1rem, 4vw, 2rem);
  color: var(--text-secondary);
  margin-bottom: 2.7rem; /* ×1.5 между абзацами */
}
.subscribe-screen .btn {
  display: inline-block;
  padding: 1.5rem 3rem;
  font-size: clamp(1rem, 4vw, 2rem);
  background: var(--green-primary);
  color: var(--bg-dark);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s;
}
.subscribe-screen .btn:hover {
  box-shadow: 0 0 20px var(--green-glow);
}
.subscribe-screen .btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--text-muted);
}

/* CTA block — в формате консоли (terminal) */
.cta-block {
  margin-top: 3rem;
  font-family: 'JetBrains Mono', monospace;
}

/* Дополнительные материалы — консоль под CTA */
.extras-block {
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.extras-block .terminal-body .btn-cta {
  margin-top: 0.75rem;
  margin-bottom: 0;
}
.extras-block .terminal-body .section-title {
  margin-top: 1.35rem;
}
.extras-block .terminal-body .section-title:first-child {
  margin-top: 0;
}
.cta-terminal {
  position: relative;
  background: #0a0d0a;
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  overflow: visible;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    inset 0 2px 0 rgba(0, 255, 136, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(0, 255, 136, 0.25),
    0 0 16px rgba(0, 255, 136, 0.12);
  animation: cta-glow-pulse 3s ease-in-out infinite;
}
.cta-terminal-inner {
  position: relative;
  z-index: 1;
  border-radius: 6px;
  overflow: hidden;
}
@keyframes cta-glow-pulse {
  50% {
    box-shadow:
      inset 0 0 80px rgba(0, 0, 0, 0.6),
      inset 0 2px 0 rgba(0, 255, 136, 0.08),
      0 2px 8px rgba(0, 0, 0, 0.4),
      0 0 10px rgba(0, 255, 136, 0.3),
      0 0 16px rgba(0, 255, 136, 0.15);
  }
}
/* Искры по контуру CTA — вылет наружу до 16px */
.cta-terminal-sparks {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
  z-index: 0;
}
.cta-terminal-sparks .spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.9);
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.8);
  animation: cta-spark-out 2.5s ease-out infinite;
}
/* Top edge — 8 частиц */
.cta-terminal-sparks .spark-t1 { left: 5%;  top: 0; animation-delay: 0s;     --tx: 0;     --ty: -16px; }
.cta-terminal-sparks .spark-t2 { left: 18%; top: 0; animation-delay: 0.15s;  --tx: 0;     --ty: -16px; }
.cta-terminal-sparks .spark-t3 { left: 31%; top: 0; animation-delay: 0.3s;   --tx: 0;     --ty: -16px; }
.cta-terminal-sparks .spark-t4 { left: 44%; top: 0; animation-delay: 0.45s;  --tx: 0;     --ty: -16px; }
.cta-terminal-sparks .spark-t5 { left: 56%; top: 0; animation-delay: 0.6s;   --tx: 0;     --ty: -16px; }
.cta-terminal-sparks .spark-t6 { left: 69%; top: 0; animation-delay: 0.75s;  --tx: 0;     --ty: -16px; }
.cta-terminal-sparks .spark-t7 { left: 82%; top: 0; animation-delay: 0.9s;   --tx: 0;     --ty: -16px; }
.cta-terminal-sparks .spark-t8 { left: 95%; top: 0; animation-delay: 1.05s;  --tx: 0;     --ty: -16px; }
/* Right edge — 8 */
.cta-terminal-sparks .spark-r1 { right: 0; top: 5%;  animation-delay: 1.2s;  --tx: 16px;  --ty: 0; }
.cta-terminal-sparks .spark-r2 { right: 0; top: 18%; animation-delay: 1.35s; --tx: 16px;  --ty: 0; }
.cta-terminal-sparks .spark-r3 { right: 0; top: 31%; animation-delay: 1.5s;   --tx: 16px;  --ty: 0; }
.cta-terminal-sparks .spark-r4 { right: 0; top: 44%; animation-delay: 1.65s; --tx: 16px;  --ty: 0; }
.cta-terminal-sparks .spark-r5 { right: 0; top: 56%; animation-delay: 1.8s;   --tx: 16px;  --ty: 0; }
.cta-terminal-sparks .spark-r6 { right: 0; top: 69%; animation-delay: 1.95s; --tx: 16px;  --ty: 0; }
.cta-terminal-sparks .spark-r7 { right: 0; top: 82%; animation-delay: 2.1s;   --tx: 16px;  --ty: 0; }
.cta-terminal-sparks .spark-r8 { right: 0; top: 95%; animation-delay: 2.25s;  --tx: 16px;  --ty: 0; }
/* Bottom edge — 8 */
.cta-terminal-sparks .spark-b1 { left: 5%;  bottom: 0; animation-delay: 2.4s;  --tx: 0;     --ty: 16px;  }
.cta-terminal-sparks .spark-b2 { left: 18%; bottom: 0; animation-delay: 2.55s; --tx: 0;     --ty: 16px;  }
.cta-terminal-sparks .spark-b3 { left: 31%; bottom: 0; animation-delay: 2.7s;   --tx: 0;     --ty: 16px;  }
.cta-terminal-sparks .spark-b4 { left: 44%; bottom: 0; animation-delay: 2.85s;  --tx: 0;     --ty: 16px;  }
.cta-terminal-sparks .spark-b5 { left: 56%; bottom: 0; animation-delay: 3s;    --tx: 0;     --ty: 16px;  }
.cta-terminal-sparks .spark-b6 { left: 69%; bottom: 0; animation-delay: 3.15s; --tx: 0;     --ty: 16px;  }
.cta-terminal-sparks .spark-b7 { left: 82%; bottom: 0; animation-delay: 3.3s;   --tx: 0;     --ty: 16px;  }
.cta-terminal-sparks .spark-b8 { left: 95%; bottom: 0; animation-delay: 3.45s;  --tx: 0;     --ty: 16px;  }
/* Left edge — 8 */
.cta-terminal-sparks .spark-l1 { left: 0; top: 5%;  animation-delay: 3.6s;  --tx: -16px; --ty: 0; }
.cta-terminal-sparks .spark-l2 { left: 0; top: 18%; animation-delay: 3.75s; --tx: -16px; --ty: 0; }
.cta-terminal-sparks .spark-l3 { left: 0; top: 31%; animation-delay: 3.9s;   --tx: -16px; --ty: 0; }
.cta-terminal-sparks .spark-l4 { left: 0; top: 44%; animation-delay: 4.05s; --tx: -16px; --ty: 0; }
.cta-terminal-sparks .spark-l5 { left: 0; top: 56%; animation-delay: 4.2s;   --tx: -16px; --ty: 0; }
.cta-terminal-sparks .spark-l6 { left: 0; top: 69%; animation-delay: 4.35s; --tx: -16px; --ty: 0; }
.cta-terminal-sparks .spark-l7 { left: 0; top: 82%; animation-delay: 4.5s;   --tx: -16px; --ty: 0; }
.cta-terminal-sparks .spark-l8 { left: 0; top: 95%; animation-delay: 4.65s;  --tx: -16px; --ty: 0; }
@keyframes cta-spark-out {
  0% {
    opacity: 0.85;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0.2);
  }
}
.cta-terminal-header {
  font-family: 'Fixedsys', monospace;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--green-primary);
  background: linear-gradient(180deg, rgba(0, 40, 24, 0.9) 0%, rgba(0, 24, 14, 0.95) 100%);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 6px 6px 0 0;
  border-bottom: 1px solid rgba(0, 255, 136, 0.35);
  padding: 0.5rem 1rem;
  min-height: 50px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  text-shadow: 0 0 8px var(--green-glow);
  box-shadow: inset 0 1px 0 rgba(0, 255, 136, 0.1);
}
.cta-terminal-body {
  padding: 1rem 1.25rem;
  background: #070907;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
}
.cta-terminal-body .line::before {
  content: '# ';
  color: var(--green-secondary);
}
.cta-terminal-body .section-title::before {
  content: '# ';
  color: var(--green-secondary);
}
.cta-terminal-body .terminal-item::before {
  content: '>> ';
  color: var(--text-secondary);
}
.cta-terminal-body .section-title {
  color: var(--green-secondary);
  font-weight: 600;
  margin-top: 1.5rem; /* ×1.5 между абзацами */
  margin-bottom: 0.54em; /* ×1.5 между абзацами */
}
.cta-terminal-body .section-title:first-child {
  margin-top: 0;
}
.cta-rating-stars {
  display: inline-flex;
  gap: 0.15rem;
  color: var(--text-muted);
}
.cta-rating-stars .star {
  font-size: 1.1em;
}
.cta-rating-stars .star-full {
  color: var(--green-primary);
}
.cta-rating-stars .star-partial {
  position: relative;
  display: inline-block;
}
.cta-rating-stars .star-partial .star-bg {
  color: var(--text-muted);
}
.cta-rating-stars .star-partial .star-fg {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--fill, 70%);
  overflow: hidden;
  color: var(--green-primary);
}
.cta-terminal-body .rating-text {
  color: var(--green-secondary);
  margin-left: 0.25rem;
}
.cta-gallery {
  display: flex;
  gap: 1rem;
  margin: 1rem auto;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
}
.cta-gallery::after {
  content: '→';
  position: sticky;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin-left: -40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: rgba(0, 255, 136, 0.9);
  background: linear-gradient(to right, transparent 0%, rgba(7, 9, 7, 0.92) 30%);
  pointer-events: none;
  animation: cta-gallery-scroll-hint 1.5s ease-in-out 3;
}
@keyframes cta-gallery-scroll-hint {
  0%, 100% { opacity: 0.5; transform: translateY(-50%) translateX(0); }
  50% { opacity: 1; transform: translateY(-50%) translateX(6px); }
}
.cta-gallery.scroll-hint-done::after {
  animation: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cta-gallery::-webkit-scrollbar {
  height: 6px;
}
.cta-gallery::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: 3px;
}
.cta-gallery::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 136, 0.3);
  border-radius: 3px;
}
.cta-gallery-item {
  flex-shrink: 0;
  width: min(320px, 100%);
  height: 200px;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
}
.cta-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}
.cta-terminal-body .btn-cta,
.extras-block .terminal-body .btn-cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #00ff88 0%, #00ffcc 100%);
  color: var(--bg-dark);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  border-radius: 8px;
  transition: box-shadow 0.2s;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.cta-terminal-body .btn-cta:hover,
.extras-block .terminal-body .btn-cta:hover {
  box-shadow: 0 0 24px var(--green-glow);
}

/* Мобильная версия: кегль на треть меньше (×2/3), увеличенное межстрочное расстояние */
@media (max-width: 768px) {
  html {
    font-size: 66.67%; /* 2/3 — уменьшение кегля на треть для rem/em */
  }
  .terminal-column .terminal-block {
    font-size: 13.33px; /* было 20px × 2/3 */
    line-height: 1.75;
  }
  .terminal-column #header-block .main-title {
    font-size: 2.8rem;
  }
  .terminal-column .phase-title {
    font-size: 1.9rem;
  }
  .terminal-column .terminal-header,
  .terminal-column .cta-terminal-header {
    font-size: 1.5rem;
  }
  .terminal-column .terminal-console .terminal-body,
  .terminal-column .cta-terminal-body {
    font-size: 13.33px; /* было 20px × 2/3 */
    line-height: 1.75;
  }
  /* Галерея по центру body, карточка на всю ширину контейнера — без обрезки */
  .cta-gallery-item {
    width: 100%;
  }
}

/* Loading — TZ: grid-bg */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-dark);
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.hidden {
  display: none !important;
}

/* Roadmap preloader — градиент полосками, WELCOME, исчезание к центру + глитч за 2s */
.roadmap-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
}
.roadmap-preloader.hidden {
  display: none !important;
}
.roadmap-preloader .preloader-stripes-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.roadmap-preloader .preloader-half {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.roadmap-preloader .preloader-half-bottom {
  flex-direction: column-reverse;
}
.roadmap-preloader .preloader-stripe {
  flex: 1;
  width: 100%;
  min-height: 0;
  background: linear-gradient(135deg, #00ff88 0%, #00ffcc 50%, #00cc6a 100%);
}
.roadmap-preloader .preloader-half-top .preloader-stripe,
.roadmap-preloader .preloader-half-bottom .preloader-stripe {
  animation: preloader-fade-out 2s ease-out forwards;
  animation-delay: calc(var(--i) * 0.055s);
}
@keyframes preloader-fade-out {
  0%    { opacity: 1; transform: translateX(0); }
  15%   { opacity: 1; transform: translateX(0); }
  16%   { opacity: 0.85; transform: translateX(4px); }
  17%   { opacity: 1; transform: translateX(-3px); }
  18%   { opacity: 1; transform: translateX(0); }
  48%   { opacity: 1; transform: translateX(0); }
  49%   { opacity: 0.85; transform: translateX(-4px); }
  50%   { opacity: 1; transform: translateX(3px); }
  51%   { opacity: 1; transform: translateX(0); }
  80%   { opacity: 0.4; transform: translateX(0); }
  82%   { opacity: 0.2; transform: translateX(2px); }
  84%   { opacity: 0.1; transform: translateX(-2px); }
  100%  { opacity: 0; transform: translateX(0); }
}
.roadmap-preloader .preloader-title-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.roadmap-preloader .preloader-title {
  font-family: 'Fixedsys', monospace;
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  color: var(--bg-dark);
  margin: 0;
  letter-spacing: 0.08em;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  animation: preloader-title-fade 2s ease-out forwards;
}
@keyframes preloader-title-fade {
  0%, 55% { opacity: 1; }
  85%     { opacity: 0.4; }
  100%    { opacity: 0; }
}

/* Error preloader — малиновый градиент, ERROR, те же полоски + глитч */
.error-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
}
.error-preloader.hidden {
  display: none !important;
}
.error-preloader .preloader-stripes-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.error-preloader .preloader-half {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.error-preloader .preloader-half-bottom {
  flex-direction: column-reverse;
}
.error-preloader .preloader-stripe {
  flex: 1;
  width: 100%;
  min-height: 0;
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 50%, #880e4f 100%);
  animation: preloader-fade-out 2s ease-out forwards;
  animation-delay: calc(var(--i) * 0.055s);
}
.error-preloader .preloader-title-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.error-preloader .preloader-title {
  font-family: 'Fixedsys', monospace;
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  color: #fff;
  margin: 0;
  letter-spacing: 0.08em;
  text-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
  animation: preloader-title-fade 2s ease-out forwards;
}

/* FAB — круглая кнопка PDF, всегда справа внизу над контентом */
.pdf-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #00b368 0%, #00a67a 100%);
  color: var(--bg-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 179, 104, 0.25), 0 0 12px rgba(0, 179, 104, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.pdf-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 179, 104, 0.35), 0 0 16px rgba(0, 179, 104, 0.15);
}
.pdf-fab:active {
  transform: scale(0.98);
}
.pdf-fab:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.pdf-fab-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.pdf-fab.hidden {
  display: none !important;
}
