/*@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700|Inconsolata:400,700);*/

/*
colors:
- purple: var(--taylor-purple)
- gold: #ac926e
- blue: #209cee, #166da7 (darker)
*/

:root {
    --taylor-purple: #522D72;
    --taylor-gold:   #C1A027;
    --taylor-gray:   #B2B4BE;
    --taylor-blue:   #1B365F;
    --taylor-cyan:   #00AFCE;
    --taylor-red:    #E14F3D;
    --taylor-purple-transparent: #522D7240;
    --taylor-gold-transparent: #C1A02740;
    --taylor-gray-transparent: #B2B4BE40;
}

/* open-dyslexic fonts */
@font-face {
  font-family: 'opendyslexic';
    src: url('https://gfx.cse.taylor.edu/fonts/opendyslexic/OpenDyslexic-Regular.otf');
    font-style: normal;
    font-weight: normal;
}
@font-face {
    font-family: 'opendyslexic';
    src: url('https://gfx.cse.taylor.edu/fonts/opendyslexic/OpenDyslexic-Italic.otf');
    font-style: italic;
    font-weight: normal;
}
@font-face {
    font-family: 'opendyslexic';
    src: url('https://gfx.cse.taylor.edu/fonts/opendyslexic/OpenDyslexic-Bold.otf');
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: 'opendyslexic';
    src: url('https://gfx.cse.taylor.edu/fonts/opendyslexic/OpenDyslexic-BoldItalic.otf');
    font-weight: bold;
    font-style: italic;
}
/*@font-face {
    font-family: eulexia;
    src: url('https://gfx.cse.taylor.edu/fonts/opendyslexic/eulexia.ttf');
}
*/


html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0 auto;
    padding: 0;
    padding-top: 0px;
    padding-bottom: 128px;

    /* width is now set in build.py (template.html: $style$)
    /*width: 600px;*/
    /*width: 775px;*/

    /*font-family: 'Open Sans', sans-serif;*/
    /*font-family: 'Lato', sans-serif;*/
    /*font-family: 'Questrial', sans-serif;*/
    font-family: 'Merriweather', serif;
    /*font-family: 'Libre Baskerville', serif;*/
    font-size: 12px;
    /*line-height: 20px;*/
    counter-reset: h4counter;
    background-color: #F8F8F8;
}



a {
    color: var(--taylor-red);
/*    text-shadow: 0 0 1px var(--taylor-gold);*/
    text-decoration: none;
}
a:hover {
    color: var(--taylor-cyan);
/*    text-shadow: 0 0 0px var(--taylor-cyan);*/
    text-decoration: underline;
}

h1, h2, h3 {
    /*font-family: 'Questrial', sans-serif;*/
    text-transform: lowercase;
    font-family: 'Open Sans', sans-serif;
    font-weight: normal;
    page-break-after: avoid;
    break-after: avoid;
    clear: both;
}

h1 a, h2 a, h3 a {
    color: var(--taylor-gray);
    opacity:50%;
}
h1:hover a, h2:hover a, h3:hover a {
    opacity:100%;
}
h1 a:hover, h2 a:hover, h3 a:hover {
    opacity: 100%;
}

h1 + p, h2 + p, h3 + p {
/*    page-break-inside: avoid;*/
    page-break-before: avoid;
}

h1 {
    margin: 16px -32px 0 -32px;
    border-bottom: 0.2em solid var(--taylor-gold);
    padding: 4px 32px 4px 32px;
    font-size: 20px;
    color: white;
    background-color: var(--taylor-purple);
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 100000;
}

hr {
    display: block;
    background: transparent;
    border: none;
    margin: 0px;
    height: 1px;
    width: 100%;
}

h2 {
    /*
    setting top margin to 3.5em instead of 1.5em so that using the anchor in URL
    will place the h2 just under the h1
    */
    margin: 1.5em -16px 0 -16px;
    /*margin-left: 0px;
    margin-top: 1.5em;*/
    border-left: 0.2em solid var(--taylor-purple);
    padding: 0.2em 16px 0.2em 16px;
    /*padding-left: 0.5em;
    padding-top: 0.2em;
    padding-bottom: 0.2em;*/

    font-size: 16px;
    color: var(--taylor-purple);
    font-weight: bold;

    background: linear-gradient(190deg, transparent, var(--taylor-purple-transparent));
}

/* #C0C0FF; */

