
/* CSS defult values:
https://www.w3schools.com/cssref/css_default_values.asp
*/

/* the default margin for pre is "1em 0", so we over-ride
so that we can set our own later */
pre {
    margin: 0;
}

/* this needs to be first, because we want any background to
   over-rule this.
   this is for the "layering" of asides and other
*/

.mathbook-content p {
    background-color: #fff; 
/*    box-shadow: 0 0 0.5em 0.2em #fff;
    put this back after the major CSS refactor
*/
}
.mathbook-content .heading, .mathbook-content pre {
    background-color: #fff; 
}

/* un-do the above for environments with colored background */
.mathbook-content .assemblage-like p,
.mathbook-content .assemblage-like .heading,
.mathbook-content .assemblage-like pre,
.mathbook-content .aside-like p,
.mathbook-content .aside-like .heading,
.mathbook-content .aside-like pre,
.mathbook-content .knowl-output p, 
.mathbook-content .knowl-output .heading,
.mathbook-content .knowl-output pre,
.mathbook-content *[knowl] p,
.mathbook-content *[knowl] .heading,
.mathbook-content *[knowl] pre {
    background-color: inherit; 
    box-shadow: none;
}

body > a.assistive {
	padding:6px;
	position: absolute;
	top:-40px;
	left:0px;
	color:white;
	border-right:1px solid white;
	border-bottom:1px solid white;
	border-bottom-right-radius:8px;
	background:transparent;
	-webkit-transition: top 1s ease-out, background 1s linear;
    transition: top 1s ease-out, background 1s linear;
    z-index: 100;
}

body > a.assistive:focus {
	position:absolute;
	left:0px;
	top:0px;
	background:#BF1722;
	outline:0;	
	-webkit-transition: top .1s ease-in, background .5s linear;
    transition: top .1s ease-in, background .5s linear;
}


/* newer, small top nav buttons */
#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-align-right .toolbar-item-middle {
    float: left;
    padding: 3px 6px 3px 6px;
    margin: 4px 10px 0px 10px;
    margin: 4px 10px 0px 195px;
    border: 1px solid #800;
    background-color: #ffe5e5;
    font-size: 90%;
}

#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-align-right .toolbar-item-middle a {
    text-decoration: none;
    color: #024;
}

#masthead.smallbuttons {
    max-width: 904px;
    border-right: 1px solid #bababa;
}

/*
 * .navbar #primary-navbar {
 *     background: #fafafa;
 *         border-bottom: none;
 *         }
 *         */
#masthead.smallbuttons #primary-navbar .navbar-top-buttons {
    border-bottom: 1px solid #bababa;
}
#masthead.smallbuttons .banner {
    border-bottom: none;
}

#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .button {
    border-top: 1px solid #bababa;
}

#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 {
    background-color: #fafafa;
}
#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .index-button {
    width: 70px;
    text-align: center;
    border-right: 1px solid #bababa;
}
#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .up-button {
    width: 60px;
    float: right;
    border-right: 1px solid #bababa;
}
#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .up-button:before {
    text-align: left;
    width: 20px;
}
#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .previous-button.toolbar-item {
    width: 70px;
    border-right: none;
    float: right;
}
/* extra .toolbar-item to overrive mathbook-add-on */
#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .previous-button.toolbar-item {
    border-left: 1px solid #bababa;
    padding-right: 3px;
}
#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .next-button {
    width: 70px;
    float: right;
    border-right: 1px solid #bababa;
}
#masthead.smallbuttons #primary-navbar .previous-button::before {
    width: 27px;
}
#masthead.smallbuttons #primary-navbar .next-button::after {
    width: 25px;
}

#masthead.smallbuttons #primary-navbar .threebuttons {
    float: right;
}

#masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .threebuttons .next-button, #masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .threebuttons .up-button, #masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-divisor-3 .threebuttons .previous-button {
    float: left;
}

.collectedworks .knowl-output {
    border: 12px 
    solid #D6E3FF;
    background: none repeat scroll 0% 0% #FAFCFF;
    border-radius: 4px;
    margin-bottom: 1.25em;
}

.collectedworks .subjectwork {
    max-width: 750px;
}

.collectedworks .bib {
    margin-bottom: 1em;
}

.collectedworks .bibitem + .bibentry {
    display: inline;
}

.collectedworks .bibitem {
    display: inline;
    font-weight: bold;
    margin-right: 1em;
}

/* see http://mathbook.pugetsound.edu/examples/sample-book/html/references-1.html */
.mathbook-content .bibitem + .bibentry {
    display: inline-block;
    width: 90%;
}
.mathbook-content .bibitem {
    display: inline-block;
    vertical-align: top;
    width: 7%;
    margin-right: 0;
}
/*
.mathbook-content .bibitem {
    float: left;
}
.mathbook-content .bibitem {
    clear: left;
}
*/

#primary-navbar .toolbar .toolbar-item a {
    text-decoration: none;
}

#primary-navbar .navbar-top-buttons .toolbar-align-right .toolbar-item {
   /* for the prev/next svg from SL2X */
    margin-top: -8px;
    border-left: 0;
}

#primary-navbar .navbar-top-buttons .toolbar-align-right {
   /* also for the prev/next svg from SL2X */
    border-right: 0;
}

#primary-navbar .navbar-top-buttons .toolbar-align-right .toolbar-item-left {
    float: left;
    padding: 3px 6px 3px 6px;
    margin: 4px 10px 0px 5px;
    border: 1px solid #aaf;
    background-color: #def;
/*
    border: 1px solid #aaf;
    margin: 8px 10px 0px 10px;
*/
    font-size: 90%;
}

#primary-navbar .navbar-top-buttons .toolbar-align-right .toolbar-item-left a {
    text-decoration: none;
    color: #00a;
/*
    padding: 3px 6px 3px 6px;
    margin: 4px 10px 0px 5px;
    margin: 0;
    border: 1px solid #aaf;
    background-color: #def;
*/
}


#feedback {position: relative;
        margin-top: 30px; /* negative value of footer height */
        height: 30px;
        margin-left: 30px;
        font-size: 70%;
        text-align: bottom;
        clear:both;
} 

.mathbook-content figure figcaption {
    font-weight: normal;
}

.mathbook-content figure figcaption {
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    font-size: 100%;
/*  Commenting this out because the initial letter of some captions were cut off
    text-indent: -30px;
*/
}

.mathbook-content figure figcaption .heading, .mathbook-content figure figcaption .codenumber {
    font-weight: 700;
}

.mathbook-content figure figcaption .heading:after {
    content: " ";
}

.mathbook-content figure figcaption .codenumber:after {
    content: ".\2002";  /* en space */
}

.mathbook-content figure figcaption .codenumber:last-child:after {
    display: inline;
    content: ". ";
}

.mathbook-content .definition-like p > em {
    font-weight: 700;
}
.mathbook-content em.alert {
    font-weight: bold;
}

.unprocessed {
    padding: 8px;
    background-color: rgb(255,230,230)
}

.unprocessed .unprocessed {
    margin: 8px;
    background-color: rgb(255,200,255)
}

.unprocessed .unprocessed .unprocessed {
    margin: 8px;
    background-color: rgb(205,205,255)
}

/* does this apply anywhere? */

/*
*[knowl] {
  border-bottom: 1px dotted #00a;
}
*/

#toc h2 + h2 {
    margin-top: 0.3em;
}

h2:last-child {
/* for the chapter pages with section links at the bottom */
    margin-bottom: 100px;
}

.mathbook-content section h2 a {
    text-decoration: none;
}

.mathbook-content section.introduction {
    margin-bottom: 2em;
}

.mathbook-content {
    margin: 0;
}

.mathbook-content .paragraphs .heading {
    display: inline;
}

.mathbook-content .paragraphs .heading .title:not(:empty):after {
    content: ".\2002";  /* en space */
}

.mathbook-content .paragraphs .heading + p {
    display: inline;
}

/* obsolete once paragraph spacing refactored */
.mathbook-content .paragraphs .heading + p:after {
    content: "";
    display: block;
    margin-bottom: 1.25em;
}
.mathbook-content .paragraphs p:last-child::after {
    margin-bottom: 0;
}


/* the next are to avoid styping a p as inline, because
 * inline styling messes up the meaning of line-height.
 * */

.mathbook-content .paragraphs p .title {
    font-family: "PT Serif", "Times New Roman", Times, serif;
    font-size: 1.125em;
    font-weight: 700;
}

.mathbook-content .paragraphs p .title:after {
    content: ".\2002";
}

