/* 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; }

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

main a { color: #892917; }

main a:hover { color: #ff002f; }



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

#header h1 { margin-top: 0.4rem; }
#header h1 img { display: inline-block; }
#header h1 a:hover img { opacity: 0.65; }


/* desktop nav
   ========================================================================== */
#nav {
    color: #d4d4d4;
    float: right;
    margin-top: 1rem;
}

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

#nav a { color: #ffcf6e; }
#nav a:hover { color: #ffa858; }

#nav .icon {
    -webkit-transition: opacity 0.5s;
    cursor: pointer;
    display: inline-block;
    opacity: 0.5;
    transition: opacity 0.5s;
    vertical-align: middle;
}
#nav .hamburger-active .icon,
#nav a:hover > .icon,
#nav div:hover > .icon { opacity: 1; }


/* toc
   ================================== */
html.toc #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:hover .icon { background-position: 0 -14px; }


/* breadcrumbs
   ================================== */
#nav .breadcrumbs {
    font-size: 0.75rem;
    padding-left: .5rem;
}

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

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

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


/* size picker
   ================================== */
#nav .size-picker {
    display: none;
    position: relative;
    z-index: 9999999999;
}
.text-version #nav .size-picker { display: inline-block; }

#nav .size-picker .icon {
    background: url('/nks/img/icon-font-size.png') no-repeat left top;
    background-size: 18px 39px;
    height: 13px;
    width: 18px;
}
#nav .size-picker:hover .icon { 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: 0.75rem;
    font-weight: 400;
    left: -0.5rem;
    line-height: 1.2;
    margin: 0.5rem 0 0;
    padding: 0.25rem 0;
    position: absolute;
}
#nav .size-picker ul li {
    background: #565656;
    cursor: pointer;
    padding: 0.25rem 1.5rem 0.25rem 2rem;
}
#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 icon & drawer
   ================================== */
#nav .search .icon {
    background: url('/nks/img/icon-search.png') no-repeat left top;
    background-size: 19px 38px;
    height: 19px;
    width: 19px;
}
#nav .search:hover .icon { background-position: 0 -19px; }

#search {
    background: #565656;
    display: none;
    left: 0;
    padding: 0.5rem;
    position: absolute;
    right: 0;
    text-align: center;
    top: 70px;
    width: 100%;
    z-index: 999999999;
}
#search > div {
    color: #dadada;
    font-size: 0.875rem;
    line-height: 0;
    margin: 0 auto;
}
#search > div > div { padding: 0 1rem; }

#search input {
    -webkit-appearance: none; /* get rid of rounded caps in iOS */
    -webkit-transition: background 0.5s;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    border: none;
    font-weight: 400;
    line-height: 1.1;
    margin: 0 1.25rem 0 0.5rem;
    padding: 0.25rem;
    text-align: left;
    transition: background 0.5s;
    width: 8rem;
}
#search input.filled,
#search input:focus,
#search input:hover { background: rgba(255, 255, 255, 1); }

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


/* hamburger nav
   ========================================================================== */
#nav .nav-burger { display: none; }
#nav .nav-burger > *:not(#top-stuff) { white-space: normal; }

#nav .nav-burger .hamburger { position: relative; }

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

#nav .nav-burger .burger-nav-l1 {
    background: #565656;
    display: none;
    left: 0;
    padding: 0;
    position: absolute;
    right: 0;
    text-align: left;
    top: 60px;
    z-index: 9999999999;
}

html.toc #nav .nav-burger .burger-nav-l1 .crumbs > *,
html.index #nav .nav-burger .burger-nav-l1 .crumbs > *,
html.names #nav .nav-burger .burger-nav-l1 .crumbs > *,
html.search #nav .nav-burger .burger-nav-l1 .crumbs > * { 
    opacity: 0; 
    pointer-events: none; 
}

#nav .nav-burger .burger-nav-l1 > * { position: relative; }

#nav .nav-burger .burger-nav-l1 .burger-nav-active { background: #686868 !important; }


/* toc, breadcrumbs, size picker
   ================================== */
