body {
  max-width: 800px;
  margin: auto;
  padding: 1em;
  line-height: 1.5;
}

body.draft {
  background: #fee;
}

/* header and footer areas */
.menu { padding: 0; }
.menu li { display: inline-block; }
.article-meta, .menu a {
  text-decoration: none;
  background: #eee;
  padding: 5px;
  border-radius: 5px;
}
.menu, .article-meta, footer { text-align: center; }
.title { font-size: 1.1em; }
footer a { text-decoration: none; }
hr {
  border-style: dashed;
  color: #ddd;
}

.draft .article-meta {
  background: rgb(218, 37, 37);
}

.draft nav::after {
  content: "Note: not yet updated for the current year. Some information may be out of date.";
}

/* https://www.w3schools.com/howto/howto_css_breadcrumbs.asp */
.breadcrumbs { list-style: none; }

.article-meta .breadcrumbs {
  text-align: left;
  padding: 0;
  margin-top: -5px;
}

.breadcrumbs li {
  display: inline;
}

.breadcrumbs li+li:before {
  padding: 5px;
  color: black;
  content: "/\00a0";
}

.section-nav { list-style: square; column-count: 3;}
/*.section-nav li { display: inline-block; }*/

#TableOfContents, #TOC {
  border: 1px solid #eee;
  border-radius: 5px;
}

/* code */
pre, .boxed {
  border: 1px solid #ddd;
  box-shadow: 5px 5px 5px #eee;
  padding: 1em;
  overflow-x: auto;
}
pre { background: #f8f8f8; }
code { background: #f9f9f9; }
pre code { background: none; }

/* misc elements */
img, iframe, video { max-width: 100%; }
main { hyphens: auto; }
blockquote {
  background: #f9f9f9;
  border-left: 5px solid #ccc;
  padding: 3px 1em 3px;
}

table {
  margin: auto;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
}
table thead th { border-bottom: 1px solid #ddd; }
th, td { padding: 5px; }
thead, tfoot, tr:nth-child(even) { background: #eee; }

/** Exercises */

.exercise {
	background: #D6E0CC;
	border: 1px solid #777777;
  margin-left: 2%;
  margin-right: 2%;
  padding: 5px;
}

.exercise pre { box-shadow: none; }
.exercise code {
  background: #cad0c3;
}

/* override the above for highlight blocks, since unfortunately it gets too high specificity */
.exercise .highlight code {
  background: none;
}

/* details fixes, https://css-tricks.com/two-issues-styling-the-details-element-and-how-to-solve-them/ */
details summary {
  cursor: pointer;
}

details summary > * {
  display: inline;
}

/* details styling */
details {
  border: 1px solid #ccc;
  border-radius: 4px;
  margin: 0.25rem 0;
}

details > summary {
  background-color: #D6E0CC;
  padding: .5rem 1rem;
  overflow: auto; /* contain the floating description even if window is narrow */
}

details > div {
  margin: 0.5rem 1rem;
}

/* discoverability */
details > summary::after {
  content: "(Click to open)";
  float: right;
  font-size: 75%;
}

details[open] > summary::after {
  content: "(Click to close)";
}
