:root{
  --bg1-l: #FFF;
  --bg1-l: FloralWhite;
  --bg2-l: #e5e5e5;
  --fg1-l: #444;
  --fg2-l: #666;
  --link-color-l: #0062cc; 
  --bg1-d: #000;
  --bg1-d: #002b36;
  --bg2-d: #222;
  --fg1-d: #bbb;
  --fg2-d: #b5b5b5;
  --link-color-d: #528dcc;
  --bg1: var(--bg1-l);
  --bg2: var(--bg2-l);
  --fg1: var(--fg1-l);
  --fg2: var(--fg2-l);
  --link-color: var(--link-color-l);
  --textwidth: 650px;
}

body {
  counter-reset: bib;
  background-color: var(--bg1); 
  color: var(--fg1);
  padding: 1rem;
  text-rendering: optimizeLegibility;
  hyphens: auto;
  line-height: 1.35;
  margin-top: 5%;
  /* text-align: justify; */
  /* font-family: sans-serif; */
	margin: auto;
  font-family: "Stix Two";
  font-feature-settings: "onum", "pnum", "kern";
  text-wrap: pretty;
  font-size: 14pt;
} 

ul:first-of-type li {
  display: inline;
  padding-right: 16px;
}

ul:first-of-type {
  font-size: 12pt;
  letter-spacing: 0.05rem;
  font-feature-settings: "smcp";
  text-transform: lowercase;
  padding-inline-start: 0px;
  margin: auto;
}

p, header, section, #refs, h2, pre.sourceCode {
  margin: auto;
  max-width: var(--textwidth);
}

pre.sourceCode {
  overflow: scroll;
  font-size: 10pt;
  border: 1pt solid var(--fg1);
}

#refs, section {
  font-size: 12pt;
}

table:first-of-type, ul:first-of-type {
  width: calc(min(var(--textwidth), 100%))
}

p {
  margin-top: 1em;
  margin-bottom: 1em;
  hyphens: auto;
  text-align: justify;
}

figcaption, .tldr {
  font-size: 12pt;
  margin: auto;
  max-width: 600px;
}

.firstpar:first-letter {
  -webkit-initial-letter: 2;
  initial-letter: 2;
  font-size: 36pt;
  /* float: left; */
  line-height: 0.5;
  margin-right: 3px;
  /* height: 0.5rem; */
}

.tldr {
  font-size: 12pt;
}

.smallcaps {
  font-feature-settings: "smcp";
}

.sc {
  font-variant-caps: small-caps;
  letter-spacing: 0.05rem;
}

abbr {
  font-feature-settings: "c2sc";
  letter-spacing: 0.01rem;
}

summary {
  font-size: 11pt;
  font-style: italic;
}

nav {
  margin-top: 1rem;
}

header img {
  /* border-radius: 50%; */
  /* width: 75pt; */
}

aside {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: solid 1px;
  margin-top: 1rem;
}

figure svg {
  width: 100%;
}

table {
  margin: auto;
  font-size: 12pt;
  margin-top: 18pt;
  margin-bottom: 18pt;
  max-width: var(--textwidth);
  font-feature-settings: "kern";
}

th {
  text-align: inherit;
  font-weight: normal;
  font-family: sans-serif;
  font-size: 8pt;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  padding-bottom: 4pt;
}

th, td {
  padding-left: 1rem;
  padding-right: 1rem;
  vertical-align: top;
  /* max-width: 10em; */
}

table:first-of-type th, table:first-of-type td {
  padding-left: 0
}


h1, h2 {
  font-weight: normal;
}


h1 {
  font-size: 2rem;
}

h2 {
  /* font-family: sans-serif; */
  /* font-weight: bold; */
  /* font-size: 1.1rem; */
  /* font-size: 0.8rem; */
  font-size: 12pt;
  /* text-transform: uppercase; */
  /* font-family: "Baskervville SC"; */
  /* font-variant-caps: small-caps; */
  letter-spacing: 0.05rem;
  font-feature-settings: "c2sc", "smcp";
  margin-top: 3em;
  margin-bottom: 2em;
  /* border-bottom: 1pt solid black; */
}

h3 {
  font-weight: normal;
  font-size: 12pt;
  font-style: italic;
  /* margin-top: 0.25em; */
  /* margin: 0.25em 0; */
  margin-bottom: 0.5em; 
  hyphens: none;
}

a h3 {
  color: var(--fg1);
}

pre, kbd, code {
  font-family: monospace;
  /* background-color: var(--bg2); */
  border-radius: 0.25rem;
  overflow: auto;
  padding: 1pt 2pt;
}

summary {
  padding-top: 3.33pt;
}

a {
  color: var(--link-color);
  /* color: var(--fg1); */
  text-decoration: none;
  background-color: transparent; 
}

pre {
  padding: 1em 1em;
}

pre code {
  padding: 0px;
}

blockquote {
    font-style: italic;
}

img {
  max-width: calc(min(1000px, 100%));
}

figure {
  margin: auto;
  max-width: calc(min(1000px, 100%));
}

footer img {
  width: 100px;
  image-rendering: pixelated;
}

figcaption {
  font-style: italic;
}


/* @media (prefers-color-scheme: dark) { */
/*   :root{ */
/*     --bg1: var(--bg1-d); */
/*     --fg1: var(--fg1-d); */
/*     --bg2: var(--bg2-d); */
/*     --fg2: var(--fg2-d); */
/*     --link-color: var(--link-color-d); */
/* } */

@font-face{
  font-family: 'Stix Two';
  src: url('stixtwo/STIXTwoText-Regular.woff2') format('woff2');
  font-weight: normal;
}

@font-face{
  font-family: 'Stix Two';
  src: url('stixtwo/STIXTwoText-Bold.woff2') format('woff2');
  font-weight: bold;
}


@font-face{
  font-family: 'Stix Two';
  src: url('stixtwo/STIXTwoText-BoldItalic.woff2') format('woff2');
  font-weight: bold;
  font-style: italic;
}


@font-face{
  font-family: 'Stix Two';
  src: url('stixtwo/STIXTwoText-Italic.woff2') format('woff2');
  font-weight: normal;
  font-style: italic;
}


@font-face{
  font-family: 'Stix Two';
  src: url('stixtwo/STIXTwoText-Medium.woff2') format('woff2');
  font-weight: 500;
}

@font-face{
  font-family: 'Stix Two';
  src: url('stixtwo/STIXTwoText-MediumItalic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
}

@font-face{
  font-family: 'Stix Two';
  src: url('stixtwo/STIXTwoText-SemiBold.woff2') format('woff2');
  font-weight: 600;
}

@font-face{
  font-family: 'Stix Two';
  src: url('stixtwo/STIXTwoText-SemiBoldItalic.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
}
