:root,
[data-theme="light"] {
  --bg-outer: #F3F4F6;
  --panel-dark: #FFFFFF;
  /* Used for left panel */
  --panel-dark-2: #F9FAFB;
  --panel-dark-3: #F3F4F6;
  --panel-light: #FFFFFF;
  /* Right panel */
  --card-bg: #FFFFFF;
  --card-border: #E5E7EB;

  --text-primary: #111827;
  --text-left-title: #111827;
  --text-left-desc: #4B5563;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;

  --divider-dark: #E5E7EB;
  --divider-light: #F3F4F6;
}

[data-theme="dark"] {
  --bg-outer: #000000;
  --panel-dark: #121212;
  --panel-dark-2: #1A1A1A;
  --panel-dark-3: #242424;
  --panel-light: #1A1A1A;
  --card-bg: #242424;
  --card-border: #333333;

  --text-primary: #FFFFFF;
  --text-left-title: #FFFFFF;
  --text-left-desc: #B3B3B3;
  --text-muted: #B3B3B3;
  --text-faint: #EDEDED;

  --divider-dark: #2A2A2A;
  --divider-light: #333333;
}

/* ═══ GLOBAL RESET & BASE ═══ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg-outer);
  font-family: 'Golos Text', sans-serif;
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.6;
}

/* ─── WRAPPER ─────────────────────────────── */
.quiz-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 0 20px;
  /* Reduced bottom padding to rely on footer margin */
  overflow-y: auto;
  /* Ensure content is scrollable if it exceeds viewport */
}

.legal-footer {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 0 16px;
  font-family: 'Golos Text', sans-serif;
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 1260px;
}

.legal-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.legal-footer a:hover {
  color: var(--text-muted);
  text-decoration: underline;
}

/* Cookie Consent — inline in footer */
.cookie-consent {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
  margin-right: 6px;
}

.cookie-accept-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  animation: cookie-pulse 2s ease-in-out infinite;
}

.cookie-accept-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: cookie-shimmer 2.5s ease-in-out infinite;
}

@keyframes cookie-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb, 232,134,15), 0.5); }
  50% { box-shadow: 0 0 8px 3px rgba(var(--accent-rgb, 232,134,15), 0.3); }
}

@keyframes cookie-shimmer {
  0% { left: -100%; }
  60% { left: 100%; }
  100% { left: 100%; }
}

.cookie-accept-btn:hover {
  filter: brightness(1.1);
}

/* Legal links row */
.legal-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: 40px;
}

.legal-footer .wayflow-credit {
  color: var(--accent);
  font-weight: 600;
}

/* Unsplash Attribution Modal */
.unsplash-modal {
  position: fixed;
  inset: 0;
  z-index: 9900;
  display: none;
  align-items: center;
  justify-content: center;
}