#nav .nav-burger #top-stuff {
    background: #686868;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr calc(18px + 2.5rem);
}
#nav .nav-burger .crumb-wrap-supreme { padding: 0.6rem 0.75rem; }
#nav .nav-burger .burger-nav-l1 .breadcrumbs { display: inline-block; }


/* size picker
   ================================== */
#nav .nav-burger .size-picker {
    padding: 0 0.75rem;
    background: #686868;
    font-size: 0;
}
#nav .nav-burger .size-picker > div {
    background: #565656;
    border-radius: 0.25rem;
    padding: 0.5rem;
}
#nav .nav-burger .size-picker.burger-nav-active > div { background: #fff; }
#nav .nav-burger .size-picker.burger-nav-active .icon { background-position: 0 -26px; }

#nav .nav-burger .size-picker + ul {
    display: none;
    border-radius: 0;
    border-top: 1px solid #898989;
    box-shadow: none;
    font-size: 1rem;
    margin: 0 0.75rem;
    position: static;
    padding: 0.6rem;
    background: #686868;
    text-align: center;
    grid-column-end: span 2;
}
#nav .nav-burger .size-picker + ul li {
    border-radius: 0.25rem;
    cursor: pointer;
    display: inline;
    padding: 0 0.5rem;
}

#nav .nav-burger .size-picker + ul li.checked,
#nav .nav-burger .size-picker + ul li:hover {
    background: #404040;
    color: #fff;
}


/* chapter/section list
   ================================== */
#nav .nav-burger ul.chapters { padding: 1rem 0.75rem; }
#nav .nav-burger ul.chapters a { 
    color: #fff; 
    display: grid;
    grid-gap: 5px;
    grid-template-columns: 24px 1fr;
}
#nav .nav-burger ul.chapters a:hover { color: #ffcf6e; }
#nav .nav-burger ul.chapters a span:first-child {
    color: #ccc; 
    justify-self: end;
    padding-right: 4px;
}
#nav .nav-burger ul.chapters a span:first-child:not(:empty) { border-right: 1px solid #ffffff60; }
#nav .nav-burger ul.chapters a:hover span:first-child:not(:empty) { 
    border-color: #ffcf6e60;
    color: #ffcf6e; 
}
#nav .nav-burger ul.chapters li {
    font-size: 1.15rem;
    line-height: 1.2;
    padding: 5px 0;
}
#nav .nav-burger ul.sections { 
    display: none; 
    padding-left: 24px; 
}
#nav .nav-burger ul.sections li { font-size: 14px; }


/*active*/
#nav .nav-burger ul.chapters > li.selected  { }
#nav .nav-burger li.chapter.selected ul.sections { 
    display: list-item; 
    margin-bottom: -5px;
    padding-top: 5px;
}
#nav .nav-burger li.chapter.selected > a,
#nav .nav-burger li.chapter.selected li.section.selected > a { color: #ffcf6e; }
#nav .nav-burger li.chapter.selected > a:hover,
#nav .nav-burger li.chapter.selected li.section.selected > a:hover { color: #ffa858; }
#nav .nav-burger li.chapter.selected > a span:first-child:not(:empty),
#nav .nav-burger li.chapter.selected li.section.selected > a span:first-child:not(:empty) { 
    border-color: #ffcf6e60;
    color: #ffcf6e; 
}


/* search
   ================================== */
#nav .nav-burger .search #search {
    background: #686868;
    padding: 0;
    position: static;
}
#nav .nav-burger .search #search > div {
    font-size: 1.05rem;
    margin: 0;
    padding: .5rem;
}
#nav .nav-burger .search #search > div > div { padding: 0; }
#nav .nav-burger .search #search > div > div:after {
    clear: both;
    content: '';
    display: table;
}


/* error stripe
   ========================================================================== */
#error-404 {
    background: #ffbc47;
    padding: 0.5rem;
    text-align: center;
    width: 100%;
}
#error-404 span {
    background: url('/nks/img/icon-error.png') no-repeat left center;
    background-size: 27px 27px;
    display: inline-block;
    font-size: 1.25rem;
    line-height: 27px;
    min-height: 27px;
    padding-left: 32px;
    text-align: left;
}



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