.mathbook-content .paragraphs p .heading {
    display: inline;
}

.mathbook-content section .paragraphs .heading {
    margin-top: 0;
}

.mathbook-content section .paragraphs {
    margin-top: 0em;
}

.mathbook-content section .paragraphs + .paragraphs {
    margin-top: 3em;
}

.mathbook-content h6 {
    line-height: 1em;
    margin-bottom: 0.5em;
}

.mathbook-content .sidebyside > p, .mathbook-content .sidebyside > figure, .mathbook-content .sidebyside > img, .mathbook-content .sidebyside > table, .mathbook-content .sidebyside > tabular, .mathbook-content .sidebyside > .paragraphs {
    display: inline-block;
    margin: 0;
}

.mathbook-content .sidebyside > figure:after {
     content:'';
}

.mathbook-content .sidebyside figcaption {
    font-weight: normal;
    padding-left: 1em; 
    padding-right: 0;
    padding-bottom: 1.5em;
    margin: 0.75em 0 0 0;
}

.mathbook-content .sidebyside figcaption .heading, .mathbook-content .sidebyside figcaption .codenumber {
    font-weight: 700;
}

.mathbook-content .sidebyside figcaption .heading:after {
    content: "\00a0";
}

.mathbook-content figcaption .codenumber{
    font-family: "PT Serif", "Times New Roman", Times, serif;
}
.mathbook-content .sidebyside figcaption .codenumber:after {
    content: ".\2002";  /* en space */
}

.mathbook-content .sidebyside figcaption .codenumber:last-child:after {
    display: inline;
    content: ". ";
}


.mathbook-content .sidebyside > p {   /* what about sbspanel? */
    width: 32%;
    vertical-align: top;
}

.mathbook-content .sidebyside > p.left, .mathbook-content .sidebyside > p.middle, .mathbook-content .sidebyside > p.right {
    vertical-align: middle;
}

.mathbook-content .sidebyside > p + img {
    vertical-align: middle;
}

.mathbook-content .sidebyside {
    margin-bottom: 1em;
}
.mathbook-content .sidebyside p:only-child {
    margin-bottom: 0;
}
.mathbook-content .sidebyside p:last-child {
    margin-bottom: 0;
}


.mathbook-content .sidebyside .sbsrow .sbsheader {
    margin-top: 0;
}

/*
.mathbook-content .sidebyside {
    text-align: justify;
}
*/

/* Deleted on 9/12/16 because it caused a blank line.
   Figure out when it was supposed to do, and do it another way.

.mathbook-content .sidebyside:after {
    display:inline-block;
    width:100%;
    content:'';
}
*/

.mathbook-content .sbsgroup {
    width: 100%;
}

.mathbook-content .sidebyside {
    width: 100%;
}

/* see Ex 29 https://yoshiwarabooks.org/linear-functions.html  */
.mathbook-content p + .sidebyside {
    margin-top: 1em;
}

.mathbook-content .sbsrow {
    display: flex;
    justify-content: space-between;
}
/*
.mathbook-content .sbsrow:last-child {
    padding-bottom: 1em;
}
*/

/* Components of three types of "sbsrow" */

/* titles, totally centered text */
.mathbook-content .sbsheader {
/*
    display: flex;
*/
    text-align: center;
    justify-content: center;
}

/* containers of desired width for actual content */
.mathbook-content .sbspanel {
    display: flex;
    flex-direction: column;
}

/* fixed-width items are centered horizontally in their panel */
/* always used in conjunction with sbspanel                   */
.mathbook-content .fixed-width {
    align-items: center;
}

/* captions, centered until word-wrapped */
.mathbook-content .sbscaption {
/*
    display: flex;
*/
    justify-content: center;
}





table {
    border-spacing: 0;
}

/*
table {
    border-collapse: collapse;
}

table tr td {
    padding: 2px;
    padding-left: 5px;
    padding-right: 5px;
    font-size: 90%;
}
*/

.mathbook-content table tr td.l {
    text-align: left;
}
.mathbook-content table tr td.c {
    text-align: center;
}
.mathbook-content table tr td.r {
    text-align: right;
}
.mathbook-content table tr td.j {
    text-align: justify;
}
.mathbook-content table tr td.lines {
        white-space: nowrap;
}


.mathbook-content table tr td.t {
    vertical-align: top;
}
.mathbook-content table tr td.b {
    vertical-align: bottom;
}
.mathbook-content table tr td.m {
    vertical-align: middle;
}

.mathbook-content table tr td.vv {
    border-left: 2px solid #000;
    border-right: 2px solid #000;
}

.mathbook-content table tr td.vcv {
    border-left: 2px solid #000;
    border-right: 2px solid #000;
    text-align: center;
}

.mathbook-content table tr td.vcvv {
    border-left: 2px solid #000;
    border-right: 4px solid #000;
    text-align: center;
}

.mathbook-content table tr td.vlv {
    border-left: 2px solid #000;
    border-right: 2px solid #000;
    text-align: left;
}

.mathbook-content table tr td.vrv {
    border-left: 2px solid #000;
    border-right: 2px solid #000;
    text-align: right;
}

.mathbook-content table tr td.rv {
    border-right: 2px solid #000;
    text-align: right;
}

.mathbook-content table tr td.vr {
    border-left: 2px solid #000;
    text-align: right;
}

.mathbook-content table tr td.lv {
    border-right: 2px solid #000;
    text-align: left;
}

.mathbook-content table tr td.vl {
    border-left: 2px solid #000;
    text-align: left;
}
.mathbook-content table tr td.cv {
    border-right: 2px solid #000;
    text-align: center;
}

.mathbook-content table tr td.Xv {
    border-right: 2px solid #000;
    text-align: left;
}

.mathbook-content table tr td.vc {
    border-left: 2px solid #000;
    text-align: center;
}

.mathbook-content table tr td.hline {
    padding: 0;
}

.mathbook-content table tr td.hlinethick {

    padding-left: 0px;
    padding-right: 0px;

}

.mathbook-content table tr td.hline hr  {

    margin-top:0;
    margin-bottom:0;
    margin-left: -1px;
    margin-right: -1px;
    border: 1px solid rgb(0,0,0);

}

.mathbook-content table tr td.hlinethick hr  {

    margin-top:0;
    margin-bottom:0;
    margin-left: -1px;
    margin-right: -1px;
    border: 2px solid rgb(0,0,0);

}


.center table { 
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}


.mathbook-content table tr td.b1 {
    border-bottom: 1px solid #000;
}
.mathbook-content table tr td.b2 {
    border-bottom: 2px solid #000;
}
.mathbook-content table tr td.b3 {
    border-bottom: 3px solid #000;
}
.mathbook-content table tr td.b0 {
    border-bottom: none;
}

.mathbook-content table tr td.t1 {
    border-top: 1px solid #000;
}
.mathbook-content table tr td.t2 {
    border-top: 2px solid #000;
}
.mathbook-content table tr td.t3 {
    border-top: 3px solid #000;
}
.mathbook-content table tr td.t0 {
    border-top: none;
}

.mathbook-content table tr td.r1 {
    border-right: 1px solid #000;
}
.mathbook-content table tr td.r2 {
    border-right: 2px solid #000;
}
.mathbook-content table tr td.r3 {
    border-right: 3px solid #000;
}
.mathbook-content table tr td.r0 {
    border-right: none;
}


.mathbook-content table tr td.l1 {
    border-left: 1px solid #000;
}
.mathbook-content table tr td.l2 {
    border-left: 2px solid #000;
}
.mathbook-content table tr td.l3 {
    border-left: 3px solid #000;
}
.mathbook-content table tr td.l0 {
    border-left: none;
}

.mathbook-content table tr td p {
    margin-bottom: 0;
}

.mathbook-content table tr td p + p {
    margin-top: 1em;
}

.mathbook-content table + p {
    margin-top: 20px;
}

.mathbook-content table tr td span.decimal {
    float: left;
    text-align: right;
}

.mathbook-content table + article.theorem-like {
    margin-top: 1em;
}

.mathbook-content ol li p, .mathbook-content ul li p {
    margin-bottom: 0;
}

/*  alternate method below seems more robust
.mathbook-content ol li + li, .mathbook-content ul li + li {
    margin-top: 0.5em;
}
*/

/* redo when refactoring p spacing */
.mathbook-content p + ol, .mathbook-content p + ul {
    margin-top: -0.5em;
}
.mathbook-content ol li, .mathbook-content ul li {
    margin-top: 0.5em;
}