h3 {
    margin: 1.5em 0px 0px 0px;
    border-left: 0.2em solid var(--taylor-gray);
    padding: 0.2em 0 0.2em 16px;

    font-size: 14px;
    color: var(--taylor-purple);
    font-weight: bold;

    background: linear-gradient(190deg, transparent, var(--taylor-gray-transparent));
}


span.highlight {
    /*color: #82A3CF;*/
    background-color: #C0FFFF;
}
span.highlight span.highlight {
    /*color: #FFFF00;*/
    background-color: #FFFFC0;
}

span.underline {
    border-bottom: 1px solid #000000;
}

div.highlight {
    background-color: #FFFFC0;
    border: 1px dashed;
}

/* http://www.2ality.com/2012/01/numbering-headingshtml.html */
h4 {
    font-size: 12px;
    font-weight: normal;
    /*line-height: 16px;*/
    counter-reset: h5counter;
    padding-left: 18px;
}
h4:before {
    font-size: 12px;
    /*line-height: 16px;*/
    content: counter(h4counter) ".\0000a0\0000a0";
    counter-increment: h4counter;
    margin-left: -18px;
    width: 18px;
}

h4 span {
    position: relative;
    left: 0px;
    padding: 0px;
    margin: 0px;
    text-indent: 0px;
    /*text-indent: 0px;
    position: relative;*/
}
h5 {
    font-size: 12px;
    font-weight: normal;
}
h5:before {
    font-size: 12px;
    content: counter(h4counter) "." counter(h5counter) ".\0000a0\0000a0";
    counter-increment: h5counter;
}

hr.pagebreak {
    display: block;
    background: transparent;
    border: none;
    border-top: dashed 2px #C0C0C0;
    height: 1px;
    width: 100%;
    page-break-before: always;
}

p {
    margin: 1ex 0 1ex 0;
    padding: 0;
}

ol, ul, li {
    margin: 0 1em 0 1em;
    padding-left: 0.5em;
}
li {
    text-align: left;
}
p+ol, p+ul {
    margin-top: -8px;
}
h1+ol, h1+ul, h2+ol, h2+ul, h3+ol, h3+ul {
    margin-top: 1ex;
}

ol.tight, ul.tight, ol.tight li, ul.tight li {
    margin-top: 0px;
    margin-bottom: 0px;
}

div.tightlist {
     margin: 12px 0px 12px 0px;
}

/*ul ul {
    margin: 0 0 0 0;
}*/

/*pre {
    margin: 0 0 24px 0;
}

code {
    font-family: 'Ubuntu Mono',;
    font-size: 13px;
}*/

table {
    margin: 6px 0 6px 0; /* 12px 0 12px 0;*/
    border-collapse: collapse;
}

tr {
    padding: 0;
    margin: 0;
}

th {
    text-align: center;
    padding: 0;
    margin: 0;
    padding-left: 8px;
    padding-right: 8px;
    vertical-align: top;
    padding-top: 6px;
    padding-bottom: 6px;
}

td {
    text-align: left;
    padding: 0;
    margin: 0;
    padding-left: 8px;
    padding-right: 8px;
    vertical-align: top;
    padding-top: 6px;
    padding-bottom: 6px;
}

td[align="left"] {
    text-align: left;
}
td[align="center"] {
    text-align: center;
}
td[align="right"] {
    text-align: right;
}

table.edges tr, table.edges td, table.edges th {
    border: 1px solid #C0C0D0;
}

table.align {
    margin: 0;
    padding: 0;
}
table.align td {
    padding: 0px;
    text-align: left;
}
table.align td + td {
    padding-left: 8px;
}


pre {
    /*font-family: Inconsolata, monospace;*/
    font-family: 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 14px;
    width: 80%;
    /*max-height: 360px;*/
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 10px;
    overflow: auto;
    /*line-height: 40px;*/
}

pre ol, pre ul, pre li {
    margin: 0;
    /*margin-top: 4px;
    margin-bottom: 4px;
    margin-left: 8px;*/
    padding: 0;
    margin-left: 16px;
    /*padding-left:4px;*/
}


code {
    color: #404040;
    /*font-family: Inconsolata, monospace;*/
    font-family: 'Ubuntu Mono', monospace;
    font-style: normal;
    font-weight: normal;
    /*font-size: 12px;
    line-height: 12px;*/
    border: 1px solid #F0F0F0;
    padding: 1px 4px;
    background-color: #F8F8F8;
    white-space: pre;
}


