* {
    box-sizing: border-box;
}

*+* {
  margin-top: 1.5em;
}
th+th, td+td {
  padding-left: 1.2em;
}
mjx-container *+* {
  margin-top: 0;
}
mjx-container mjx-mtr {
  /* the mathjax table rows behave strangely regarding their
     margins and padding, so instead set a top border. */
  border-top-width: 0.4em;
  border-top-style: solid;
  border-top-color: transparent;
}

table .org-right { text-align: right; }
table .org-left { text-align: left; }
table .org-center { text-align: center; }

*+span {
  margin-top: 0em;
}

:root {
    --bg-color: #e7e7e7;
    --alt-bg-color: #eee;
    --color: #24292e;
    --quote-color: #373737;
    --line-color: #ccc;
    --a-color: #47720b; /* HSV: 85, 90%, 45% */
    --a-hover-color: #67a510; /* HSV: 85, 90%, 65% */
    --a-visited-color: #720b47; /* HSV: 325, 90%, 45% */
    --a-visited-hover-color: #a51067; /* HSV: 325, 90%, 65% */
    --aside-bg-color: #fbfff5;
    --warn-bg-color: #fffbf0;
}
/*
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1c1c20;
        --alt-bg-color: #222225;
        --color: #d0d0d0;
        --quote-color: #b7b7be;
        --line-color: #444;
        --a-color: #67a510;
        --a-hover-color: #47720b;
        --a-visited-color: #a51067;
        --a-visited-hover-color: #720b47;
        --aside-bg-color: #2b2f25;
        --warn-bg-color: #2f2b20;
    }
}
*/

html {
    font-family: IBM Plex Serif,serif;
    font-size: calc(0.7em + 1vw);
    background: var(--bg-color);
    color: var(--color);
}
@media screen and (min-width:750px) {
    html {
        font-size: calc(0.7em + 7.5px)
    }
}

body {
    max-width: 750px;
    line-height: 1.5;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0 2em;
}

header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
}

header nav .section-links{
    font-size: 1.1em;
}
header nav .home-link {
    font-size: 2em;
    margin-right: 1em;
}
.section-links *+* {
    margin-left: 0.5em;
}

h1 {
    font-family: IBM Plex Sans,sans-serif;
    font-size: 2em;
    font-weight: 700;
    line-height: 120%;
}

h2 {
    font-family: IBM Plex Sans,sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    line-height: 120%;
    border-bottom: 1px solid var(--line-color);
}

h3, .subtitle {
    font-family: IBM Plex Sans,sans-serif;
    font-size: 1.3em;
    font-style: italic;
    font-weight: 600;
    line-height: 120%;
}

li, .verse *+br {
    margin-top: .5em;
}

a {
    color: var(--a-color);
    text-decoration: none;
    font-weight: bolder;
}
a:visited {
    color: var(--a-visited-color);
}
a:hover {
    text-decoration: none;
    color: var(--a-hover-color);
}
a:visited:hover {
    text-decoration: none;
    color: var(--a-visited-hover-color);
}

.tags ul { list-style-type: "\1F3F7\ \ " }

blockquote {
    margin-left: 1em;
    padding: 1px 1em;
    background: var(--alt-bg-color);
    page-break-inside: avoid;
    border-left: 3px solid var(--line-color);
    color: var(--quote-color);
}
code, pre {
    font-family: IBM Plex Mono, monospace, serif;
    font-size: smaller;
}
pre {
    background: var(--alt-bg-color);
    overflow: scroll;
}
code {
    background: var(--alt-bg-color);
    padding-left: 0.3em;
    padding-right: 0.3em;
}

aside { /* sbs custom, often personal opinions in summaries */
    font-family: "IBM Plex Sans", sans-serif;
    padding: 1px 1em;
    background: var(--aside-bg-color);
    border: 2px solid #67A60E;
}
div.warning {
    font-family: "IBM Plex Sans", sans-serif;
    padding: 1px 1em;
    background: var(--warn-bg-color);
    border: 2px solid #A6670E;
}

hr {
    border: 0;
    height: 0;
    border-top: 1px solid var(--line-color);
}

footer {
    margin-top: 3em;
    padding-top: 2em;
}

#text-footnotes {
    font-size: smaller;
}
.footnum {
    margin-right: 0.4em;
}
div.footpara, p.footpara:first-of-type {
    display: inline;
}

#table-of-contents {
    background-color: var(--alt-bg-color);
    padding: 1em;
}
#text-table-of-contents li {
    list-style-type: none;
}
#text-table-of-contents *+* {
    margin-top: 0.5em;
}

/* ripped from org defaults: */
.title  { text-align: center;
          margin-bottom: .2em; }
.subtitle { text-align: center;
            font-size: medium;
            font-weight: 600;
            margin-top:0; }
.tag, .tag::before { font-family: "IBM Plex Mono", monospace;
                     font-size: small;
                     content: "tags: "; }

/*
https://css-tricks.com/couple-takes-sticky-footer/
*/
html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
}
.content {
  flex: 1 0 auto;
}
#postamble {
  flex-shrink: 0;
  padding-top: 20px;
  padding-bottom: 20px;
}

.fig_wrapper {
    width: 100%;
    background: var(--alt-bg-color);
    color: var(--quote-color);
}
* + .fig_wrapper {
    margin-top: 25px;
}
.fig_wrapper figure {
    display: block;
    margin: 0;
    line-height: 0;
}
.fig_wrapper figure img {
    width: 100%;
    height: auto;
}
.fig_wrapper figcaption {
    line-height: 1.5;
    text-align: center;
    margin: 10px;
}