.mathbook-content ol li ol, .mathbook-content ol li ul,  .mathbook-content ul li ol, .mathbook-content ul li ul {
    margin-top: 0.5em;
}

.mathbook-content ol li p + p, .mathbook-content ul li p + p {
    margin-top: 1em;
}

.mathbook-content article .heading + dl {
    margin-top: 1em;
}

.mathbook-content dl dd p {
    margin-bottom: 0.5em;
}

.mathbook-content dl dd *:last-child {
    margin-bottom: 0;
}

.mathbook-content dl dt, .mathbook-content dl dd {
    margin-top: 1em;
}

.mathbook-content dl dt:first-of-type, .mathbook-content dl dd:first-of-type {
    margin-top: 0;
}

.mathbook-content .hidden-knowl-wrapper .hiddenproof  {
    margin-top: 0;
}

.mathbook-content .hidden-knowl-wrapper article {
    display: inline;
}

/* things like knowlified examples */
.mathbook-content section > .hidden-knowl-wrapper {
    margin-bottom: 1em;
}

.mathbook-content  .theorem-like + .hidden-knowl-wrapper {
    margin-top: -0.5em;
}   

.mathbook-content .hiddenproof > .heading::after {
    content: "."
}

.amathbook-content figure.figure-like {
    overflow: auto;
}
.mathbook-content figure.figure-like {
/*
    margin-left: 0;
    margin-right: 0;
*/
    margin-left: auto;
    margin-right: auto;
}
/*
.mathbook-content .sbscaption {
    width: 100%! important;
}
*/

.mathbook-content figure.figure-like figcaption {
    overflow: hidden;
}

/* need to fix this in the main CSS code */
.mathbook-content  .proof {
    padding-top: 0;
}

.mathbook-content .knowl p:last-of-type {
    margin-bottom: 0;
}

/* not sure where this was being used, but it made short knowls
 * look bad, like the hint here:
 * SAFurtherReading.html
.mathbook-content .knowl-output .knowl-content {
    margin-bottom: 0.5em;
}
*/

.mathbook-content tt {
    font-size: 1.4em;
    margin-left: 0.2em;
    margin-right: 0.2em;
}

.mathbook-content section .videolink a:link {
    background-size: 0;
    text-decoration: none;
}

.mathbook-content .exercise-like ol li table {
    margin-bottom: 0.5em;
}

.mathbook-content .exercise-like > ol li + li {
    margin-top: 0.5em;
}
.mathbook-content .solution > ol li + li {
    margin-top: 0.5em;
}

.mathbook-content section header .heading a.permalink {
    opacity: 0.1;
    font-size: 70%;
    color: #d00;
    text-decoration: none;
    display: inline-block;
}

.mathbook-content section header .heading {
  display: inline-block;
}
.mathbook-content section header .heading + a.permalink {
    opacity: 0.2;
    color: #d00;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    margin-left: 0.5em;
}
.mathbook-content section.subsection header .heading + a.permalink {
    font-size: 90%;
}
.mathbook-content section.subsubsection header .heading + a.permalink {
    font-size: 80%;
}


/*
.mathbook-content .heading a.permalink:after {
    content: "permalink";
    opacity: 0;
    font-size: 50%;
    font-weight:normal;
    font-family: sans-serif;
    text-decoration: none;
}
*/

.mathbook-content .heading a.permalink:hover {
    opacity: 1;
    color: #a32;
}

/*
.mathbook-content .heading a.permalink:hover:after {
    opacity: 1;
}
*/

.mathbook-content .heading a.permalink:focus {
    opacity: 1;
    color: #a32;
}
/*
.mathbook-content .heading a.permalink:focus:after {
    opacity: 1;
}
*/

.mininav {
    float: left;
    padding-top: 0.7ex;
    padding-left: 1ex;
}
.indexnav {
    margin-left: 1.5ex;
    margin-top: 0.2ex;
    padding-top: 0;
/*    display: inline;
 *     *    ooooooo
 *      *    */
    float: left;
    line-height: 0.95;
}

.indexnav a {
    text-decoration: none;
    padding-left: 2.5px;
    width: 2.5ex;
/*
 *  *  omitted, because we put a space in the source
 *      padding-right: 3px;
 *      */
    margin-right: -1px;
    color: inherit;
    font-size: 80%;
    display: inline-block;
    text-align: center;
}
.indexnav a::after{
    content: "";
    display: inline-block;
}
.indexnav a:nth-of-type(14){
    padding-left: 1.8ex;
}

.indexnav a:hover {
    background: #eeaaff;
}



.mathbook-content .indexitem {
    margin-top: 2px;
}

.mathbook-content .subindexitem {
    margin-left: 2em;
    font-size: 95%;
    margin-top: -1px;
}

.mathbook-content .subsubindexitem {
    margin-left: 3.5em;
    font-size: 95%;
    margin-top: -1px;
}

.mathbook-content .indexknowl {
    margin-left: 0.11em;
}
.mathbook-content em + .indexknowl  {
    margin-left: -0.25em;
}
.mathbook-content .indexknowl a {
    margin-left: 2em;
}
.mathbook-content .indexitem i,
.mathbook-content .subindexitem i,
.mathbook-content .subsubindexitem i {
    margin-left: 1em;
    margin-right: 0.25em;
}

/* temporary, to over-ride the misguided .indexitem i  above */
.mathbook-content b i {
    margin: 0 !important;
}

.mathbook-content .indexitem .see,
.mathbook-content .subindexitem .see,
.mathbook-content .subsubindexitem .see {
    margin-left: 1em;
    margin-right: 0.5em;
}

.mathbook-content .indexitem .indexknowl {
    font-size: 90%;
}

/*
.mathbook-content .indexitem a {
    font-size: 90%;
}
*/

.mathbook-content .indexitem [knowl], .mathbook-content .subindexitem [knowl], .mathbook-content .indexitem [knowl]:hover {
    padding-right: 2px;
    padding-left: 2px;
}
.mathbook-content .indexknowl [knowl]:hover, .mathbook-content .indexknowl .active[knowl] {
    margin-left: 2em;
}

.mathbook-content .subindexitem .indexknowl {
    font-size: 95%;
}
.mathbook-content .subsubindexitem .indexknowl {
    font-size: 95%;
}

/*
.mathbook-content .indexletter {
    margin-top: 1em;
    font-size: 170%;
    font-weight: bold;
}
*/
.mathbook-content .indexletter {
    margin-top: 1.5em;
}

/*
.mathbook-content .indexknowl + .indexknowl{
    margin-left: 1em;
}
*/

/*
.mathbook-content section #hk-exercise-essay article {
    display: inline;
}
*/

.mathbook-content .hidden-knowl-wrapper .heading {
    display: inline;
}
.mathbook-content .heading + .hidden-knowl-wrapper {
    display: inline;
}
.mathbook-content article .hidden-knowl-wrapper {
    display: inline;
}

.mathbook-content .cols2 .knowl-output, .mathbook-content .cols3 .knowl-output, .mathbook-content .cols4 .knowl-output, .mathbook-content .cols5 .knowl-output, .mathbook-content .cols5 .knowl-output {
    width: 100%;
}

.mathbook-content .cols2 + *, .mathbook-content .cols3 + *, .mathbook-content .cols4 + *, .mathbook-content .cols5 + *, .mathbook-content .cols6 + * {
    clear: both;
}
.mathbook-content .cols2 > li:last-child, .mathbook-content .cols3 > li:last-child, .mathbook-content .cols4 > li:last-child, .mathbook-content .cols5 > li:last-child, .mathbook-content .cols6 > li:last-child{
    margin-bottom: 1.5em;
}
/* see elsewhere for discussion about bargin bottom for hints */
.mathbook-content .exercise-like .cols2 > li:last-child, .mathbook-content .exercise-like .cols3 > li:last-child, .mathbook-content .exercise-like .cols4 > li:last-child, .mathbook-content .exercise-like .cols5 > li:last-child, .mathbook-content .exercise-like .cols6 > li:last-child{
    margin-bottom: 0;
}

.mathbook-content ol.cols2:last-child > li:last-child, .mathbook-content ol.cols3:last-child > li:last-child, .mathbook-content ol.cols4:last-child > li:last-child, .mathbook-content ol.cols5:last-child > li:last-child, .mathbook-content ol.cols6:last-child > li:last-child, .mathbook-content ul.cols2:last-child > li:last-child, .mathbook-content ul.cols3:last-child > li:last-child, .mathbook-content ul.cols4:last-child > li:last-child, .mathbook-content ul.cols5:last-child > li:last-child, .mathbook-content ul.cols6:last-child > li:last-child {
    margin-bottom: 0;
}