/* reactions to size picker
   ========================================================================== */

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

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

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

html.image-version #content .small,
html.image-version #content .medium,
html.image-version #content .large,
html.image-version #content .xlarge { 
    position: relative; 
    text-align: center;
}

html.text-version #content .text-content { 
    padding-bottom: 3.5rem;
    padding-top: 2.5rem;
}
html:not(.size-auto).text-version.size-small .text-content { font-size: .82rem; }
html:not(.size-auto).text-version.size-medium .text-content { font-size: 1rem; }
html:not(.size-auto).text-version.size-large .text-content { font-size: 1.2rem; }
html:not(.size-auto).text-version.size-xlarge .text-content { font-size: 1.5rem; }

html.size-auto .text-content.wide-padding,
html.size-small .text-content.wide-padding,
html.size-medium .text-content.wide-padding {
    max-width: 850px;
}


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

.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;
    z-index: 999999998;
}

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

#previous a span,
#next a span {
    -webkit-text-stroke: 1px #ffcc66;
    color: #ffedca;
    display: block;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    font-size: 9rem;
    height: 1.5em;
    line-height: 0;
    opacity: .8;
    position: relative;
    text-align: center;
    top: 50%;
    width: 4rem;
}

#previous a:hover span,
#next a:hover span { 
    color: #e96209;
    opacity: 1;
    -webkit-text-stroke: 1px #ffcc6600;
}

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

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

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

#content section:not(.chapter-title) > hr:last-child { display: none; }


/* headings
   ================================== */
#content h1, #content h2 { font-family: "Crimson Text", "Trump Mediaeval", Georgia, serif; }
#content .main-heading {
    color: #000;
    font-size: 1.975rem;
    margin-bottom: 1rem;
}
#content .chapter-heading {
    color: #646464;
    font-size:1.7rem;
    letter-spacing: -.04rem;
    margin-bottom: 2rem;
}
#content .section-heading {
    color: #646464;
    font-family: "gill-sans-nova", "Gill Sans", Helvetica, Arial, sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    min-height: 25px;
}
#content .chapter-content .section-heading { 
    font-family: "Crimson Text", "Trump Mediaeval", Georgia, serif; 
    font-size: 1.35rem; 
    font-weight: 500; 
}
html.notes-chapter #content .section-heading,
#content .chapter-heading + .section-heading { 
    font-family: "Crimson Text", "Trump Mediaeval", Georgia, serif; 
    font-size: 1.45rem; 
    font-weight: 500; 
}
#content .chapter-heading + .section-heading { 
    margin-top: -1.8rem; 
}

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

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

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

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

#content .section-heading:target a { border-bottom: solid 2px #f4ba86; }

#content .section-heading .section-anchor {
    cursor: pointer;
    display: none;
    height: 20px;
    font-size: 0;
    margin-left: .25rem;
    position: relative;
    vertical-align: text-bottom;
    width: 20px;
}

#content .section-heading:hover .section-anchor { display: inline-block; }

#content .section-heading .section-anchor img {
    filter: brightness(0) saturate(100%) invert(87%) sepia(0%) saturate(308%) hue-rotate(211deg) brightness(88%) contrast(87%);
    left: 0;
    position: absolute;
    top: 0;
    vertical-align: middle;
}

#content .section-heading .section-anchor:hover img { filter: brightness(0) saturate(100%) invert(16%) sepia(44%) saturate(3515%) hue-rotate(350deg) brightness(100%) contrast(92%); }

#content .section-heading .section-anchor > span {
    background: transparent;
    border: none;
    display: inline-block;
    height: 20px;
    position: relative !important;
    width: 20px;
}

#content .special-character {
    font-family: Mathematica, Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 2px;
}

/* notes tab
   ================================== */
