/*

Set some sensibe defaults for slides-related stuff that most every theme would
otherwise have to set individually.

*/

* {
    box-sizing: border-box;
}

body {
    text-align: left;  /* not: justify */
    max-width: 100%;
}

.md h1, .md h2, .md h3 {
    color: inherit;
}

/* hide section numbering and the associated margins */
.md h1:before,
.md h2:before,
.md h3:before {
    content: '' !important;
    margin: 0 !important;
}

.md center,
.md blockquote.fancyquote {
    margin: 1rem 0;
}

/* enable margin collapse: imagine a paragraph and a headline (both margin: 1rem
0), with the headline's a.target between them. jumping to the target should
still work just fine */
.md a.target {
    position: absolute;
}


/* tables */
.md table {
    font-size: inherit;  /* not sure why it doesn't automatically inherit the body's font size */
}
.md table.calendar {
    font-size: 0.6rem;
    font-family: inherit;
}

/* diagrams */
.md svg.diagram {
    font-size: 13.5px;  /* the relative font size introduced in markdeep 1.09 will otherwise clash with diagram scaling as implemented here, yielding grotesquely large font sizes */
    stroke-width: 1.5px;  /* make lines a bit thinner (must be defined in px – diagrams are scaled differently than the rest) */
}


/* quotes */
.md blockquote.fancyquote {
    padding: 0;
}
.md blockquote.fancyquote .author {
    margin-top: 0.25rem;
}


/* code */
.md pre {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.md pre.listing {
    resize: none;  /* remove resizability indicator from listings */
}
.md pre.listing .linenumbers {
    padding-left: 0.3rem;
}
.md pre.listing .linenumbers span.line:before {
    width: 1rem;
    margin-left: -0.5rem;
    margin-right: 1rem;
    padding: 0;
}
@media print {
    .md .listing code {
        white-space: pre;
    }
}
.hljs-comment {
    font-style: italic;
}


/* lists (with pluses, minuses or dots as item signifiers) */
.md ol {
    padding-left: 1.3rem;  /* this is otherwise defined in terms of px by the browser.*/
}
.md ul {
    list-style: none;
    padding: 0;
}
.md ul > li.plus:before {
    content: "+";
    padding-right: 0.7em;
}
.md ul > li.minus:before {
    content: "–";
    padding-right: 0.7em;
}
.md ul > li.asterisk:before {
    content: "●";
    font-size: 0.9em;
    padding-right: 0.7em;
}
.md ul > li {
    padding-left: 1.2em;
    text-indent: -1.2em;
}


/* media */
.md .imagecaption,
.md .tablecaption,
.md .listingcaption {
    margin: -0.5rem 0 0;  /* accounts for the 1rem margin on <center>, which captions are wrapped in */
}
.md img,
.md svg.diagram {
    max-width: 100%;
    max-height: calc(var(--slide-height) - 2rem);
}
.md video {
    width: 21.33rem;
}
.md iframe[src^="https://www.youtube"],
.md iframe[src^="https://player.vimeo"] {
    width: 21.33rem;
    height: 12rem;  /* 16:9 aspect ratio */
}
