/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */

/**
 * 1. Set default font family to sans-serif.
 * 2. Prevent iOS and IE text size adjust after device orientation change,
 *    without disabling user zoom.
 */

html {
  font-family: sans-serif; /* 1 */
  -ms-text-size-adjust: 100%; /* 2 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

/**
 * Remove default margin.
 */

body {
  margin: 0;
}

/* HTML5 display definitions
   ========================================================================== */

/**
 * Correct `block` display not defined for any HTML5 element in IE 8/9.
 * Correct `block` display not defined for `details` or `summary` in IE 10/11
 * and Firefox.
 * Correct `block` display not defined for `main` in IE 11.
 */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
  display: block;
}

/**
 * 1. Correct `inline-block` display not defined in IE 8/9.
 * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
 */

audio,
canvas,
progress,
video {
  display: inline-block; /* 1 */
  vertical-align: baseline; /* 2 */
}

/**
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */

audio:not([controls]) {
  display: none;
  height: 0;
}

/**
 * Address `[hidden]` styling not present in IE 8/9/10.
 * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
 */

[hidden],
template {
  display: none;
}

/* Links
   ========================================================================== */

/**
 * Remove the gray background color from active links in IE 10.
 */

a {
  background-color: transparent;
}

/**
 * Improve readability of focused elements when they are also in an
 * active/hover state.
 */

a:active,
a:hover {
  outline: 0;
}

/* Text-level semantics
   ========================================================================== */

/**
 * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
 */

abbr[title] {
  border-bottom: 1px dotted;
}

/**
 * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
 */

b,
strong {
  font-weight: bold;
}

/**
 * Address styling not present in Safari and Chrome.
 */

dfn {
  font-style: italic;
}

/**
 * Address variable `h1` font-size and margin within `section` and `article`
 * contexts in Firefox 4+, Safari, and Chrome.
 */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}



/* Embedded content
   ========================================================================== */

/**
 * Remove border when inside `a` element in IE 8/9/10.
 */

img {
  border: 0;
}

/**
 * Correct overflow not hidden in IE 9/10/11.
 */

svg:not(:root) {
  overflow: hidden;
}

/* Grouping content
   ========================================================================== */

/**
 * Address margin not present in IE 8/9 and Safari.
 */

figure {
  margin: 1em 40px;
}

/**
 * Address differences between Firefox and other browsers.
 */

hr {
  box-sizing: content-box;
  height: 0;
}

/**
 * Contain overflow in all browsers.
 */

pre {
  overflow: auto;
}

/**
 * Address odd `em`-unit font size rendering in all browsers.
 */

code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

/* Forms
   ========================================================================== */

/**
 * Known limitation: by default, Chrome and Safari on OS X allow very limited
 * styling of `select`, unless a `border` property is set.
 */

/**
 * 1. Correct color not being inherited.
 *    Known issue: affects color of disabled elements.
 * 2. Correct font properties not being inherited.
 * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
 */

button,
input,
optgroup,
select,
textarea {
  color: inherit; /* 1 */
  font: inherit; /* 2 */
  margin: 0; /* 3 */
}

/**
 * Address `overflow` set to `hidden` in IE 8/9/10/11.
 */

button {
  overflow: visible;
}

/**
 * Address inconsistent `text-transform` inheritance for `button` and `select`.
 * All other form control elements do not inherit `text-transform` values.
 * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
 * Correct `select` style inheritance in Firefox.
 */

button,
select {
  text-transform: none;
}

/**
 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
 *    and `video` controls.
 * 2. Correct inability to style clickable `input` types in iOS.
 * 3. Improve usability and consistency of cursor style between image-type
 *    `input` and others.
 */

button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button; /* 2 */
  cursor: pointer; /* 3 */
}

/**
 * Re-set default cursor for disabled elements.
 */

button[disabled],
html input[disabled] {
  cursor: default;
}

/**
 * Remove inner padding and border in Firefox 4+.
 */

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/**
 * Address Firefox 4+ setting `line-height` on `input` using `!important` in
 * the UA stylesheet.
 */

input {
  line-height: normal;
}

