/* Shared styles for nksonline.

   developer:   marionm
   requires:    nothing
   ========================================================================== */

/* ==========================================================================
   gui.en.css overrides
   ========================================================================== */

#_noscript div {
    bottom: 0;
    position: fixed;
    top: auto;
}

/* ==========================================================================
   setup the environment
   ========================================================================== */

html {
    background: #ffcc66;
    font-family: 'PT Serif', Georgia, serif;
}

b,
optgroup,
strong { font-weight: 700; }

main { overflow-x: auto; } /* Safari herp derp */

main a { color: #892917; }

main a:active,
main a:hover { color: #ff002f; }

/* ==========================================================================
   header
   ========================================================================== */

#header {
    background: #3b3b3b;
    height: 70px;
}

#header h1 { margin-top: .4rem; }

#header h1 img { display: inline-block; }

#header h1 a:active img,
#header h1 a:hover img { opacity: .65; }

/* nav
   ========================================================================== */

#nav {
    color: #d4d4d4;
    float: right;
    margin-top: 1rem;
}

#nav > * { white-space: nowrap; }

#nav > * > * { padding-left: 1.5rem; }

#nav a { color: #e0b867; }

#nav a:active,
#nav a:hover { color: #ffa858; }

#nav .icon {
    -webkit-transition: opacity .5s;
    cursor: pointer;
    display: inline-block;
    opacity: .5;
    transition: opacity .5s;
    vertical-align: middle;
}

#nav .icon:active,
#nav .icon:hover { opacity: 1; }

/* size picker
   ================================== */

#nav .size-picker {
    position: relative;
    z-index: 9999;
}

html.toc #nav .size-picker,
html.chapter #nav .size-picker,
html.notes-toc #nav .size-picker,
html.notes-chapter #nav .size-picker,
html.notes-section #nav .size-picker,
html.notes-page #nav .size-picker,
html.index #nav .size-picker,
html.names #nav .size-picker,
html.search #nav .size-picker { display: none; }

#nav .size-picker .icon {
    background: url('/nks/img/icon-font-size.png') no-repeat left top;
    background-size: 18px 26px;
    height: 13px;
    width: 18px;
}

#nav .size-picker .icon:active,
#nav .size-picker .icon:hover { background-position: 0 -13px; }

#nav .size-picker ul {
    background: #565656;
    border-radius: 3px;
    box-shadow: 0px 1px 7px rgba(0, 0, 0, 0.25);
    color: #d0d0d0;
    display: none;
    font-size: .75rem;
    font-weight: 400;
    left: -.5rem;
    line-height: 1.2;
    margin: .5rem 0 0;
    padding: .25rem 0;
    position: absolute;
}

#nav .size-picker ul li {
    background: #565656;
    cursor: pointer;
    padding: .25rem 1.5rem .25rem 2rem;
}

#nav .size-picker ul li:active,
#nav .size-picker ul li:hover {
    background: #cb6f07;
    color: #fff;
}

#nav .size-picker ul li span { position: relative; }

#nav .size-picker ul li.checked span:before {
    color: #ffdd54;
    content: '\2713';
    left: -1rem;
    position: absolute;
}

/* search
   ================================== */

#nav .search {}

#nav .search .icon {
    background: url('/nks/img/icon-search.png') no-repeat left top;
    background-size: 19px 38px;
    height: 19px;
    width: 19px;
}

#nav .search .icon:active,
#nav .search .icon:hover { background-position: 0 -19px; }

/* toc
   ================================== */

#nav .toc {}

html.toc #nav .toc,
html.chapter #nav .toc,
html.notes-toc #nav .toc,
html.index #nav .toc,
html.names #nav .toc,
html.search #nav .toc { display: none; }

#nav .toc .icon {
    background: url('/nks/img/icon-toc.png') no-repeat left top;
    background-size: 15px 28px;
    height: 14px;
    width: 15px;
}

#nav .toc .icon:active,
#nav .toc .icon:hover { background-position: 0 -14px; }

/* breadcrumbs
   ================================== */

#nav .breadcrumbs {
    font-size: .75rem;
    padding-left: .5rem;
}

#nav .breadcrumbs a,
#nav .breadcrumbs span > span {
    display: inline-block;
    padding: .25rem;
    position: relative;
}