#content .side-tabs { 
    height: 1.5rem; /*tab line height*/
    position: absolute;
    left: calc(100% + 1.5rem); /*offset*/
    top: 1.5rem;
    transform: rotate(90deg); /*first rotate*/
    transform-origin: top left;
    width: 1.5rem; /*we need this to be a small square, for positioning*/
    z-index: 999999998;
  
}
.side-tabs ul { display: flex; }
.side-tabs li { transform: rotate(180deg); }
.side-tabs a {
    color: #fff !important;
    background: #969696;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    line-height: 1.5rem;
    margin-left: 0.3125rem;
    padding: 0 0.5rem;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 999999999;
}
.page #content .side-tabs li a:hover { background: #3b3b3b; }
.page.image-version .side-tabs li.page-img a,
.page.text-version .side-tabs li.web-view a { 
    background: #de8200; 
    pointer-events: none;
}


/* 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; }

#content .section-links {
    column-count: 2;
    column-fill: balance;
    column-gap: 2rem;
    column-rule: 1px solid #95150030;
}

#content .section-links p {
    break-inside: avoid;
    padding-bottom: 1rem;
    word-wrap: break-word;
}

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

.smallcaps { font-variant: small-caps; }
.overline { text-decoration: overline; }

#content .text-content { /*position: relative;*/ }

#content .text-content a { color: #951500; }

#content .text-content a:active,
#content .text-content a:hover { color: #dd1100; }

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

#content sub,
#content sup { font-style: italic; }

#content code,
#content .blockcode,
#content .inlinecode,
#content .capcode {
    font-family: 'Source Sans Pro', Arial, sans-serif;
    font-style: italic;
    font-weight: 600;
    word-break: break-word;
}

#content .text-content .blockcode {
    display: block;
    margin: 0 2rem 1rem;
}

#content .text-content .blockimg-wrapper,
#content .text-content .capimg-wrapper { text-align: center; }

#content .text-content img.blockimg,
#content .text-content img.inlineimg,
#content .text-content img.capimg {
    display: inline;
    vertical-align: middle;
}

#content .text-content .clipboard-input {
    display: table;
    margin: 0 auto;
}

.clipboard-hover .clipboard-copy {
  -webkit-touch-callout: none;
    -webkit-user-select: none;
     -khtml-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}

.clipboard-hover:hover .clipboard-copy {
  -webkit-touch-callout: text;
    -webkit-user-select: text;
     -khtml-user-select: text;
       -moz-user-select: text;
        -ms-user-select: text;
            user-select: text;
}

#content span[class^='spacer-']:before {
    clear: right;
    content: '';
    display: block;
}

#content span[class^='spacer-']:after {
    content: '';
    display: inline-block;
}

#content .spacer-1:after { width: .25rem; }
#content .spacer-2:after { width: .5rem; }
#content .spacer-3:after { width: .75rem; }
#content .spacer-4:after { width: 1rem; }
#content .spacer-5:after { width: 1.25rem; }
#content .spacer-6:after { width: 1.5rem; }
#content .spacer-7:after { width: 1.75rem; }
#content .spacer-8:after { width: 2rem; }
#content .spacer-9:after { width: 2.25rem; }
#content .spacer-10:after { width: 2.5rem; }
#content .spacer-11:after { width: 2.75rem; }
#content .spacer-12:after { width: 3rem; }
#content .spacer-13:after { width: 3.25rem; }
#content .spacer-14:after { width: 3.5rem; }
#content .spacer-15:after { width: 3.75rem; }
#content .spacer-16:after { width: 4rem; }

/* classes to fix overbar and sqrt
   ================================== */

.overbar {
    background-image:url('/nks/img/background-bar.svg');
    background-position-y: 1px;
    background-size: cover;
}

.sqrt {
    background-image:url('/nks/img/background-bar.svg');
    background-size: cover;
    margin-left: 1px;
}

.radical {
    font-size: 1.15em;
    font-weight: 400;
    line-height: 1;
}

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

#footer {
    border-top: 6px solid #ffcc66;
    background: #fff;
    margin-top: 3px;
}

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

#footer a { color: #951500; }

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

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

