* {
  box-sizing: border-box;
}
.clear{clear: both;}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'TiemposTextWeb-Regular', Georgia, serif;
  font-size: 18px;
  line-height: 24px;
  color: #3C3C3C;
  -webkit-font-smoothing: antialiased;
}

footer {
  position: absolute;
  width: 100%;
  background: #fff;
}

#background-canvas {
  position: fixed;
  height: 100%;
  width: 100%;
  background-color: #f94600;
  z-index: -1;
}

.code-section {
  width: 90%;
  margin: 100px auto 0 auto;
  background-color: #fff;
  padding: 40px 0;
  -webkit-transform: translate3d(0,0,0);
}
.code-section:first-child {
  margin-top: 0;
}
.code-content{
  margin: 0 auto;
  max-width: 740px;
}

article img {
  max-width: 100%;
}
article .code-content > img {
  display: block;
  margin: 0 auto;
}

.centered {margin: 0 auto; display: block;}
.screenshot { image-rendering: pixelated; }

.introText {font-size: 26px; line-height: 30px;}

/* subsection numbers */
.section{font-size: 16px}

h2 {
  font-family: "BWHaasText-75Bold",Helvetica, Arial, sans-serif;
  font-size: 100px;
  line-height: 94px;
  margin: 40px 0 40px 0;
  text-align: center;
}
h2 a {
  display: block;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: #3c3c3c;
  color: #fff;
  text-align: center;
  font-size: 18px;
  line-height: 24px;
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  font-weight: normal;
  margin: 0 auto 40px auto;
  transition: background .2s;
}
h2 a:hover {
  border: none;
  color: #fff;
  background: #f94600;
}

h3 {
  font-size: 34px;
  line-height: 34px;
  font-weight: bold;
  margin-top:74px;
  position: relative;
}
h3 a {
  position: absolute;
  right: 100%;
  bottom: 0;
  padding: 0 1em;
  border-bottom: none;
  font-size: 0.4705882353em;
  line-height: 2.125em;
  line-height: 1em;
}
h3 a:hover {
  border-bottom: none;
}

h4 {
  font-size: 22px;
  line-height: 24px;
  margin: 0;
}

/* ****** */
/* HEADER */
/* ****** */

#headerArt {
  text-align: center;
  width: 100%;
  height: 100vh;
  display: table;
  font-family: 'Roboto Mono', courier, monospace;
  line-height: 1em;
  color: #fff;
}

#headerArt h1{
  margin: 0;
  padding: 0;
  line-height: 1em;
  clear: both;
}

#headerArt h2 {
  font-size: 40px;
  line-height:1em;
  margin-bottom: 0;
  margin-top:0;
  font-family: 'Roboto Mono', courier, monospace;
}
#headerArt .byline{height:40px;}
#headerArt .bylinePaul {float:right;margin-right:70px;display: block;}
#headerArt .bylineDate {float:left;margin-left:70px}

#headerArt .vertCenter{
  display: table-cell;
  text-align: center;
  vertical-align: middle;
}

.blinking-cursor {
  animation: 1s blink step-end infinite;
  -webkit-animation: 1s blink step-end infinite;
}

