/* Mobile version */

@media screen and (max-width: 899px) {

  /* diary entries */

  div#diary-left div.tomorrow {
    display: none;
  }

  div#diary-left div.half, div#dashboard-left div.half {
    width: 100%;
  }
  div#diary-left div.pair div.half:first-child, div#dashboard-left div.pair div.half:first-child {
    float: none;
    margin: 0 0 20px 0;
  }
  div#diary-left div.pair div.half:last-child, div#dashboard-left div.pair div.half:last-child {
    float: none;
  }
  div#diary-left div.pair {
    background-position: top center;
    background-repeat: repeat;
  }
  div#diary-left div.pair div.half:last-child h3 {
    background-color: transparent;
    color: #fff;
  }
  div#diary-left div.pair h3:only-child {
    background-color: #f4f4f4;
    color: #333;
  }
  
  /* questions */
  
  div#questions-masonry {
    width: 100%;
    position: relative;
    left: 0;
  }
  div.question div.card {
    width: 97%;
    float: none;
    margin: 0 0 20px 0;
    left: 0;
  }
  
  /* credits */
  
  div#credits {
    width: 90%;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.03em;
    padding: 25px 0;
    color: #999;
    clear: both;
  }
  
}

@media screen and (max-width: 859px) {

  /* mobile header condensed, narrower */

  body.fixed div#header ul#header-menu {
    left: 480px;
  }
    body.fixed div#header ul#header-menu li {
      float: left;
      right: 50%;
      position: relative;
    }

    body.fixed div#header ul#header-menu li a {
      text-align: center;
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-decoration: none;
      display: block;
      padding: 10px 12px 13px 12px;
      background-position: 50% bottom;
    }
}

@media screen and (max-width: 774px) {

    ul#header-menu li a {
      padding-left: 15px;
      padding-right: 15px;
    }

}

@media screen and (max-width: 699px) {
  
  /* welcome - everyone */
  
  div#about div.about-left {
    float: none;
    width: 100%;
    text-align: center;
  margin: 0 0 0 0;
    }
    div#about div.about-left div.caption {
      max-width: 436px;
    margin: 5px auto;
    }

  div#about div.about-right {
    float: none;
  width: 100%;
    max-width: 436px;
  font-size: 18px;
  line-height: 24px;
  margin: 20px auto;
  }

  /* stories */

  div#stories div.story, div#stories div.story.half {
    text-align: left;
      float: none;
      width: 96%;
    margin: 0 auto 20px auto;
    left: 0;
    }

  div#stories div.story:nth-of-type(2) div.card {
    min-height: 0;
  }

  div#stories div.story.wide {
    margin: 0 auto 20px auto;
  }
    div#stories div.story.wide h4 {
      font-size: 24px;
      line-height: 30px;
    }
  div.story div.tease {
    font-size: 18px;
    line-height: 24px;
    padding: 10px;
  }
  div#stories .clear {
    height: 1px;
  }
  div#stories div.story.story-ad {
    text-align: center;
  }
  
  /* placeholder */
  
  div.placeholder {
    text-align: center;
  }
  div.placeholder img {
    float: none;
    display: block;
    margin: 30px auto;
  }
  div.placeholder span {
    float: none;
    display: block;
    width: 80%;
    font-size: 18px;
    line-height: 24px;
    margin: 40px auto;
    text-align: left;
  }

  div#tooltip.open {
    display: none;
  }

  div.card.diary div.card-body label i {
    display: none;
  }

}

@media screen and (max-width: 904px) {

  /* ad */

  div#ad div.ad-center div {
    top: 20%;
    padding: 0 50px;
  }
    div#ad div.ad-center div span {
      top: 0;
    }

}

