/* colors */
.bggray { color: #e8edf2; }
.yellow { color: #fac229; }
.dark-yellow { color: #e3801f; }
.red { color: #f54f4f; }
.dark-red { color: #a62633; }
.blue { color: #73abf2; }
.dark-blue { color: #323b93; }
.darker-blue { color: #334e4a; }

/* candidate colors */
.sanders, .c1, .c1p { color:#73abf2;}
.biden, .c2, .c2p { color:#3b6474;}
.buttigieg, .c3, .c3p { color: #a7631f; }
.warren, .c4, .c4p { color:#66c2a5; }
.klobuchar, .c5, .c5p { color:#cc9c16; } 
.gabbard, .c6, .c6p { color:#a08a6a; }
.bloomberg, .c7, .c7p { color:#e75525; }
.steyer, .c8, .c8p { color:#6e8d7f; }
.writein, .c11, .c11p { color:#b3b3b3; }
.twn.sanders, .c1 {fill: #73abf2; }
.twn.biden, .c2 {fill: #3b6474; }
.twn.buttigieg, .c3 { fill: #a7631f }
.twn.warren, .c4 { fill: #66c2a5; }
.twn.klobuchar, .c5 { fill: #cc9c16; }
.twn.gabbard, .c6 { fill: #a08a6a; }
.twn.bloomberg, .c7 { fill: #e75525; }
.twn.steyer, .c8 { fill: #6e8d7f; }
.twn.writein, .c11 { fill: #b3b3b3; }
.twn.tied { fill: #6d4b8a; }
.tied {color: #6d4b8a; }
.tied span { display: inline-block; width: 12px; height: 12px; background-color: #6d4b8a; }

.sanders .cand-bar { background-color:#73abf2; }
.biden .cand-bar { background-color:#3b6474; }
.buttigieg .cand-bar { background-color:#a7631f; }
.warren .cand-bar { background-color:#66c2a5; }
.klobuchar .cand-bar { background-color:#cc9c16; }
.gabbard .cand-bar { background-color:#a08a6a; }
.bloomberg .cand-bar { background-color:#e75525; }
.steyer .cand-bar { background-color:#6e8d7f; }
.writein .cand-bar { background-color:#b3b3b3; }

.graphic {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  font-size: 18px;
  font-family: 'metric', sans-serif;
  position: relative;
}
.graphic-headline {
  margin-bottom: 8px;
}
.graphic-description {
  margin-bottom: 10px;
  line-height: 1.1;
}
.infobox {
  padding: 10px;
}
.credit {
  color: #999fa5;
  font-size: 15px;
  text-align: right;
  margin: 0;
  line-height: 1;
}
.note {
  color: #999fa5;
  font-size: 15px;
  margin: 0;
  line-height: 1;
}
.graphic-content .infobox p.info-precinctsreporting {
  color: #999fa5;
  margin-bottom: 10px;
}
* {
  box-sizing: border-box;
}

#show-nh-total {
  margin:0 auto 14px 0;
  background-color: #eeeeee;
}
#show-nh-total:hover {
  background-color: #666;
}
/* responsive svg */
.map {
  margin: 0 auto;
  height: 0;
  width: 100%;
  overflow: hidden;
  padding-bottom: 62%;
  padding-top: 0;
  position: relative;
}
.map svg {
  height: 100%;
  position: absolute;
  top: 0;
  width: 100%;
  left: 0;
  max-width: 100%;
  background-color: transparent;
  display: inline-block;
  z-index: 1000;
}
.twn {
  transition: fill .25s ease;
  fill: #eee;
  stroke: #efefef;
  stroke-width: 0.5;
  cursor: pointer;
  display: block;
}
.twn:hover,
.twn:focus {
  stroke: #000;
  outline: none;
}

#tooltip {
  visibility: hidden;
  position: absolute;
  top: 400px;
  left: 300px;
  z-index: 100000;
  pointer-events: none;
  background: #fff;
  border-radius: 3px;
  font-size: 16px;
  padding: 1px 5px;
  box-shadow: 1px 1px 2px 1px #ccc;
}
#tooltip:after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 18px;
	width: 0;
	height: 0;
	border: 10px solid transparent;
	border-top-color: #fff;
	border-bottom: 0;
	border-right: 0;
	margin-left: -6.5px;
	margin-bottom: -9px;
}

.graphic-content .infobox h3 {
  margin-bottom: 0;
}

table caption {
  font-size: 14px;
  text-align: left;
  padding-bottom: 5px;
}

.cand-head {
  width:40px;
}
.cand-votes {
  font-size: 15px;
}
.win-badge {
  display: inline-block;
  width: 18px;
  margin-left: 5px;
  fill: #a62633;
}
.cand-bar {
  display: inline-block;
  height: 12px;
  margin-right: 5px;
}

@media (min-width: 430px) {

  .graphic-content .infobox  {
    margin-top: -90px;
  }
}

@media (min-width: 560px) {

  .graphic-content .infobox  {

  }
  #leaderboard {
    display: flex;
    flex-direction: column;
    max-height: 160px;
    flex-wrap: wrap;
  }
  #leaderboard .candidate {
    width: 50%;
  }
}

@media (min-width: 690px) {
  #leaderboard {
    max-height: 110px;
  }
  #leaderboard .candidate {
    width: 33%;
  }
}


@media (min-width: 970px) {
  .graphic-content .infobox  {
    margin-top: -270px;
    width: 600px;
  }
  #leaderboard {
    width: 600px;
    max-height: 160px;
  }
  #leaderboard .candidate {
    width: 50%;
  }
}

.graphic-content .infobox ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.graphic-content .infobox ul li {
  line-height: 1.2;
  white-space: nowrap;
  clear: left;
}
.graphic-content .infobox .cand-head {
  float: left;
  display: block;
  margin: 0 10px 10px 0;
}

.graphic-content .infobox .cand-results{
  white-space: nowrap;
  padding: 0 0 0.5em 0;
}
.graphic-content .infobox p {
  clear: left;
  margin: 0;
}

 .button--small {
   margin: 3px 0 20px;
} 