/* ==========================================================================
   HTML5 Boilerplate styles - h5bp.com (generated via initializr.com)
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

body {
    font-size: 1em;
    line-height: 1.4;
}

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

img {
    vertical-align: middle;
}

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}

.chromeframe {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}


/* ===== L20n Styles ========================================================
   Author: Mozilla - l20n.org
   ========================================================================== */

html.error {
    display: table;
    height: 100%;
    width: 100%;
}

body {
    background: #DBDBD6;
    color: #333333;
    font: 19px/26px Open Sans, Helvetica Neue, Helvetica, Arial;
    font-weight: 300;
    text-align: center;
}

.error body {
    background: #66D9EF;
    display: table-cell;
    vertical-align: middle;
}

h3 {
    font-size: 1.2em;
    letter-spacing: -1px;
    margin: 0 0 1em;
    text-shadow: 0 2px 0px #CFCFCF;
    text-transform: uppercase;
}

h5 {
    background: #66D9EF;
    display: inline-block;
    font-size: 1.2em;
    font-weight: 400;
    letter-spacing: -1px;
    margin: 0;
    padding: 0.5em 2em;
    text-transform: uppercase;
}

hr {
    font-size: 0.8em;
    border-color: #333333;
    margin-top: 2em;
}

p {
    line-height: 1.6em;
    margin: 0;
}

code {
    color: #F92672;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 0.8em;
    line-height: 1em;
    padding: 0.1em 0.2em 0;
    white-space: nowrap;
}

dt code,
code.entity {
    background: #F8F8F0;
    border: 1px solid #05B1CC;
    border-radius: 5px;
    color: #05B1CC;
}

.implementation code {
    border-left: 2px solid #CCCCCC;
    color: #8F908A;
    display: block;
    line-height: 1.3em;
    margin: 4px 0;
    padding: 0 8px;
    white-space: normal;
    word-wrap: break-word;
}

.error dt {
    color: #FF0000;
}

.error dt code {
    color: #999999;
    border-color: #999999;
}

.error dd div {
    color: #FF0000;
    font-style: italic;
}

a {
    color: #F92672;
    text-decoration: none;
    transition-duration: .2s;
    transition-property: background, color;
}

a:hover,
a:active,
a.active {
    color: #F92672;
    text-decoration: none;
}

a#cta {
    background: url('../img/download.png') no-repeat 2em 7px #E6DB74; /* Icon source: http://www.visualpharm.com */
    border: 1px solid #333333;
    color: inherit;
    display: inline-block;
    font-weight: 400;
    letter-spacing: -1px;
    margin-bottom: 0.2em;
    padding: 0.5em 2em 0.5em 4em;
    text-align: left;
    text-transform: uppercase;
}

.error a#cta {
    background: #E6DB74;
    padding-left: 2em;
}

a#cta:hover,
a#cta:active {
    background-color: #FFFFFF;
}

main {
    background: url('../img/grain.png') #F8F8F0;
}

main .content a {
    display: block;
    margin-top: 0.5em;
}

main .content p a {
    display: inline;
}

main .content a:hover,
main .content a:active {
    text-decoration: underline;
}

a.title {
    float: left;
    line-height: 4.6em;
    margin: 0 2em;
}

main header h2 {
    width: 90%;
    margin: 0.5em 5%;
}

main > .content {
    width: 90%;
    margin: 0 5%;
}

main > .content > .introduction {
    padding-bottom: 4em;
    padding-top: 4em;
}

main > .content > .introduction :nth-child(3):before {
    content: "∴";
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    margin: 1em 0;
}

main > .content > .highlights {
    border-bottom: 1px dotted #333333;
    border-top: 1px dotted #333333;
    padding-top: 4em;
}

main > .content > .highlights > figure {
    margin-bottom: 4em;
}

main > .content > .highlights > figure > h3 {
    margin: 1em 0 0.5em;
}

main > .content > .highlights > figure > a:after,
main > .content > .implementation > div > a.developer-docs:after {
    content: " →";
}

main > .content > .implementation {
    padding-top: 4em;
    text-align: left;
}

main > .content > .implementation > div {
    margin-bottom: 4em;
}
main > .content > .implementation > div ol {
    padding: 0;
}

main > .content > .implementation > div li {
    padding-bottom: 20px;
}

body > header {
    background: #272822;
    line-height: 0;
}

body > footer {
    background: #DBDBD6;
    border-top: 1px solid #B5B5B0;
    text-align: center;
}

