/* Theme Switcher */
/* Credits: https://endtimes.dev/no-javascript-dark-mode-toggle/ */

:root {
    --html-font-size: 18px;
    --base-font-size: 1rem;
    --line-height: 1.4rem;
    --scale-factor: 1.3333;
    --leading: 1.6rem;
    --quarter-leading: 0.4rem;
    --half-leading: 0.4rem;
    --letter-spacing: 0.05em;
    --font-family-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-family-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --link-color: lightcoral;
    --link-hover-color: tomato;
    --heading-text-color: ghostwhite;
    --primary-text-color: ivory;
    --secondary-text-color: floralwhite;
    --primary-background: #1e1e1e;
    --secondary-background: #262626;
}

html {
    font-size: 18px;
    line-height: 1.4rem;
}

body {

    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-weight: 300;
    margin: auto;
    height: 100vh;
    letter-spacing: 0.05em;
    font-size: 1rem;
    line-height: 1.4rem;
}

.grimoire,
.navlinks
{
    font-style: normal;
}

.page h2 {
    text-align: center;
}

.navlinks {
    margin-top: 2rem;
}

h1,
.h1 {
    font-size: 1.8rem;
    margin-top: 1.6rem;
    margin-bottom: 0;
}

h2,
.h2 {
    font-size: 1.6rem;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
}

h3,
.h3 {
    font-size: 1.4rem;
    margin-top: 1.6rem;
    margin-bottom: 0.4rem;
}

h4,
.h4 {
    font-size: 1.2rem; 
    margin-top: 1.6rem;
    margin-bottom: 0.4rem;
}

h5,
.h5 {
    font-size: 1.1rem;
    margin-top: 1.6rem;
    margin-bottom: 0.4rem;
}

p,
ul,
ol,
pre,
table,
blockquote {
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
}

ul ul,
ol ol,
ul ol,
ol ul {
    margin-top: 0;
    margin-bottom: 0;
}

b,
i,
strong,
em,
small,
code {
    line-height: 1rem;
}

pre,
code {
    font-family: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
}

.break-code {
    word-break: break-all;
    overflow-wrap: break-word;
}

small,
sub,
sup,
.panel-header,
hr,
footer {
    font-size: 0.8rem;
}