.mathbook-content .cols2:last-child::after, .mathbook-content .cols3:last-child::after, .mathbook-content .cols4:last-child::after, .mathbook-content .cols5:last-child::after, .mathbook-content .cols6:last-child::after {
    content: "";
    display: block;
    clear: both;
}

.mathbook-content .cols2 li:nth-child(2n+1) {
    clear: left;
}
.mathbook-content .cols3 li:nth-child(3n+1) {
    clear: left;
}
.mathbook-content .cols4 li:nth-child(4n+1) {
    clear: left;
}
.mathbook-content .cols5 li:nth-child(5n+1) {
    clear: left;
}
.mathbook-content .cols6 li:nth-child(6n+1) {
    clear: left;
}
/* need to repeat for .colsN */
.mathbook-content .exercise-like ol.cols2 li {
    margin-top: 0.5em;
}

/* need to rethink paragraph spacing and have margin-top instead of margin-bottom,
 so that hints in exercises don't have a lot of extra space above them */

.mathbook-content .exercise-like > .heading + p::after {  
    margin-bottom: 0;
}
.mathbook-content .exercise-like p + p {  
    margin-top: 1.25em;
}
/* 1.25 = ol top + li top ?  looked too big with 0.75 below */
.mathbook-content .exercise-like p + ol {  
    margin-top: 0.5em;
}
.mathbook-content .exercise-like ol {  
    margin-bottom: 0;
}

/* see http://bob.cs.sonoma.edu/IntroCompOrg-RPi/exercises-10.html
  for examples of an odd number of items in a cols2, followed by
  a hint */
.mathbook-content .cols2 li:last-child:nth-child(odd) {
    float: none !important;
    padding-top: 0.5em;
}

.mathbook-content .incontext {
    display: block;
    font-size: 85%;
    text-align: right;
    margin-bottom: -1.0em;
}

.mathbook-content .terminology {
  font-style: italic;
  font-weight: bold;
}

/* the "pink flash" when navigating to a target
*/
:target {
    -webkit-animation: target-fade 10s 1;
    -moz-animation: target-fade 10s 1;
}

@-webkit-keyframes target-fade {
    0% { background-color: rgba(120,0,120,.3); }
    100% { background-color: inherit;
           opacity: 1; }
}
@-moz-keyframes target-fade {
    0% { background-color: rgba(120,0,120,.3); }
    100% { background-color: inherit;
           opacity: 1; }
}

/*
.mathbook-content .autoterm {
    display: inline;
}
*/

.mathbook-content .autoterm [knowl], .mathbook-content .autoterm [knowl]:after {
    font-weight: inherit;
    color: inherit;
    padding: 0;
    margin-bottom: inherit;
    border-bottom: inherit;
    border-bottom-color: inherit;
}

/*
.mathbook-content .autoterm [knowl]:hover {
    background: inherit;
    border-bottom: inherit;
}

.mathbook-content .autoterm [knowl]:hover {
    background: #eebbff;
    border-bottom: 1px dotted red;
}
*/

/*
.mathbook-content .autoterm .active[knowl] {
    background: inherit;
}
*/

.mathbook-content .autoterm [knowl]:hover {
    background: #ffddff;
    border-top: 2px dotted purple;
    border-bottom: 1px dotted red;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.has-sidebar-left #primary-navbar-sticky-wrapper .navbar-top-buttons .toolbar, .has-sidebar-left #primary-navbar .navbar-top-buttons .toolbar {
     border-right: 0;
}

#primary-navbar .toolbar.toolbar-divisor-3 > .toolbar-item:last-child, #primary-navbar-sticky-wrapper .toolbar.toolbar-divisor-3 > .toolbar-item:last-child {
    border-right: 1px solid #bababa;
}

.mathbook-content ol li.custom-list-style-type {
    list-style-type: none;
}

.mathbook-content ol li.custom-list-style-type:before {
     content: attr(label) "\00A0\00A0 ";
}

/* The dl should behave more like the default on a narrow screen,
 * with the term and definition on separate lines.
 */

.mathbook-content dl.description-list {
    margin-left: 0;
}

.mathbook-content dl.description-list dt {
    float: left;
    clear: left;
    text-align: right;
    width: 18ex;
}
.mathbook-content dl.description-list dd {
    margin-left: 22ex;
}

.mathbook-content dl.description-list dd dt {
    width: 14ex;
}
.mathbook-content dl.description-list dd dd {
    margin-left: 18ex;
}

.mathbook-content dl.description-list dd:after {
    content: "";
    display: block;
    clear: left;
}

.mathbook-content dl.description-list-narrow {
    margin-left: 0;
}
.mathbook-content dl.description-list-narrow dt {
    float: left;
    clear: left;
    text-align: right;
    width: 8ex;
}
.mathbook-content dl.description-list-narrow dd {
    margin-left: 12ex;
}
.mathbook-content dl.description-list-narrow dd:after {
    content: "";
    display: block;
    clear: left;
}

/*
#toc ul li.listprefix {
    list-style-type: none;
    display: inline-block;
}

#toc ul li.listprefix:before {
     content: attr(label) "\00A0\00A0 ";
     display: inline-block;
}
*/

.mathbook-content .knowl .definition-like:last-child, .mathbook-content .knowl .theorem-like:last-child, .mathbook-content .knowl .remark-like:last-child, .mathbook-content .knowl .example-like:last-child, .mathbook-content .knowl .exercise-like:last-child, .mathbook-content .knowl .objectives:last-child {
    margin-bottom: 0.3em;
}

.mathbook-content a {
    color: inherit;
}

/* to stop things being blue when rendering MathJax with SVG */
a.mjx-svg-href  {
    fill: inherit;
    stroke: inherit;
}

/* for long math formulas and tables to scroll on small screens */
@media screen and (max-width: 943px) {
  /* adapted from line 192, ../../../../../MathBook/mathbook-assets/scss/ui/mixins/_sliding-sidebars.scss */
  .mathbook-content .mjx-chtml.MJXc-display {
    /*Allow users on smaller screens to scroll equations*/
    /*horizontally when they don't fit on the screen*/
    overflow-x: auto;
    overflow-y: hidden;
  }
  .mathbook-content .figure-like {
    overflow-x: auto;
}
}

.floatnav {
    margin-top: 8px;
    margin-left: 50px;
}

.floatnav a {
    text-decoration: none;
    padding-left: 3px;
/*
 *  omitted, because we put a space in the source
    padding-right: 3px;
*/
    margin-right: -1px;
    color: inherit;
}

/* to allow big math in knowl links */
.mathbook-content .hidden-knowl-wrapper a .mjx-chtml {
    z-index: 1;
    background: #fff;
}
.mathbook-content .hidden-knowl-wrapper [knowl]::after, .mathbook-content .hidden-knowl-wrapper [knowl]:hover::after, .mathbook-content .hidden-knowl-wrapper .active[knowl]::after {
    right: 7px;
}

.floatnav a:hover {
    background: #eeaaff;
}

.mathbook-content .unselectable {  /* from Alex Jordan */
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Chrome/Safari/Opera */
  -khtml-user-select: none;    /* Konqueror */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Non-prefixed version, currently
                                  not supported by any browser */
}

/* Adapted from William Hammond (attributed to David Carlisle) */
/* "mathjax-users" Google Group, 2015-12-27 */

.mathbook-content .latex-logo {font-family: "PT Serif", "Times New Roman", Times, serif;}

.mathbook-content .latex-logo .A {font-size: 75%; text-transform: uppercase; vertical-align: .5ex;
         margin-left: -.48em; margin-right: -.2em;}

.mathbook-content .latex-logo .E {vertical-align:-.5ex; text-transform: uppercase;
         margin-left: -.18em; margin-right: -.12em}

.mathbook-content .posterior {
    margin-bottom: 1.25em;
}

.mathbook-content .fillin {
    display: inline-block;
    border-bottom-style: solid;
    border-width: 1px;
    margin-right: 0.1em;
    margin-bottom: -0.25em;
}

.mathbook-content .exercisegroup {
    margin-bottom: 1.0em;
}
.mathbook-content .exercisegroup article.exercise-like p {
    margin: 0;
}
.mathbook-content .exercisegroup article.exercise-like .heading {
    margin: 0;
}
.mathbook-content .exercisegroup .conclusion .heading {
    margin-top: 0.5em;
}
.mathbook-content .exercisegroup .hidden-knowl-wrapper {
    margin: 0;
}
.mathbook-content .exercisegroup .exercise-like .heading + p:after {
    margin: 0;
}
.mathbook-content .exercisegroup .introduction .heading + p:last-child {
    margin-bottom: 0.5em;
}

