/* Blog post styles. Layered on top of Bootstrap 3.3.6 to match the homepage. */

.post {
    font-size: 16px;
    line-height: 1.65;
    overflow-wrap: break-word;
}

.post-title {
    font-size: 32px;
    line-height: 1.25;
    margin: 48px 0 6px;
}

.post-meta {
    color: #777;
    font-size: 14px;
    margin-bottom: 28px;
}

.post h2 {
    font-size: 24px;
    margin-top: 36px;
}

.post h3 {
    font-size: 20px;
    margin-top: 28px;
}

.post p,
.post ul,
.post ol {
    margin-bottom: 16px;
}

.post blockquote {
    font-size: inherit;
    color: #555;
}

/* Math */

.katex {
    font-size: 1.05em !important;
}

/* Pandoc emits display math as a span; make it a block that scrolls on its own
   instead of widening the page on mobile. */
.math.display,
.katex-display {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.katex-display {
    margin: 0.8em 0;
    padding: 0.25em 0;
}

/* Avoid subpixel seams between KaTeX's stitched stretchy brace pieces. */
.katex .brace-left {
    width: 25.4%;
}

.katex .brace-center {
    left: 24.8%;
    width: 50.4%;
}

.katex .brace-right {
    width: 25.4%;
}

/* Collapsible hints */

summary::-webkit-details-marker {
    display: none;
}

summary {
    list-style: none;
}

details.collapsible {
    margin: 16px 0;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

details.collapsible > summary {
    cursor: pointer;
    outline: none;
}

details.collapsible > summary::before {
    content: "\25B8\00a0";
    color: #777;
}

details.collapsible[open] > summary::before {
    content: "\25BE\00a0";
}

details.collapsible[open] > summary {
    margin-bottom: 8px;
}

/* Tables */

.post table {
    width: 100%;
    margin: 20px 0;
    font-size: 15px;
    display: block;
    overflow-x: auto;
}

.post table th,
.post table td {
    text-align: left;
    padding: 8px;
    border: 1px solid #ddd;
}

.post table th {
    background-color: #f5f5f5;
}

.post table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Code */

.post pre {
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    word-wrap: normal;
    word-break: normal;
}

/* Bootstrap wraps code blocks mid-word; scroll them instead. */
.post pre code {
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
}

/* Media */

.post img,
.post video,
.post iframe {
    max-width: 100%;
    height: auto;
}

.post figure {
    margin: 24px 0;
    text-align: center;
}

.post figcaption {
    color: #777;
    font-size: 14px;
    margin-top: 6px;
}

/* Footnotes */

.post section.footnotes {
    font-size: 14px;
    color: #555;
}

.post .footnote-ref,
.post .footnote-back {
    text-decoration: none;
}

.copyright {
    color: #b5bec9;
    font-size: 0.8em;
    text-align: center;
    margin: 48px 0 24px;
}