@keyframes "blink" {
  from, to {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

@-webkit-keyframes "blink" {
  from, to {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}


/* ********** */
/* END HEADER */
/* ********** */

/* Above the fold... */

/* Josh's editor's letter */
.josh-letter {
  margin: 2em 0;
  padding: 15px;
  border: 4px solid #fff;
  transition: border .5s;
}
.josh-letter a {
  border-bottom: none;
  display: block;
  text-align: center;
  font-weight: bold;
}
.josh-letter a:hover {
  border-bottom: none;
}
.josh-letter .josh-inner {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s;
}
.josh-letter.open {
  border: 4px solid #3c3c3c;
}
.josh-letter.open .josh-inner {
  max-height: 1000px;
}
.josh-letter .josh-inner p:last-child {
  margin: 0;
}


.chat{width: 100%;font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;font-size: 16px;line-height: 20px;margin: 0 auto;text-align: center;}
.chatBig{font-size: 24px;line-height: 26px}

.chat .person {
  position: relative;
  margin: 4px auto;
  border: #000 solid 4px;
  border-radius: 14px;
  width: 80%;
  height: auto;
  padding: 6px;
  background: #fff;
}

.chat .person.a {
  color: #f94600;
  border-color: #f94600;
}
.chat .person.b {
  color: #2800d7;
  border-color: #2800d7;
}
.chat .person.c {
  color:#00c770;
  border-color: #00c770;
}

.chat .person:after {
  content: '';
  position: absolute;
  border-style: solid;
  border-color: transparent #fff;
  display: block;
  width: 0;
  z-index: 1;
  top: 18px;
}

.chat .person.a:after, .chat .person.c:after {
  border-width: 6px 27px 6px 0;
  left: -27px;
}
.chat .person.b:after {
  border-width: 6px 0 6px 27px;
  right: -27px;
}

.chat .person:before {
  content: '';
  position: absolute;
  border-style: solid;
  display: block;
  width: 0;
  z-index: 0;
  top: 15px;
}

.chat .person.a:before {
  border-width: 9px 30px 9px 0;
  border-color: transparent #f94600;
  left: -34px;
}
.chat .person.b:before {
  border-width: 9px 0 9px 30px;
  border-color: transparent #2800d7;
  right: -34px;
}
.chat .person.c:before {
  border-width: 9px 30px 9px 0;
  border-color: transparent #00c770;
  left: -34px;
}


.chatterL{display: inline-block;width: 25%;vertical-align: middle;z-index: 2;position:relative;}
.chatterL img{width: 100%;max-width: 80px}
.chatterR{display: inline-block;width: 75%;vertical-align: middle;z-index: 1;position:relative;}


a {
  color: #3c3c3c;
  text-decoration: none;
  border-bottom: 1px solid #848484;
  transition: color .2s, border .2s;
}
a:hover {
  color: #f94600;
  border-bottom-color: #f94600;
}

#stockCreds, #changelog{
  margin-top: 1em;
  font-size: 14px;
  line-height: 16px;
  font-family: "BWHaasText-55Roman";
  color:#848484
}

/* Videos */
/* re: bplayer, cf. http://bl.ocks.org/tophtucker/4bfe467ba870734de86c */

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  padding-top: 25px;
  height: 0;
}

.video-wrapper-inner {
  width: 100%;
  height: 0;
  position: relative;
  padding-top: 56.25%;
}

.video-wrapper-inner > div {
  position: absolute;
  top: 0;
  width: 100% !important;
  height: 100% !important;
}

.videoRight{
  width: 340px;
  margin:0 -140px 0 0;
  padding: 0 0 10px 20px;
  float: right;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.terminal .video-wrapper {
  display: none;
}

/* Footnote popups */

.footwrapper {
  position: relative;
  display: inline-block;
}

.footref {
  border-radius: 10px;
  border: 1px solid #848484 !important;
  color: #848484;
  padding: 2px 8px;
  font-size: small;
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  text-decoration: none;
}
.footref:not(.correx)::before {
  content: "■ ";
}
.footref.notabene::before {
  content: "✱";
}
.footref:hover {
  cursor: pointer;
  color: #2800d7;
  border: 1px solid #2800d7;
}
.footref.correx:not(.notabene):hover {
  border: 1px solid #f94600;
  color: #f94600;
}
.footref.stick {
  background: #6381ff;
  color: #2800d7;
}
.footref.correx:not(.notabene).stick {
  background: rgba(249,70,0,.5);
  color: rgba(249,70,0,1);
}

.fn-popup {
  position: absolute;
  top: 100%;
  left: 50%;
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  font-size:0.875em;
  line-height: 1.3em;
  width: 300px;
  padding: 1em;
  background: white;
  border: 1px solid black;
  margin-top: 0.5em;
  transform: translate(-50%,0);
  display: none;
  z-index: 3;
}
.fn-popup p {
  margin: 1em 0 0 0;
}
.fn-popup p:first-child {
  margin: 0;
}

/* Syntax */
/* code highlighting without syntax highlighting */
pre code {
  display: block;
  overflow-x: auto;
  padding: 0.5em;
  background: #23241f;
  color: #f8f8f2;
}
.syntax-tooltip {
  position: absolute;
  font-size:0.875em;
  line-height: 1.3em;
  width: 300px;
  padding: 1em;
  background: white;
  border: 1px solid black;
  margin-top: 0.5em;
  transform: translate(-50%,0);
}


#interestingWrap{margin:0 -100px 0 -100px;}
.interesting1, .interesting2, .interesting3{width: 320px;text-align: center;position: relative;}
.interesting2{margin:-40px 0 0 290px}
.interesting3{margin:-40px 0 0 580px}


/* Table breaking down "PRINT {HELLO NERDS}" char-by-char */
#tokens {
  text-align: center;
  border-collapse: collapse;
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  margin: 0 auto;
}
#tokens tbody tr:nth-child(odd) {
  background: #f94600;
  color:#fff;
}
#tokens tbody tr:nth-child(even) {
  background: #fff;
}
#tokens tr td:nth-child(1) {
  font-family: 'Roboto Mono', courier, monospace;
}
#tokens tr td:nth-child(2) {
  font-style: italic;
}

