:root {
	/***** gruvbox palette (w/ harder constrast) *****/
	/* github.com/morhetz/gruvbox */
  /* --black: #1d2021; */
  --black: #161616;
  --lessblack: #282828;
  /**/
  --red: #cc241d;
  --green: #98971a;
  --yellow: #d79921;
  --blue: #3a587a;
  --magenta: #d3869b;
  --cyan: #689d6a;
  --lesswhite: #a89984;
  --white: #ebdbb2;
  --whiter: #fae8be;
  --sepia: #e6ae75;
}

[data-theme="light"] {
	--color-bg: var(--white);
	--color-fg: var(--black);
	--code-color-bg: var(--whiter);
	--code-color-fg: var(--lessblack);
	--link: var(--blue);
	--linkhover: var(--red);
}

[data-theme="dark"] {
	--color-bg: var(--black);
	--color-fg: var(--white);
	--code-color-bg: var(--lessblack);
	--code-color-fg: var(--white);
	--link: var(--sepia);
	--linkhover: var(--red);
}

@font-face {
	font-family: "mysans";
	src: url('../fonts/ibm-plex/IBMPlexSans-Regular.ttf') format('truetype');
	font-style: normal;
	font-weight: normal;
}

@font-face {
	font-family: "mysans";
	src: url('../fonts/ibm-plex/IBMPlexSans-Italic.ttf') format('truetype');
	font-style: italic;
	font-weight: normal;
}

@font-face {
	font-family: "mysans";
	src: url('../fonts/ibm-plex/IBMPlexSans-Medium.ttf') format('truetype');
	font-style: normal;
	font-weight: bold;
}

@font-face {
	font-family: "mysans";
	src: url('../fonts/ibm-plex/IBMPlexSans-MediumItalic.ttf') format('truetype');
	font-style: italic;
	font-weight: bold;
}

@font-face {
	font-family: "myserif";
	src: url('../fonts/ibm-plex/IBMPlexSerif-Regular.ttf') format('truetype');
	font-style: normal;
	font-weight: normal;
}

@font-face {
	font-family: "myserif";
	src: url('../fonts/ibm-plex/IBMPlexSerif-Italic.ttf') format('truetype');
	font-style: italic;
	font-weight: normal;
}

@font-face {
	font-family: "myserif";
	src: url('../fonts/ibm-plex/IBMPlexSerif-Medium.ttf') format('truetype');
	font-style: normal;
	font-weight: bold;
}

@font-face {
	font-family: "myserif";
	src: url('../fonts/ibm-plex/IBMPlexSerif-MediumItalic.ttf') format('truetype');
	font-style: italic;
	font-weight: bold;
}

@font-face {
	font-family: "mymono";
	src: url('../fonts/ibm-plex/IBMPlexMono-Regular.ttf') format('truetype');
	font-style: monospace;
	font-weight: normal;
}

@media screen{
	pre {white-space: pre-wrap;}
}

@media only screen and (max-width: 767px) {
	/* CSS code for mobile devices */
	body {
		width:90%;
		max-width: 450px;
	}
	pre {white-space: pre-wrap;}
	.mobile-hide {
		display: none;
	}
}

@media only screen and (min-width: 768px) {
	/* CSS code for non-mobile devices */
	body {
		width:60%;
		max-width: 650px;
	}
	pre {white-space: pre-wrap;}
	.desktop-hide {
		display: none;
	}
}

/* ********************
 * Global settings
 ********************* */

html * {
	line-height: 1.55;
}

/* ********************
 * Classes on the index
 ********************* */

.index-name {
	font-size: 120%;
	font-family: 'mysans', sans-serif;
	font-weight: bold;
}

.index-title {
	font-size: medium;
	font-family: 'myserif', serif;
}

.bigdate {
	font-family: 'mymono', monospace;
	font-size: smaller;
	text-align: right;
}

.date {
	font-family: 'mymono', monospace;
	font-size: 70%;
	text-align: right;
}

.backhome {
	font-family: 'myserif', serif;
	font-size: medium;
}

#top {
	/**/
	font-size: xx-large;
	font-family: 'myserif', serif;
	/**/
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	border-bottom: 1px solid;
	margin-bottom: 10px;
}

#currently {
	font-size: medium;
	font-family: 'myserif', serif;
	/*font-style: italic;*/
}

/* ********************
 * General settings
 ********************* */

body {
	color: var(--color-fg);
	background-color: var(--color-bg);
	font-family: 'myserif', serif;
	margin-left: auto;
	margin-right: auto;
}

figure {
	margin-top: 10px;
	margin-bottom: 10px;
	padding-top: 10px;
	padding-bottom: 10px;
	text-align: center;
	margin: auto;
}

img {
	border-radius: 15px;
}

a {
	color: var(--link);
	text-decoration: underline;
}

a:hover {
	color: var(--linkhover);
}

a.nodeco {
	color: inherit;
	text-decoration: none;
}

a.nodeco:hover {
	color: var(--linkhover);
}

#writing a {
	color: var(--link);
	text-decoration: underline;
}

#writing a:hover {
	color: var(--linkhover);
}

.copyright {
	font-family: 'myserif';
	font-size: small;
	text-decoration: none;
}

.copyright span {
	font-family: 'mymono', monospace;
	font-size: small;
	text-decoration: none;
}

div.flexbox-crypto {
	display: flex;
	justify-content:flex-start;
	align-items: center;
}

