/****************************************************
*
* External
*
****************************************************/

@import url('https://fonts.googleapis.com/css?family=Merriweather:400,400i,700,700i');
@import url('/birdview/css/birdview.css');

/****************************************************
*
* Base
*
****************************************************/

html{
    margin: 0;
    padding: 0;
}

body{
    margin: 0;
    padding: 0;
    color: #000;
    font-family: "Futura-PT", "Segoe UI Web Regular", "Segoe UI", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, sans-serif;
    font-size: 16px;
    overflow-y: scroll;
    background-color: #fff;
}
a, label, button, input{-webkit-tap-highlight-color: rgba(0, 0, 0, 0); cursor: pointer;}
a{text-decoration-skip: ink;}
*{box-sizing: border-box;}

:focus{
    outline: solid 4px #222;
    outline-offset: 2px;
}

button::-moz-focus-inner{
    border: 0;
}

/****************************************************
*
* Article
*
****************************************************/

.article{
    display: block;
    max-width: 64em;
    margin: auto;
    padding: 1em 1em 3em;
    font-family: 'Merriweather', Georgia, serif;
}

.article .title,
.article .info,
.article h2{
    font-family: "Futura-PT", "Segoe UI Web Regular", "Segoe UI", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, sans-serif;
}

.article .title{
    margin: 0.25em 0;
    text-align: center;
    color: #e10000;
    font-weight: 700;
    font-size: 2em;
    letter-spacing: -1px;
    transform: scaleX(0.95) scaleY(1.05);
}

.article .title a{
    color: inherit;
    text-decoration: none;
}

.article .title a:hover,
.article .title a:active{
    text-decoration: underline;
}

.article header .info{
    display: block;
    margin: auto;
    font-weight: 400;
    text-align: center;
}

.article .gist{
    max-width: 33em;
    margin: 1em auto 2em;
    padding: 1em;
    text-align: left;
    font-weight: 700;
    font-size: 0.875em;
    line-height: 1.6em;
    letter-spacing: 0;
    border-radius: 0;
    border: 1px solid #777;
    border-top: none;
    border-bottom: none;
}

.article h2{
    max-width: 32em;
    margin: 1em auto;
    font-weight: 600;
    font-size: 1.25em;
    text-align: left;
    transform-origin: 0% 0%; 
    transform: scaleX(0.95) scaleY(1.05);
}

.article .links{
    padding-top: 1em;
    border-top: 1px solid #eee;
}

.article p,
.article ul,
.article ol,
.article figure,
.article pre{
    max-width: 40em;
}

.article p,
.article ol,
.article ul{
    margin: auto;
    font-weight: 400;
    font-size: 1em;
    line-height: 1.8em;
}

.article p{
    margin: 1em auto;
}

.article li{
    margin: 0.5em 0 0 0;
}

blockquote{
    max-width: 37.5em;
    margin: 1.5em auto;
    padding: 0 1em;
    font-style: italic;
    line-height: 1.8em;
    border-left: 1px solid #999;
}

q{font-style: italic;}

.cite{
    display: block;
    font-style: normal;
}

.article .center{
    text-align: center;
}

/****************************************************
*
* Media
*
****************************************************/

figure{
    margin: 1.5em auto;
    overflow-y: auto;
}

figure img{
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1em auto 0;
}

figcaption{
    display: block;
    padding: 1em 2em 0;
    font-size: 0.9375em;
    line-height: 1.4em;
}

/****************************************************
*
* Stacking property
*
****************************************************/

input[type=button]{
    -webkit-appearance: none;
}

#stacking-property pre{
    margin: auto;
    font-family: 'Consolas', monospace;
}

/*
*
* 2D Grid
*
*/
.stacking_property_grid{
    box-sizing: content-box;
    width: 100px;
    height: 200px;
    margin: 0 auto 1em;
    background: #fff;
    line-height: 0px;
    border: 1px solid #ddd;
    overflow: hidden;
    overflow-anchor: none;
    transition: 2s width ease, 2s height ease;
}

.stacking_property_grid.big{
    width: 280px;
    height: 280px;
}

.stacking_property_grid input{display: none;}

.stacking_property_grid label{
    display: inline-block;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: 2s width ease, 2s height ease;
}

.stacking_property_grid label.colored{
    background: #ccc;
    border-color: #ddd;
}

.stacking_property_grid input:checked + label{
    background: #000;
    border-color: #000;
}

/*
*
* 1D Grid
*
*/
.stacking_property_grid.unwrapped{
    width: 500px;
    height: 10px;
}

.stacking_property_grid.unwrapped label{
    width: 10px;
    height: 10px;
}

/*
*
* Controls
*
*/
#stacking-property .controls{
    text-align: center;
}

#stacking-property .controls div{
    max-width: 480px;
    margin: 1em auto;
    text-align: left;
}

#stacking-property .controls label{
    display: inline-block;
    vertical-align: top;
    min-width: 120px;
    font-family: 'Consolas', monospace;
    font-weight: normal;
    font-size: 15px;
    text-align: right;
}

#stacking-property .controls input[type=range]{
    width: 250px;
}

@media only screen and (max-width: 520px) {
    #stacking-property .controls div{
        max-width: 400px;
    }
    #stacking-property .controls input[type=range]{
        width: 120px;
    }
}

#stacking-property .controls input[type=number]{
    width: 5em;
    display: inline-block;
    vertical-align: top;
    border: 1px solid #ccc;
}

#stacking-property .stacking_property_button{
    box-sizing: content-box;
    display: inline-block;
    vertical-align: top;
    min-width: 3.25em;
    height: 2.25em;
    margin: 0.25em 0.125em;
    padding: 0 1em;
    color: #e10000;
    font-family: 'Consolas', monospace;
    font-weight: bold;
    font-size: 1em;
    border: 2px solid #e10000;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
}

#stacking-property .stacking_property_button.clear{
    margin-left: 2em;
    color: #fff;
    background: #e10000;
}

#stacking-property .stacking_property_button:active{
    color: #fff;
    background: #bb0000;
    border-color: #bb0000;
    outline: none;
}

/****************************************************
*
* Footer
*
****************************************************/

.footer{
    text-align: center;
    line-height: 1.6em;
    padding-bottom: 1em; /* Fixes birdview's bug */
}

.footer a{padding: 1em;}

/****************************************************
*
* Generic responsive
*
****************************************************/

@media screen and (max-width: 767px) {
    ul, ol{padding-left: 1em;}
    figcaption{padding: 1em 1em 0;}
}

/****************************************************
*
* Print
*
****************************************************/

@media print{
    body{font-size: 12px;}

    figure{
        page-break-inside: avoid;
    }

    .printable{text-decoration: none;}

    .printable:after{
        content: ' (' attr(href) ') ';
        font-weight: normal;
        text-decoration: underline;
    }
    
    .footer{display: none;}
}