/* ============================================================ */
/* M-Tech Landing & Quiz — Styles                                 */
/* ============================================================ */

/* ----------- CSS Variables (тема / палітра) ------------------ */
:root {
  --bg-deep:        #07070d;
  --bg-base:        #0d0d18;
  --bg-elev:        #15152a;
  --bg-card:        rgba(28, 28, 51, 0.55);
  --bg-card-hover:  rgba(38, 38, 68, 0.75);
  --border:         rgba(255, 255, 255, 0.08);
  --border-strong:  rgba(255, 255, 255, 0.16);

  --text:           #f4f4f7;
  --text-muted:     #a3a3b8;
  --text-dim:       #6b6b85;

  --accent:         #a78bfa;        /* фіолетовий */
  --accent-strong:  #8b5cf6;
  --accent-2:       #34d399;        /* зелений */
  --accent-2-strong:#10b981;
  --accent-glow:    rgba(167, 139, 250, 0.35);

  --danger:         #f87171;
  --warning:        #fbbf24;
  --success:        #34d399;

  --radius-sm:      8px;
  --radius:         14px;
  --radius-lg:      24px;

  --shadow-card:    0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow:    0 0 60px var(--accent-glow);

  --font-body:      'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:   'Manrope', 'Inter', sans-serif;
}

/* ----------- Reset & base ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

/* ----------- Background decorations ------------------------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.bg-glow {
  position: fixed; z-index: -1;
  width: 720px; height: 720px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  will-change: transform;
}
.bg-glow-1 { background: rgba(139, 92, 246, 0.35); top: -200px; left: -200px;  animation: auroraMove1 28s ease-in-out infinite; }
.bg-glow-2 { background: rgba(52, 211, 153, 0.28);  bottom: -200px; right: -200px; animation: auroraMove2 34s ease-in-out infinite; }
.bg-glow-3 {
  background: rgba(251, 191, 36, 0.18);
  width: 500px; height: 500px;
  top: 40%; left: 40%;
  animation: auroraMove3 40s ease-in-out infinite;
}

@keyframes auroraMove1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40vw, 20vh) scale(1.25); }
  66%      { transform: translate(20vw, 50vh) scale(0.9); }
}
@keyframes auroraMove2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-35vw, -30vh) scale(1.35); }
}
@keyframes auroraMove3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50%      { transform: translate(-30%, -70%) scale(1.4); opacity: 0.9; }
}

/* ----------- Screens (welcome / quiz / thankyou) ----------- */
.screen { display: none; min-height: 100vh; }
.screen-active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ============================================================ */
/* WELCOME SCREEN                                                */
/* ============================================================ */
.top-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 48px;
  max-width: 1280px; margin: 0 auto;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo-clickable {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.logo-clickable:hover { opacity: 0.85; transform: translateY(-1px); }
.logo-clickable:hover .logo-mark { filter: drop-shadow(0 0 24px rgba(52, 211, 153, 0.6)); }
.logo-clickable:active { transform: translateY(0); }
/* (старий .logo-mark лишився для совместимости — не використовується) */
.logo-mark {
  font-size: 1.1em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================ */
/* LOGO CUBE — реальне лого M-Tech (PNG) з живою анімацією         */
/* ============================================================ */
.logo-cube {
  display: inline-block;
  width: 36px;
  height: 36px;
  vertical-align: middle;
  flex-shrink: 0;
  object-fit: contain;
  /* Подвійна анімація: легке коливання + плавна левітація */
  animation: cubeRock 3.6s ease-in-out infinite, cubeFloat 4.2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(167, 139, 250, 0.45));
  transform-origin: center center;
  transition: filter 0.3s ease;
}
.logo-small .logo-cube { width: 30px; height: 30px; }

/* Hover — повне 360° обертання за 1.4 сек + посилений glow */
.logo-clickable:hover .logo-cube {
  animation: cubeSpin360 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 6px 20px rgba(167, 139, 250, 0.75));
}