.unsplash-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.unsplash-modal__content {
  position: relative;
  background: var(--bg-card, #fff);
  border-radius: 14px;
  padding: 28px 32px;
  max-width: 440px;
  width: 90%;
  z-index: 1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.unsplash-modal__close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted, #999);
  padding: 0;
}

.unsplash-attribution-link {
  cursor: pointer;
}

.quiz-container {
  width: 100%;
  max-width: 1260px;
  display: flex;
  flex: 1;
  /* Stretches the container to fill height, leaving exactly 40px wrapper padding */
  max-height: 900px;
  /* Sensible maximum stretch so it doesn't look absurd on 4K */
  background: var(--panel-light);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 32px 64px rgba(0, 0, 0, 0.08);
  /* Optional: max-height constraint if we want internal scrolling, but usually better to let the whole page scroll */
}

/* ─── LEFT PANEL ──────────────────────────── */
.panel-left {
  width: 40%;
  flex-shrink: 0;
  background: var(--panel-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text-primary);
}

/* TOP ZONE — dynamic */
.left-top {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.slide-image-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.slide-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--panel-dark-3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.slide-image-placeholder svg {
  opacity: 0.12;
}

.slide-image-wrap img {
  position: relative;
  z-index: 2;
}

/* Gradient overlay на фото */
.slide-image-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, var(--panel-dark) 0%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}

.left-text {
  padding: 20px 32px 24px;
  flex-shrink: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 4;
  position: relative;
}

.left-text.fading {
  opacity: 0;
  transform: translateY(4px);
}

.left-title {
  font-family: 'Golos Text', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.left-desc {
  font-family: 'Golos Text', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-left-desc);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* BOTTOM ZONE — static */
.left-bottom {
  flex: 0 0 50%;
  background: var(--panel-dark-2);
  border-top: 1px solid var(--divider-dark);
  padding: 20px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

/* Stats */
.stats-row {
  display: flex;
  gap: 0;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 16px;
  position: relative;
}

.stat-item+.stat-item {
  padding-left: 16px;
  padding-right: 0;
}

.stat-item+.stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--divider-dark);
}

.stat-num {
  font-family: 'Golos Text', sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  color: var(--accent);
  letter-spacing: normal;
}

.stat-lbl {
  font-family: 'Golos Text', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Divider */
.left-divider {
  height: 1px;
  background: var(--divider-dark);
  margin: 0 -32px;
  flex-shrink: 0;
}

/* Portfolio */


.portfolio-label {
  font-family: 'Golos Text', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.portfolio-thumb {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--panel-dark-3);
  cursor: pointer;
}

.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.portfolio-thumb:hover img {
  opacity: 1;
}

.portfolio-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--panel-dark-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-more {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.portfolio-thumb:hover .portfolio-more {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
}

.portfolio-more span {
  font-family: 'Golos Text', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

[data-theme="dark"] .portfolio-more {
  background: linear-gradient(to top, rgba(15, 15, 15, 0.9) 0%, rgba(15, 15, 15, 0.4) 100%);
  backdrop-filter: none;
}

[data-theme="dark"] .portfolio-thumb:hover .portfolio-more {
  background: linear-gradient(to top, rgba(15, 15, 15, 0.95) 0%, rgba(15, 15, 15, 0.6) 100%);
}

[data-theme="dark"] .portfolio-more span {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Play overlay for video */
.portfolio-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.3s ease, background 0.3s ease;
}

.portfolio-thumb:hover .play-btn {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.25);
}

/* ─── RIGHT PANEL ─────────────────────────── */
.panel-right {
  flex: 1;
  background: var(--panel-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Centers the quiz content vertically inside the stretched panel */
  padding: 30px 40px;
  position: relative;
  overflow: hidden;
}

/* Subtle texture on light panel */
.panel-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 10%, rgba(232, 134, 15, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 90%, rgba(26, 23, 20, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

/* PROGRESS */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.progress-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.progress-track {
  flex: 1;
  height: 2px;
  background: var(--divider-dark);
  border-radius: 1px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.4s cubic-bezier(.4, 0, .2, 1);
}

.progress-total {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

/* OPERATOR BLOCK */
.operator-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--divider-light);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.operator-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--panel-dark-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.operator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.operator-avatar-placeholder {
  font-family: 'Golos Text', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.operator-info {
  flex: 1;
  min-width: 0;
}

.operator-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.operator-name {
  font-family: 'Golos Text', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

.operator-dot {
  color: var(--text-faint);
  font-size: 12px;
}

.operator-role {
  font-family: 'Golos Text', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
}

.operator-online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

.operator-message {
  font-family: 'Golos Text', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-faint);
  font-style: italic;
  transition: opacity 0.2s ease;
  min-height: 48px;
  /* Two lines of 14px * 1.65 = 46.2px, 48px prevents jumping */
}

.operator-message.fading {
  opacity: 0;
}

/* QUESTION */
.question-wrap {
  position: relative;
  margin-bottom: 16px;
  z-index: 10;
}

.question-watermark {
  position: absolute;
  top: -28px;
  right: -8px;
  font-family: 'Golos Text', sans-serif;
  font-weight: 700;
  font-size: 128px;
  line-height: 1;
  color: var(--text-primary);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -4px;
}

.question-text {
  font-family: 'Golos Text', sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  /* slightly smaller to fit vertically */
  line-height: 1.25;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
  max-width: 92%;
}

/* OPTIONS */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Slightly tighter */
  flex: 1;
  z-index: 1;
  position: relative;
}

.option-card {
  padding: 12px 20px;
  /* Reduced vertical, increased horizontal padding */
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
  user-select: none;
}

.option-card:hover {
  box-shadow: 4px 4px 18px rgba(26, 23, 20, 0.08);
  border-color: var(--accent-border);
}

.option-card.selected {
  background: var(--accent-pale);
  border-color: var(--accent);
}

.option-title {
  font-family: 'Golos Text', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

.option-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  background: transparent;
  position: relative;
}

.option-card.selected .option-check {
  border-color: var(--accent);
  background: var(--accent);
}

.option-check::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
  position: absolute;
  top: 3px;
}

.option-card.selected .option-check::after {
  transform: rotate(45deg) scale(1);
}

/* CONTACT FORM */
.final-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  animation: slideFadeUp 0.4s ease forwards;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-field input {
  height: 52px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1.5px solid var(--card-border);
  background: var(--card-bg);
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field input:active {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-pale);
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

/* Fix autofill background in dark theme aggressively */
.form-field input:-webkit-autofill,
.form-field input:-webkit-autofill:hover,
.form-field input:-webkit-autofill:focus,
.form-field input:-webkit-autofill:active,
.form-field input:autofill {
  -webkit-box-shadow: 0 0 0 30px var(--card-bg) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  box-shadow: 0 0 0 30px var(--card-bg) inset !important;
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.privacy-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: left;
  line-height: 1.4;
}

.privacy-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  background: transparent;
  position: relative;
  margin-top: -2px;
  /* Align visually with text */
}

.custom-checkbox::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
  position: absolute;
  top: 3px;
}

.checkbox-label input[type="checkbox"]:checked~.custom-checkbox {
  border-color: var(--accent);
  background: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked~.custom-checkbox::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-label input[type="checkbox"]:focus-visible~.custom-checkbox {
  box-shadow: 0 0 0 3px var(--accent-pale);
}

.privacy-text {
  flex: 1;
}

.nav-row.final-nav-row {
  margin-top: 30px;
  gap: 24px;
}

@media (max-width: 600px) {
  .nav-row.final-nav-row {
    flex-direction: column;
    align-items: stretch !important;
  }

  .checkbox-label {
    max-width: 100%;
    margin-top: 16px;
  }
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  max-width: 100%;
  /* Allow it to take remaining space */
}

/* NAVIGATION */
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--divider-light);
  margin-top: 24px;
  position: relative;
  z-index: 10;
}

.btn-back {
  font-family: 'Golos Text', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  transition: color 0.2s;
  visibility: hidden;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-back.visible {
  visibility: visible;
}

.btn-back:hover {
  color: var(--text-primary);
}

.btn-next {
  font-family: 'Golos Text', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #FFFFFF;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  height: 52px;
  padding: 0 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-next:hover {
  filter: brightness(0.9);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
  transform: translateY(-1px);
}

.btn-next:active {
  transform: translateY(0);
}

.btn-next.final {
  background: var(--accent);
  color: #FFFFFF;
  margin-left: 0;
}

.btn-next.final:hover {
  background: var(--accent);
  filter: brightness(0.9);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
}

.btn-arrow {
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}

.btn-next:hover .btn-arrow {
  transform: translateX(4px);
}

/* ─── MODALS ──────────────────────────── */
.exit-modal,
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.exit-modal.active,
.video-modal.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.exit-modal__overlay,
.video-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s ease;
}

[data-theme="dark"] .exit-modal__overlay,
[data-theme="dark"] .video-modal__overlay {
  background: rgba(15, 23, 42, 0.6);
}

.exit-modal__content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border-radius: 24px;
  padding: 48px;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--card-border);
}

.exit-modal.active .exit-modal__content {
  transform: translateY(0);
}

.exit-modal__close,
.video-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(26, 23, 20, 0.05);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  z-index: 100;
  transition: all 0.2s ease;
}

.exit-modal__close:hover {
  background: rgba(26, 23, 20, 0.1);
}

.video-modal__close {
  background: var(--card-bg, #FFFFFF);
  color: var(--text-dark, #1A1714);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.05));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.video-modal__close:hover {
  background: var(--bg2, #E5E0D8);
}

[data-theme="dark"] .video-modal__close {
  background: rgba(26, 23, 20, 0.8);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

[data-theme="dark"] .video-modal__close:hover {
  background: rgba(26, 23, 20, 0.95);
}

.exit-modal__expert {
  margin-bottom: 24px;
}

.exit-modal__avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid #FFF;
  margin: 0 auto 16px;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--accent), 0 8px 16px rgba(0, 0, 0, 0.1);
}

.exit-modal__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exit-modal__name {
  font-family: 'Golos Text', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.exit-modal__role {
  font-size: 14px;
  color: var(--text-muted);
}

.exit-modal__title {
  font-family: 'Golos Text', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.exit-modal__text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 32px;
}

.exit-modal__btn {
  width: auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 18px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
}

.video-modal__content {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: transparent;
  border-radius: 12px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lightbox mode: expand to fill viewport */
.video-modal__content.lightbox-mode {
  max-width: calc(100vw - 200px);
  max-height: calc(100vh - 80px);
}

@media (max-width: 1160px) {
  .video-modal__content.lightbox-mode {
    max-width: calc(100vw - 48px);
  }
}

@media (max-width: 768px) {
  .video-modal__content.lightbox-mode {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 48px);
  }
}

.video-modal__iframe-container {
  width: 100%;
  position: relative;
  aspect-ratio: 16/9;
}

.video-modal__iframe-container iframe {
  width: 100%;
  height: 100%;
}

/* Lightbox Navigation */
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card-bg, #FFFFFF);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.05));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  color: var(--text-dark, #1A1714);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 110;
}

[data-theme="dark"] .lightbox-btn {
  background: rgba(26, 23, 20, 0.8);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .lightbox-btn:hover {
  background: rgba(26, 23, 20, 0.95);
}

/* Placed just outside the 960px container on desktop */
.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

/* On smaller screens, move them inside so they don't get cut off */
@media (max-width: 1160px) {
  .lightbox-prev {
    left: 16px;
  }

  .lightbox-next {
    right: 16px;
  }
}

/* ─── ANIMATIONS ──────────────────────────── */
@keyframes slideFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.slide-content.exiting {
  opacity: 0;
  transform: translateY(8px);
}

/* ─── MOBILE ADAPTATION ──────────────────────────── */
@media (max-width: 1024px) {
  .quiz-container {
    flex-direction: column;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .panel-left {
    width: 100%;
    flex: none;
  }

  .left-top,
  .left-bottom {
    flex: none;
    height: auto;
  }

  .slide-image-wrap {
    height: 240px;
  }

  .panel-right {
    padding: 24px 20px 28px;
  }
}

/* Typing Cursor */
.typing-cursor {
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--accent);
  margin-left: 2px;
  animation: typing-blink 1s step-end infinite;
  vertical-align: middle;
}

@keyframes typing-blink {
  50% {
    opacity: 0;
  }
}

/* Input Focus */
.form-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb, 232, 134, 15), 0.15);
  outline: none;
  background: #FFF;
}

/* Contact Methods */
.contact-form-title {
  font-family: 'Golos Text', sans-serif;
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.contact-methods {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.contact-method input {
  display: none;
}

.method-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: var(--card-bg);
  border: 1px solid var(--divider-light);
  border-radius: 8px;
  font-family: 'Golos Text', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-method input:checked+.method-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb, 232, 134, 15), 0.2);
}

