/* Spacing */

:root {
  --pico-block-spacing-vertical: 0.5rem;
  --pico-nav-element-spacing-vertical: 0.5rem;
  --pico-nav-element-spacing-horizontal: 0.33rem;
  --pico-font-family-sans-serif: alegreya-sans, system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, Helvetica, Arial, "Helvetica Neue", sans-serif, var(--pico-font-family-emoji);
  --pico-font-family-monospace: mononoki, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace, var(--pico-font-family-emoji);
  --pico-line-height: 1.25;
  --pico-typography-spacing-vertical: 0.7rem;
  letter-spacing: 0.1px;
}

/* Primary Layout */

html, body { height: 100%; }

body {
  display: flex;
  flex-direction: column;
}

body > * { flex-grow: 0; }
body > main {
  min-width: fit-content;
  flex-grow: 1;
}

/* Header & Footer */

header, footer { z-index: 1; }
header { min-width: max-content; }
header nav {
  justify-content: center;
  padding:
    0px var(--pico-nav-element-spacing-horizontal)
    0px var(--pico-nav-element-spacing-horizontal);
}
header svg { width: 1em; height: 1em; }
header li:not(:first-child) { padding-left: 0px; }
header li:not(:first-child)::before {
  content: "|";
  padding-right: inherit;
}

/* Current-Page Nav Button */
:where(a:not([role="button"])):is([aria-current]:not([aria-current="false"])) {
  color: var(--pico-border-color);
}

footer ul {
  padding-left: 0px;
  text-align: center;
  white-space: nowrap;
  --pico-font-size: 83.333%;
  font-size: var(--pico-font-size);
}
footer li { list-style: none; }
footer a { text-decoration: none; }

/* Headings & Misc Elements */

h1, h2, h3, h4, h5, h6 {
  font-family: "Open Sans";
  font-weight: 700;
  font-size: 110%;
  margin-top: 0.3rem;
}

article ul li { list-style: "– "; }

/* less indent, more space after marker */
article ul { padding-left: 1em; }
article li { padding-left: 2px; }

code, kbd {
  padding: 0px 0.25rem 0px 0.25rem;
  color: purple;
}

dt { font-weight: 600; }

/* Fighting ox-pandoc styles. */
.footpara { display: inline; }
table { border: none; }
table > * { border: none; }
.underline { text-decoration: underline; }

/* Fighting Pico styles. */
:where(article, address, blockquote, dl, figure, form, ol, p, pre, table, ul) ~ :is(h1, h2, h3, h4, h5, h6) { margin-top: 0px; }

@media (min-width: 576px) {
  body > header, body > main, body > footer {
    padding: var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal);
  }
}

/* Both. */
table { width: auto; }
table tbody tr:nth-child(odd) th,
table tbody tr:nth-child(odd) td {
  background-color: var(--pico-table-row-stripped-background-color);
}
/* Fonts */

@font-face {
  /* Looks better when loading on Chromium. */
  font-family: system-ui-scaled;
  src: local(system-ui);
  size-adjust: 84.75%;
}

@font-face {
  font-family: alegreya-sans;
  font-weight: 400;
  font-style: normal;
  src: local("AlegreyaSans-Light"), url(/static/fonts/AlegreyaSans-Light-illucid.otf);
}

@font-face {
  font-family: alegreya-sans;
  font-weight: 400;
  font-style: italic;
  src: local("AlegreyaSans-LightItalic"), url(/static/fonts/AlegreyaSans-LightItalic-illucid.otf);
}

@font-face {
  font-family: alegreya-sans;
  font-weight: 500;
  font-style: normal;
  src: local("AlegreyaSans-Regular"), url(/static/fonts/AlegreyaSans-Regular-illucid.otf);
}

@font-face {
  font-family: alegreya-sans;
  font-weight: 500;
  font-style: italic;
  src: local("AlegreyaSans-Italic"), url(/static/fonts/AlegreyaSans-Italic-illucid.otf);
}

@font-face {
  font-family: alegreya-sans;
  font-weight: 600;
  font-style: normal;
  src: local("AlegreyaSans-Medium"), url(/static/fonts/AlegreyaSans-Medium-illucid.otf);
}

@font-face {
  font-family: alegreya-sans;
  font-weight: 700;
  src: local("AlegreyaSans-Bold"), url(/static/fonts/AlegreyaSans-Bold-illucid.otf);
}

@font-face {
  font-family: alegreya-sans;
  font-weight: 800;
  src: local("AlegreyaSans-ExtraBold"), url(/static/fonts/AlegreyaSans-ExtraBold-illucid.otf);
}

/* --- */

@font-face {
  font-family: mononoki;
  font-weight: 700;
  font-style: normal;
  src: local("mononoki-Regular"), url(/static/fonts/mononoki-Regular-illucid.otf);
}

@font-face {
  font-family: mononoki;
  font-weight: 700;
  font-style: italic;
  src: local("mononoki-Italic"), url(/static/fonts/mononoki-Italic-illucid.otf);
}

@font-face {
  font-family: mononoki;
  font-weight: 900;
  font-style: normal;
  src: local("mononoki-Bold"), url(/static/fonts/mononoki-Bold-illucid.otf);
}

@font-face {
  font-family: mononoki;
  font-weight: 900;
  font-style: italic;
  src: local("mononoki-BoldItalic"), url(/static/fonts/mononoki-BoldItalic-illucid.otf);
}

/* --- */

@font-face {
  font-family: "Open Sans";
  font-weight: 400;
  src: local("OpenSans-Regular"), url(/static/fonts/OpenSans-Regular-illucid.ttf);
}

@font-face {
  font-family: "Open Sans";
  font-weight: 500;
  src: local("OpenSans-Medium"), url(/static/fonts/OpenSans-Medium-illucid.ttf);
}

@font-face {
  font-family: "Open Sans";
  font-weight: 600;
  src: local("OpenSans-SemiBold"), url(/static/fonts/OpenSans-SemiBold-illucid.ttf);
}

@font-face {
  font-family: "Open Sans";
  font-weight: 700;
  src: local("OpenSans-Bold"), url(/static/fonts/OpenSans-Bold-illucid.ttf);
}

@font-face {
  font-family: "Open Sans";
  font-weight: 800;
  src: local("OpenSans-ExtraBold"), url(/static/fonts/OpenSans-ExtraBold-illucid.ttf);
}
