body {
  margin: 0;
  position: relative;
}

circle {
  fill: none;
  pointer-events: none;
}

.intro {
  max-width: 640px;
  margin: 20px auto 32px;
  font-family: sans-serif;
  font-weight: bold;
  color: #333;
  font-size: 18px;
  text-align: center;
}

.credit {
  max-width: 1200px;
  margin: 32px auto;
  font-family: sans-serif;
  color: #888;
  font-size: 12px;
  text-align: right;
}

.graphic {
  position: relative;
  margin: 0 auto;
}

.buttons {
  margin: 0 auto;
  max-width: 600px;
  text-align: center;
  margin-bottom: 18px;
}

.buttons > div {
  display: inline-block;
}

.cells path {
  fill: none;
  pointer-events: all;
  /*stroke: black;*/
}

.bar {
  fill: lightblue;
}

.axis--swarm line {
  stroke: #888;
  stroke-width: 0.5;
}

.key {
  text-align: center;
  pointer-events: none;
  margin: 12px 0 20px;
}

.key > svg {
  display: inline-block;
  vertical-align: middle;
}

.axis--swarm text, .axis--label, .group--label {
  font-weight: bold;
  font-size: 12px;
  font-family: sans-serif;
  fill: #888;
}

.chart--title {
  font-weight: bold;
  font-size: 12px;
  font-family: sans-serif;
}

.axis--title {
  font-family: sans-serif;
  fill: #888;
  font-size: 11px;
}


#tooltip {
  font-family: sans-serif;
  position: absolute;
  background: #fff;
  border-radius: 2px;
  padding: 14px 14px 10px;
  pointer-events: none;
  box-shadow: 0 0 2px black;
  font-size: 14px;
  color: #333;
  display: none;
  max-width: 200px;
  line-height: 1.1em;
}

#tooltip>div:not(:last-child):not(:first-child) {
  margin-bottom: 6px;
}

.location {
  margin-bottom: 4px;
  text-transform: uppercase;
}

.location, .catlabel {
  text-align: center;
}

.increase {
  font-weight: bold;
  color: #ED6A5A;
}

.decrease {
  font-weight: bold;
  color: #5CA4A9;
}

.catlabel {
  margin-bottom: 12px;
}

.catlabel, .note {
  font-size: 11px;
  font-weight: normal;
  color: #888;
  font-style: italic;
}

.location, .percapita, .average, .totalpercent, .percappercent {
  font-weight: bold;
}

.percappercent, .totalpercent {
  padding-bottom: 8px;
}

.percapita:after, .average:after, .totalpercent:after, .percappercent:after {
  font-weight: normal;
  font-size: 11px;
  color: #888;
  margin-left: 1px;
}

.percapita:after {
  content: ' thefts per 100,000 population';
}

.average:after {
  content: ' average thefts reported per year';
}

.percappercent:after, .totalpercent:after {
  content: ' change, 2010-2015';
}

.chart {
  border-top: 1px solid #aaa;
  padding-top: 4px;
}

/*Radio buttons*/

.btn-group {
  position: relative;
  display: -ms-inline-flexbox;
  display: inline-flex;
  vertical-align: middle;
  font-family: sans-serif;
  margin: 4px 8px 8px;
}

.btn {
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  padding: .375rem .75rem;
  font-size: 0.8rem;
  line-height: 1.5;
  border-radius: .25rem;
  color: #fff;
  background-color: #bbb;
}

.btn.active {
  color: #fff;
  background-color: #777;
  -moz-box-shadow:    inset 0 0 2px #000000;
  -webkit-box-shadow: inset 0 0 2px #000000;
  box-shadow:         inset 0 0 2px #000000;
}

.btn-group>.btn {
  position: relative;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;
}

.btn:not(.active):hover{
  background-color: #aaa;
}

.btn-group>.btn:not(:first-child):not(:last-child) {
  border-radius: 0;
}

.btn-group>.btn:last-child:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn-group>.btn:first-child:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.btn-group>.btn:first-child {
  margin-left: 0;
}

input[type=radio] {
  position: absolute;
  clip: rect(0, 0, 0, 0);
}

.map {
  max-width: 640px;
  margin: 200px auto 0;
}
