/* https://dev.to/clairecodes/how-to-make-a-sticky-sidebar-with-two-lines-of-css-2ki7 */

/* https://www.bram.us/2020/01/10/smooth-scrolling-sticky-scrollspy-navigation/ */

/* https://css-tricks.com/practical-use-cases-for-scroll-linked-animations-in-css-with-scroll-timelines/#scrollspy */


/* this is the way:

https://www.quackit.com/html/templates/download/preview.cfm?template=../frames/css_frames/2_rows_2_columns_a.cfm#nr

<body> has three children: <header>, <main>, <nav>


		body {
			margin: 0;
			padding: 0;
			overflow: hidden;
			height: 100%; 
			max-height: 100%; 
			font-family:Sans-serif;
			line-height: 1.5em;
		}
		
		#header {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100px; 
			overflow: hidden; /* Disables scrollbars on the header frame. To enable scrollbars, change "hidden" to "scroll" */  /*
			background: #BCCE98;
		}
		
		#nav {
			position: absolute; 
			top: 100px; 
			left: 0; 
			bottom: 0;
			width: 230px;
			overflow: auto; /* Scrollbars will appear on this frame only when there's enough content to require scrolling. To disable scrollbars, change to "hidden", or use "scroll" to enable permanent scrollbars */ /*
			background: #DAE9BC; 		
		}
		
		#logo {
			padding:10px;
		}
		
		main {
			position: fixed;
			top: 100px; /* Set this to the height of the header */ /*
			left: 230px; 
			right: 0;
			bottom: 0;
			overflow: auto; 
			background: #fff;
		}
		
		.innertube {
			margin: 15px; /* Provides padding for the content */ /*
		}
		
		p {
			color: #555;
		}

		nav ul {
			list-style-type: none;
			margin: 0;
			padding: 0;
		}
		
		nav ul a {
			color: darkgreen;
			text-decoration: none;
		}



*/

:root {
    --navwidth: 15rem;  /* use, e.g., var(--navwidth) */
    --headerheight: 6.5rem;
}

@media screen and (max-width: 400px) {
  :root {
      --navwidth: 5rem;  /* use, e.g., var(--navwidth) */
  }
}



html {
  scroll-behavior: smooth;
}

details {
    margin-left: 1.2em;
    margin-bottom: 1.0em;
    max-width: 800px;
}

details[open] {
    margin-bottom: 2em;
    margin-top: 2em;
}

details table {
    border-collapse: collapse;
    width: 100%;
}

details td {
    padding: 0 1em 0 1em;
}

details td.dow {
    width: 15%;
}

.aside {
    color: #aaa;
}

details summary {
    border: 1px solid #c7cdd1;
    padding: 0.5em 1em 0.5em 1em;
    background-color: #f5f5f5;
}

details td {
   border-bottom: 1px solid #c7cdd1;
}
details tr.continued td {
   border-bottom-width: 0;
}
details td:first-child {
   border-left: 1px solid #c7cdd1;
}
details td:last-child {
   border-right: 1px solid #c7cdd1;
}



details summary p {
    display: inline;
    margin-left: 0.5em;
}

details td p {
    margin-top: 0.7em;
    margin-bottom: 0.7em;
    margin-left: 0;
    margin-right: 0;
}

div.onlymake {
    float: right;
    clear: left;
}

@media screen and (max-width: 1160px) {
    div.onlymake {
        display: none;
    }
}


div.onlymake p {
    margin: 0;
    padding: 0;
}

div.onlymake img {
    width: 301px;
}

details tr.continued td p {
    margin-bottom: 0;
}

body {
    font-family: tahoma, verdana, arial, sans-serif;
    font-size: 11pt;
    margin-left: 0.6rem;
}

body.hw {
    margin: 0;
    padding: 0;
/*    overflow: hidden; */  /* needed for homework */
    height: 100%; 
    max-height: 100%; 
    scroll-behavior: smooth;
}

@media screen and (min-width: 400px) {

  header.hw { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--headerheight); 
    overflow: hidden; /* Disables scrollbars on the header frame. To enable scrollbars, change "hidden" to "scroll" */ 
  }

  nav.hw {
      position: absolute; 
      top: var(--headerheight); 
      left: 0; 
      width: var(--navwidth);
      overflow: auto; /* Scrollbars will appear on this frame only when there's enough content to require scrolling. To disable scrollbars, change to "hidden", or use "scroll" to enable permanent scrollbars */

   /*    align-self: start; */
      bottom: auto;
      margin: 1em 1.5em 0 0.5em;
  }

  main.hw {
      position: fixed;
      top: var(--headerheight);
      left: var(--navwidth); 
      right: 0;
      bottom: 0;
      overflow: auto; 
      margin-left: 2rem;
      scroll-behavior: smooth;
  }

}

nav.hw p.header {
    font-size: 120%;
    font-weight: bold;
    margin: 0;
    padding: 2px 0 0 0;
    text-align: center;
}