.contact-method:hover .method-btn {
  border-color: var(--accent);
}

/* Input wrap with icons */
.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s ease;
}

.input-wrap input {
  padding-left: 44px;
}

.input-wrap:focus-within .input-icon {
  color: var(--accent);
}

/* Operator typing effect */
.operator-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13.5px;
  font-style: italic;
  animation: typingPulse 1.5s infinite;
}

@keyframes typingPulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* ─── BRAND BADGE ─── */
.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--divider-light);
}

.brand-badge-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.brand-badge-name {
  font-family: 'Golos Text', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

/* ─── OPERATOR ONLINE STATUS ─── */
.operator-online-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Golos Text', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 10px;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

/* ─── MOBILE TRUST ACCORDION ─── */
.mobile-trust-accordion {
  display: none;
  background: var(--panel-light);
  border-bottom: 1px solid var(--divider-light);
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.mobile-trust-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  padding: 0 20px;
  cursor: pointer;
  font-family: 'Golos Text', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  user-select: none;
  background: var(--card-bg);
}

.mobile-trust-header .chevron-icon {
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.mobile-trust-accordion.open .chevron-icon {
  transform: rotate(180deg);
}

.mobile-left-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  background: var(--panel-dark-2);
}

.mobile-trust-accordion.open .mobile-left-content {
  max-height: 1200px;
  /* arbitrary max height */
  opacity: 1;
}

.mlc-inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mlc-image {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.mlc-title {
  font-family: 'Golos Text', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.mlc-desc {
  font-family: 'Golos Text', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-left-desc);
}

.mlc-stats-row {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--divider-dark);
}

.mlc-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mlc-stat-num {
  font-family: 'Golos Text', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--accent);
}

