html { font-family: "EB Garamond", serif; font-size: 22px; line-height: 1.3em; }

h1     { margin-bottom: 0.75rem; }
h2, h3 { margin-bottom: 0.5rem; }
section { margin-top: 1rem; }
p, table, ol, ul, figure, aside, dl, hr { margin-bottom: 0.5rem; }

sup, sub { line-height: 0; }
svg.icon { width: 1rem; height: 1rem; vertical-align: middle; }

h1, h2, h3 {
    font-family: "Open Sans", sans-serif;
    font-weight: 300;
    color: #ba3925;
    text-rendering: optimizeLegibility;
    line-height: 1em;
}
h1, h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem;}

section:target > :is(h1, h2, h3)         { position: relative; }
section:target > :is(h1, h2, h3)::before { position: absolute; left: -1.2ch; content: "§"; }
:is(h1, h2, h3) > a { color: inherit; text-decoration:none }
:is(h1, h2, h3) > a:hover { color: inherit; text-decoration:none }


/* Block */

img, video { display: inline-block; vertical-align: middle; max-width: 100%; height: auto; }
figure > img, figure > video { display: block; margin-left: auto; margin-right: auto; }

p { hyphens: auto; -webkit-hyphens: auto; text-align: justify; }
figure.blockquote { padding-left: 1em; border-left: 3px solid #ba3925; }
figure.blockquote > figcaption { text-align: right; }

table { border-collapse: collapse; background: #fff;  }
table, td, th { border: 1px solid #dedede; }
td, th { padding: 0.5625em 0.625em }

ol, ul, dd { margin-left: 3ch; }
ul { list-style-type: circle;}
.roman { list-style-type: lower-roman; }

dt { font-weight: bold; }

aside.admn { display: flex; flex-direction: row; align-items: center; }
aside.admn > svg.icon { flex-shrink: 0; width: 2rem; height: 2rem; fill: #19407c; }
aside.admn.warn > svg.icon { fill: #ba3925; }
aside.admn > div { padding-left: 1ch; margin-left: 1ch; border-left: 1px solid #dddddf }

aside.block {
    border-style: solid; border-width: 1px; border-radius: 4px; border-color: #dbdbd6;
    padding: 1em;
    background: #f3f3f2;
}
aside.block > .title {
    font-family: "Open Sans", sans-serif; font-size: 1.5rem; color: #7a2518;
    text-align: center;
    margin-top: 0; margin-bottom: 0.5rem;
}
aside.block > :last-child { margin-bottom: 0; }

details { padding-left: 1em; border-left: 3px solid #19407c; }

pre { line-height: 1rem;}
code {
    font-family: "JetBrains Mono", monospace; font-variant-ligatures: none; font-size: 0.75em;
    color: rgba(0, 0, 0, .9);
}
figcaption.title {
    font-style: italic; font-weight: 400;
    line-height: 1.45;
    color: #7a2518;
    margin-top: 0; margin-bottom: 0.25em;
}
figure.code-block > pre > code {
    display: flex; flex-direction: column;
    overflow-x: auto; overflow-y: clip;
    counter-reset: line;
}
figure.code-block > pre > code > .line { counter-increment: line; }
figure.code-block > pre > code > .line:before {
    content: counter(line);
    display: inline-block;
    width: 3ch; padding-right: 0.5ch; margin-right: 1ch;
    text-align: right;
    opacity: .35;
    border-right: 1px solid black;
}
ol.callout { list-style: none; counter-reset: callout; }
ol.callout > li { position: relative; }
ol.callout > li::before {
    counter-increment: callout; content: counter(callout);
    position: absolute; top: 0.2rem; left: -1.1rem;
}
i.callout::after {
    content: attr(data-value);
}
ol.callout > li::before, i.callout::after {
    font-family: "JetBrains Mono"; font-style: normal; font-size: 0.75rem; font-weight: bold;
    display: inline-block; width: 0.9rem; height: 0.9rem; line-height: 0.9rem;
    border-radius: 100%;
    background-color: black;
    color: white;
    text-align: center;
}

.two-col { display: flex; flex-direction: row; }
.two-col > *:first-child { flex: 30%; }
.two-col > *:last-child { flex: 30%; }

hr { border: solid #dddddf; border-width: 1px 0 0; height: 0; }

/* Inline */

p>code { white-space: nowrap; } /* Sadly, overflow-wrap: anywhere doesn't compose with this */
.display { display: block; margin: 1em 0; text-align: center }

a { text-decoration-color: #2156a5; color: black; }
a:hover, a:focus { color: #2156a5; fill: #2156a5; }
a.url { word-break: break-all; }

kbd > kbd {
    display: inline-block;
    font-family: "JetBrains Mono", monospace; font-variant-ligatures: none; font-size: .65em;
    line-height: 1.45;
    color: rgba(0, 0, 0, .8); background: #f7f7f7; border: 1px solid #ccc; border-radius: 3px; box-shadow: 0 1px 0 rgb(0 0 0 / 20%), 0 0 0 0.1em #fff inset;
    margin: 0 0.15em; padding: 0.2em 0.5em; top: -0.1em;
    vertical-align: middle; position: relative; white-space: nowrap;
}

dfn, .small-caps { font-style: normal; font-variant: small-caps; }

.meta { display: block; display: block; color: #828282; font-family: "Open Sans", sans-serif; font-size: 1rem;}

.menu { font-weight: bold; }

/* Special Cases */

.post-list      { margin-left: 0; list-style: none; }
.post-list > li { margin-top: 1em; }
.post-list h2   { margin-top: 0; }
.post-list a       { color: #ba3925; text-decoration: none; display: block; }
.post-list a:hover { color: #ba3925; text-decoration: underline; }

.about-ava { float: left; margin-right: 2ch; display: inline;}

/* Highlighting */

.hl-keyword, .hl-literal { color: #000000; font-weight: bold; }
.hl-type    { color: #0086B3; }
.hl-tag     { color: #000080; }
.hl-title.function_ { color: #990000; font-weight: bold; }
.hl-title.class_{ color: #445588; font-weight: bold; }
.hl-comment { color: #008000; font-style: italic; }
.hl-built_in, .hl-meta { color: #3c5d5d; font-weight: bold; }
.hl-number { color: #009999; }
.hl-string { color: #d14; }
.hl-output { color: #2156a5; }
.hl-subst { color: rgba(0, 0, 0, .9); }
.hl-attr, .hl-symbol { color: #008080; }
.hl-line { background-color: #ffc; }
