/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

body {
    color: #000000;
    background: #a68945;
    font-size: 1em;
    line-height: 1.4;
    padding: 0;
    margin: 0;
}

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection declarations have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
 */

img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Chrome Frame prompt
   ========================================================================== */

.chromeframe {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */


/* Header margins to 0 to prevent spacing b/w divs */
h1 { margin: 0; }
h2 { margin: 0; }
h3 { margin: 0; }
h4 { margin: 0; }

/* Layout for page header */
#header {
    height: 145px;
    color: #EBD08D;
    background-color: #303C71;
    margin: 0;
    padding: 0;
    position: relative;

    text-align: center;
    font-family: Helvetica, Arial, sans-serif;
}

#header h1 {
    margin: 0;
    padding-top: 0.1em;
    font-weight: normal;
}

#header h1#course-title { font-size: 18pt; }
#header h1#course-semester { font-size: 11pt; }
#header h1#course-instructor { font-size: 13pt; }

#header a { color: inherit; }

/* Layout for navigation menu */
#menu {
    position: absolute;
    bottom: 0;
    margin-left: 33px;
}

#menu ul {
    list-style: none; 
    padding: 0; 
    margin: 0; 
    border: none;
}

#menu li {
    float: left;
    margin-right: 4px;
    width: 100px;
}

#menu li a {
    display: block;
    padding: 4px 0px 2px;

    font-size: 9pt;
    font-weight: normal;
    text-decoration: none;

    color: #101a49;
    background-color: #7e88b8;

    -webkit-border-top-right-radius: 3px;
    -webkit-border-top-left-radius:  3px;
    -moz-border-radius-topright: 3px;
    -moz-border-radius-topleft:  3px;
    border-top-right-radius: 3px;
    border-top-left-radius:  3px;
}

#menu li#selected a {
    font-weight: normal;
    color: #121D49;
    background-color: #fff2d3;
}

#menu li a:hover {
    color: #220f4a;
    background-color: #907cb8;
}


/* Layout for main content section */
#contents {
    margin: 0 10px;
    padding: 15px 25px;
    background-color: #fff2d3;

    font-family: Helvetica, Arial, sans-serif;
    font-size: 10pt;
}

#contents h1, h2, h3, h4 {
    color: #6c5216;
    margin: 0;
    padding-top: 0.1em;
    padding-bottom: 0;
}

#contents h1 { font-size: 16pt; }
#contents h2 { font-size: 13pt; }

#contents .section {
    margin-top: 0.6em;
    padding-top: 0.5em;
    border-top: 1px solid #c6bed7;
}

#contents .subsection {
	margin-top: 1.8em;
	margin-bottom: -0.4em;
}

#contents .section-text {
    display: block;
    max-width: 950px;
}

#contents p {
    font-family: Times, serif;
    font-size: 11pt;
}

#contents a {
    color: #121D49;
    /* font-weight: 500; */
    text-decoration: none;
    border-bottom: 1px dotted;
}

#contents div.book-info {
    padding: 0.7em 0em;
}

#contents pre.code {
	overflow: auto;
	max-width: 650px;
    
	margin: 0 80px;
    padding: 3px 8px;

    font-family: monospace;
    font-size: 9pt;

	color: #2D3962;
    background-color: #DFDCCA;

	border: 1px dotted #A7A69B;
}

#contents p.update {
    border: 2px groove;
    margin: 1.0em 25px;
    padding: 3px 5px;

    color: #4E60A4;
}

#contents p.update b {
}

#contents p.update a {
    color: inherit;
}

#contents table.toc {
    padding: 0;
    margin: 0;
}

#contents table.toc td {
    padding: 0;
    padding-right: 3.5em;
}

#contents table.assignments {
    width: 95%;
    margin: 5px;
}

#contents table.assignments thead {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: bold;
}

#contents div.class-section {
    padding: 0.7em 0em;
}

#contents div.class-section p {
    padding: 0;
    margin: 0;
}

#contents div#grading {
    width: 80%;
    padding: 0.7em 2em;
}

#contents #grading td.frac {
    width: 20%;
    text-align: right;
    padding-right: 2em;
}

#contents #grading td.item {
}

#contents #toc {
    margin: -15px 0 0;  /* top adjustment for #contents padding */
    padding: 10px 0 5px;
}

#contents #toc ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#contents #toc li {
    display: inline-block;
    margin: 0;
    margin-right: 1px;
    padding: 0;
}

#contents #toc li a {
    display: block;
    min-width: 125px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9pt;
    text-align: center;

    color: #121D49;
    background-color: #D3C98F;

    margin: 0;
    padding: 4px 2px;

    border: 0;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
}

#contents #toc li a:hover {
    background-color: #D3B776;
}


/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    /* IE 6/7 fallback */
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 100%;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   Theses examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-resolution: 144dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /* Hide header section when printing */
    #header { display: none; }
    #toc { display: none; }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