article ul {
  padding-left: 40px;
  list-style-type: disc;
}
article ol {
  list-style-position: inside;
  margin-left: 20px;
  padding-left: 0;
}
article ol li {
  margin: 0 0 0 40px;
  padding: 0;
  list-style: decimal;
}
article ol ol {
  margin: 0;
}
article ol ol li {
  list-style-type: lower-alpha;
}




/* images */

.bigimgWrap{margin:60px -200px 60px -200px;}

.imageLeft{margin-left: -140px;float:left;width: 500px;padding-right: 24px;}
.imageRight{margin-right: -140px;float:right;width: 500px;padding-left: 24px;}
.imageLeft img, .imageRight img{width: 100%}

.inline-img {
  display: inline;
  vertical-align: middle;
  height: 30px;
  margin-top: -5px;
}

figure.wide {
  margin: 60px -200px 60px -200px;
}

figure.three-column img {
  width: 33%;
  display: inline-block;
  vertical-align: middle;
}

figure figcaption {
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 16px;
  margin-top: 4px;
}
figure figcaption p { margin: 0; }

.caption{font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;font-size: 14px;line-height: 16px;margin-top: 4px;}
.photoCaption{text-transform: uppercase;font-size: 10px;line-height:12px;font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;color:#848484;}


/* asides */

.ephemeraL a{border-bottom: 0px solid white; color:#f94600;font-weight: bold;}

.ephemeraL{
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 16px;
  width: 140px;
  margin-left: -140px;
  float: left;
  padding: 0 20px 0 0;
}
.ephemeraL img{max-width: 120px;display: block;margin: 0}


.ephemeraR{
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 16px;
  width: 140px;
  margin-right: -140px;
  float: right;
  padding: 0 0 0 20px;
}
.ephemeraR img{max-width: 120px;display: block;margin: 0}

.profileR{
  display: block;
  color:#f94600;
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 16px;
  width: 200px;
  margin-right: -140px;
  float: right;
  padding: 0 0 0 24px;
}
.profileR p{ border-bottom: 4px solid #f94600;}

.listR{
  color:#f94600;
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 18px;
  float:right;
  margin-right: -140px;
  padding: 0 0 0 28px;
  width:240px;
}
.listRinner {padding: 8px;  border:4px solid #f94600;}
.listRinner li{margin-left: 0}


.language{ border-bottom: 4px solid #f94600;margin: 20px auto; padding: 4px auto;}
.language img{max-width: 60px;margin: 0 auto}

#productivity{
  color:#f94600;
  font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 18px;
  width: 440px;
  margin-right: -200px;
  float: right;
  padding: 0 0 0 20px;
}
.productive p{border-bottom: 4px solid #f94600;}
.productive{ margin: 5px;width: 200px;display: inline-block;vertical-align: top}
.productive img{max-width: 100px;margin-left:25%;}

#paulL{display: inline-block;width: 20%;vertical-align: top;margin-top: 60px}
#paulL img{width: 100%;}
#paulR{margin-top: 60px;display: inline-block;width: 80%;font-size: 18px;line-height: 22px;vertical-align: top;font-family: "BWHaasText-55Roman",Helvetica, Arial, sans-serif;}
#paulR p{padding: 0 10px;margin:0;}


#many-buttons p {
  border-bottom: none;
}
#many-buttons button {
  border: none;
  background: none;
  background-size: contain;
  padding: 0;
  image-rendering: pixelated;
  cursor: pointer;
}
#many-buttons button:active { transform: rotate(5deg); }

#many-buttons button.gradient { background-image: url('../images/sec3-25_buttons-gradient1.png'); width:106px; height:21px }
#many-buttons button.gradient:hover { background-image: url('../images/sec3-25_buttons-gradient2.png'); }

#many-buttons button.inline { background-image: url('../images/sec3-25_buttons-inline1.png'); width:85px; height:16px }
#many-buttons button.inline:hover { background-image: url('../images/sec3-25_buttons-inline2.png'); }

#many-buttons button.push { background-image: url('../images/sec3-25_buttons-push1.png'); width:105px; height:20.5px }
#many-buttons button.push:hover { background-image: url('../images/sec3-25_buttons-push2.png'); }

#many-buttons button.recessed { background-image: url('../images/sec3-25_buttons-recessed1.png'); width:116px; height:18px }
#many-buttons button.recessed:hover { background-image: url('../images/sec3-25_buttons-recessed2.png'); }

#many-buttons button.roundrect { background-image: url('../images/sec3-25_buttons-roundrect1.png'); width:122px; height:18px }
#many-buttons button.roundrect:hover { background-image: url('../images/sec3-25_buttons-roundrect2.png'); }

#many-buttons button.roundtextured { background-image: url('../images/sec3-25_buttons-roundtextured1.png'); width:116px; height:23px }
#many-buttons button.roundtextured:hover { background-image: url('../images/sec3-25_buttons-roundtextured2.png'); }

#many-buttons button.textured { background-image: url('../images/sec3-25_buttons-textured1.png'); width:109.5px; height:23px }
#many-buttons button.textured:hover { background-image: url('../images/sec3-25_buttons-textured2.png'); }


/* every [data-module] also has this class... */
.interactive-feature {
  position: relative;
  clear:both;
}

.innershare {
/*  border-top: 1px solid #ddd;
  padding-top: 10px;
  height: 30px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;*/
}

.terminal .innershare {
  display: none;
}

.innertw {
  text-align: right;
  transition: all 0.5s;
  cursor: pointer;
}

#share-tinder .innertw {
  margin-right:175px;
}

#share-circuit .innertw {
  /*margin-right:-110px;*/
  height: 0px;
}

#share-circuit .innertw img{
  position: relative;
  top: -75px;
}