/* Базова "жива" анімація — коливання вліво-вправо */
@keyframes cubeRock {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(6deg); }
}
/* Левітація — повільне підняття-опускання */
@keyframes cubeFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -3px; }
}
/* Повне обертання навколо вертикалі — на hover */
@keyframes cubeSpin360 {
  0%   { transform: rotateY(0deg) rotate(-6deg); }
  100% { transform: rotateY(360deg) rotate(-6deg); }
}
.logo-small { font-size: 1.1rem; }

.top-nav-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-link { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s ease; white-space: nowrap; }
.nav-link:hover { color: var(--accent); }

/* ============================================================ */
/* ICON LINKS — круглі контактні іконки в top-nav                 */
/* ============================================================ */
.icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              color 0.2s ease,
              box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
}
.icon-link svg {
  width: 18px; height: 18px;
  display: block;
}
.icon-link:hover {
  transform: translateY(-3px) scale(1.05);
}

/* Бренд-кольори при hover */
.icon-link--mail:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(167, 139, 250, 0.15);
  box-shadow: 0 8px 20px rgba(167, 139, 250, 0.35);
}
.icon-link--phone:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
  background: rgba(52, 211, 153, 0.15);
  box-shadow: 0 8px 20px rgba(52, 211, 153, 0.35);
}
.icon-link--telegram:hover {
  color: #29b6f6;
  border-color: #29b6f6;
  background: rgba(41, 182, 246, 0.18);
  box-shadow: 0 8px 20px rgba(41, 182, 246, 0.4);
}
.icon-link--whatsapp:hover {
  color: #25D366;
  border-color: #25D366;
  background: rgba(37, 211, 102, 0.15);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}
.icon-link--instagram:hover {
  color: #ec4899;
  border-color: #ec4899;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(236, 72, 153, 0.18), rgba(139, 92, 246, 0.15));
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.35);
}