/**
 * Remove default vertical scrollbar in IE 8/9/10/11.
 */

textarea {
  overflow: auto;
}


/* Tables
   ========================================================================== */

/**
 * Remove most spacing between table cells.
 */

table {
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  padding: 0;
}

/* web fonts
------------------------- */

/* Texta Regular */
@font-face {
  font-family: 'Texta';
  src: url('texta-regular.woff2') format('woff2'),
    url('texta-regular.woff') format('woff');
}

/* Texta Heavy */
@font-face {
  font-family: 'Texta';
  font-weight: bold;
  font-style: normal;
  src: url('texta-heavy.woff2') format('woff2'),
    url('texta-heavy.woff') format('woff');
}

/* Texta Italic */
@font-face {
  font-family: 'Texta';
  font-weight: normal;
  font-style: italic;
  src: url('texta-italic.woff2') format('woff2'),
    url('texta-italic.woff') format('woff');
}

/* Styles
------------------------- */

* {
  box-sizing: border-box;
}

html {
  font-family: Texta, sans-serif;
  font-size: 19px;
  line-height: 1.4;
}

body {
  color: #320;
  background: #FC0;
}

pre, code {
  font-family: Consolas, Menlo, monospace;
  font-size: 15px;
  background: #320;
  color: #FED;
}

#content {
  padding: 0 8px 3.0em;
}

pre {
  padding: 1.0em;
  border-radius: 8px;
  overflow-x: auto;
}

code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
}


pre code {
  background: transparent;
  padding: 0;
  white-space: pre-wrap;
}

h2 {
  border-top: 2px solid white;
  padding-top: 1.0em;
  margin-top: 2.0em;
}

h3 {
  font-weight: normal;
}

.tagline {
  font-size: 24px;
}

a {
  text-decoration: none;
  color: #B60;
}

a:hover { color: #04F; }

.page-nav {
  list-style: none;
  font-size: 17px;
}

/* demo
------------------------- */

#image-container {
  border-radius: 10px;
  background: white;
  padding: 10px;
  min-height: 165px;
}

/* clear fix */
#image-container:after {
  content: '';
  display: block;
  clear: both;
}

#image-container img {
  max-height: 140px;
  border-radius: 5px;
}

#image-container li {
  height: 140px;
  min-width: 100px;
  display: block;
  float: left;
  list-style: none;
  margin: 0 5px 5px 0;
  background-color: black;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 5px;
}

#image-container li img,
#status {
  -webkit-transition: opacity 0.4s;
     -moz-transition: opacity 0.4s;
      -ms-transition: opacity 0.4s;
          transition: opacity 0.4s;
}

#image-container li.is-loading {
  background-color: black;
  background-image: url('loading.gif');
}

#image-container  li.is-broken {
  background-image: url('broken.png');
  background-color: #be3730;
  width: 120px;
}

#image-container li.is-loading img,
#image-container li.is-broken img {
  opacity: 0;
}

#progress-demo button {
  font-size: 1.1rem;
  padding: 10px 20px;;
  border-radius: 8px;
  color: white;
  background-color: #888;
  border: none;
  background-image: -webkit-linear-gradient( hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.3) );
  background-image:         linear-gradient( hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.3) );
}

#progress-demo #add { background-color: #88F; }
#progress-demo #add:hover { background-color: #AAF; }

#progress-demo #reset { background-color: #333; }
#progress-demo #reset:hover { background-color: #555; }

#progress-demo button:active {
  box-shadow: inset 0 2px 14px hsla(0, 0%, 0%, 0.8);
}

#status {
  opacity: 0;
  position: fixed;
  right: 20px;
  top: 20px;
  background: #222;
  color: white;
  background: hsla( 0, 0%, 0%, 0.8);
  padding: 20px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 2; /* over other stuff */
}

#status progress { font-size: 28px; }

/* ---- github button ---- */

.gh-button {
  display: inline-block;
  background: none;
  border: none;
  font-family: Helvetica, Arial, sans-serif;
  color: #333;
}

