/* Layout */
body {
  margin: 0;
}

img {
  max-width: 100%;
}

.section {
  margin-top: 3ex;
}

#banner {
  margin: 0 auto 2rem;
  max-width: 70rem;
  width: 100%;
  display: block;
}

#toc {
  margin-bottom: -0.5em;
}

.math.display {
  margin: 0 auto;
  display: block;
}

figure {
  margin: 0;
}

figure img {
  display: block;
  margin: 0 auto;
  padding-top: 2ex;
}

figure figcaption {
  text-align: center;
}

.main {
  margin: 0 auto 3rem;
  padding: 0 0.5rem;
}

#index {
  max-width: 70rem;
}

#contest {
  max-width: 70rem;
}

#assignment {
  max-width: 55rem;
  font-weight: 400;
}

#course-info {
  display: grid;
  grid-template-columns: repeat(2, auto);
  margin: 0 auto;
  grid-row-gap: 1rem;
}

@media (max-width: 700px) {
  #course-info {
    grid-template-columns: none;
  }
}

iframe {
  border: 0;
  width: 100%;
  height: 600px;
  max-width: 800px;
  display: block;
  margin: 0 auto;
}

#supplemental-books > img {
  max-width: 10rem;
  display: inline;
}

.book {
  margin: 1rem 0;
  display: grid;
  justify-items: center;
  grid-template-columns: auto 1fr;
  grid-gap: 1rem;
}
.book h3 {
  font-style: italic;
  margin: 0;
}
.book .authors {
  margin-top: 0.3em;
  font-size: 15px;
}
.book img {
  width: 15em;
}

pre, code, div.sourceCode {
  background-color: #f6f8fa;
  border-radius: 3px;
}

code:not(.sourceCode) {
  padding: 0.3em;
}

pre {
  padding: 1em;
}

@media (max-width: 520px) {
  .book {
    grid-template-columns: none;
  }
}

/* Type */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-weight: 300;
  line-height: 1.5;
  color: #212529;
}

strong {
  font-weight: 800;
}

a {
  color: #3285ff;
  text-decoration: none;
}

a:hover {
  color: #0067ff;
  text-decoration: underline;
}

.title {
  font-size: 40px;
}

.title .subtitle {
  font-weight: 300;
}

h1 {
  font-size: 26px;
}

#assignment h2 {
  font-size:  22px;
  font-weight: 400;
}

h3 {
  font-weight: 800;
}

/* Calendar */
table.sched {
  width: 100%;
  border-collapse: collapse;
}

table.sched td, table.sched th {
  padding: 0.4em 1em;
  vertical-align: middle;
  text-align: left;
  border-style: none;
  border-width: 0;
}

@media (max-width: 470px) {
  table.sched td, table.sched th {
    padding: 0.4em 0.5em;
  }
}

table.sched td.day {
  text-align: right;
  padding-right: 0;
}

table.sched td.month {
  padding-left: 0.25em;
}

table.sched td.projdue { 
  width: 12em;
}

table.sched tr.even {
  background: #fff;
}

table.sched tr.odd  {
  background: #f5f5f7;
}

table.sched tr.exam {
  background-color: #a7aabc;
}

table.sched tr.dis {
  color: #888;
}

table.sched tr.dis td.projdue {
  color: black;
}

table.sched tr.dis td.ref {
  color: #fff;
}

table.sched tr.dis td.ref a.dis {
  color: #fff;
}

#contest img {
  display: block;
  margin: auto;
  width: 75%;
}

#contest h2 {
  margin-top: 5ex;
  margin-bottom: 3ex;
  text-align: center;
}

#contest h2 span.subtitle {
  font-size: 14px;
  font-weight: normal;
}

#contest p.caption {
  text-align: center;
  margin-bottom: 5ex;
}