.innertw:hover {
  opacity: 0.5;
}

.padT{padding: 4px 0px;}

/* queries */

@media (max-width: 1280px) {
  .innershare {display: none}
  .bigimgWrap,figure.wide{margin: 0 -100px;}
  .imageLeft{margin-left: -100px;width: 400px}
  .imageRight{margin-right: -100px;width:400px;}
  .profileR,.ephemeraR,#productivity,.videoRight {margin-right: -100px}
  .ephemeraL{margin-left: -100px;}
}

@media (max-width: 1100px) {

  #headerArt .bylinePaul, #headerArt .bylineDate {
    float: none;
    width: 100%;
    margin: 0
  }

  .profileR,.bigimgWrap,figure.wide,.ephemeraL,.ephemeraR,.listL,.listR,#productivity,.imageLeft,.imageRight,.videoRight{margin:0;}
  #interestingWrap{margin:0}
  .interesting1, .interesting2, .interesting3{width: 300px;}
  .interesting2{margin:-60px 0 0 200px}
  .interesting3{margin:-60px 0 0 460px}

}

@media (max-width: 900px) {
  .code-content{padding: 0 20px 0 20px;}
  #interestingWrap{margin:0 auto;width: 220px}
  .interesting1, .interesting2, .interesting3{width: 220px;position: relative;}
  .interesting2{margin:0}
  .interesting3{margin:0}
}

