
/* For smart quotes */
q { quotes: "“" "”" "‘" "’"; }

/* Override section behavior.
 * We only want the top-level <section> to have padding.
 * This makes it easier to work with --section-divs. */
section {
  padding-top: initial;
  padding-bottom: initial;
}
article > section {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Make byline (date and/or author) small */
p.byline { font-size: 1.2rem; }


/* Simulate Pandoc's table output styles */
table {
  border-top: 2px solid black;
  border-bottom: 2px solid black;
}
th {
  border-bottom: 1px solid black;
}
td, th {
  font-size: 1.4rem;
  padding: 10px;
  text-align: left;
}

/* Allow tables to be full width
 * if they're wrapped in a figure.fullwidth
 * (Easier to insert from Pandoc than manually adding table) */
figure.fullwidth table {
  width: 90%;
}

@media (max-width: 760px) {
  figure.fullwidth table {
    width: 100%;
  }
}

/* Code blocks
 *
 * Code blocks with a language look like div.sourceCode > pre.sourceCode
 * Otherwise, it's just a pre (without .sourceCode) */
div.sourceCode,
pre:not(.sourceCode) {
  padding: 1.4rem;
  margin: -0.7rem -1.4rem;
  width: 55%;
  font-size: 0.9rem;
  overflow-x: auto;
}

/* But if there are line numbers, the inner pre *doesn't* get a .sourceCode
 * class, so we want to reset it to the full width of the table container. */
td.sourceCode pre {
  width: initial;
}
/* We don't want the line numbers to overflow; rather, we want the table to
 * reflow to have enough room to show everthing without scrolling. */
td.lineNumbers pre {
  overflow-x: initial;
}

div.sourceCode code,
pre:not(.sourceCode) code {
  font-size: 0.9rem;
}

.fullwidth div.sourceCode,
.fullwidth pre:not(.sourceCode) {
  width: 100%;
}

/* We've handled all the margin/padding on the outer-most div.sourceCode */
div.sourceCode pre {
  padding: 0;
  margin: 0;
}

@media (max-width: 760px) {
  div.sourceCode,
  pre:not(.sourceCode) {
    width: 100%;
  }
}

/* Pandoc-generated line numbers need the same stylings as normal <code> */
.lineNumbers pre {
  line-height: 1.42;
  font-size: 0.9rem;
}