.gh-button__title,
.gh-button__stat {
  float: left;
  font-size: 15px;
  font-weight: bold;
  line-height: 20px;
  padding: 5px 10px;
  border: 1px solid #d5d5d5;
}

.gh-button__icon {
  height: 20px;
  fill: #333;
  display: inline-block;
  vertical-align: bottom;
}

.gh-button__title {
  background-color: #eee;
  background-image: linear-gradient(#fcfcfc, #eee);
  border-radius: 4px 0 0 4px;
}

.gh-button__icon--github-logo {
  margin-right: 0.2em;
}

.gh-button__stat {
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: white;
}

.gh-button:hover { color: #333; }

.gh-button:hover .gh-button__title {
  background-color: #ddd;
  background-image: linear-gradient(#eee, #ddd);
}

.gh-button:hover .gh-button__stat {
  color: #4078c0;
}

.gh-button:hover .gh-button__icon--star {
  fill: #4078c0;
}

/* other-products
------------------------- */

.other-products:after {
  content: '';
  display: block;
  clear: both;
}

.other-product {
  margin-bottom: 10px;
}

.other-product__link {
  position: relative; /* gonna abs */
  display: block;
  padding: 0px;
  background: white;
  border-radius: 5px;
}

.other-product__link:hover {
  background: #B60;
  color: white;
}

.other-product__link:after {
  content: '';
  display: block;
  clear: both;
}

.other-product__image {
  float: left;
  display: block;
  width: 100%;
  max-width: 120px;
  margin: 10px;
  border-radius: 5px;
}

.other-product__title {
  margin: 10px 0;
  padding-top: 10px;
  line-height: 1.2;
  font-weight: bold;
  font-size: 2.0em;
}

.other-product__description {
  line-height: 1.2;
  margin: 0;
}

/* syntax highlighting
------------------------- */

code .string,
code .tag .value { color: #2D4; }
code .number, /* integer */
code .cp, /* doctype */
code .literal { color: #78F; } /*boolean*/
code .keyword { color: #F84; } /* keyword */
code .params { color: #88F; }
code .regexp { color: #FC4; }
code .built_in { color: #C9E; }
code .kd, /* storage */
code .attribute { color: #C83; } /* markup attribute */
code .p  { color: #EDB; } /* punctuation */
code .o  { color: #F63; }   /* operator */
code .nb { color: #AA97AC;} /* support */

/* comment */
code .comment { color: #876; font-style: italic; }

code .tag { color: #59D; } /* Markup open tag */

code .id { color: #567; } /* css id */
code .class { color: #A63; }  /* CSS class */
code .rules { color: #431; }
code .m  { color: #DE8E50; } /* CSS value */
code .nd { color: #9FAD7E; } /* CSS pseudo selector */
code .hexcolor { color: #F63; }
code .at_rule { color: #088; }

code .imagesloaded_keyword { color: #0FF; }
code .imgload_var { color: #F3F; }

code .title.function_ { color: #FF8; }

/* tablet and desktop */
@media screen and (min-width: 830px) {

  h1 {
    font-size: 4.0rem;
    line-height: 1.2;
    margin-bottom: 0.3em;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.4rem;
  }

  #content {
    padding: 0 0 6.0em;
  }

  #content > * {
    padding-left: 60px;
    max-width: 820px;
    margin-right: 240px
  }

  #content > h2 {
    max-width: none;
  }

  #content > pre {
    padding-left: 1.0em;
    margin-left: 60px;
    max-width: 820px;
  }

  #content > ul {
    padding-left: 126px;
  }

  #content > #progress-demo {
    padding-right: 1.0em;
    max-width: none;
  }

  /* ---- page-nav ---- */

  .page-nav {
    position: fixed;
    width: 200px;
    right: 20px;
    top: 60px;
  }
  /* hacky overwrite styles */
  #content > .page-nav {
    margin-right: 0;
  }

  .page-nav__item {
    margin-bottom: 2px;
  }

  .page-nav__item a { display: block; }

  /* ---- other products ---- */

  .other-product {
    width: 49%;
    float: left;
  }

  .other-product:nth-child(2n+1) {
    margin-right: 2%;
  }

}