.mathbook-content .exercises .exercise-like figcaption .heading {
    font-weight: bold;
    font-size: inherit;
}
/* for titles on APEX WW exercises, but should make sense for other exercises */
.mathbook-content .exercises .exercise-like .heading {
    font-weight: normal;
    font-size: inherit;
}

/* http://spot.pcc.edu/math/APEXCalculus/sec_interp_deriv.html */
.mathbook-content .exercisegroup > article.exercise-like,
.mathbook-content .exercisegroup-exercises > article.exercise-like {
    margin-left: 2em;
    margin-bottom: 0.75em;
}
.mathbook-content .exercisegroup article.exercise-like + .hidden-knowl-wrapper {
    margin-left: 4em;
    margin-top: 0;
    margin-bottom: 1em;
}

/* make it look like a list, and have entra indenting when already more indented */
.mathbook-content .exercise-like .introduction + .hidden-knowl-wrapper,
.mathbook-content .exercise-like .conclusion {
    margin-left: 1.0em;
}
.mathbook-content .exercisegroup .exercise-like .introduction + .hidden-knowl-wrapper,
.mathbook-content .exercisegroup .exercise-like .conclusion {
    margin-left: 1.5em;
}

.mathbook-content .exercisegroup article.exercise-like:not(:first-child) {
    margin-top: 0em;
}

.mathbook-content .exercisegroup > .conclusion {
    margin-left: 1.5em;
}

.mathbook-content article.exercise-like .hint [knowl]{
    font-weight: lighter;
}

.mathbook-content .exercise-like .hint {
    display: block;
    margin-top: -0.75em;
}

.mathbook-content .exercise-like .introduction {
    display: inline;
}
.mathbook-content .exercise-like .introduction .heading {
    display: inline;
}
.mathbook-content .exercise-like .introduction p {
    display: inline;
}
.mathbook-content .exercise-like .introduction::after {
    content: "";
    display: block;
    margin-bottom: 0.25em;
}
.mathbook-content .exercise-like .conclusion::before {
    content: "";
    display: block;
    margin-top: 0.25em;
}


/*
.mathbook-content .example-like .hint {
}
*/

.example-like, .exercise-like {
  margin: 1.25em 0;
}

/* if hints and solutions are in .posterior, then
 * some of the above styling does not apply */

.mathbook-content article.exercise-like + .posterior {
    margin-top: -0.75em;
}


.mathbook-content article.example-like .hint {
    display: block;
    margin-top: -0.75em;
}

.mathbook-content article.example-like .hint [knowl]{
    font-weight: lighter;
}


.mathbook-content .exercisegroup .exercisegroup-exercises.cols2, .mathbook-content .exercisegroup .exercisegroup-exercises.cols3, .mathbook-content .exercisegroup .exercisegroup-exercises.cols4, .mathbook-content .exercisegroup .exercisegroup-exercises.cols5, .mathbook-content .exercisegroup .exercisegroup-exercises.cols6 {
    width: 100%;
    display:inline-flex;
    flex-direction:row;
    flex-wrap:wrap;
    justify-content:flex-start;
    align-items:flex-start;
    align-content:flex-start;
}

.mathbook-content .exercisegroup .exercisegroup-exercises.cols1 {
    display:inline;
}

.mathbook-content .exercisegroup .exercisegroup-exercises.cols1 .knowl-output {
    display: block;
}

.mathbook-content .exercisegroup .exercisegroup-exercises article.exercise-like {
    margin-top: 0;
}

.mathbook-content .exercisegroup .cols1 article.exercise-like {flex-basis: calc(100% - 2em);}
.mathbook-content .exercisegroup .cols2 article.exercise-like {flex-basis: calc(50% - 2em);}
.mathbook-content .exercisegroup .cols3 article.exercise-like {flex-basis: calc(33.33% - 2em);}
.mathbook-content .exercisegroup .cols4 article.exercise-like {flex-basis: calc(25% - 2em);}
.mathbook-content .exercisegroup .cols5 article.exercise-like {flex-basis: calc(20% - 2em);}
.mathbook-content .exercisegroup .cols6 article.exercise-like {flex-basis: calc(16.66% - 2em);}
/*
.mathbook-content .exercisegroup .cols3 article.exercise-like {flex-basis: calc(100% / 3 - 2em);}
.mathbook-content .exercisegroup .cols6 article.exercise-like {flex-basis: calc(100% / 6 - 2em);}
*/


.mathbook-content .code-inline,
.mathbook-content .code-block,
.mathbook-content .console {
    font-family: "Inconsolata", monospace;
}

.main .mathbook-content section  article .heading {
    line-height: 1.125em;
}

.mathbook-content .sagecell_sessionOutput pre {
    font-family: 'Inconsolata', monospace;
}

.mathbook-content .sagecell {
    margin-bottom: 1.25em;
}

.mathbook-content .assemblage-like {
    border: solid 2px #1100AA;
    border-radius: 12px;
    padding: 10px;
    background-color: #f4f4fe;
}

.mathbook-content .assemblage-like .heading {
    margin-top: 0;
}

/*  need more generally:  see next
.mathbook-content .assemblage-like + .assemblage-like {
    margin-top: 3ex;
}
*/
.mathbook-content .assemblage-like {
    margin-top: 1ex;
    margin-bottom: 2ex;
}
/* obsolete once we refactor paragraph spacing */
.mathbook-content .assemblage-like > p:last-child, .mathbook-content .assemblage-like > ul:last-child, .mathbook-content .assemblage-like > ol:last-child {
    margin-bottom: 0;
}


.mathbook-content .booktitle {
    font-style: oblique;
}

.mathbook-content .definition-like > .heading .type:last-child:after, .mathbook-content .theorem-like > .heading .type:last-child:after, .mathbook-content .remark-like > .heading .type:last-child:after, .mathbook-content .example-like > .heading .type:last-child:after, .mathbook-content .exercise-like > .heading .type:last-child:after, .mathbook-content .definition-like > .heading .codenumber:last-child:after, .mathbook-content .theorem-like > .heading .codenumber:last-child:after, .mathbook-content .remark-like > .heading .codenumber:last-child:after, .mathbook-content .example-like > .heading .codenumber:last-child:after, .mathbook-content .exercise-like > .heading .codenumber:last-child:after, .mathbook-content .definition-like > .heading .title:last-child:after, .mathbook-content .theorem-like > .heading .title:last-child:after, .mathbook-content .remark-like > .heading .title:last-child:after, .mathbook-content .example-like > .heading .title:last-child:after, .mathbook-content .exercise-like > .heading .title:last-child:after, .mathbook-content .definition-like > header > .heading .type:last-child:after, .mathbook-content .theorem-like > header > .heading .type:last-child:after, .mathbook-content .remark-like > header > .heading .type:last-child:after, .mathbook-content .example-like > header > .heading .type:last-child:after, .mathbook-content .exercise-like > header > .heading .type:last-child:after, .mathbook-content .definition-like > header > .heading .codenumber:last-child:after, .mathbook-content .theorem-like > header > .heading .codenumber:last-child:after, .mathbook-content .remark-like > header > .heading .codenumber:last-child:after, .mathbook-content .example-like > header > .heading .codenumber:last-child:after, .mathbook-content .exercise-like > header > .heading .codenumber:last-child:after, .mathbook-content .definition-like > header > .heading .title:last-child:after, .mathbook-content .theorem-like > header > .heading .title:last-child:after, .mathbook-content .remark-like > header > .heading .title:last-child:after, .mathbook-content .example-like > header > .heading .title:last-child:after, .mathbook-content .exercise-like > header > .heading .title:last-child:after {  
    content: ".\2009 ";
}

.mathbook-content .aside-like > .heading .type:last-child:after,
.mathbook-content .aside-like > .heading .codenumber:last-child:after,
.mathbook-content .aside-like > .heading .title:last-child:after,
.mathbook-content .aside-like > header > .heading .type:last-child:after,
.mathbook-content .aside-like > header > .heading .codenumber:last-child:after,
.mathbook-content .aside-like > header > .heading .title:last-child:after {
    content: ":\2009 ";
}

.mathbook-content .aside-like > .heading .title:empty:after {
    content: "";
}

