/* EKM Demo Sandbox — post-login init sequence */
#ekm-demo-init-sequence {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: #0c0b0a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: opacity 0.22s ease;
}

#ekm-demo-init-sequence.ekm-init-sequence--out {
  opacity: 0;
  pointer-events: none;
}

#ekm-demo-init-sequence .ekm-init-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding: 2rem 1.5rem;
}

#ekm-demo-init-sequence .ekm-init-brand {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.72);
  margin-bottom: 1.25rem;
}

#ekm-demo-init-sequence .ekm-init-line {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.02em;
  min-height: 1.5em;
  transition: opacity 0.18s ease;
}

#ekm-demo-init-sequence .ekm-init-line.ekm-init-line--pulse {
  animation: ekmInitPulse 0.22s ease;
}

@keyframes ekmInitPulse {
  from {
    opacity: 0.35;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #ekm-demo-init-sequence .ekm-init-line.ekm-init-line--pulse {
    animation: none;
  }
  #ekm-demo-init-sequence.ekm-init-sequence--out {
    transition: none;
  }
}

/* EKM Demo Sandbox — welcome screen (emerald/white v11) */
body.ekm-welcome-gate-active {
  overflow: hidden;
}

body.ekm-welcome-gate-active #login-screen,
body.ekm-welcome-gate-active #app,
body.ekm-welcome-gate-active #modal,
body.ekm-welcome-gate-active #celebrate-bg,
body.ekm-welcome-gate-active #pq-chat-bg {
  display: none !important;
  pointer-events: none !important;
}

#ekm-sandbox-welcome {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, 0.08), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(0, 0, 0, 0.12), transparent 40%),
    linear-gradient(165deg, #3D5A48 0%, #2D4336 52%, #1F2E25 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-y: auto;
}

#ekm-sandbox-welcome .ekm-gate-card {
  width: 100%;
  max-width: 520px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1.85rem 1.65rem 1.55rem;
  box-shadow: none;
  color: #FFFFFF;
}

#ekm-sandbox-welcome .ekm-gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

#ekm-sandbox-welcome .ekm-gate-logo {
  height: auto;
  max-height: 160px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

#ekm-sandbox-welcome .ekm-gate-brand-sub {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

#ekm-sandbox-welcome h1 {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 6vw, 2.35rem);
  margin: 0 0 1.15rem;
  color: #FFFFFF;
  text-align: center;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

#ekm-sandbox-welcome .ekm-gate-emoji {
  display: inline-block;
  font-weight: 400;
}

#ekm-sandbox-welcome .ekm-gate-body {
  font-size: 14px;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.84);
  margin: 0 0 1.25rem;
}

#ekm-sandbox-welcome .ekm-gate-body p {
  margin: 0 0 0.95rem;
}

#ekm-sandbox-welcome .ekm-gate-body p:last-child {
  margin-bottom: 0;
}

#ekm-sandbox-welcome .ekm-gate-lede {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
}

#ekm-sandbox-welcome .ekm-gate-pivot {
  margin-top: 1.15rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.62);
}

#ekm-sandbox-welcome .ekm-gate-help {
  font-size: 15.5px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 0.35rem;
}

#ekm-sandbox-welcome .ekm-gate-emphasis {
  font-weight: 700;
  font-size: 15px;
  color: #FFFFFF;
  margin-bottom: 1rem;
}

#ekm-sandbox-welcome .ekm-gate-closer {
  font-weight: 600;
  color: #FFFFFF;
  margin-top: 0.25rem;
}

#ekm-sandbox-welcome .ekm-gate-signoff {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
}

#ekm-sandbox-welcome .ekm-gate-audit {
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.48);
  margin: 0 0 1rem;
  text-align: center;
}

#ekm-sandbox-welcome .ekm-gate-submit {
  width: 100%;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 10px;
  background: #FFFFFF;
  color: #2D4336;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

#ekm-sandbox-welcome .ekm-gate-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

#ekm-sandbox-welcome .ekm-gate-submit:not(:disabled):hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

#ekm-sandbox-welcome .ekm-gate-submit:not(:disabled):active {
  transform: translateY(0);
}

#ekm-sandbox-welcome .ekm-gate-err {
  font-size: 12px;
  color: #FFB4B4;
  margin: 0 0 0.75rem;
  min-height: 0;
  text-align: center;
}