#related-notes h2,
#related-pages h2,
#related-resources h2 {
    color: #454545;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

#footer .thumbnails,
#related-notes .thumbnails,
#content .thumbnails { margin-bottom: .75rem; }

#footer .thumbnails a,
#related-notes .thumbnails a,
#content .thumbnails a {
    display: block;
    float: left;
    margin-right: 3px;
}

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

#related-notes li { padding-bottom: .5rem; }

/*
#related-notes li.right-border,
.section-links p.right-border { border-right: 1px solid #95150030; }
*/

#related-resources li { margin: 1rem 0 .5rem; }

/*#related-notes li:nth-child(odd) > span,*/
#related-pages li:nth-child(odd) > span,
#related-resources li:nth-child(odd) > span { margin-right: 1rem; }

/*#related-notes li:nth-child(even) > span,*/
#related-pages li:nth-child(even) > span { margin-left: 1rem; }

#related-resources li:nth-child(even) > span { margin-left: .5rem; }

/*
#related-notes ul.show-thumbnails li:nth-child(odd) > span { margin-right: 0; }
#related-notes ul.show-thumbnails li:nth-child(even) > span { margin-left: 0; }
*/

#related-notes li a,
#related-pages li a,
#related-resources li a {
    color: #951500;
    display: inline-block;
    padding-left: .75rem;
    position: relative;
}

#related-notes ul.show-thumbnails li a {
    display: table;
    padding: 0;
}

#related-notes ul.show-thumbnails li a > * {
    display: table-cell;
    vertical-align: middle;
}

#related-notes ul.show-thumbnails li a > *:last-child { 
    break-inside: avoid;
    padding-left: .5rem; 
}

#related-notes li a img { display: none; }
#related-notes ul.show-thumbnails li a img { display: block; }

#related-resources li a {
    font-size: .8125rem;
    padding-left: 0;
}

#related-resources li a span {
    color: #707070;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    font-size: .75rem;
    font-weight: 400;
    position: absolute;
    top: -16px;
    white-space: nowrap;
}

#related-notes li a:hover,
#related-pages li a:hover,
#related-resources li a:hover { color: #000; }

#related-notes li a:before,
#related-pages li a:before {
    color: #951500;
    content: '»';
    left: 0;
    position: absolute;
}

#related-notes ul.show-thumbnails li a:before { display: none; }

#related-notes hr,
#related-pages hr,
#related-resources hr {
    border: none;
    display: block;
    height: 1px;
    background: #d5d5d5;
    margin: 2rem 0 1rem;
    width: 100%;
}

#related-notes hr.even,
#related-pages hr.even,
#related-resources hr.even { margin: 2rem 0; }

#image-sources {
    margin-top: 2rem;
}

#image-sources hr {
    border: none;
    border-top: 1px solid #d5d5d5;
    margin-bottom: 2rem;
}

#image-sources li {
    margin-bottom: 10px;
}

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

#image-sources a img {
    max-height: 78px;
    max-width: 93%;
}

#image-sources a .notebook-spiral {
    background: url("/nks/img/icon-spiral.png") no-repeat;
    width: 12px;
    height: 80px;
    position: absolute;
    background-size: 6px 74px;
    margin-top: 4px;
}

#image-sources a:hover .notebook-spiral {
    background: url("/nks/img/icon-spiral-hover.png") no-repeat;
    width: 12px;
    height: 160px;
    position: absolute;
    background-size: 6px 74px;
    margin-top: 4px;
}

#image-sources a .notebook-chevron {
    margin-top: 60px;
    background: url("/nks/img/icon-chevron.png") no-repeat;
    width: 25px;
    height: 24px;
    background-size: 20px 19px;
}

#image-sources a:hover .notebook-chevron {
    margin-top: 60px;
    background: url("/nks/img/icon-chevron-hover.png") no-repeat;
    width: 25px;
    height: 24px;
    background-size: 20px 19px;
}

#image-sources .notebook-image {
    overflow: hidden;
    max-width: 375px;
    display: flex;
    align-items: center;
    margin-left: 2px;
    border: 1px solid #bcbcbc;
    height: 80px;
    padding-left: 5px;
}