/* need sample use case for these */
.mathbook-content a  .definition-like > .heading .type:last-child:after, .mathbook-content a  .theorem-like > .heading .type:last-child:after, .mathbook-content a  .remark-like > .heading .type:last-child:after, .mathbook-content a  .example-like > .heading .type:last-child:after, .mathbook-content a  .exercise-like > .heading .type:last-child:after, .mathbook-content a  .definition-like > .heading .codenumber:last-child:after, .mathbook-content a  .theorem-like > .heading .codenumber:last-child:after, .mathbook-content a  .remark-like > .heading .codenumber:last-child:after, .mathbook-content a  .example-like > .heading .codenumber:last-child:after, .mathbook-content a  .exercise-like > .heading .codenumber:last-child:after, .mathbook-content a  .definition-like > .heading .title:last-child:after, .mathbook-content a  .theorem-like > .heading .title:last-child:after, .mathbook-content a  .remark-like > .heading .title:last-child:after, .mathbook-content a  .example-like > .heading .title:last-child:after, .mathbook-content a  .exercise-like > .heading .title:last-child:after, .mathbook-content a  .definition-like > header > .heading .type:last-child:after, .mathbook-content a  .theorem-like > header > .heading .type:last-child:after, .mathbook-content a  .remark-like > header > .heading .type:last-child:after, .mathbook-content a  .example-like > header > .heading .type:last-child:after, .mathbook-content a  .exercise-like > header > .heading .type:last-child:after, .mathbook-content a  .definition-like > header > .heading .codenumber:last-child:after, .mathbook-content a  .theorem-like > header > .heading .codenumber:last-child:after, .mathbook-content a  .remark-like > header > .heading .codenumber:last-child:after, .mathbook-content a  .example-like > header > .heading .codenumber:last-child:after, .mathbook-content a  .exercise-like > header > .heading .codenumber:last-child:after, .mathbook-content a  .definition-like > header > .heading .title:last-child:after, .mathbook-content a  .theorem-like > header > .heading .title:last-child:after, .mathbook-content a  .remark-like > header > .heading .title:last-child:after, .mathbook-content a  .example-like > header > .heading .title:last-child:after, .mathbook-content a  .exercise-like > header > .heading .title:last-child:after, {  
    content: "";
}

/* FOr exercises, etc, hidden in knowls */
.mathbook-content a  .definition-like > .heading .codenumber:not(:empty)::after, .mathbook-content a  .theorem-like > .heading .codenumber:not(:empty)::after, .mathbook-content a  .remark-like > .heading .codenumber:not(:empty)::after, .mathbook-content a  .example-like > .heading .codenumber:not(:empty)::after, .mathbook-content a  .exercise-like > .heading .codenumber:not(:empty)::after, .mathbook-content a  .theorem-like > header > .heading .codenumber:not(:empty)::after, .mathbook-content a  .remark-like > header > .heading .codenumber:not(:empty)::after, .mathbook-content a  .example-like > header > .heading .codenumber:not(:empty)::after, .mathbook-content a  .exercise-like > header > .heading .codenumber:not(:empty)::after { 
    content: ": \2009";
}

.mathbook-content .hiddenproof > .heading .type:after, .mathbook-content .hiddenproof > header > .heading .type:after {
  content: "";
}

.mathbook-content .exercise-like > .heading .codenumber:not(:empty):after {
    content: ".\2009 ";
}

.mathbook-content .objectives > .heading {
    font-size: 1.25em;
}

/* Born-hidden example with a very long title */
/* http://physics.thomasmore.edu/ConnectedPhysics/sss-netforce.html */
.mathbook-content a .heading {
    white-space: normal;
}


.mathbook-content .solutions > a, .mathbook-content .solutions > a:hover, .mathbook-content .solutions > a.active {
    display: inline-block;
    margin-right: 1em;
}

.mathbook-content .solutions .solution .type + .codenumber {
    margin-left: 0.4em;
}
.mathbook-content .solutions .solution .title:last-child {
    margin-left: 0.2em;
    font-size: 90%;
}
.mathbook-content .solutions .solution .title:last-child::before {
    content: "(";
}
.mathbook-content .solutions .solution .title:last-child::after {
    content: ")";
}

/* omitting, because Historical notes end with a code number,
   which gets an ". " :after, so there was a double dot.  If this
   needs to be put back, then also fix the double dot problem
   http://sl2x.aimath.org/book/aafmt/section9-3.html  (at end)
.mathbook-content .aside-like > .heading:not(:empty):after {
    content: ".\2009 ";
}
*/



/* these were taken from the local add-on.css.
 * need to check if the are needed.
 */

body, html body { background: #fff; }

figure {
    margin-top: 10px;
}
.mathbook-content figure + figure {
    padding-top: 1.0em;
}


.mathbook-content img {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

.mathbook-content img.cs {

    display: block;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
}

.mathbook-content img.cs.svg {
 /*   transform:  scale(1.3);
 */
}

img:not(.cs) {
    max-width: 550px;
}

.mathbook-content table tr td img {
    max-width: 200px;
    margin-right: 30px;
}

.mathbook-content table tr td.lines {
    	white-space: nowrap;
}

figure img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 550px;
}

figure img + img {
    margin-top: 30px;
}

figure.wrap img {
    width: 250px;
}

div.center img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 550px;
}

div.center + div.center > img {
    margin-top: 60px;
}

div.center > img + img {
    margin-top: 60px;
}

figure table {
    margin-left: auto;
    margin-right: auto;
}

.caption {
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    font-size: 100%;
    text-align: center;
}


figure.wrap {
    float: right;
    margin-right: 0;
    margin-left: 30px;
}

figure figcaption.wrap {
    margin: 10px;
    font-size: 100%;
    text-align: center;
}

figure img.wrap {
    float: right;
    margin: 0;
}


.caption .counter:after { content: " ";}

/* above repeated for captions outside figures */

.caption .heading {
    font-weight: bold;
}

.caption .heading:after { content: " ";}

.caption .counter {
    font-weight: bold;
}

figcaption .counter:after { content: " ";}

div.quote {
    padding-left: 40px;
    padding-right: 10px;
    margin-bottom: 1em;
}

.minipage  + .minipage {
    display: inline-block;
}

code.inline {
    background: none;
    border: none;
}

/* sup knowls are used for footnotes */
sup [knowl] {
    padding: 0px 0px 0px 3px;
}

sup .active[knowl] {
    padding: 0px 0px 0px 3px;
}

sup [knowl]:hover {
    padding: 0px 0px 0px 3px;
}

.mathbook-content .proof > .heading:after {
    content: ".";
}

/* new "Greg's L" styling for definitions, theorems, etc 
 */

/* in main css
article.proof {
    padding-right: 1.25em;
    border-right: 1px dotted #aaa;
}

article.proof:after {
    content:'';
    border-bottom: 1px dotted #aaa;
    display: block;
    margin-left: auto;
    margin-right: -1.25em;
    width: 1.5em;
}
*/

figure pre.prettyprint {
    margin-top: 0;
    padding-left: 15px;
    border-left: 1px solid #aaa;
}

figure pre.prettyprint:before {
    content:'';
    border-top: 1px solid #aaa;
    display: block;
    margin-right: auto;
    margin-left: -15px;
    padding-bottom: 0.25em;
    width: 2.5em;
}


article.example-like {
    padding-left: 6px;
    border-left: 1px solid #569;
}

article.example-like:after {
    content:'';
    border-bottom: 1px solid #569;
    display: block;
    margin-right: auto;
    margin-left: -6px;
    padding-top: 0.25em;
    width: 1.5em;
}


.mathbook-content article.example-like > *:last-child {
    margin-bottom: 0;
}
.mathbook-content article.example-like > *:last-child::after {
    margin-bottom: 0;
}
/* List 12.3 at http://mathbook.pugetsound.edu/examples/sample-article/html/section-12.html
 [[put somethign here]]
 */
.mathbook-content article.example-like + .posterior {
    margin-top: -0.75em;
}

.mathbook-content article.proof > *:last-child {
    margin-bottom: 0;
}
.mathbook-content article.proof > *:last-child::after {
    margin-bottom: 0;
}

article.definition-like {
    padding-left: 6px;
    border-left: 1px solid #956;
}

article.definition-like:after {
    content:''; 
    border-bottom: 1px solid #956;
    display: block;
    margin-left: auto;
    margin-left: -6px;
    padding-top: 0.25em;
    width: 1.5em;
/*
  border-right: 1px solid #956;
  margin-right: -5px;
  height: 2em;
  margin-top: -2em; 
*/
}

