nd-color: #BBB; border-radius: 3px; padding: 3px; width: 50px; text-align: center; box-shadow: inset 0px 1px 0px 0px #EEE; cursor: pointer; }
#area .ui-submit:active { box-shadow: inset 0px 1px 0px 0px #999; }
</style>`;

var layouts = [layout1, layout2, layout3, layout4, layout5];


var genProblem = function() {
  var widget_state = -1.0;
  var div = d3.select('#area');
  div.html('');  // clear previous problem, if any  
  var elements = createWidgets();
  var chosenElement = core.sample(elements);
  $('#