/* Tooltip під іконкою на hover */
.icon-link::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--bg-deep);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
}
.icon-link:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================ */
/* CONTACT BLOCK (welcome + thank-you)                            */
/* ============================================================ */
.contact-block {
  margin-top: 40px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  text-align: left;
  display: flex; flex-direction: column; gap: 20px;
}
.contact-block-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.contact-block-lines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.contact-line {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.contact-line:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.contact-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: rgba(167, 139, 250, 0.12);
  border-radius: 8px;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* PDF контакти */
.pdf-contacts p {
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: #d4d4dc;
}
.pdf-contacts strong { color: #a78bfa; font-weight: 600; }
.pdf-contacts a { color: #34d399; text-decoration: none; }

.welcome-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 48px 80px;
  text-align: center;
}

.welcome-badge {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
}

.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.reveal-line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: revealLine 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.reveal-line:nth-child(2) { animation-delay: 0.2s; }
@keyframes revealLine { to { opacity: 1; transform: none; } }
.welcome-lead, .welcome-badge, .welcome-cards, .btn-xl, .welcome-footer {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.welcome-badge { animation-delay: 0s; }
.welcome-lead  { animation-delay: 0.4s; }
.welcome-cards { animation-delay: 0.55s; }
.btn-xl        { animation-delay: 0.75s; }
.welcome-footer { animation-delay: 0.85s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.accent { color: var(--accent); }
.accent-2 { color: var(--accent-2); }

.welcome-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 56px;
  line-height: 1.65;
}

.welcome-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 56px;
  text-align: left;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(16px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.4s ease;
  position: relative;
}
.info-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(167, 139, 250, 0.15), transparent 50%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.info-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-6px) rotate3d(1, 1, 0, 1.5deg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(167, 139, 250, 0.2);
}
.info-card:hover::before { opacity: 1; }

.card-icon { font-size: 2rem; margin-bottom: 12px; }
.info-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: 14px;
}
.info-card ul { list-style: none; }
.info-card li {
  padding: 6px 0 6px 22px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.info-card li::before {
  content: '·';
  position: absolute; left: 6px; top: 4px;
  color: var(--accent);
  font-weight: 800; font-size: 1.4em;
}

/* ----------- Buttons --------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white;
  box-shadow: 0 4px 24px var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.7s ease;
  pointer-events: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 36px var(--accent-glow); }
.btn-primary:hover::before { left: 100%; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover { background: var(--bg-card-hover); }

.btn-success {
  background: linear-gradient(135deg, var(--accent-2-strong), var(--accent-2));
  color: var(--bg-deep);
  box-shadow: 0 4px 24px rgba(52, 211, 153, 0.35);
  font-weight: 700;
}
.btn-success:hover { transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); background: var(--bg-card); }

.btn-xl {
  padding: 18px 40px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.arrow, .arrow-back { transition: transform 0.2s ease; display: inline-block; }
.btn:hover .arrow { transform: translateX(4px); }
.btn:hover .arrow-back { transform: translateX(-4px); }

.welcome-footer {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 32px;
}

/* ============================================================ */
/* QUIZ SCREEN                                                   */
/* ============================================================ */
.quiz-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 20px 48px;
  background: rgba(13, 13, 24, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 50;
}

.progress-wrap { max-width: 600px; width: 100%; justify-self: center; }
.progress-meta {
  display: flex; justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.progress-track {
  height: 6px;
  background: var(--bg-elev);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent), var(--accent-2));
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.quiz-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 32px 120px;
}

.quiz-block {
  animation: slideIn 0.4s ease;
}

.block-header { margin-bottom: 32px; }
.block-number {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.block-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.block-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ----------- Question item -------------------------------- */
.question {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  backdrop-filter: blur(16px);
  transition: border-color 0.3s ease;
}
.question:hover { border-color: var(--border-strong); }
.question.answered { border-color: rgba(52, 211, 153, 0.3); }

.q-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}
.q-num {
  display: inline-block;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}
.q-help {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(167, 139, 250, 0.03));
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.q-help::before {
  content: 'ℹ';
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 22px; height: 22px;
  background: var(--accent);
  color: var(--bg-deep);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.78rem;
  font-style: normal;
  margin-top: 1px;
}
.q-help code, .q-help .term {
  background: var(--bg-elev);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
  border: 1px solid var(--border);
}

/* ============================================================ */
/* CHAR COUNTER                                                   */
/* ============================================================ */
.char-counter {
  display: block;
  text-align: right;
  font-size: 0.78rem;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.char-counter.low { color: var(--warning); }
.char-counter.ok { color: var(--accent-2); }

/* ============================================================ */
/* FILE UPLOAD                                                    */
/* ============================================================ */
.file-upload { width: 100%; }
.file-upload input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.file-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 32px 24px;
  background: var(--bg-elev);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.file-drop:hover { border-color: var(--accent); background: rgba(167, 139, 250, 0.05); }
.file-drop.dragover { border-color: var(--accent-2); background: rgba(52, 211, 153, 0.08); }
.file-drop .file-icon { font-size: 2rem; opacity: 0.7; }
.file-drop .file-text { font-weight: 600; color: var(--text); font-size: 0.95rem; }
.file-drop .file-hint { font-size: 0.82rem; color: var(--text-dim); }

.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeIn 0.3s ease;
}
.file-item-icon { font-size: 1.2em; flex-shrink: 0; }
.file-item-name { flex: 1; font-size: 0.9rem; font-weight: 500; }
.file-item-size { font-size: 0.78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.file-item-remove {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--text-dim);
  border-radius: 6px;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}
.file-item-remove:hover { background: rgba(248, 113, 113, 0.15); color: var(--danger); }

/* File upload статуси (multipart) */
.file-item-status {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  flex-shrink: 0;
}
.file-item-status.done {
  color: var(--accent-2);
  background: rgba(52, 211, 153, 0.12);
}
.file-item-status.uploading {
  color: var(--accent);
  background: rgba(167, 139, 250, 0.12);
  font-variant-numeric: tabular-nums;
}
.file-item-status.error {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.12);
  cursor: help;
}
.file-item-uploading { border-color: rgba(167, 139, 250, 0.4); }
.file-item-error { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.04); }
.file-item-done { border-color: rgba(52, 211, 153, 0.3); }
/* Progress bar під час завантаження */
.file-item-progress {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: rgba(167, 139, 250, 0.1);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.file-item-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}
.file-item { position: relative; }

