/* 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-collapse: collapse;
border-top: 2px solid #111111;
border-bottom: 2px solid #111111;
caption {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 1.1rem 0;
}

} th {

border-bottom: 1px solid #111111;

} td, th {

font-size: 1.4rem;
font-variant: tabular-nums;
padding: 10px;
text-align: left;
& > p {
  margin-top: 0;
}

}

/* 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) */

/* Unset the tufte-css defaults that we'd like to overwrite */ pre > code {

margin-left: initial;
overflow-x: initial;
display: initial;

}

.sourceCode.numberLines a:link {

text-decoration: initial;
background: initial;
text-shadow: initial;

}

div.sourceCode, pre:not(.sourceCode) {

padding: 1.4rem;
margin: -0.7rem -1.4rem;
width: 55%;
overflow-x: auto;

}

.fullwidth div.sourceCode, .fullwidth pre:not(.sourceCode) {

width: 100%;

}

// Line blocks (e.g. for poetry) .line-block {

font-size: 1.4rem;
line-height: 2rem;

}

@media (max-width: 760px) {

div.sourceCode,
pre:not(.sourceCode) {
  padding: 1.4rem 8vw;
  margin: -0.7rem -8vw;
  width: 100%;
}

.fullwidth {
  max-width: 100%;
}

}

/* Math formatting */ .katex {

font-size: inherit !important;

}

/* Wrap long URLs in references */ refs a {

word-wrap: break-word;
overflow-wrap: break-word;

}