.center figure {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 80%;
}

figcaption {
    display: none;
}

nav.hw div.contents, nav.hw div.steps {
    background-color: #fff8ff;
    border: 2px solid #dcd;
    bottom: auto;
/*    margin: 1em 1.5em 0 0.5em; */
}

nav.hw div.problems {
    margin-top: 4em;
    background-color: #e8e8ff;
    border: 2px solid #d0d0f0;
    bottom: auto;
/*    margin: 1em 1.5em 0 0.5em; */
}

nav.hw div.problems code {
    background-color: #e8e8ff;
    color: inherit;
}


nav.hw > a {
    transition: all 100ms ease-in-out;
}




header h1 {
    margin-block-start: 0.33em;
}

h1 .shortdue {
    font-size: 60%;
    color: black;
/*    font-weight: normal; */
}

.bold {
    font-weight: bold;
}

.enchilada {
  margin: 10rem auto 0 0;
}


nav.hw ul li {
  padding-left: 0;
}

nav.hw ul li a {
    transition: all 50ms ease-in-out; 
    text-decoration: none;
    color: #878;
}

nav.hw ul li code, nav.hw ul li.active li code {
    color: #878;
}
nav.hw ul li.active code, nav.hw ul li li.active code {
    color: #101;
}

nav.hw ul li a:hover,
nav.hw ul li a:focus {
  color: #101;
}

nav.hw ul li.active > a {
  color: #101;
  font-weight: 500;
}

nav.hw ol li.active > a {
  color: #101;
  font-weight: 500;
}

    


nav.hw ul {
    padding-top: 0.5em;
    margin-block-start: 0;
    padding-inline-start: 1.2em;
    list-style: circle;
}

nav.hw div.steps ul {
    list-style: none;
    padding-inline-start: 0em;
    padding-top: 0.2em;
    padding-left: 0.5em;
    padding-bottom: 0.2em;
}


nav.hw div.steps ul ol {
    padding-inline-start: 0em;
    padding-top: 0.2em;
    padding-right: 0.5em;
    padding-left: 2.5em;
    padding-bottom: 0.2em;
}

.breakwords {
    overflow-wrap: break-word;
}

.nobreaks {
    white-space: nowrap;
}




nav.hw ul ul {
    list-style: square;
    padding-inline-start: 2em;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
}

caption {
    font-size: 120%;
    font-weight: bold;
}

td {
    font-family: tahoma, verdana, arial, sans-serif;
    font-size: 11pt;
}

p {
    margin-left: 1em;
}

li > p { 
    margin-left: 0;
}





h1 {
    color: #35A;
    padding-bottom: 4px;
    border-bottom: 1px solid silver;
}

p.author {
    color: #35A;
    font-weight: bold;
    font-size: 120%;
    margin-left: 0.8em;
}

/*
header h1, header p.date {
    display: inline;
}
*/

main p.date {
    font-weight: bold;
}

.enchilada p.date {
    font-weight: bold;
}


.ninja {
    color : #fff;
}

/* https://stackoverflow.com/questions/1383143/how-to-prevent-line-breaks-in-list-items-using-css */

.nowrap { white-space: nowrap; display: inline-block; }
    /* inline-block is key here */

.book2 { margin-top: 10px; }  /* not working.  NR is ignorant. */

h2 {
    color: #631;
    margin-left: 0.5em;
}

h3 {
    color: #631;
    margin-left: 0.7em;
}

h4 {
    color: #904818;  /* h3 multiplied by 1.5 */
    margin-left: 0.7em;
}

pre {
    margin-left: 3.0em;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
}

code {
    color: #222;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
}

.code {
    font-family: monospace;
    color: #222;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
}





.indented {
    margin-left: 1.5em;
}

.doubleindented {
    margin-left: 3.0em;
}


.sidebar, .leftsidebar {
    background-color: #ffebff;
    border: 1px solid #dcd;
}

.leftsidebar {
    margin-left: 1.0em;
    margin-right: 1.0em;
}

.sidebar {
    margin-left: 5.0em;
    margin-right: 3.0em;
}

.sidebar pre, .leftsidebar pre {
    margin-right: 3.0em;
}

.sidebar p, .leftsidebar p {
    margin-right: 1.0em;
}

.pdfnotice {
    background-color: #ffebff;
    border: 1px solid #dcd;
}

.new code {
    background-color: #f8f8e0;
}

pre code {
    border: none;
}

.new pre {
    background-color: #f8f8e0;
}

.rubric, .asst_rubric {
    margin-left: 2.0em;
}

hr {
  border: 1px solid silver;
}

.homework {
   max-width: 850px;
}

.hangingindent {
   text-indent: -1.0em;
   padding-left: 0.3em;
   padding-right: 0.3em;
}