/* ============================================================ */
/* FIELD HIGHLIGHT (after navigateToError)                        */
/* ============================================================ */
@keyframes highlightPulse {
  0%   { box-shadow: 0 0 0 0   rgba(248, 113, 113, 0.6); border-color: var(--danger); }
  50%  { box-shadow: 0 0 0 16px rgba(248, 113, 113, 0);   border-color: var(--danger); }
  100% { box-shadow: 0 0 0 0   rgba(248, 113, 113, 0);   border-color: var(--border); }
}
.question.field-highlight {
  border-color: var(--danger) !important;
  animation: highlightPulse 1.8s ease-out 2;
}

/* ============================================================ */
/* ERRORS MODAL                                                   */
/* ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--danger);
}
.modal-lead {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.error-list { list-style: none; padding: 0; margin: 0 0 24px 0; }
.error-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 16px;
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.error-item:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: var(--danger);
  transform: translateX(4px);
}
.error-block {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.error-label { font-weight: 600; color: var(--text); font-size: 0.95rem; }
.error-msg { font-size: 0.85rem; color: var(--text-muted); }
.modal-actions {
  display: flex; gap: 12px; justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* ----------- Form inputs ---------------------------------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="number"], textarea, select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all 0.2s ease;
  font-size: 0.98rem;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }

input::placeholder, textarea::placeholder { color: var(--text-dim); }

/* ----------- Radio / Checkbox options --------------------- */
.option-group { display: flex; flex-direction: column; gap: 10px; }

.option {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}
.option:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.option input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; }
.option-label { flex: 1; }
.option-title { display: block; font-weight: 500; }
.option-desc { display: block; color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; line-height: 1.4; }

.option.selected { border-color: var(--accent); background: rgba(167, 139, 250, 0.08); }

/* ----------- "Don't know" panel --------------------------- */
.dont-know-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 12px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}
.dont-know-toggle:hover { color: var(--accent); border-color: var(--accent); }

.hint-panel {
  margin-top: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(52, 211, 153, 0.05));
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: var(--radius);
  animation: fadeIn 0.3s ease;
}
.hint-panel.hidden { display: none; }
.hint-title {
  font-weight: 600; font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--accent);
}
.hint-panel ol {
  list-style: decimal; padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.hint-panel li { margin-bottom: 6px; }
.hint-panel li:last-child { margin-bottom: 0; }

.upsell {
  margin-top: 16px;
  padding: 16px 18px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--text);
  display: flex; align-items: center; gap: 12px;
}
.upsell::before { content: '🔍'; font-size: 1.2em; flex-shrink: 0; }
.upsell strong { color: var(--accent-2); }