.mathbook-content article.definition-like *:last-child {
    margin-bottom: 0;
}
.mathbook-content article.definition-like *:last-child::after {
    margin-bottom: 0;
}

.mathbook-content .objectives {
    margin-bottom: 1.25em;
}

article.theorem-like, article.objectives {
    padding-left: 6px;
    border-left: 1px solid #66a;
}

article.objectives .heading .type + .codenumber:before {
    content: " ";
}
article.objectives .heading .type + .title:before {
    content: ":\2002";
}
article.objectives .heading .codenumber + .title:before {
    content: ":\2002";
}

article.list .heading .type + .codenumber:before {
    content: " ";
}
article.list .heading .type + .title:before {
    content: ":\2002";
}
article.list .heading .codenumber + .title:before {
    content: ":\2002";
}

article.theorem-like:after, article.objectives:after {
  content:'';
border-bottom: 1px solid #66a;
  display: block;
  margin-left: -6px;
  margin-right: auto;
    padding-top: 0.25em;
  width: 1.5em;
/*
  border-left: 1px solid #66a;
  margin-right: -5px;
  height: 2em;
  margin-top: -2em;
*/
}

.mathbook-content article.theorem-like *:last-child, .mathbook-content article.objectives *:last-child { 
    margin-bottom: 0;
}
.mathbook-content article.theorem-like *:last-child::after, .mathbook-content article.objectives *:last-child::after {
    margin-bottom: 0;
}

article.remark-like {
    padding-left: 6px;
    border-left: 1px solid #aaa;
}

article.remark-like:after {
  content:'';
border-bottom: 1px solid #aaa;
  display: block;
  margin-right: auto;
  margin-left: -6px;
    padding-top: 0.25em;
  width: 1.5em;
}

.mathbook-content article.remark-like > *:last-child {
    margin-bottom: 0;
}
.mathbook-content article.remark-like > *:last-child::after {
    margin-bottom: 0;
}

/* Since there can be p which are nearby but not siblings,
   let's put background and (but not box shadow) on everything */

/* see start of file
.mathbook-content p, .mathbook-content .heading {
    background: #fff;
}
*/

/*
  OLD VERSION: see new version above

.mathbook-content .aside-like ~ *:not(.aside-like) p, .mathbook-content .aside-like ~ *:not(.aside-like) .heading {
    background: #fff;
    box-shadow: 3em 0 0 0 #fff;
}
.mathbook-content .aside-like ~ *:not(.aside-like) .knowl-output p {
    background: inherit;
    box-shadow: none;
}
*/

/* next selector first part of the following is due to the mistake of
   putting paragraph spacing in the margin-bottom 
   Redo when we fix that error */
.mathbook-content .aside-like {
    margin-top: -1.25em;
    position: absolute;
    margin-left: 45%;
    z-index: -10;
    overflow-x: hidden;
    max-width: 495px;
    max-height: 7em;
    overflow-y: hidden;
    border: none;
    padding: 2px 10px;
    color: #888;
}
.mathbook-content .example-like .aside-like {
    margin-top: 0;
    position: absolute;
}
.mathbook-content .aside-like {
    font-size: 90%;
}
.mathbook-content .aside-like {
  margin-bottom: 5px;
  background-color: #f5faff;
  box-shadow: 0 0 1.0em 0.2em #fff inset;
}
.mathbook-content .aside-like:first-child {
    margin-top: -2.25em;
}
.mathbook-content .aside-like:after {
  content  : "";
  position : absolute;
  z-index  : 1;
  top   : 0em;  
  bottom   : 0;
  left     : 0;
  pointer-events   : none;
  background-image : linear-gradient(to bottom, 
                    rgba(255,255,255, 0.4), 
                    rgba(255,255,255, 1) 90%);
  width    : 550px;
  height   : 8em;
}
/* example of where the following is needed? */
.mathbook-content .aside-like * {
    background-color: #f5faff !important;
}
.mathbook-content .aside-like.front, .mathbook-content .example-like .aside-like.front {
  position: relative;
  z-index: 0;
  padding: 8px 15px 10px 15px;
  padding: 2px 10px;
  margin: 5px 0px 5px 10px;
  border: 2px solid #dcebfa;
  max-height: none;
  max-width: 550px;
  color: inherit;
/*  width: 550px; */
  font-size: 100%;
  box-shadow: none;
}
.mathbook-content .aside-like.front:after, .mathbook-content .example-like .aside-like.front:after {
    background-image: none;
}
.mathbook-content .example-like .aside-like.front {
    margin-top: 1.25em;
}

.mathbook-content .aside-like.front + p{
    margin-top: 1.25em !important;
    padding-top: 0;
}



.mathbook-content .aside-like .aside-like {
  background-color: #fafff5;
  border: 1px dotted #aaa;
}

.mathbook-content article.aside-like > *:last-child {
    margin-bottom: 0;
}
.mathbook-content article.aside-like > *:last-child::after {
    margin-bottom: 0;
}
/*
.mathbook-content .aside-like {
    margin-bottom: 1.25em;
}
*/

.mathbook-content .aside-like > .heading {
    font-size: 95%;
}

.mathbook-content .aside-like + *{
    margin-top: 3em !important;
    box-shadow: 0 0 0.5em 0.2em #fff;
    margin-right: 3em;
}

/* for + ul p see http://physics.thomasmore.edu/ConnectedPhysics/ss-NII.html */
/*  subsumed by general background at start
.mathbook-content .aside-like + p, .mathbook-content .aside-like + ul p, .mathbook-content .aside-like + ol p{
    background: #fff;
    box-shadow: 2em 0 1em 0.0em #fff;
}
*/

/* on sufficiently large screens, there is enough of a margin to see part of the aside */

@media screen and (min-width: 943px) {
  .mathbook-content .aside-like + * {
      margin-right: 0;
  }
}

/* on a wide screen, asides should appear in the right margin */
@media screen and (min-width: 1100px) {
  .mathbook-content .aside-like, .mathbook-content .aside-like.front, .mathbook-content .example-like .aside-like, .mathbook-content .example-like .aside-like.front {
      position: absolute;
      margin-top: -2em;
      margin-left: 660px;
      max-width: 200px;
      color: inherit;
  }
  .mathbook-content .aside-like.front, .mathbook-content .example-like .aside-like.front {
      max-height: none;
      max-width: 223px;
      border: 2px solid #dcebfa;
}
  .mathbook-content .example-like .aside-like, .mathbook-content .example-like .aside-like.front {
      margin-left: 654px;  /* because .example-like has 6px of padding */
  }

  .mathbook-content .aside-like + * {
      margin-top: 1.25em !important;
  /*    background: none;  */
      box-shadow: none;
      margin-right: 0;
  }

  .mathbook-content .aside-like.front:after, .mathbook-content .example-like .aside-like.front:after {
    background-image: none;
  }

  .mathbook-content .aside-like:nth-of-type(3n+1) {
    margin-left: 660px;
}
  .mathbook-content .aside-like:nth-of-type(3n) {
    margin-left: 680px;
}
  .mathbook-content .aside-like:nth-of-type(3n+2) {
    margin-left: 640px;
}
}

/* on a narrow screen, collapsed asides should only be one line tall */
/* was too hard to see/poke
@media screen and (max-width: 480px) {
.mathbook-content .aside-like {
    margin-top: -1.25em;
}
.mathbook-content .example-like .aside-like {
    margin-top: -1em;
  }
.mathbook-content .aside-like + *{
    margin-top: 1.5em !important;
}
.mathbook-content .aside-like + article, .mathbook-content .aside-like + ul, .mathbook-content .aside-like + ol {
    margin-top: 2.5em !important;
}
}
*/

.mathbook-content .aside-like:hover:after, .mathbook-content .aside-like:focus:after {
    top: 3em;
    height: auto;
    background-image : none;
}
/* redundant
.mathbook-content .aside-like.front:hover:after, .mathbook-content .aside-like.front:focus:after {
    background-image: none;
}
*/

.mathbook-content .aside-like:hover, .mathbook-content .aside-like:focus {
    color: inherit;
    padding: 0 8px;
    border: 2px solid #dcebfa;
    height: auto;
    max-height: none;
}
.mathbook-content .aside-like.front:hover, .mathbook-content .aside-like.front:focus {
    padding: 2px 10px;
}