div.coin {
	margin-right: 10px;
}

div.scroll {
	font-size: x-small;
	overflow-x: auto;
	padding: 5px;
	margin: 2px;
	border-radius: 0.5em;
	color: var(--code-color-fg);
	background-color: var(--code-color-bg);
	flex-basis: 40%;
}

.coin *:not(b) {
	font-size: smaller;
	font-family: 'mymono', monospace;
}

.navigator *:not(b) {
	font-size: smaller;
	font-family: 'mymono', monospace;
}

.navigator-home a {
	font-size: 50%;
	font-family: 'mymono', monospace;
}

.navigator-home button {
	font-size: 50%;
	font-family: 'mymono', monospace;
}

.navigator-home span {
	font-size: 60%;
	font-family: 'mymono', monospace;
}

a.copyright:hover {
	color: var(--linkhover);
}


code {
	font-family: 'mymono', monospace;
}

pre {
	font-family: 'mymono', monospace;
	font-size: small;
	border: 1px dotted;
	display: block;
	padding: 15px;
}

h1.index-heading {
	font-size: x-large;
	font-weight: normal;
	font-family: 'myserif';
	border-bottom: 1px solid;
}

h2.index-heading {
	font-size: large;
	font-weight: normal;
	font-family: 'myserif';
	border-bottom: none;
}

h1 {
	font-size: xx-large;
	font-weight: normal;
	font-family: 'myserif';
	border-bottom: 3px solid;
}
h2 {
	font-size: x-large;
	font-weight: normal;
	font-family: 'myserif';
	border-bottom: 1px solid;
}
h3 {
	font-size: large;
	font-weight: normal;
	font-family: 'myserif';
	border-bottom: 1px dashed;
}

hr {
	border: none;
	/*overflow: visible;*/
	/*text-align: center;*/
	/*height: 1px;*/
	border-top: 1px dashed var(--color-fg);
	background-color: transparent
}

footer {
	margin: auto;
	font-size: medium;
}

.footnotes {
	font-size: small;
}

div.footnotes p {
	font-size: small;
	margin: auto;
}

.flexbox {
	display: flex;
	justify-content:space-between;
	/* align-items: center; */
	align-items: flex-start;
}

aside {
  height: 100%; /* 100% Full-height */
  border-right: solid;
}

.sidetoc {
  /* height: 100%; /1* 100% Full-height *1/ */
  width: 18%; /* 100% Full-height */
  position: fixed; /* Stay in place */
  top: 0; /* Stay at the top */
  left: 0;
  /* overflow-x: hidden; /1* Disable horizontal scroll *1/ */
  padding-top: 10px; /* Place content 60px from the top */
  padding-left: 10px; /* Place content 60px from the top */
  font-size: 90%;
  font-style: italic;
}

.sidetoc ul {
  padding-left: 5px;
  margin-left: 10px;
}

.sidetoc ul li {
  list-style-type: "# ";
}

.sidetoc ul li li {
  list-style-type: square;
}

.sidetoc ul li li li {
  list-style-type: circle;
}

.sidetoc a {
	color: inherit;
	text-decoration: none;
}

.sidetoc a:hover {
	color: var(--linkhover);
}

.sidetoc button {
	color: inherit;
	text-decoration: none;
}

.sidetoc button:hover {
	color: var(--linkhover);
}

table, thead, tbody, th, td {
	width: 50%;
	margin-left: auto;
	margin-right: auto;
	border: 1px dotted;
   border-collapse: collapse;
   padding: 5px;
   border-spacing: 0px;
}

button {
	color: var(--link);
	background: none!important;
	border: none;
	padding: 0!important;
	text-decoration: underline;
	cursor: pointer;
}

button:hover {
	color: var(--linkhover);
}

.highlight-wrapper {
    position: relative;
}

.highlight-link {
    position: absolute;
    bottom: 0;
    right: 0;
}

.list-wrapper {
  counter-reset: mycounter;
}

.bracketed-list {
  list-style: decimal;
}

.bracketed-list li {
  counter-increment: mycounter;
}

.bracketed-list li::marker {
  content: "[" counter(mycounter) "] ";
}

/*div.horizontal-scroll-block {*/
/*	overflow-y: scroll;*/
/*	overflow-x: scroll;*/
/*	white-space: pre;*/
/*	margin-top: -10px;*/
/*	margin-bottom: -10px;*/
/*}*/


/* Course review stuff */

.scp-question {
   margin-top: 10px;
	border-style: double;
	border-width: 1px;
   padding: 6px;
	border-radius: 5px;
}

.scp-answer {
	font-style: italic;
   padding-left: 20px;
   margin-bottom: 10px;
}

.studentreview-amath242 {
	border-style: solid;
	border-width: 2px;
	padding: 25px;
	margin: 5px;
}

.studentreview-math127 {
	border-style: solid;
	border-width: 2px;
	padding: 25px;
	margin: 5px;
}

/* Library stuff */

input {
	display: table;
	margin: auto;
	border-style: solid;
   border-color: var(--color-fg);
   border-radius: 10px;
	padding: 5px;
	color: var(--color-fg);
	background-color: var(--color-bg);
}

#booksearch {
	border-style: solid;
	border-width: 1px;
   border-color: var(--color-fg);
	padding-top: 20px;
	margin-top: 10px;
   border-radius: 10px;
}