#image-sources a:hover .notebook-image {
    border: 1px solid #dd1100;
}

#image-sources a {
    min-height: 80px;
    margin-right: 20px;
    display: flex;
}

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

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

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

#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;
}

#inline-footer .pdf-link {
    color: #020202;
    display: inline-block;
    position: relative;
}

#exportable-images .tooltip,
#inline-footer .tooltip {
    background: #fff;
    border: 1px solid #fff;
    border-radius: .25rem;
    box-shadow: 0 0 1rem rgba(0, 0, 0, .2);
    line-height: 1.5;
    padding: .75rem 1rem;
    position: absolute;
    text-align: left;
    white-space: nowrap;
    z-index: 9999999;
}

#inline-footer .tooltip {
    display: none;
    left: 0;
    top: -1.5rem;
}

#exportable-images .tooltip .close,
#inline-footer .tooltip .close {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 0 1rem rgba(0, 0, 0, .2);
    color: #892917;
    cursor: pointer;
    font-size: .5rem;
    height: 16px;
    line-height: 16px;
    position: absolute;
    right: -.3rem;
    text-align: center;
    top: -.3rem;
    width: 16px;
    z-index: 99999999;
}

#exportable-images .tooltip a,
#inline-footer .tooltip a { color: #892917; }

#exportable-images .tooltip a:hover,
#inline-footer .tooltip a:hover { color: #ff002f; }

/* use specificity to keep hidden links hidden at the 600px breakpoint */
#inline-footer .hide { display: none !important; }

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

#citation {
    color: #646464;
    font-size: .75rem;
    margin-top: .5rem;
}
footer#citation {
    color: #646464;
    font-size: .85rem;
    margin-top: 0.95rem;
}
footer svg#icon-cc-by-sa, footer svg#icon-wiki {
    display: inline-block;
    height: 0.7rem;
    width: auto;
    margin-bottom: 0.23rem;
    vertical-align: bottom;
}

/* ==========================================================================
   ribbons
   ========================================================================== */

/* stripe
   ================================== */

.ribbon-wrapper.stripe .ribbon {
    border-top: 6px solid #ffcc66;
    margin-bottom: -3px;
}

.ribbon-wrapper.stripe a {
    background: #f7f1fe;
    border: 2px solid #e5daf4;
    display: block;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    padding: 17px 10px;
}

.ribbon-wrapper.stripe a:hover {
    background: #e9d9ee;
    border: 2px solid #e5daf4;
}

.ribbon-wrapper.stripe .ribbon-content {
    margin: 0 auto;
    max-width: 794px;
}

.ribbon-wrapper.stripe .icon img {
    margin-right: 18px;
    vertical-align: middle;
}

.ribbon-wrapper.stripe .title {
    color: #531368;
    font-size: 16px;
    font-weight: 600;
    line-height: 19px;
}

.ribbon-wrapper.stripe .text {
    color: #4e4e4e;
    font-size: 16px;
    font-weight: 400;
    line-height: 19px;
}

.ribbon-wrapper.stripe .book { font-style: italic; }

/* top
   ================================== */

.ribbon-wrapper.top {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 999999997;
}

.ribbon-wrapper.top a {
    background: #f3eaf6;
    display: block;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    max-width: 46.875rem;
    padding: .8rem;
}