/* ----------- Conditional branches ------------------------- */
.branch { display: none; animation: fadeIn 0.4s ease; }
.branch.active { display: block; }
.branch-label {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--accent-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ----------- Quiz navigation ------------------------------ */
.quiz-nav {
  display: flex; flex-direction: column; gap: 18px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.quiz-nav-row {
  display: flex; align-items: center; gap: 16px;
  width: 100%;
}
.quiz-nav-row #btn-prev { flex-shrink: 0; }
.quiz-nav-row #btn-next { flex-shrink: 0; }
#btn-submit {
  align-self: center;
  min-width: 240px;
  justify-content: center;
}
.btn-prev[disabled], #btn-prev[disabled] { opacity: 0.35; pointer-events: none; cursor: not-allowed; }

/* ----------- Page Dropdown ------------------------------ */
.page-dropdown {
  position: relative;
  flex: 1 1 auto;
  max-width: 480px;
  min-width: 0;
}
.page-dropdown-toggle {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.page-dropdown-toggle:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}
.page-dropdown.open .page-dropdown-toggle {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}

.page-dropdown-label {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.page-dropdown-title {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  min-width: 0;
}
.dd-chevron {
  width: 16px; height: 16px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: var(--text-muted);
}
.page-dropdown.open .dd-chevron { transform: rotate(180deg); color: var(--accent); }

/* Меню — відкривається ВГОРУ (бо footer-quiz-nav в самому низу) */
.page-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  max-height: 480px;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  z-index: 60;
  display: none;
  padding: 6px;
  backdrop-filter: blur(20px);
}
.page-dropdown.open .page-dropdown-menu {
  display: block;
  animation: fadeInUp 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}
.page-menu-item:hover { background: rgba(167, 139, 250, 0.10); }
.page-menu-item.current { background: rgba(167, 139, 250, 0.18); }
.page-menu-item.current .page-menu-name { font-weight: 600; }

.page-menu-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.page-menu-item.current .page-menu-number {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white;
}
.page-menu-item.visited .page-menu-number {
  background: rgba(52, 211, 153, 0.18);
  color: var(--accent-2);
}
.page-menu-item.visited.current .page-menu-number {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white;
}

.page-menu-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-menu-check {
  color: var(--accent-2);
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
}
.page-menu-current-dot {
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  animation: logoPulse 2s ease-in-out infinite;
}

/* Кастомний scrollbar для меню */
.page-dropdown-menu::-webkit-scrollbar { width: 6px; }
.page-dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.page-dropdown-menu::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.page-dropdown-menu::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================ */
/* RETURN BANNER (повернутись до останнього блоку)                */
/* ============================================================ */
.return-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(167, 139, 250, 0.08));
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--radius);
  animation: fadeInUp 0.4s ease;
  flex-wrap: wrap;
}
.return-banner-text { font-size: 0.95rem; color: var(--text); flex: 1; min-width: 200px; }
.return-banner-btn {
  padding: 8px 16px;
  background: var(--accent-2);
  color: var(--bg-deep);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.return-banner-btn:hover { background: var(--accent-2-strong); transform: translateX(4px); }

/* Submit button у footer завжди видимий — стиль трохи менший */
#btn-submit { background: linear-gradient(135deg, var(--accent-2-strong), var(--accent-2)); }

/* ============================================================ */
/* THANK YOU SCREEN                                              */
/* ============================================================ */
.thankyou-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 48px;
  text-align: center;
}

.success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--accent-2-strong), var(--accent-2));
  border-radius: 50%;
  font-size: 2.4rem;
  color: var(--bg-deep);
  font-weight: 800;
  margin-bottom: 32px;
  box-shadow: 0 0 60px rgba(52, 211, 153, 0.5);
  animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scaleIn { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }

.thankyou-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.thankyou-actions {
  margin: 32px 0 12px;
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}
.thankyou-hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 24px;
  font-style: italic;
}
.thankyou-card { text-align: left; margin-top: 40px; }
.thankyou-card p { margin-bottom: 12px; color: var(--text-muted); }
.thankyou-card p:last-child { margin-bottom: 0; }

/* ============================================================ */
/* POST-SUBMIT ACTIONS — фокусний блок з Telegram CTA             */
/* ============================================================ */
.post-submit-actions {
  margin-top: 32px;
  padding: 32px 28px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(52, 211, 153, 0.05));
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: var(--radius-lg);
  text-align: center;
  backdrop-filter: blur(16px);
}
.post-submit-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.post-submit-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 22px;
  line-height: 1.5;
}
.post-submit-actions .btn svg { vertical-align: middle; }

