@import url('./fonts/Libertinus/documentation/libertinus.css');


body {
  font-family: 'Libertinus Serif', 'Times New Roman', sans-serif;
  font-feature-settings: 'liga', 'tnum', 'calt', 'zero';
}

main {
  max-width: 110ch;
  margin: 0 auto;
  padding: 16px;
}

kbd {
  font-family: 'Libertinus Keyboard', monospace;
}

aside, footer, h1, h2, h3, h4, h5, h6, figcaption {
  font-family: 'Libertinus Sans', sans-serif;
}

h2 {
  text-transform: uppercase;
}

abbr {
  font-variant: all-small-caps;
}

blockquote {
  border-left: 4px solid #ccc;
  margin: 1em 0;
  padding: 0.5em 1em;
  background-color: #f9f9f9;
}

aside {
  background-color: #f0f0f0;
  border-left: 4px solid #ccc;
  margin: 1em 0;
  padding: 1em;
  border-radius: 4px;
}

pre {
  background-color: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 16px;
  overflow: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  margin-top: 2ch;
  margin-bottom: 0.5ch;
}

/* Silcrow styling */
h1 > a[href^="#"], 
h2 > a[href^="#"], 
h3 > a[href^="#"], 
h4 > a[href^="#"], 
h5 > a[href^="#"], 
h6 > a[href^="#"] {
    position: relative;
    transition: opacity 0.2s;
    opacity: 0.5;
    text-decoration: none;
    font-size: smaller;
    vertical-align: top;
}

h1 > a[href^="#"] {
  left: -1.2rem;
}
h2 > a[href^="#"] {
  left: -2.6rem;
}
h3 > a[href^="#"] {
  left: -3.1rem;
}
h4 > a[href^="#"] {
  left: -3.5rem;
}
h5 > a[href^="#"] {
  left: -3.65rem;
}
h6 > a[href^="#"] {
  left: -3.60rem;
}

h1 > a[href^="#"]:hover, 
h2 > a[href^="#"]:hover, 
h3 > a[href^="#"]:hover, 
h4 > a[href^="#"]:hover, 
h5 > a[href^="#"]:hover, 
h6 > a[href^="#"]:hover {
    opacity: 1;
    text-decoration: none;
}

h1 > a[href^="#"]::before, 
h2 > a[href^="#"]::before, 
h3 > a[href^="#"]::before, 
h4 > a[href^="#"]::before, 
h5 > a[href^="#"]::before, 
h6 > a[href^="#"]::before {
    content: "§";
}

a:hover {
  text-underline-offset: 2px;
}

a:active {
  background-color: yellow;
  text-underline-offset: 3px;
}

:target {
  background-color: yellow;
}

table {
  border-collapse: collapse;
  width: 100%;
}

table, th, td {
  border: 1px solid #ddd;
}

th, td {
  padding: 8px;
  text-align: left;
}

th {
  background-color: #f2f2f2;
}

p {
  padding-top: 0.25ch;
  padding-bottom: 0.25ch;
}

/* if p is followed by an script.echo or style.echo, add a little space above the script */
p + script.echo, p + style.echo {
  margin-top: 0.5ch;
}

/* if p is followed by an div.observablehq, add a little space above the inspector */
p:has(+ div.observablehq) {
  margin-bottom: 1ch;
}

/* if an div.observablehq is followed by an script.echo, add a little space above the script */
div.observablehq + script.echo {
  margin-top: 0.5ch;
}

.subtitle {
  font-style: italic;
}

code {
  border: 1px solid #ddd;
  padding: 0 3px 1px;
  border-radius: 4px;
}

script, pre, style {
  margin-bottom: 1ch;
}

.table-of-contents {
  font-family: 'Libertinus Sans', sans-serif;
}

.authors .author a {
  text-decoration: none;
}

.authors a.author {
  text-decoration: none;
}

.authors .author .author-name {
  text-transform: uppercase;
  font-family: 'Libertinus Sans', sans-serif;
  font-size: larger;
}

.authors .author .author-affiliation {
  font-size: larger
}

.abstract {
  margin: 1em 0 2em;
  padding: 1em;
  border: 1px solid #aaa;
  border-radius: 4px
}


/** counters */
body {
  counter-reset: h2counter;
}

h2 {
  counter-reset: h3counter;
  counter-increment: h2counter;
}

h3 {
  counter-reset: h4counter;
  counter-increment: h3counter;
}

h4 {
  counter-reset: h5counter;
  counter-increment: h4counter;
}

h5 {
  counter-reset: h6counter;
  counter-increment: h5counter;
}

h6 {
  counter-increment: h6counter;
}

h2::before {
  content: counter(h2counter);
  padding-right: 1ch;
}

h3::before {
  content: counter(h2counter) "." counter(h3counter);
  padding-right: 1ch;
}

h4::before {
  content: counter(h2counter) "." counter(h3counter) "." counter(h4counter);
  padding-right: 1ch;
}

h5::before {
  content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter);
  padding-right: 1ch;
}

h6::before {
  content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) "." counter(h6counter);
  padding-right: 1ch;
}

/*
  Josh's Custom CSS Reset
  https://www.joshwcomeau.com/css/custom-css-reset/
*/
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
body {
  -webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
#root, #__next {
  isolation: isolate;
}