html.toc #nav .breadcrumbs,
html.chapter #nav .breadcrumbs,
html.notes-toc #nav .breadcrumbs,
html.index #nav .breadcrumbs,
html.names #nav .breadcrumbs,
html.search #nav .breadcrumbs { display: none; }

#nav .breadcrumbs div > span:before {
    color: #909090;
    content: '›';
    font-size: 19px;
    line-height: 0;
    margin-right: .2rem;
    position: relative;
    top: 1px;
}

/* search
   ========================================================================== */

#search {
    background: #565656;
    display: none;
    left: 0;
    padding: .5rem;
    position: absolute;
    right: 0;
    text-align: center;
    top: 70px;
    width: 100%;
    z-index: 9999999999;
}

#search > div {
    color: #dadada;
    font-size: .875rem;
    line-height: 0;
    margin: 0 auto;
}

#search > div > div { padding: 0 1rem; }

#search input {
    -webkit-transition: background .5s;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    border: none;
    font-weight: 400;
    line-height: 1.1;
    margin: 0 2rem 0 .5rem;
    padding: .25rem;
    text-align: left;
    transition: background .5s;
    width: 10rem;
}

#search input:focus,
#search input:hover { background: rgba(255, 255, 255, 1); }

#search #search-jump-input { width: 3rem; }

/* ==========================================================================
   shared sub-page styles
   ========================================================================== */

.wide-wrapper,
.thin-wrapper {
    margin: 0 auto;
    padding: 3rem 4rem;
    width: 100%;
}

.wide-wrapper { max-width: 1128px; }
.thin-wrapper { max-width: 900px; }

.wide-padding { padding: 2rem 8rem; }
.thin-padding { padding: 4rem; }

.no-related-notes {
    color: #838383;
    font-size: .875rem;
    font-style: italic;
}

/* navigation
   ========================================================================== */

#previous,
#next { position: relative; }

#next { float: right; }

#previous a,
#next a {
    bottom: 0;
    height: 100%;
    position: fixed;
    top: 70px;
    width: 4rem;
}

#previous a { margin-left: -4rem; }

#previous span,
#next span {
    color: #fff;
    display: block;
    font-size: 9rem;
    height: 1.5em;
    line-height: 0;
    opacity: .5;
    position: fixed;
    text-align: center;
    top: 50%;
    width: 4rem;
}

#previous a:active span,
#previous a:hover span,
#next a:active span,
#next a:hover span { opacity: 1; }

/* page content
   ========================================================================== */

#content {
    background: #fff;
    position: relative;
}

#content hr {
    background: #d5d5d5;
    border: none;
    display: block;
    height: 1px;
    margin: 1rem 0;
    width: 100%;
}

/* headings
   ================================== */

#content .main-heading {
    color: #000;
    font-size: 1.875rem;
    margin-bottom: 1rem;
}

#content .chapter-heading {
    color: #646464;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

#content .section-heading {
    color: #646464;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

#content .chapter-heading + .section-heading { margin-top: -2rem; }

#content .chapter-heading span,
#content .section-heading span { color: #000; }

#content .chapter-heading a,
#content .section-heading a { color: #646464; }

#content .chapter-heading a:active,
#content .chapter-heading a:hover,
#content .section-heading a:active,
#content .section-heading a:hover { color: #000; }

#content .chapter-heading a:active span,
#content .chapter-heading a:hover span,
#content .section-heading a:active span,
#content .section-heading a:hover span { color: #892917; }

/* notes tab
   ================================== */

#content .notes {
    position: absolute;
    right: -3.5rem;
    top: 3rem;
}

#content .notes a {
    -webkit-transform: rotate(-90deg);
    background: #de8200;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    color: #fff;
    display: inline-block;
    padding: .5rem .75rem;
    text-transform: uppercase;
    transform: rotate(-90deg);
}

#content .notes a:active,
#content .notes a:hover { background: #3b3b3b; }

/* two-column sets of links
   ================================== */

#content .page-links > * { padding-bottom: 1rem; }

#content .page-links > *:nth-child(odd) { padding-right: 1rem; }
#content .page-links > *:nth-child(even) { padding-left: 1rem; }

/* text content snowflakes
   ================================== */