/*blockquote {
    border-left: 2px solid #C0C0C0;
    padding-left: 5px;
}
*/
blockquote {
    position: relative;
    background-color: rgba(128,128,128,0.10); /* #E0E0E0; /*white;*/
    border: 1px solid rgba(0,0,0,0.05);
    padding-left: 48px;
    padding-right: 48px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-radius: 20px;
}

blockquote p {
    color: black; /* #000000; */
    text-align: justify;
}

blockquote span.quotationstart {
    position: absolute;
    left: 16px;
    top: 8px;
    color: rgba(0,0,0,0.1); /* #C0C0C0; /*#404040;*/
    text-align: left;
    font-size: 32pt;
}
blockquote span.quotationend {
    position: absolute;
    right: 16px;
    bottom: -8px;
    color: rgba(0,0,0,0.1); /* #C0C0C0; /*#404040;*/
    text-align: left;
    font-size: 32pt;
}




div.admonition {
    border: 0.1em solid rgba(0, 0, 0, 0.5);
    border-radius: 0.5em;
    padding: 1em;
    margin: 1em 0;
    p.admonition-title {
        font-weight: bold;
        margin: -1em -1em 1.5ex -1em;
        padding: 0.5ex 2em;
        border-radius: 0.4em 0.4em 0 0;
    }
    /* first-child is the title bar! */
    p:nth-child(2) {
        margin-top: 0;
    }
    p:last-child {
        margin-bottom: 0;
    }
}

div.admonition.note {
    background-color: rgba(178, 180, 190, 0.25);
    p.admonition-title {
        background-color: rgba(178, 180, 190, 1.0);
        color: white;
    }
}

div.admonition.important {
    background-color: rgba(222, 79, 61, 0.25);
    p.admonition-title {
        background-color: rgba(222, 79, 61, 1.0);
        color: white;
    }
}

div.admonition.warning {
    background-color: rgba(0, 175, 206, 0.25);
    p.admonition-title {
        background-color: rgba(0, 175, 206, 1.0);
        color: white;
    }
}

div.admonition.answers {
    background-color: rgba(128, 128, 255, 0.25);
    p.admonition-title {
        background-color: rgba(128, 128, 255, 1.0);
        color: white;
    }
}

div.admonition.tip, div.admonition.hint {
    background-color: rgba(0, 206, 174, 0.25);
    p.admonition-title {
        background-color: rgba(0, 206, 175, 1.0);
        color: white;
    }
}




div.topleft {
    position:fixed;
    top:10px;
    left:10px;
    z-index: -1000;
    padding: 4px;
}
div.topleft:hover {
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

div.toc {
    margin-bottom: 20px;
    text-align:left;
    opacity: 0.4;
    text-transform: lowercase;
    font-family: 'Open Sans', sans-serif;
    font-weight: normal;
}
div.toc:hover {
    opacity: 1.0;
}

div.toc a {
    color:#202080;
    opacity: 0.3;
}
div.toc:hover a {
    opacity: 0.5;
}
div.toc a:hover {
    opacity: 1.0;
}

div.links {
    text-align:left;
    opacity: 0.4;
    text-transform: lowercase;
    font-family: 'Open Sans', sans-serif;
    font-weight: normal;
    z-index: -1000;
}
div.links:hover {
    opacity: 1.0;
}
div.links > ul {
    list-style-type: none;
    margin-left: 0;
    padding-left: 0;
}
div.links > ul > li {
    margin-left: 0;
    padding-left: 0;
}
div.links a {
    color:#202080;
    opacity: 0.3;
}
div.links:hover a {
    opacity: 0.5;
}
div.links a:hover {
    opacity: 1.0;
}

div.content {
    background-color: white;
    margin-top: 36px;
    margin-left:  -48px;
    margin-right: -48px;
    padding-left:  48px;
    padding-right: 48px;
    padding-bottom: 36px;
    border: 1px solid #E0E0E0;
    box-shadow: 0px 0px 10px #E0E0E0;
}



/* http://edward.oconnor.cx/2007/08/tex-poshlet */
.tex sub, .latex sub, .latex sup {
  text-transform: uppercase;
}
.tex sub, .latex sub {
  vertical-align: -0.2ex;
  margin-left: -0.1667em;
  margin-right: -0.125em;
}
.tex, .latex, .tex sub, .latex sub {
  font-size: 1em;
}
.latex sup {
  font-size: 0.85em;
  vertical-align: 0.05em;
  margin-left: -0.36em;
  margin-right: -0.15em;
}



div#bottomright {
    z-index: 100000;
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 10pt;
    line-height: 10pt;
    font-family: 'Questrial', sans-serif;
    user-select: none;
}
div#bottomright div {
    text-align: center;
    opacity: 0.10;
    background: rgba(0,0,0,0.5);
    color: white;
    cursor: pointer;
    padding: 5px;
    margin: 2px;
    border: 1px solid black;
}
div#bottomright div:hover {
    opacity: 1.0;
}
div#bottomright span {
    display: inline-block;
    text-align: center;
    padding-left: 5px;
    padding-right: 5px;
    margin-left: 2px;
    margin-right: 2px;
    border: 1px solid rgba(0,0,0,0.10);
}