#tooltip {
    display: none;
    background: #272822;
    color: #A6E22E;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 0.7em;
    padding: 0 0.3em;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

#inspect {
    margin-left: 0.5em;
}

.navigation .back {
    float: left;
}

.navigation .back:before {
    content: "← ";
}

.navigation .next {
    float: right;
}

.navigation .next:after {
    content: " →";
}

.editor.height5 {
    height: 5em;
}

.editor.height10 {
    height: 10em;
}

.editor.height15 {
    height: 15em;
}

.editor.height25 {
    height: 25em;
}

.editor.height35 {
    height: 35em;
}

.editor.height45 {
    height: 45em;
}

.editor.height52 {
    height: 52em;
}

/* =======
    Learn
   ======= */

.learn main {
    text-align: left;
    padding-top: 4em;
}

.learn button.toggle {
    background-color: #66D9EF;
}

.learn header nav {
    background: #66D9EF;
}

.learn header nav a {
    border-color: #068599;
    line-height: 1.5em;
    margin: 0 1em;
    padding: 0.8em 0;
}

.learn h3 {
    margin-bottom: 2em;
}

.learn main ul {
    margin: -1em 0 2em 0;
}

.learn p {
    margin: 0 0 2em 0;
}

.learn .editor {
    border: 1px solid #777777;
    margin-bottom: 1.25em;
}

.learn dl[id^="output"] {
    background: #DBDBD6;
    padding: 0.4em;
}

.learn dl[id^="output"] dd {
    font-size: 0.8em;
    white-space: pre-wrap;
}

.learn .navigation {
    margin-bottom: 4em;
}

/* ==============
    MOBILE: Menu
   ============== */

button.toggle {
    background: url('../img/menu.png') #F92672 no-repeat center center;
    border: none;
    float: right;
    font-size: 0.8em;
    height: 4.6em;
    line-height: 4.6em;
    padding: 0;
    width: 4.6em;
}

nav {
    background: #F92672;
    display: none;
}

.extended nav {
    display: block;
}

footer nav {
    background: inherit;
    display: block;
    line-height: 0;
    padding-top: 1em;
}

nav ul {
    margin: 0;
    padding: 0;
}

nav a {
    border-bottom: 1px solid #B30545;
    display: block;
    margin: 0 1em;
    padding: 1.6em 0;
    text-align: center;
    text-decoration: none;
}

header nav a:hover,
header nav a.active {
    color: #272822;
}

header nav li:last-child a {
    border-bottom: none;
}

footer nav a {
    border-bottom: 1px solid #B5B5B0;
    color: #333333;
}

footer nav p {
    color: #70716A;
    font-size: 0.7em;
    padding: 2em 0;
    text-shadow: 1px 1px 0 #F8F8F0;
}

nav a,
a.title {
    color: #F8F8F0;
    font-weight: 700;
    font-size: 0.8em;
    text-transform: uppercase;
}

.learn header nav a {
    color: #333333;
    font-weight: 300;
    text-align: left;
    text-transform: none;
}

/* ==============
    MOBILE: Main
   ============== */

main header {
    background: #66D9EF;
    padding: 2em 0;
}

main header h2 {
    color: #333333;
    font-size: 1.8em;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2em;
    margin-bottom: 1em;
    text-transform: uppercase;
}

main header .wrapper {
    margin-top: -2.2em;
}

main header .inner-wrapper {
    background: #66D9EF;
    display: inline-block;
    padding: 0 2em;
}

main > .content {
    margin: 0 auto;
}

.learn main > .content {
    padding-top: 2em;
}

main .window {
    background: #3D3D3D;
    border: 1px solid #777777;
    border-radius: 7px 7px 7px 7px;
    box-shadow: 0 0 30px #52524D;
    color: #FFFFFF;
    margin-bottom: 4em;
    text-align: left;
}