#content .text-content img {
    display: inline-block;
    height: auto;
    max-width: 100%;
}

#content .text-content .border {
    display: block;
    margin: 1rem auto;
}

#content .text-content .displaycode {
    font-family: 'Source Sans Pro', Arial, sans-serif;
    font-style: italic;
    font-weight: 600;
    margin: 1rem 2rem;
}

#content .text-content .inlinecode {
    font-family: 'Source Sans Pro', Arial, sans-serif;
    font-style: italic;
    font-weight: 600;
    white-space: nowrap;
}

#content .text-content .wedge { display: none; }

/* ==========================================================================
   thick footer
   ========================================================================== */

#footer {
    background: #fff;
    margin-top: 3px;
    padding: 2rem 8rem;
}

html.notes-section #footer,
html.notes-page #footer {
    background: none;
    margin-top: 0;
    padding: 0;
}

#footer a { color: #951500; }

#footer a:active,
#footer a:hover { color: #000; }

/* headings and lists
   ========================================================================== */

#footer h2 {
    color: #454545;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

#footer li { margin-bottom: .5rem; }

#footer li:nth-child(odd) span { margin-right: 1rem; }
#footer li:nth-child(even) span { margin-left: 1rem; }

#footer li a {
    display: inline-block;
    padding-left: .75rem;
    position: relative;
}

#footer li a:before {
    color: #951500;
    content: '»';
    left: 0;
    position: absolute;
}

#footer hr {
    border: none;
    display: block;
    height: 1px;
    background: #d5d5d5;
    margin: 2rem 0 1rem;
    width: 100%;
}

#footer #details-view .grid > * {
    font-size: .75rem;
    margin-right: .5rem;
    text-align: center;
}

#footer #details-view img { border: 1px solid #f4662e; }

/* ==========================================================================
   inline footer
   ========================================================================== */

#inline-footer {
    border-top: 1px solid #d5d5d5;
    font-size: .875rem;
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
}

#inline-footer a {
    color: #020202;
    display: inline-block;
}

#inline-footer a:active,
#inline-footer a:hover { color: #951500; }

#inline-footer div:not(:last-of-type) a { margin-right: 2rem; }

#inline-footer .mini-t img {
    margin-right: .5rem;
    position: relative;
    top: -2px;
    vertical-align: middle;
}

/* ==========================================================================
   citation
   ========================================================================== */

#citation {
    color: #646464;
    font-size: .75rem;
    margin-top: .5rem;
}

/* ==========================================================================
   responsive breakpoint styles
   ========================================================================== */

/* styles for large screens (1200px)
   ========================================================================== */

@media all and (max-width: 1200px) {}

/* styles for medium screens (900px)
   ========================================================================== */

@media all and (max-width: 900px) {
    #nav > * > * { padding-left: 1rem; }
    #nav .size-picker ul { left: -1rem; }

    #nav .breadcrumbs { font-size: .75rem; }

    #search form {
        display: block;
        margin: .25rem 0;
    }

    .wide-padding { padding: 2rem 4rem; }
    .thin-padding { padding: 2rem; }

    #footer { padding: 2rem 4rem; }
}

/* styles for small screens (600px)
   ========================================================================== */

@media all and (max-width: 600px) {
    #header { height: 60px; }
    #header h1 img { width: 300px; }
    #search { top: 60px; }

    #nav { margin-top: .5rem; }
    #nav > * > * { padding-left: .75rem; }
    #nav .size-picker ul { left: -1.25rem; }

    #content .notes { display: none; }

    .wide-wrapper,
    .thin-wrapper,
    .wide-padding,
    .thin-padding { padding: 1rem; }

    #content .page-links > *:nth-child(odd) { padding-right: 0; }
    #content .page-links > *:nth-child(even) { padding-left: 0; }

    #inline-footer div:not(:last-of-type) a { margin-right: 0; }

    #footer { padding: 2rem; }
    #footer li { margin-bottom: 0; }
    #footer li:nth-child(odd) span { margin-right: 0; }
    #footer li:nth-child(even) span { margin-left: 0; }
}

/* styles for minimum supported screen width (320px)
   ========================================================================== */

@media all and (max-width: 320px) {}

/* printer styles
   ========================================================================== */

@media print {}