/*  collapsible blockquotes  */
blockquote.contracted {
    overflow-y: hidden;
    max-height: 80px;
}
blockquote.contracted:after {
    content  : "";
    position : absolute;
    z-index  : 1;
    bottom   : 0;
    left     : 0;
    width    : 100%;
    height   : 4em;
    pointer-events    : none;
    /*--fade-color-value: 160;*/
    --fade-color-value: 255;
    background-image  : linear-gradient(to bottom,
                            rgba( var(--fade-color-value), var(--fade-color-value), var(--fade-color-value), 0),
                            rgba( var(--fade-color-value), var(--fade-color-value), var(--fade-color-value), 1) 90%
                            );
}
blockquote button.expand {
    position: absolute;
    right:16px;
    opacity:50%;
}
blockquote button.expand:hover {
    opacity:100%;
}
@media print {
    blockquote.contracted {
        overflow-y: initial;
        max-height: fit-content;
    }
    blockquote.contracted:after {
        display: none;
    }
    button.expand {
        display: none;
    }
}



.h1-hide {
    display: none !important;
}

sup.accessible {
    margin-left: 0.25em;
}
section#accessibility li {
    clear: both;
    break-inside: avoid;
}
section#accessibility li div.clear-url {
    word-wrap: break-word;
}
section#accessibility div.qrcode {
    display: inline-block;
    float: left;
}
section#accessibility div.qrcode img {
    width:  4.2em;
    height: 4.2em;
    margin-right: 0.5em;
    margin-bottom: 0.5em;
/*    opacity: 0.5;*/
}


body.dyslexic {
    font-family: 'opendyslexic', serif !important;
    font-size: 12pt;
    line-height: 16pt;
}

body.dyslexic h1, body.dyslexic h2, body.dyslexic h3 {
    font-family: 'opendyslexic', serif !important;
}
body.dyslexic h1 {
    font-size: 18pt;
    line-height: 22pt;
}
body.dyslexic h2, body.dyslexic h3 {
    font-size: 16pt;
    line-height: 22pt;
}
body.dyslexic h4, body.dyslexic h4::before {
    font-size: 14pt;
}
body.dyslexic pre {
    font-family: 'Comic Mono';
    font-size: 14pt;
    line-height: 18pt;
}
body.dyslexic code {
    font-family: 'Comic Mono';
}


@media print {
    body {
        margin: 0 auto;
        /*margin: 72px 72px;*/
        padding: 0;
        padding-top: 0px;
        padding-bottom: 0px;
        background-color: #FFFFFF;
    }
    @page {
/*        margin: 48px 48px 48px 48px;*/
        margin: 1in;
    }
    hr.pagebreak {
        border: 0;
        height: 0px;
        padding-top: -1px;
        padding-bottom: 1px;
    }
    div.content {
        border: none;
        margin-top: 0px; /*-24px;*/
        margin-left: 0px;
        margin-right: 0px;
        padding-left: 0px;
        padding-right: 0px;
        padding-bottom: 0px;
        box-shadow: 0px 0px 0px;
    }
    div#toc {
        visibility: hidden;
    }
    h1 {
        page-break-after: avoid !important;
    }
    h2 {
        page-break-after: avoid !important;
    }
    h3 {
        page-break-after: avoid !important;
    }
    h1 a, h2 a, h3 a {
        opacity: 0%;
    }

    /* remove space between h1 and page margin */
    h1 {
        margin-top: 0em;
    }
    *:has(+ h1) {
        margin-bottom: 2em;
    }
    *:has(+ a + h1) {
        margin-bottom: 2em;
    }
    *:has(+ a + a + h1) {
        margin-bottom: 3em;
    }

    h1:not(:nth-of-type(1)) {
        page-break-before: always;
    }
    section {
        page-break-before: always;
    }


    div#bottomright {
        display: none;
    }
}