@media (max-width: 800px) {
  .imageLeft,.imageRight{margin:0;width:100%;padding: 10px;}
  body{font-size: 17px; line-height: 22px;}
  h2{font-size: 70px;line-height: 72px;}
  h4{text-align: center;}
  #productivity{margin: 0 auto;width: 100%}
  .productive{width: 48%}
}

@media (max-width: 600px) {
  #headerArt h2 {font-size: 22px;line-height: 22px;}
  #headerArt {padding: 0;}
  #headerArt{background: url('../images/mobileBG.gif');}
  #background-canvas{display:none;}

  body{font-size: 16px; line-height: 20px;}
  h2{font-size: 55px;line-height: 55px;}
  h3{font-size:26px;line-height: 28px}
  .ephemeraL,.ephemeraR{margin: 0}
  .listL,.listR{width: 100%}
  li {margin-left:20px}
  .videoRight{margin-right: 0;width: 100%;padding:10px;}
}

@media (max-width: 400px) {
  .hide-mobile {display:none;}
  .josh-letter { margin-left: -15px; margin-right: -15px; }
  .introText {font-size: 20px; line-height: 22px;}
  .listL, .listR,.ephemeraR,.ephemeraL,.profileR{display: none;}
  li {margin-left:0px}
  #productivity{display: none;}
  .chat{font-size: 14px;line-height: 16px;}
  .chatBig{font-size: 20px;line-height: 22px}
  .code-section { width: 100%; margin: 40px auto 0 auto;padding:10px 0;}
  h2{font-size: 40px;line-height: 40px;}
}

/* footnotes only appear if you're printing. interactives don't. */
#text-footnotes {
  display:none;
}
@media print {
  #text-footnotes {
    display:block;
  }
  [data-module] {
    display: none;
  }
}

@media only screen and (max-width: 1270px)  {
  [data-module="maps"]{
    display: none;
  }
}

@media only screen and (max-width: 840px)  {
  [data-module="tinder"]{
    display: none;
  }
}

@media only screen and (max-width: 1020px)  {
  #certificate, #certificate-container{
    display: none;
  }

  [data-module="circuit"]{
    display: none;
  }

  [data-module="crapplets"]{
    display: none;
  }

  [data-module="debug"]{
    display: none;
  }

  [data-module="gcd"]{
    display: none;
  }

  [data-module="grabbag"]{
    display: none;
  }

  [data-module="keyboard"]{
    display: none;
  }

  [data-module="languages"]{
    display: none;
  }

  [data-module="learninal"]{
    display: none;
  }

  [data-module="livehtml"]{
    display: none;
  }

  [data-module="mouse"]{
    display: none;
  }

  [data-module="paperclip"]{
    display: none;
  }

  [data-module="paulbot"]{
    display: none;
  }

  [data-module="recirc"]{
    display: none;
  }

  [data-module="shoppingcart"]{
    display: none;
  }

  [data-module="text-diff"]{
    display: none;
  }

  [data-module="toc"]{
    display: none;
  }

  [data-module="tree"]{
    display: none;
  }

}

.b-ie #circuit, .b-ie #crapplets, .b-ie #debug, .b-ie #gcd, .b-ie #grabbag, .b-ie #keyboard, .b-ie #languages, .b-ie #learninal, .b-ie #livehtml,  .b-ie #mouse,  .b-ie #paperclip,  .b-ie #paulbot,  .b-ie #recirc,  .b-ie #text-diff,  .b-ie #tree,  .b-ie #tinder, .b-ie #code-atlas, .b-ie #certificate-container, .b-ie #paulbot, .b-ie .innershare{
  display: none !important;
}