sub,
sup {
    line-height: 0;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

.primary-subtitle {
    margin-top: 0.4rem;
    line-height: 1.4rem;
}

.secondary-subtitle {
    margin-top: 0;
}

.leading {
    margin-top: 1.6rem;
    margin-bottom: 0;
}

b,
strong {
    font-weight: bold;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.panel-title {
    font-weight: normal;
}

i,
em,
.primary-subtitle,
blockquote {
    font-style: italic;
}

.body-text h1,
.body-text h2,
.body-text h3,
.body-text h4,
.body-text h5,
.body-text h6 {
    margin-bottom: 0.6rem;
}

a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    display: inline;
}

a[href^=http] {
    text-decoration-style: dotted;
}

.content {
    padding: 0 0.4rem;
    padding-bottom: 0.4rem;
}

.container-fluid {
    padding: 0 0;
}

.date {
    text-align: right;
    display: block;
}

.sidebar header {
    text-align: center;
}

.main-header {
    right: 0;
    left: 0;
    padding: 0.5rem 0;
    background-color: #1e1e1e;
    margin-top: -40px;
}

.celebration-badge {
    z-index: 1000;
    position: fixed;
    line-height: 26px;
    top: 8px;
    left: 8px;
    font-size: 0.8rem;
}

.footer,
.header,
.main-content,
.sidebar {
    max-width: 1024px;
    margin: auto;
}

footer {
    padding: 1rem;
}

.main-header h1 {
    margin: 16px 0 0 0;
    height: 40px;
    text-align: center;
}

.main-header .navlinks {
    text-align: left;
    font-size: 14px;
    margin: 0;
    text-align: center;
}

.logo {
    width: 130px;
    height: 33.725px;
    border: none;
}

.logo-mini {
    width: 69.375px;
    height: 18px;
    vertical-align: middle;
    border: none;
}

.card-title {
    margin-bottom: 0.2rem;
}

table.badge-container, table.card-badges {
    margin: 0;
    line-height: 0.8rem;
}

.card-footer {
    margin: auto;
}

.badge a, .badge a:visited {
    color: darkred;
}

.badge a:hover {
    color: firebrick;
}

.badge-container {
    border-collapse: collapse;
}

.badge {
    font-size: 10px;
    border: 1px solid snow;
}

.badge-content {
    width: 45px;
    text-align: center;
    border: 1px solid snow;
}

.badge-label {
    color: black;
    background: silver;
}

.badge-bedrock {
    color: snow;
    background: royalblue;
    width: 75px;
}

.badge-operational {
    color: black;
    background: goldenrod;
    width: 75px;
}

.badge-prototype {
    color: snow;
    background: chocolate;
    width: 75px;
}

.badge-consolidated {
    color: snow;
    background: seagreen;
    width: 75px;
}

.badge-license {
    color: snow;
    background: lightslategray;
    width: 75px;
}

.panel,
blockquote {
    margin: 4px;
    background: #262626;
    padding: 8px;
    border: 1px solid #262626;
}


blockquote p:first-child,
blockquote p:last-child {
    margin: 0;
}

.panel-header {
    text-align: right;
}

.panel-body {
    margin-top: 1.6rem;
}

.panel-body header {
    text-align: left;
}

footer {
    text-align: center;
}

ul.inline {
    padding-left: 0;
}

ul.inline li {
    display: inline;
}

footer p,
footer ul.inline,
.secondary-subtitle {
    margin-bottom: 0;
    margin-top: 0.5rem;
}

.license-icons {
  margin-top: 1rem;
}

footer .h3rald {
    font-size: 0.85rem;
    /* Compensate */
    vertical-align: text-bottom;
}

.clearfix {
    clear: both;
}

img {
    max-width: 100%;
}

@media screen and (max-width: 500px) {
    p[style*="float"]:has(img) {
        float: none !important;
        margin: 1rem auto;
        text-align: center;
    }
}

p[style*="float"]:has(img) {
    margin: 1rem;
}


/*****
 * THEME
 *****/

body {
    background: #1e1e1e;
    color: ivory;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5 {
    color: ghostwhite;
}

.primary-subtitle {
    color: floralwhite;
}

a,
a:visited {
    color: lightcoral;
    word-break: break-word;
}

a:hover {
    color: tomato;
}

.content {
    background: #1e1e1e;
    color: ivory;
}

.main {
    padding-top: 35px;
    margin: 0 8px;
}

.main,
.sidebar,
.sidebar .content {
    background: #1e1e1e;
    color: ivory;
}

.sidebar a,
.sidebar a:visited {
    color: lightcoral;
}

.sidebar a:hover {
    color: tomato;
}

a.logo,
a.logo:visited,
a.logo:hover {
    color: ghostwhite;
}

.sidebar hr,
.main hr,
.panel-header {
    color: floralwhite;
}

code,
pre {
    font-size: 0.9rem;
}

img {
    border: 1px solid #262626;
}

pre {
    white-space: pre-wrap;
    padding: 0.5rem;
}

a.icon-link,
a[href^=http].icon-link {
    text-decoration: none;
}

a[href^=http].icon-link::after {
    display: none;
}

.icon-link img {
    width: 20px;
    height: 20px;
    border: none;
    margin: 12px;
}

.icon {
    width: 16px;
    height: 16px;
    border: none;
    vertical-align: text-top;
}

.heading-anchor {
    position: relative;
    top: -70px;
    display: block;
    visibility: hidden;
}

.go2top {
    font-size: 80%;
    vertical-align: super;
}

#toc {
    padding: 1rem;
}

#toc li {
    margin-left: 1rem;
}

/* Figures */

.figure {
    background: #262626;
    margin: auto 0;
}

.figure img,
.figure .figcaption {
    vertical-align: bottom;
}

.figcaption {
    background-color: #262626;
    border: 1px solid #262626;
    padding: 0 4px;
    padding: 0.5rem;
}


/* Days */

.days h3 {
    margin-bottom: 0;
    background: #262626;
    padding: 0 0.5rem;
    border: 1px solid #262626;
}

.days .figure {
    margin: 0;
}

.days .date {
    text-align: inherit;
    display: inherit;
    font-size: inherit;
    margin: 0.5rem 0;
}

.days .figcaption {
    margin: 0;
    font-size: 0.9rem;
    background: #262626;
}

.days img {
    border: none;
}

/* Used only in Glyph Book */

.line-numbers {
    display: none;
}