/* Тонка стрілка «На головну» внизу Thank You */
.thankyou-back-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 24px;
  padding: 10px 22px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
}
.thankyou-back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(167, 139, 250, 0.08);
  transform: translateX(-3px);
}
.thankyou-back-link:hover .arrow-back { transform: translateX(-3px); }
.thankyou-back-link .arrow-back { transition: transform 0.2s ease; }

/* ============================================================ */
/* GLOSSARY DRAWER                                               */
/* ============================================================ */
.glossary-drawer {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 100;
  max-width: 380px;
  display: none; /* за замовчуванням прихований; з'являється тільки на quiz screen */
}
/* Показуємо глосарій ТІЛЬКИ коли активний screen-quiz */
#screen-quiz.screen-active ~ .glossary-drawer { display: block; }
.glossary-toggle {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}
.glossary-toggle:hover { background: var(--bg-card-hover); transform: translateY(-2px); }

.glossary-content {
  display: none;
  margin-top: 12px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
}
.glossary-content.open { display: block; animation: fadeIn 0.3s ease; }
.glossary-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.glossary-header h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0;
  color: var(--accent);
}
.glossary-close {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; line-height: 1;
  color: var(--text-muted);
  border-radius: 8px;
  background: transparent;
  transition: all 0.2s ease;
  font-weight: 400;
}
.glossary-close:hover { background: var(--bg-card); color: var(--text); transform: rotate(90deg); }
.glossary-content h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--accent);
}
.glossary-content dl { font-size: 0.88rem; line-height: 1.5; }
.glossary-content dt {
  color: var(--accent-2);
  font-weight: 600;
  margin-top: 12px;
}
.glossary-content dt:first-child { margin-top: 0; }
.glossary-content dd { color: var(--text-muted); margin-left: 0; padding-bottom: 4px; }

/* ============================================================ */
/* UPSELL CHECKBOX (research-замовлення)                          */
/* ============================================================ */
.upsell-checkbox {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.upsell-checkbox:hover { background: rgba(52, 211, 153, 0.14); border-color: var(--accent-2); }
.upsell-checkbox input { margin-top: 4px; accent-color: var(--accent-2); flex-shrink: 0; width: 18px; height: 18px; }
.upsell-checkbox span { font-size: 0.92rem; line-height: 1.4; }
.upsell-checkbox strong { color: var(--accent-2); display: block; margin-bottom: 4px; }
.upsell-checkbox em { color: var(--text-muted); font-style: normal; font-size: 0.88rem; display: block; }
.upsell-checkbox.checked { background: rgba(52, 211, 153, 0.18); border-color: var(--accent-2); }

/* ============================================================ */
/* DOMAIN CHECKER                                                 */
/* ============================================================ */
.domain-checker {
  display: flex; gap: 10px; align-items: stretch;
  margin-bottom: 12px;
}
.domain-checker input { flex: 1; margin-bottom: 0; }
.domain-checker .btn-check {
  padding: 0 22px;
  background: var(--accent-strong);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.domain-checker .btn-check:hover { background: var(--accent); }
.domain-status {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  margin-top: 8px;
  display: none;
}
.domain-status.show { display: block; animation: fadeIn 0.3s ease; }
.domain-status.available { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.4); color: var(--accent-2); }
.domain-status.taken     { background: rgba(248, 113, 113, 0.10); border: 1px solid rgba(248, 113, 113, 0.4); color: var(--danger); }
.domain-status.unknown   { background: rgba(251, 191, 36, 0.10); border: 1px solid rgba(251, 191, 36, 0.4); color: var(--warning); }
.domain-status.loading   { background: var(--bg-elev); color: var(--text-muted); }
.domain-status a { color: inherit; text-decoration: underline; }

/* ============================================================ */
/* VALIDATION ERRORS                                              */
/* ============================================================ */
.field-error {
  display: block;
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(248, 113, 113, 0.08);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--danger);
}
input.invalid, textarea.invalid { border-color: var(--danger); }