.ribbon-wrapper.top a:hover { background: #e9d9ee; }

.ribbon-wrapper.top .icon img {
    margin-right: 0.625rem;
    vertical-align: middle;
}

.ribbon-wrapper.top .title {
    color: #7d7181;
    font-size: .875rem;
    font-weight: 400;
}

.ribbon-wrapper.top .text {
    color: #531368;
    display: block;
    font-size: 1rem;
    font-weight: 600;
}

/* bottom
   ================================== */

.ribbon-wrapper.bottom { display: none; }

.ribbon-wrapper.bottom a {
    background: #f3eaf6;
    display: block;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    padding: 1.25rem;
    text-align: center;
}

.ribbon-wrapper.bottom a:hover { background: #e9d9ee; }

.ribbon-wrapper.bottom .ribbon-content {
    display: inline-block;
    margin: 0 auto;
}

.ribbon-wrapper.bottom .icon img {
    margin-right: 1.125rem;
    vertical-align: middle;
}

.ribbon-wrapper.bottom .title {
    color: #7d7181;
    font-size: .875rem;
    font-weight: 400;
    margin-right: .625rem;
}

.ribbon-wrapper.bottom .text {
    color: #531368;
    font-size: 1rem;
    font-weight: 600;
}

/* ==========================================================================
   responsive breakpoint styles
   ========================================================================== */
/*text size snowflakes*/
@media (min-width: 1100px) {
    html.size-auto .text-content {
        font-size: 1.15rem !important;
    }
    html.size-auto .text-content.wide-padding, 
    html.size-small .text-content.wide-padding, 
    html.size-medium .text-content.wide-padding {
        max-width: 950px;
    }
}
@media (min-width: 1200px) {
    html.size-auto .text-content.wide-padding, 
    html.size-small .text-content.wide-padding, 
    html.size-medium .text-content.wide-padding {
        max-width: 1000px;
    }
} 
@media (min-width: 1400px) {
    html.textsize-auto .text-content {
        font-size: 1.25rem !important;
    }
}


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

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

    #footer { padding: 2rem 4rem; }

    .ribbon-wrapper.top { display: none; }
    .ribbon-wrapper.bottom { display: block; }
}


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

    #nav { margin-top: .5rem; }
    #nav .nav-main { display: none; }
    #nav .nav-burger { display: table-row; }
    #nav .breadcrumbs { font-size: .95rem; }

    #search form { margin: .25rem 0; }
    #search label {
        display: inline-block;
        text-align: right;
        width: 8rem;
    }
    #search input { font-size: 1.1rem !important; }
    #search #search-index-input,
    #search #search-all-input { width: 10rem; }
    
    #error-404 span {
        background-size: 19px 19px;
        font-size: .9rem;
        padding-left: 23px;
    }

    #content.ribbon-top { margin-top: 1.5rem; }
    #content .side-tabs{ 
        top: -1px;
        left: 100%;
        transform: rotate(180deg); 
    }
    .side-tabs a { border-radius: 3px 3px 0 0; }
    .side-tabs .notes,
    .side-tabs .resources { display: none; }

    html.notes-chapter #content .thumbnails a,
    html.notes-chapter #content .thumbnails img {
        height: auto;
        max-width: 38px;
    }

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

    #previous a,
    #next a {
        margin-left: 0;
        width: 0;
        z-index: 999999999;
    }

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

    #previous a span,
    #next a span {
        -webkit-transition: opacity .5s;
        color: #3d3d3d;
        display: none;
        font-size: 23rem;
        height: 1em;
        opacity: 0;
        transition: opacity .5s;
        width: 10rem;
    }

    #next a span { right: 1rem; }

    #previous .half,
    #next .half,
    #previous a:hover span.half,
    #next a:hover span.half {
        display: block;
        opacity: .5;
    }

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

    #inline-footer .display-b__600 { display: block !important; }
    #inline-footer div:not(:last-of-type) a { margin-right: 0; }

    #footer { padding: 2rem; }
    #related-notes ul.show-thumbnails li:nth-child(odd) > span,
    #related-notes ul.show-thumbnails li:nth-child(odd) a { margin-right: 0; }
    #related-notes ul.show-thumbnails li:nth-child(even) > span,
    #related-notes ul.show-thumbnails li:nth-child(even) a { margin-left: 0; }
    #footer li:nth-child(odd) span,
    #related-resources li:nth-child(odd) span { margin-right: 0; }
    #footer li:nth-child(even) span,
    #related-resources li:nth-child(even) span { margin-left: 0; }

    .ribbon-wrapper.bottom .title { text-align: left; }
    .ribbon-wrapper.bottom .text { display: block;  }
}


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


@media print {}
