/*
 * Layout primitives, replacing Bootstrap 3.3.1 (MIT). Only what this site uses: the base resets and typography
 * sizes the grayscale theme builds on, the fixed-width container, the grid columns in use, the navbar structure,
 * and the button/list resets. Values are Bootstrap's own, so the rendering is unchanged.
 * Class names are kept (.container, .row, .col-*, .navbar-*) because css/grayscale.css styles them.
 */

/* --- base ---------------------------------------------------------------- */

*,
*:before,
*:after {
    box-sizing: border-box;
}

html {
    font-size: 10px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    margin: 0;
    font-size: 14px;
    line-height: 1.42857143;
}

a {
    text-decoration: none;
}

button {
    margin: 0;
    font: inherit;
    color: inherit;
    overflow: visible;
    text-transform: none;
    -webkit-appearance: button;
    cursor: pointer;
}

img {
    border: 0;
    vertical-align: middle;
}

/* grayscale.css sets the family, weight, transform and margins; these are the sizes it relies on */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.1;
}
h1 { font-size: 36px; }
h2 { font-size: 30px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

ul, ol {
    margin-top: 0;
    margin-bottom: 10px;
}

.text-center {
    text-align: center;
}

/* screen-reader-only text (Bootstrap's .sr-only) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- container and grid -------------------------------------------------- */

.container {
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    margin-right: -15px;
    margin-left: -15px;
}

.container:before,
.container:after,
.row:before,
.row:after,
.nav:before,
.nav:after,
.navbar:before,
.navbar:after,
.navbar-header:before,
.navbar-header:after,
.navbar-collapse:before,
.navbar-collapse:after {
    display: table;
    content: " ";
}

.container:after,
.row:after,
.nav:after,
.navbar:after,
.navbar-header:after,
.navbar-collapse:after {
    clear: both;
}

.col-xs-3,
.col-xs-9,
.col-sm-3,
.col-sm-6,
.col-md-8,
.col-lg-8 {
    position: relative;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
}

.col-xs-3,
.col-xs-9 {
    float: left;
}

.col-xs-3 { width: 25%; }
.col-xs-9 { width: 75%; }

@media (max-width: 767px) {
    .hidden-xs {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .container { width: 750px; }

    .col-sm-3,
    .col-sm-6 { float: left; }
    .col-sm-3 { width: 25%; }
    .col-sm-6 { width: 50%; }
}

@media (min-width: 992px) {
    .container { width: 970px; }

    .col-md-8 { float: left; width: 66.66666667%; }
    .col-md-offset-2 { margin-left: 16.66666667%; }
}

@media (min-width: 1200px) {
    .container { width: 1170px; }

    .col-lg-8 { float: left; width: 66.66666667%; }
    .col-lg-offset-2 { margin-left: 16.66666667%; }
}

/* --- lists and buttons --------------------------------------------------- */

.list-inline {
    padding-left: 0;
    margin-left: -5px;
    list-style: none;
}

.list-inline > li {
    display: inline-block;
    padding-right: 5px;
    padding-left: 5px;
}

.btn {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}

.btn:hover,
.btn:focus {
    text-decoration: none;
}

/* --- navbar -------------------------------------------------------------- */

.navbar {
    position: relative;
    min-height: 50px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.navbar-fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    border-width: 0 0 1px;
}

.navbar-brand {
    float: left;
    height: 50px;
    padding: 15px 15px;
    font-size: 18px;
    line-height: 20px;
}

.navbar-brand > img {
    display: block;
}

.navbar-toggle {
    position: relative;
    float: right;
    padding: 9px 10px;
    margin: 8px 15px 8px 0;
    background-color: transparent;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}

.navbar-toggle:focus {
    outline: 0;
}

.nav {
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav > li {
    position: relative;
    display: block;
}

.nav > li > a {
    position: relative;
    display: block;
    padding: 10px 15px;
}

.navbar-nav {
    margin: 7.5px -15px;
}

.navbar-nav > li > a {
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 20px;
}

/* the menu is collapsed on phones and always open from the md breakpoint up; js/tgifunk.js toggles .in */
.navbar-collapse {
    padding-right: 15px;
    padding-left: 15px;
    max-height: 340px;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.collapse {
    display: none;
}

.collapse.in {
    display: block;
}

.container > .navbar-header,
.container > .navbar-collapse {
    margin-right: -15px;
    margin-left: -15px;
}

@media (min-width: 768px) {
    .navbar-header {
        float: left;
    }

    .navbar > .container .navbar-brand {
        margin-left: -15px;
    }

    .navbar-toggle {
        display: none;
    }

    .navbar-nav {
        float: left;
        margin: 0;
    }

    .navbar-nav > li {
        float: left;
    }

    .navbar-nav > li > a {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .navbar-right {
        float: right !important;
        margin-right: -15px;
    }

    .navbar-collapse {
        width: auto;
        border-top: 0;
        box-shadow: none;
    }

    .navbar-collapse.collapse {
        display: block !important;
        height: auto !important;
        padding-bottom: 0;
        overflow: visible !important;
    }

    .container > .navbar-header,
    .container > .navbar-collapse {
        margin-right: 0;
        margin-left: 0;
    }

    .navbar-fixed-top .navbar-collapse {
        padding-right: 0;
        padding-left: 0;
    }
}