/* Inline "other" input під чекбоксом */
.other-input { margin-top: 12px; }

/* ============================================================ */
/* PDF DOCUMENT (renders inside visible host, captured by html2pdf)
   Render host inline-styled у script.js — html2canvas вимагає
   повністю видимий елемент (opacity:0 чи offscreen — empty canvas).
   Користувач не бачить рендер через fullscreen loading overlay.    */
/* ============================================================ */
.pdf-document {
  font-family: 'Inter', sans-serif;
  color: #f4f4f7;
  background: #0d0d18;
  padding: 0;
  width: 794px;
}

.pdf-page {
  padding: 48px 44px;
  background: #0d0d18;
  position: relative;
  break-inside: auto;
}
/* Кожен новий тип сторінки починається з нової фізичної сторінки,
   але всередині секцій розбиття слідує природу контенту. */
/* min-height: 1123px = A4 portrait у px (794 × 1.414 = A4 aspect 595/842).
   Це робить canvas aspect точно A4 → image вписується у PDF page без розтягування і без полів. */
.pdf-cover         { page-break-after: always;  break-after: page; min-height: 1123px; position: relative; }
.pdf-section       { page-break-before: always; break-before: page; min-height: 1123px; position: relative; padding-bottom: 100px; }
.pdf-research      { page-break-before: always; break-before: page; min-height: 1123px; position: relative; padding-bottom: 100px; }
.pdf-footer-page   { page-break-before: always; break-before: page; min-height: 1123px; position: relative; padding-bottom: 100px; }

/* Footer на кожній секційній сторінці (НЕ на обкладинці) — дизайнерський акцент.
   Заповнює природний gap внизу сторінки, додає брендування + номер сторінки. */