.mlc-stat-lbl {
  font-family: 'Golos Text', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
}

.mlc-portfolio .portfolio-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

@media (max-width: 1024px) {
  body.is-step-2-plus .panel-left {
    display: none !important;
  }

  body.is-step-2-plus .mobile-trust-accordion {
    display: block;
  }
}

/* ─── TABLET & MOBILE REFINEMENTS ─── */
@media (max-width: 768px) {

  .quiz-wrapper {
    padding-top: 20px;
  }

  /* Left Panel (Step 1) */
  .left-text {
    padding: 16px 20px 16px;
  }

  .left-bottom {
    padding: 20px 20px;
  }

  .slide-image-wrap {
    height: 200px;
  }

  .left-title {
    font-size: 18px;
    /* Was 22px, but desktop is now 20px */
  }

  .left-desc {
    font-size: 13px;
    /* Was 13.5px, but desktop is now 14px */
  }

  .stat-item {
    padding-right: 12px;
  }

  .stat-item+.stat-item {
    padding-left: 12px;
  }

  .stat-num {
    font-size: 24px;
  }

  /* Right Panel (All Steps) */
  .panel-right {
    padding: 24px 20px;
  }

  .operator-block {
    padding-bottom: 16px;
    margin-bottom: 20px;
    gap: 12px;
  }

  .operator-avatar {
    width: 48px;
    height: 48px;
  }

  .operator-avatar-placeholder {
    font-size: 15px;
  }

  .question-text {
    font-size: 22px;
    max-width: 100%;
  }

  .option-card {
    padding: 12px 14px;
    border-radius: 11px;
    gap: 10px;
  }

  .option-title {
    font-size: 12px;
    /* Was 13px, but desktop is now 13px */
  }

  .btn-back,
  .btn-next {
    padding: 14px;
    font-size: 13px;
  }

  /* Brand badge tight fit */
  .brand-badge {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .brand-badge-logo {
    height: 24px;
  }

  /* Footer + Cookie: stack vertically on mobile */
  .legal-footer {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
  }

  .cookie-consent {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    margin-right: 0 !important;
    gap: 6px;
  }

  .legal-links {
    margin-left: 0 !important;
    justify-content: center;
    text-align: center;
  }
}

/* ─── DEEP MOBILE COMPACT MODE ─── */
@media (max-width: 400px) {
  .question-watermark {
    font-size: 80px;
    top: -20px;
    right: 0;
  }

  .question-text {
    font-size: 20px;
  }

  /* Navigation vertically stacked, Next button on top */
  .nav-row {
    flex-direction: column;
    gap: 10px;
  }

  .btn-back,
  .btn-next {
    width: 100%;
    flex: unset;
  }

  .btn-next {
    order: 1;
  }

  .btn-back {
    order: 2;
  }

  /* Final final form actions */
  .nav-row.final-nav-row {
    flex-direction: column;
    align-items: stretch !important;
  }

  .checkbox-label {
    max-width: 100%;
    margin-top: 12px;
  }
}

/* ─── DESKTOP FIT FOR 1600px (max-width: 1600px) ─── */
@media (max-width: 1600px) and (min-width: 1025px) {
  .quiz-wrapper {
    padding: 20px 20px 0 20px;
    /* At least 20px top padding */
  }

  .panel-right {
    padding: 30px 40px;
  }

  .left-bottom {
    padding: 24px 32px;
  }

  .left-title {
    font-size: 18px;
  }

  .left-desc {
    font-size: 13px;
  }

  .stat-num {
    font-size: 26px;
  }

  .stat-lbl {
    font-size: 13px;
  }

  .question-text {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .operator-name {
    font-size: 14px;
  }

  .operator-message {
    font-size: 13px;
  }

  .option-card {
    padding: 10px 16px;
  }

  .option-title {
    font-size: 13px;
  }

  .options-list {
    gap: 8px;
  }

  .operator-block {
    padding-bottom: 16px;
    margin-bottom: 20px;
  }

  .legal-footer {
    margin-top: 10px;
    margin-bottom: 10px;
    /* Reduced from default 20px to 10px */
  }

  .btn-next {
    font-size: 14px;
  }

  .nav-row {
    margin-top: 24px;
    /* Removes auto margin, pulling the button up */
    padding-top: 20px;
  }

  .exit-modal__avatar {
    width: 72px;
    height: 72px;
  }

  .exit-modal__name {
    font-size: 18px;
  }

  .exit-modal__role {
    font-size: 13px;
  }

  .exit-modal__title {
    font-size: 28px;
    margin-bottom: 8px;
  }

  .exit-modal__text {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .exit-modal__btn {
    font-size: 15px;
    padding: 14px 28px;
  }

}

/* ─── DESKTOP FIT FOR 1366px (max-width: 1366px) ─── */
@media (max-width: 1366px) and (min-width: 1025px) {
  .quiz-wrapper {
    padding: 10px 16px 0;
  }

  .quiz-container {
    max-height: 95vh;
  }

  .panel-right {
    padding: 20px 30px;
  }

  .left-text {
    padding: 16px 30px 16px;
  }

  .left-bottom {
    padding: 12px 30px;
    gap: 12px;
  }

  .left-title {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .left-desc {
    font-size: 12px;
  }

  .stat-num {
    font-size: 24px;
  }

  .stat-lbl {
    font-size: 12px;
  }

  .question-text {
    font-size: 20px;
    margin-bottom: 8px;
    line-height: 1.2;
  }

  .operator-name {
    font-size: 13px;
  }

  .operator-message {
    font-size: 12px;
  }

  .option-card {
    padding: 8px 16px;
  }

  .options-list {
    gap: 6px;
  }

  .option-title {
    font-size: 12px;
  }

  .operator-block {
    padding-bottom: 8px;
    margin-bottom: 8px;
    gap: 8px;
  }

  .operator-avatar {
    width: 40px;
    height: 40px;
  }

  .question-wrap {
    margin-bottom: 8px;
  }

  .left-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
  }

  .btn-next {
    font-size: 13px;
    height: 46px;
  }

  .nav-row {
    margin-top: 16px;
    padding-top: 12px;
  }

  .legal-footer {
    margin-top: 8px;
    margin-bottom: 8px;
  }

  .exit-modal__avatar {
    width: 60px;
    height: 60px;
  }

  .exit-modal__name {
    font-size: 16px;
    margin-bottom: 0;
  }

  .exit-modal__role {
    font-size: 12px;
  }

  .exit-modal__title {
    font-size: 24px;
    margin-bottom: 6px;
  }

  .exit-modal__text {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .exit-modal__btn {
    font-size: 14px;
    padding: 12px 24px;
  }
}