/* teams */
@media screen and (max-width: 928px) {
  span.join-share-text {
    display: none;
  }
}
@media screen and (max-width: 749px) {
  div.a-team div.teaminfo img {
    position: relative;
    float: left;
  }
  div.a-team div.teaminfo div {
    clear: left;
    margin: 10px;
  }

  div.a-team.mine div.teamdescrip div.aside,
  div.a-team div.teamdescrip div.aside {
    float: left;
    width: 95%;
  }
  
  div.a-team.mine div.teamdescrip div.paragraphs,
  div.a-team div.teamdescrip div.paragraphs {
    float: left;
    width: 95%;
  }
}
@media screen and (max-width: 629px) {
  div.a-team div.teamnumbers ul.score {
    clear: left;
  } 

  div.a-team div.teamnumbers ul.score li, div.a-team div.teamnumbers ul.score li:first-child {
    padding: 10px 0 0 10px;
    clear: both;
  }

  div.a-team div.teaminfo div ul.toggle li a {
    width: 90px;
  }
}
@media screen and (max-width: 399px) {
  div#teams > p {
    width: 90%;
  }
  div.a-team div.teaminfo div ul.toggle li a {
    font-size: 14px;
    padding: 10px 5px;
  }
  div.a-team div.teaminfo div.action a.button, div.a-team div.teaminfo div.action a.quit {
    font-size: 14px;
  }
  div.a-team div.teaminfo div.action a.button, div.a-team div.teaminfo div.action ul.share li.button {
    font-size: 12px;
  }
  div.a-team div.teaminfo div.action ul.share li {
    margin-top: 2px;
    margin-left: 5px;
    margin-right: 0;
  }

  div.a-team div.teaminfo div.action a.button {
    float: left;
  }

  div.a-team div.teaminfo div.action {
    margin-top: 10px;
    position: static;
    left: auto;
    right: auto;
    clear: both;
  }
}


@media screen and (max-width: 599px) {
  
  h2 {
    margin: 0 0 20px 0;
  }
  
  div.story, div.question, div.sidebar, div.two-thirds {
    float: none;
    width: 100%;
  }

  div#questions-sidebar {
    margin-bottom: 12px;
  }

  div#welcome-form div.card {
    width: 100%;
  }

  div#diary-right div.card {
    display: none;
  }

  div.survey-button a.button {
  	display: block;
  	font-size: 16px;
  }

	/* diary entries */
  div#diary-right div.teams {
    display: block;
  }

  div.two-thirds {
  float: none;
  width: 100%;
  }
  div.sidebar {
  float: none;
  width: 100%;
  }

  div#you-progress iframe {
    height: 680px;
  }

}

@media screen and (max-width: 525px) {
  
  div#welcome-form > p {
    font-size: 18px;
    line-height: 24px;
  }
  div#welcome-form div.card {
    margin: 20px auto 50px auto;
  }
  div#welcome-form div.card div.card-body > div {
    margin: 10px 0 0 0;
    padding: 0 20px;
    height: 80px;
  }
  div#welcome-form label {
    display: block;
    width: 90%;
    margin: 0 25px 15px 0;
  }
  div#welcome-form div.input-container, div#welcome-form div.input-container.narrow {
    display: block;
    width: 100%;
    position: relative;
    top: 0;
    right: 0;
  }
  div#welcome-form strong#welcome-email {
    padding-top: 0px;
    height: 20px;
  }

}

@media screen and (max-width: 549px) {

  /* ad */

  div#ad div.ad-center div {
    font-size: 14px;
    line-height: 18px;
    top: 30%;
  }

}

@media screen and (max-width: 479px) {
  
  div#you div.menu {
    margin: 0 0 30px 0;
  }
  ul#you-menu li a {
    padding: 10px 20px;
    font-size: 14px;
  }
  
}

@media screen and (max-width: 444px) {
  
  div#stories div.story.wide div.show strong, div#stories div.story div.show strong {
    max-width: 100%;
    float: none;
  }
  div#stories div.story span.story-date {
    clear: both;
    float: none;
    display: block;
    text-align: left;
    margin: 5px 0 0 0;
  }
  
  div#welcome-form div.card div.card-body div.newsletter {
    height: 100px;
  }

}

@media screen and (max-width: 472px) {
  
  /* ad */

  div#ad div.ad-center div {
    top: 20%;
  }

}

@media screen and (max-width: 379px) {
	ul#you-menu li a {
		padding: 10px;
		font-size: 12px;
	}
}

@media screen and (max-width: 349px) {
  
  div#stories {
    overflow: visible;
  }
  
    div#stories div.story.half.story-ad {
      width: 100%;
    }
      div#stories div.story.half.story-ad > div {
        width: 320px;
        margin: 0;
        position: relative;
        left: -19px;
      }

      div#you-diary a.button.large {
        margin: 0 auto;
        font-size: 18px;
      }

  /* ad */

  div#ad div.ad-center div {
    top: 20%;
    font-size: 12px;
    line-height: 15px;
  }

}