.pdf-page-footer {
  position: absolute;
  left: 44px; right: 44px; bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
  color: #6b6b85;
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pdf-page-footer .pdf-footer-brand {
  color: #a78bfa;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.85rem;
}
.pdf-page-footer .pdf-footer-meta { color: #a3a3b8; font-size: 0.7rem; }
.pdf-page-footer .pdf-footer-pgnum { color: #a78bfa; font-weight: 600; }

/* Section "продовження" — для розбитих блоків (chunks по 5 Q&A) */
.pdf-section-cont {
  color: #a3a3b8;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.pdf-section-cont-tag {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  margin-left: 12px;
  border-radius: 6px;
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  vertical-align: middle;
}
/* Питання НЕ ламається посередині — якщо не вміщається, переходить на наступну сторінку цілком */
.pdf-q             { page-break-inside: avoid;  break-inside: avoid; }
.pdf-section h3,
.pdf-section .pdf-section-num,
.pdf-section .pdf-section-sub { page-break-after: avoid; break-after: avoid; }

.pdf-cover {
  background: linear-gradient(180deg, #07070d 0%, #15152a 70%, #1a1a3a 100%);
  /* НЕ використовуємо display:flex — html2canvas некоректно клонує flex layout
     (контент стискається до intrinsic-content-width). Замінено на padding-based
     vertical centering: великий padding-top "штовхає" контент у середину сторінки. */
  padding-top: 280px;
  padding-bottom: 200px;
}
.pdf-cover .pdf-logo {
  font-family: 'Manrope', sans-serif;
  font-weight: 800; font-size: 2.4rem;
  color: #a78bfa;
  letter-spacing: -0.03em;
  margin-bottom: 80px;
}
.pdf-cover h1 {
  font-family: 'Manrope', sans-serif;
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: #f4f4f7;
}
.pdf-cover h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #34d399;
  margin-bottom: 60px;
  letter-spacing: -0.01em;
}
.pdf-cover .pdf-meta {
  display: flex; gap: 40px;
  color: #a3a3b8;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.pdf-cover .pdf-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 100px;
  color: #a78bfa;
  font-size: 0.82rem;
  margin-bottom: 32px;
  align-self: flex-start;
}

.pdf-section .pdf-section-num {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a78bfa;
  padding: 5px 12px;
  background: rgba(167, 139, 250, 0.14);
  border-radius: 6px;
  margin-bottom: 14px;
}
.pdf-section h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #f4f4f7;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}
.pdf-section .pdf-section-sub {
  color: #a3a3b8;
  font-size: 0.92rem;
  margin-bottom: 28px;
  line-height: 1.55;
  font-style: italic;
}
.pdf-q {
  margin-bottom: 14px;
  padding: 16px 18px;
  background: rgba(28, 28, 51, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-left: 3px solid #a78bfa;
  border-radius: 10px;
}
.pdf-q-label {
  font-weight: 700;
  font-size: 0.88rem;
  color: #f4f4f7;
  margin-bottom: 8px;
  line-height: 1.4;
}
.pdf-q-answer {
  color: #d4d4dc;
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.pdf-q-answer ul { padding-left: 18px; margin: 0; }
.pdf-q-answer li { margin-bottom: 4px; }
.pdf-q-empty { color: #6b6b85; font-style: italic; }

.pdf-research {
  background: linear-gradient(180deg, #07070d 0%, #0a2a1c 100%);
}
.pdf-research h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #34d399;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.pdf-research p { color: #a3a3b8; margin-bottom: 24px; line-height: 1.6; }
.pdf-research ul { list-style: none; padding: 0; }
.pdf-research li {
  padding: 14px 18px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 10px;
  margin-bottom: 10px;
  color: #f4f4f7;
  page-break-inside: avoid;
}
.pdf-research li strong { color: #34d399; display: block; margin-bottom: 4px; }
.pdf-research li em { color: #a3a3b8; font-style: normal; font-size: 0.9rem; }

.pdf-footer-page {
  background: linear-gradient(180deg, #07070d 0%, #15152a 100%);
  text-align: center;
  display: flex; flex-direction: column; justify-content: center;
}
.pdf-footer-page h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 1.8rem;
  color: #a78bfa;
  margin-bottom: 32px;
}
.pdf-footer-page p { color: #d4d4dc; font-size: 1rem; margin-bottom: 12px; }
.pdf-footer-page a { color: #34d399; text-decoration: none; }

/* ============================================================ */
/* MOBILE                                                        */
/* ============================================================ */
@media (max-width: 768px) {
  .top-nav { padding: 14px 16px; gap: 12px; flex-wrap: wrap; }
  .top-nav-links { gap: 8px; }
  .icon-link { width: 36px; height: 36px; }
  .icon-link svg { width: 16px; height: 16px; }
  .icon-link::after { display: none; }  /* tooltips off on mobile */
  .top-nav-links .nav-link { font-size: 0.82rem; }
  .contact-block { padding: 20px; }
  .contact-block-lines { grid-template-columns: 1fr; }
  .welcome-wrap { padding: 24px 20px 60px; }
  .quiz-header { grid-template-columns: 1fr auto; padding: 12px 16px; gap: 12px; }
  .progress-wrap { grid-column: 1 / -1; order: 3; }
  .quiz-main { padding: 24px 16px 100px; }
  .question { padding: 20px; }
  .quiz-nav-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .quiz-nav-row > * { width: 100%; }
  .quiz-nav-row button { justify-content: center; }
  #btn-submit { min-width: 0; width: 100%; }
  .page-dropdown { max-width: none; }
  .page-dropdown-menu { max-height: 60vh; }
  .glossary-drawer { bottom: 16px; right: 16px; left: 16px; max-width: none; }
  .info-card { padding: 24px; }
  .welcome-badge { font-size: 0.78rem; padding: 6px 14px; }
  .btn-xl { padding: 14px 28px; font-size: 1rem; width: 100%; justify-content: center; }
}