main .window h3 {
    background: -moz-linear-gradient(top, #f7f7f7 0%, #cfcfcf 7%, #aaaaaa 100%);
    background: -webkit-linear-gradient(top, #f7f7f7 0%,#cfcfcf 7%,#aaaaaa 100%);
    background: linear-gradient(top, #f7f7f7 0%,#cfcfcf 7%,#aaaaaa 100%);
    border-bottom: 1px solid #777777;
    border-radius: 5px 5px 0 0;
    color: #444444;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.7em;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5em;
    margin: 0;
    padding: 0.2em 0;
    text-align: center;
    text-shadow: 0 1px 0 #DDDDDD;
    text-transform: none;
}

main .window h3.status {
    background: -moz-linear-gradient(top, #cfcfcf, #aaaaaa);
    background: -webkit-linear-gradient(top, #cfcfcf, #aaaaaa);
    background: linear-gradient(top, #cfcfcf, #aaaaaa);
    border-bottom: none;
    border-top: 1px solid #777777;
    border-radius: 0 0 5px 5px;
    font-size: 0.6em;
}

.editor {
    font-size: 0.7em;
    line-height: 1.5em;
}

/* ===============
    ALL: IE Fixes
   =============== */

.ie7 .title {
    padding-top: 20px;
}



@media only screen and (min-width: 480px) {

/* ====================
    INTERMEDIATE: Main
   ==================== */

    .editor {
        font-size: 0.77em;
    }

/* ========================
    INTERMEDIATE: IE Fixes
   ======================== */

    .oldie nav a {
        margin: 0 0.7%;
    }
}

@media only screen and (min-width: 768px) {

/* ============
    WIDE: Menu
   ============ */

    .mobile-container {
        float: none;
        display: inline-block;
    }

    a.title {
        color: #F92672;
        float: left;
        display: inline-block;
    }

    button.toggle {
        display: none;
    }

    nav {
        background: #272822;
        display: inline-block;
    }

    .extended nav {
        display: inline-block;
    }

    nav ul li {
        display: inline-block;
    }

    .learn header nav ul li {
        width: 100%;
    }

    nav a {
        background: transparent;
        border-bottom: none;
        float: left;
        line-height: 4.6em;
        margin: 0em 1.7em;
        padding: 0;
    }

    header nav a:hover,
    header nav a.active {
        color: #F92672;
    }

    footer nav a {
        border-bottom: none;
    }

    footer nav p {
        margin: -2em 0 1em;
    }

    .learn {
        overflow-x: hidden;
        position: relative;
    }

    .learn .mobile-container {
        float: left;
    }

    .learn .mobile-container a.title {
        color: #F8F8F0;
    }

    .learn .mobile-container .toggle {
        position: absolute;
        right: 0;
        display: block;
    }

    .learn > header nav {
        display: inline-block;
        position: absolute;
        right: -400px;
        top: 3.7em;
        width: 400px;
        transition: all 0.2s ease-out;
        z-index: 100;
    }

    .learn > header.extended nav {
        right: 0;
    }

    .learn > header nav li a {
        border-bottom: 1px solid #068599;
        display: block;
        float: none;
    }

    .learn > header nav li:last-child a {
        border-bottom: none;
    }

/* ============
    WIDE: Main
   ============ */

    main header h2 {
        font-size: 2.5em;
        letter-spacing: -2px;
        margin: 0.5em auto 0.7em;
    }

    main > .content {
        margin: 0 auto 0;
    }

    main > .content .introduction {
        text-align: left;
    }

    main > .content .introduction p {
        padding: 0 4em;
    }

    main > .content .introduction :nth-child(3) {
        padding-top: 1em;
    }

    main > .content .introduction :nth-child(3):before {
        content: none;
    }

    main > .content > .highlights > figure {
        display: inline-block;
        /* TODO: why not 4%?; */
        margin-right: 3%;
        vertical-align: top;
        width: 48%;
    }

    main > .content > .highlights > figure:nth-child(2n) {
        margin-right: 0;
    }

    .learn section .left {
        float: left;
        width: 50%;
    }

    .learn section .right {
        float: right;
        width: 48%;
    }

}

@media only screen and (min-width: 1140px) {

/* ===============
    Maximal Width
   =============== */

    main header .wrapper {
        margin-top: -1.4em;
    }

    hr,
    main header h2 {
        width: 1026px;
    }

    hr {
        margin: 2em auto 0;
    }

    main header h2 {
        letter-spacing: -3px;
    }

    main > .content {
        width: 1026px;
    }

    main > .content > .highlights > figure:nth-child(n) {
        /* TODO: why not 5%?; */
        margin-right: 4%;
        width: 30%;
    }

    main > .content > .highlights > figure:nth-child(3),
    main > .content > .highlights > figure:nth-child(6) {
        margin-right: 0;
    }

    main > .content > .implementation > div {
        float: left;
        text-align: left;
        width: 48%;
    }

    main .window {
        float: right;
        width: 48%;
    }

    .editor {
        height: 50em;
    }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 150%;
}

.hidden {
    display: none !important;
    visibility: hidden;
}

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

.invisible {
    visibility: hidden;
}

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   Print styles
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
