html {
    scroll-behavior: smooth;
}

.content .infobar {
    color: var(--icons);
    border-bottom: 1px solid var(--icons);
}

.content .infobar p {
    margin: 1px 0;
}

.content .infobar a,
.content .infobar a:link,
.content .infobar a:visited {
    background-color: transparent;
    color: var(--icons);
    text-decoration: none;
    transition: color 0.5s;
}

.content .infobar a:hover {
    color: var(--icons-hover);
    transition: color 0.15s;
}

.content .infobar i {
    margin-left: 0.5em;
}

.content .infobar p > i:first-child,
.content .infobar p > a:first-child i {
    margin-left: 0;
}

.content main :not(pre) > .hljs {
    background-color: transparent;
    color: var(--fg);
    padding: 0;
}

.content main a:link,
.content main a:link .hljs,
.content main a:visited,
.content main a:visited .hljs {
    color: var(--fg);
    text-decoration: dotted underline;
    transition: background-color 0.5s;
}

.content main details summary {
    cursor: pointer;
    transition: background-color 0.5s;
}

.content main a:hover,
.content main details summary:hover {
    background-color: var(--theme-hover);
    transition: background-color 0.15s;
}

.content .linkbar p {
    display: flex;
    flex-wrap: wrap;
    margin: -8px 0;
}

.content .linkbar:last-child p {
    border-bottom: 1px solid var(--icons);
}

.content .linkbar a,
.content .linkbar a:link,
.content .linkbar a:visited {
    flex: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    padding: 12px;
}

.content h1 {
    margin-bottom: 0.25em;
}

.content h2,
.content h3 {
    margin-top: 1.5em;
}

.content h4,
.content h5 {
    margin-top: 1em;
}

.content p {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;    
    word-wrap: break-word;
}

.content blockquote p {
    text-align: left;
}

.content blockquote i.fa {
    margin-left: 0.5em;
}

.content blockquote i.fa:first-child {
    margin-left: 0;
}

.content a:target,
.content .footnote-definition:target {
    scroll-margin-top: var(--menu-bar-height);
}

.content sup {
    line-height: 0;
}

.content hr {
    border: 1px solid var(--icons);
}

.content ins {
    text-decoration: none;
    background: var(--quote-bg);
}

nav.nav-wrapper,
.sidebar-visible nav.nav-wrapper,
nav.nav-wide-wrapper {
    display: none;
}

.katex {
    white-space: nowrap;
}

figure {
    margin: 0;
    max-width: 100%;
    overflow-x: auto;
    text-align: center;
}

figure .fig-scale {
    max-width: 100%;
}

.tabs {
    display: flex; /* To get rid of whitespace between tab labels */
    flex-wrap: wrap;
    margin: 20px 0;
    background-color: var(--quote-bg);
    border-top: .1em solid var(--quote-border);
}

.tabs > input[type="radio"] {
    display: none;
}

.tabs > label {
    display: inline-block;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.5s;
}

.tabs > label:hover {
    background-color: var(--theme-hover);
    transition: background-color 0.15s;
}

.tabs > input[type="radio"]:checked + label {
    background-color: var(--table-header-bg);
}

.tabs > hr {
    flex-basis: 100%;
    margin: 0;
    border: none;
    border-top: .1em solid var(--quote-border);
}

.tabs > .tab {
    display: none;
    flex-basis: 100%;
    overflow-x: auto;
}

.tabs > input[type="radio"]:checked:nth-of-type(1) ~ div:nth-of-type(1),
.tabs > input[type="radio"]:checked:nth-of-type(2) ~ div:nth-of-type(2),
.tabs > input[type="radio"]:checked:nth-of-type(3) ~ div:nth-of-type(3),
.tabs > input[type="radio"]:checked:nth-of-type(4) ~ div:nth-of-type(4) {
    display: block;
}

.tab pre {
    margin: 0;
}

.tab p {
    margin-left: 20px;
    margin-right: 20px;
}