/* figure out a better way to handle asides in content that has a wide left margin */
/* see http://pretext.jahrme.com/aside-in-knowl/section-1.html */
.mathbook-content section dl dd .aside-like {
    margin-top: 0 !important;
    margin-left: 100px !important;
}
.mathbook-content section dl dd .aside-like.front {
    margin-left: -300px !important;
}

/* hack for demo!  delete soon! */
.mathbook-content p:empty + .aside-like  {
    margin-top: -2.25em;
}
.mathbook-content p:empty + .aside-like.front  {
    margin-top: -1.25em;
}


/* borders above should not appear in a knowl ref 
   or when the example is created as a knowl */

a > article.example-like {
    padding-left: 0;
    border-left: none;
}

a > article.example-like:after {
  content:'';
  border-bottom: none;
  display: inline;
  margin-left: 0;
  margin-right: 0;
  width: 0;
}

/*  this is helpful in a knowl
.knowl figure pre.prettyprint {
    padding-left: 15px;
    border-left: none;
}

.knowl figure pre.prettyprint:before {
    content:'';
    border-top: none;
    display: block;
    margin-right: 0;
    margin-left: 0;
    padding-bottom: 0;
    width: 0;
}
*/

.knowl article.theorem-like, .knowl article.definition-like, .knowl article.remark-like, .knowl article.example-like, .knowl article.objectives {
    padding-right: 0;
    border-right: none;
    border-left: none;
}

.knowl article.theorem-like:after, .knowl article.definition-like:after, .knowl article.remark-like:after, .knowl article.example-like:after, .knowl article.objectives:after {
  content:'';
  display: inline;
  margin-left: 0;
  margin-right: 0;
  width: 0;
  height: 0;
  padding: 0;
  border: none;
}

/* http://spot.pcc.edu/math/APEXCalculus/sec_prod_quot_rules.html
 * solution to Example 2.4.14
 */
.mathbook-content .solution ol li { 
    margin-top: 1em;
}
.mathbook-content .solution ol li p {
    vertical-align: top;
    display: inline-block;
    margin-top: 0;
    margin-left: 0.5em;
}
.mathbook-content .exercise-like ol li {
    margin-top: 1em;
}
.mathbook-content .exercise-like ol li p {
    vertical-align: top;
    display: inline-block;
    margin-top: 0;
    margin-left: 0.5em;
}

/* http://mathbook.pugetsound.edu/beta/contibutor-list-20161130/preface-2.html
 * */

.mathbook-content .contributor .contributor-name {
    font-variant: small-caps;
}
.mathbook-content .contributor .contributor-info {
    font-size: 88%;
    font-style: italic;
    margin-left: 3ex;
}
.mathbook-content .contributor {
    margin-top: 3ex;
}
.mathbook-content .contributor + .contributor {
    margin-top: 1.5ex;
}

.mathbook-content .contributor + p {
    margin-top: 3ex;
}


.searchwrapper {
    max-width: 900px;
    position: absolute;
    right: 0;
    bottom: 0; 
    margin-bottom: 39px; 
}
body.sidebar-left-closed .searchwrapper {
    margin-bottom: -2px; 
}

body.sidebar-left-open .searchwrapper {
    top: 74px;
}

/* bottom: 0;
 *  * */

body.sidebar-left-closed .searchwrapper {
    top: 74px;
    margin-bottom: -2px;
}


@media screen and (max-width: 800px) {
body.sidebar-left-closed .searchwrapper {
    top: 129px;
}
}

@media screen and (max-width: 480px) {
body.sidebar-left-closed .searchwrapper {
    top: 174px;
}
}


.searchwrapper .cse .gsc-control-cse, .searchwrapper .gsc-control-cse  {
    padding: 0;
    border: none;
    width: 25ex;
}
.searchwrapper .cse .gsc-search-button input.gsc-search-button-v2, .searchwrapper input.gsc-search-button-v2 {
    padding: 2px 2px;
}
.searchwrapper form.gsc-search-box {
    margin: 0;
}
.searchwrapper table.gsc-search-box {
    margin: 0;
}
.searchwrapper .gsc-search-box-tools .gsc-search-box .gsc-input {
    padding: 0;
}
.searchwrapper .gsib_a {
    padding: 0 0 0 5px;
}
.searchwrapper .gsc-input-box {
    height: 3.0ex;
}
.searchwrapper form.gsc-search-box {
    font-size: 12px;
}

/* turn off the green parentheses Alex does not like */
.mathbook-content div.CodeMirror span.CodeMirror-matchingbracket {color: #090;}

.mathbook-content .image-archive {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: auto;
    margin-top: 0.75em;
    padding-bottom: 0.25em;
    text-align: center;
}
.mathbook-content .image-archive > a {
    display: inline-block;
    padding-left: 0.5em;
    padding-right: 0.5em;
    font-family: monospace;
}
/*
.mathbook-content .image-archive > a:not(:last-child) {
    padding-right: 1em;
}
.mathbook-content .image-archive > a:not(:last-child):after {
    content: " ";
}
*/

/*
.mathbook-content .sbspanel object {
*/
.mathbook-content .sbspanel object:not(:last-child) {
    margin-bottom: 0 !important;
}

.mathbook-content iframe {
    border: none;
}

.times-sign {
    font-size: larger;
    vertical-align: -0.15ex;
}
/* temporary for Mitch Keller.  delete at end of 2017 */
.mathbook-content div.knowl .posterior div a:first-child {
    font-style: italic;
}

/* sort of a hack for proof knows in theorem knowls */
.mathbook-content div.knowl .posterior a[knowl]:first-child {
    padding: 0;
}

.mathbook-content a[href^="mailto:"] {
    font-style: normal;
    font-family: monospace;
}
.mathbook-content .preface a[href^="mailto:"] {
    font-size: 110%;
}

/*
nested tasks. see
http://mathbook.pugetsound.edu/examples/sample-article/html/interesting-corollary.html
*/

.mathbook-content .exercise-like > .exercise-like {
    margin-left: 40px;
}
.mathbook-content .exercise-like > .exercise-like p {
    margin-top: 1.25em;
    margin-bottom: 0.25em;
}
.mathbook-content .exercise-like > .exercise-like > .heading + p::after {
    margin-bottom: 0.25em;
}
.mathbook-content .example-like > .heading + .introduction {
    display: inline;
}
.mathbook-content .example-like > .heading + .introduction > p:first-child {
    display: inline;
}
.mathbook-content .example-like > .exercise-like p {
    margin-top: 1.25em;
    margin-bottom: 0.25em;
}
.mathbook-content .example-like > .exercise-like > .heading + p::after {
    margin-bottom: 0.25em;
}
.mathbook-content .conclusion p:last-child {
    margin-bottom: 0.25em;
}
/* not sure about these two.  there may be bad side-effects */
.mathbook-content .example-like p {
    margin-top: 1.25em;
    margin-bottom: 0.25em;
}
.mathbook-content .example-like ol, .mathbook-content .example-like ul {
    margin-top: 1.25em;
    margin-bottom: 0.25em;
}
.mathbook-content .example-like > .heading + p::after {
    margin-bottom: 0.25em;
}

/* end of nested tasks */

/* genus and species in italics */
.mathbook-content .taxon {
    font-style: italic;
}

/* Sage stuff */
.mathbook-content .sageanswer {
    font-family: monospace;
    white-space: pre;
    margin-left: 3em;
    margin-bottom: 2em;
} 
.mathbook-content .sageanswer .key {
    display: inline-block;
    vertical-align: top;
    margin-right: 1em;
}
.mathbook-content .sageanswer .output {
    display: inline-block;
    vertical-align: top;
}
.mathbook-content .CodeMirror-code pre.CodeMirror-line {
    padding-bottom: 5px;
}

/* to enable hovering over aside-like */
/* div.page, main.main, body.mathbook-article, */
body.mathbook-book, body.mathbook-article, .mathbook-content section.chapter, .mathbook-content section.introduction, .mathbook-content section.conclusion, .mathbook-content section.section, .mathbook-content section.subsection, .mathbook-content section.subsubsection, .mathbook-content article, #content.mathbook-content {
    pointer-events: none;
}
html nav, html header, .mathbook-content article.aside-like, .mathbook-content *,
body.mathbook-book .MathJax_Menu, body.mathbook-article .MathJax_Menu {
    pointer-events: auto;
}
.mathbook-content ol, .mathbook-content ul {
    pointer-events: none;
}
.mathbook-content ol li, .mathbook-content ul li {
    pointer-events: auto;
}
div, span, button {
    pointer-events: auto;
}

/* used when knowl content is hidden in the page */
.hidden-content {
    display: none;
}