article, x-homework {  
              /* use <article> or <x-homework> tag directly instead of <div class="homework">;
               see https://github.com/jgm/pandoc/issues/997 
                   http://softwareengineering.stackexchange.com/questions/134223
              */
   max-width: 850px;
}

section.footnotes { max-width: 850px; }

.notes {
   max-width: 700px;
   margin-left: 2.0em;
}

.slide {
   max-width: 700px;
   padding: 15px;
   margin-top: 1em;
   margin-bottom: 1em;
   margin-left: 1em;
   border: 8px solid #ccc;
   color: #00f;
   font-family: tahoma, verdana, arial, sans-serif;
   font-weight: bold;
}

.slide pre {
   font-size: 120%;
   color: black;
}

.slide strong {
   color: red;
}

.slidetitle {
  font-size: 144%;
  text-align: center;
  color: red;
}



.warning {
    margin-top: 5px;
    margin-bottom: 5px;
    border-top: 1px solid #ffccbb;
}

.problem {
    margin-top: 5px;
    margin-bottom: 5px;
    border-top: 3px solid gold;
    pading-top: 5px;
    background-color: #fffff6;
}

.yrule {
/*    border-top: 3px solid gold; */
/*    margin-top: 2em; */
}   

.problem:first-child, .warning:first-child, h2 + .problem, h1 + .problem, h3 + .problem, 
    div.sidebar + .problem, .reading + .problem
{
    margin-top: 5px;
    margin-bottom: 5px;
    border-top: 0;
}

.firstproblem, .firstwarning {
    margin-top: 5px;
    margin-bottom: 5px;
}


.point {
    margin-top: 5px;
    margin-bottom: 5px;
    border-top: 1px solid #fdd;
    color: #833;
}

.reading {
    color: #348;
}

.laws {
    color: #834;
}

.mistake {
    margin-top: 5px;
    margin-bottom: 5px;
    border-top: 1px solid gold;
}

.firstmistake {
    margin-top: 5px;
    margin-bottom: 5px;
}

.navbar {
    font-family: tahoma, verdana, arial, sans-serif;
    font-size: 16pt;
    font-weight: bold;
    background-color: #ffffe0;
    color: #ff0000;
    vertical-align: text-bottom;
}

.navbar td, th {
    padding-right: 5px;
    vertical-align: bottom;
}

.navbar .here {
    text-decoration: none;
}

.here a { 
    color: #888;
    text-decoration: none;
    /* border: 1px solid gray;  KF, 2017f, but NR did not care for it */
}
 /* KF, 2017f
.navbar th {
  display:none;
} 
*/


/* KF, 2017f
navbar a {
   display: inline-block;
   text-decoration: none;
   padding-left:10px;
   padding-right:10px;

}
.navbar a:hover {
   text-decoration: underline;
}
*/
    

.grading_party { background-color : #ffaaaa;
                 font-weight : bold;
                 font-size : 120%;
               }

.staff_meeting { background-color : #ddddff;
               }

.leader { font-size: 110%; font-weight: 600; }

.title .semester {
    font-size: 80%;
}


.new, .nextyear {
    background-color: #ffffe8;
}

.nextyear, .deleted, .latexonly {
    display: none;
}

.earlyphoto {  /* used when photo is due separately */
   /* display: inline; */ /* if photo not early, uncomment */
   display: none
}

.latephoto {  /* used when photo is submitted with impcore */
    display: inline; /* if photo late, comment out */
}

.officehours table {
    border-style: solid;
}
.officehours td {
    background-color: #ffffdd;
    padding-right: 20px;
}


.rubric table, table.asst_rubric {
   margin-top: 1em;
   background-color: #ddffff;
   border-collapse: collapse;
}

.rubric table th, table.asst_rubric th {
    text-align: center !important;
}

.rubric table tr, table.asst_rubric tr {
    border-top: 5px solid #d0f0f0;
}

.rubric td, table.asst_rubric td {
    vertical-align: top;
}
.rubric td:first-child, table.asst_rubric td:first-child {
    vertical-align: middle;
}

/*
.rubric table {
  border-bottom: 0; 1px solid #000;
  border-right: 1px solid #000;
}

.rubric table th, .asst_rubric table td {
  border-top: 1px solid #000;
  border-left: 1px solid #000;
  padding: 6px;
  vertical-align: top;
}

*/

.smallcaps {
  font-variant: small-caps;
}


img.exam {
  display: block;
  margin: 0 auto;
  max-width: 800px;
  width : 90%;
}



.form-display {
    background-color: SeaShell;
    border: 3px solid black;
    margin: auto;
    padding: 6px;
    width: 60%;
}


.alert {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert {
    position: relative;
    padding: 0.25rem 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.125rem;
}

.hangingindent {
  padding-left: 2em;
  text-indent: -2em;
}


.helpertab {
  margin-left: 2em;
}

.display table {
   margin-top: 1em;
   background-color: #ddffff;
   border-collapse: collapse;
   margin-left: 1em;
}


