:root {
  --bg:         rgb(230, 230, 230);
  --fg:         rgb(25,  25,  25);
  --bg_code:    rgb(64,  64,  64);
  --fg_code:    rgb(225, 225, 225);
  --bg_quote:   rgb(215, 215, 215);
  --fg_qoute:   rgb(25,  25,  25);
  --bg_table:   rgb(215, 215, 215);
  --bg_table_th:rgb(64,  64,  64);
  --hl_table:   rgb(200, 200, 200);
}

html, body {
  color: var(--fg);
  background-color: var(--bg);
  font-family: Verdana, sans-serif;
  height: 100%;
}

a {
  text-decoration: none;
  color: blue;
}

a:hover {
  text-decoration: underline;
}

header {
  margin-bottom: 4rem;
  max-width: 1100px;
  box-sizing: border-box;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem .5rem;
}

header > h1,
header > a > h1 {
  font-size: 2.5rem;
  text-transform: uppercase;
  border-radius: 5px;
  padding: .1rem .4rem;
  transition: .2s;
  margin: 0;
/*  background-color: var(--fg); */
/*  color: var(--bg); */
}

header > nav > ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0 1rem;
}

header > nav > ul > li > a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 700;
}

main {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
  min-height: 100vh;
/*  padding: 1rem; */
}

main > article h1 {
  margin: 1rem 0 0.5rem;
/*  padding: 2rem 0; */
  font-size: 2rem;
/*  border-bottom: 1px solid #cecece; */
}

ul#markdown-toc {
  margin: 3em 0 0 0;
}

ul#markdown-toc:before {
  content: "Table of Contents";
  font-weight: bold;
 /* padding: 2rem 0 1rem; */
  margin: -40px;   /* TODO - magic number */
  font-size: 1.6rem;
/* border-bottom: 1px solid #f1f1f1; */
}

ul#markdown-toc > li:first-child {
  padding-top: 1em;
}

main > article > p {
  margin: 1rem 0;
}

main > article h2 {
 /* padding: 2rem 0 1rem; */
  margin: 2em 0 0 0;
  font-size: 1.6rem;
/*  border-bottom: 1px solid #f1f1f1; */
}

main > article h3 {
  margin: 2em 0 0 0;
}



pre, code {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 4px;
  background-color: var(--bg_code);
  color: var(--fg_code);
}

pre > code {
  font-weight: 500;
  font-size: 1rem;
  word-break: normal;
  padding: 0px;
}

pre {
  white-space: pre;
}

code {
  padding: 1px 4px;
}



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

table th, table td {
  padding: 5px;
  border: 1px solid var(--bg_table_th);
}

table th {
  color: var(--bg);
  background-color: var(--bg_table_th);
}

table td {
}

table tr:nth-child(even){
  background-color: var(--bg_table);
}

table tr:hover {
  background-color: var(--hl_table);
}



.footnotes ol:before {
  content: "References";
  font-weight: bold;
 /* padding: 2rem 0 1rem; */
  margin: -40px;   /* TODO - magic number */
  font-size: 1.6rem;
 /* border-bottom: 1px solid #f1f1f1; */
}

.footnotes ol {
  margin: 3em 0 0 0;
}

.footnotes li {
  position: relative;
  word-break: break-word;  /* Force breaks in the back-reference list. */
  opacity: 0.6;
}

.footnotes li:target {
  opacity: 1;
}

.footnotes li:target::before {
  position: absolute;
  top: -5px;
  right: -8px;
  bottom: -8px;
  left: -45px;
  pointer-events: none;
  content: "";
  border: 2px solid var(--fg);
  border-radius: 5px;
}

/* Keep the back arrow and ID number together across line breaks. */
a.reversefootnote {
  white-space: nowrap;
}



footer {
  padding: 2rem 0;
  background-color: var(--fg);
  color: var(--bg);
  margin-top: 3rem;
  text-align: center;
}



/* article tags */

/*
display: flex;
flex-wrap: wrap;
gap: 1rem;
*/





