With a ceasefire deadline looming and oil markets rattled, Washington and Tehran are locked in a high-stakes diplomatic standoff — even as both sides appear to want a way out.