.typst-document-wrapper :is(h1, h2, h3, h4, h5, h6) {
  text-align: left;
  color: white;
  text-shadow: 2px 0px 3px rgb(29, 22, 9);
}

.typst-document-wrapper :is(h1, h2) {
  width: 100%;
  border-bottom: 2px white solid;
  margin-bottom: 0.3em;
  box-sizing: border-box;
}

.typst-document-wrapper :is(h3) {
  margin-bottom: 0;
  font-size: 1.2em;
  padding-left: 0.2em;
  color: white;
  background-color: rgb(2, 11, 94);
  text-shadow: none;
}

.typst-document-wrapper :is(h4, h5, h6) {
  color: black;
  margin-bottom: 0;
  text-shadow: none;
}

.typst-document-wrapper :is(h4) {
  font-size: 1.2em;
}

.typst-document-wrapper :is(h5, h6) {
  font-size: 1em;
}

.typst-document-wrapper p {
  margin-bottom: 0.6em;
  margin-top: 0.6em;
}

.typst-document-wrapper nav {
  margin-top: 1em;
  border-left: 2px white solid;
  padding-bottom: 0.5em;
  box-sizing: border-box;
}

.typst-document-wrapper nav h2 {
  font-size: 1.3em;
  border: none;
  margin-left: 0.5em;
  margin-bottom: 0;
  width: auto;
}

.typst-document-wrapper nav > ol {
  margin-top: 0.2em;
  margin-bottom: 0;
}

.typst-document-wrapper :is(a, .external-link):not(.webring *):not(.button-galore *) {
  padding-left: 1.1em;
  padding-right: 0.2em;
  text-decoration: none;

  background-color: black;
  color: white;
}

.typst-document-wrapper :is(a, .external-link):not(:where(nav *)):not(.webring *):not(.button-galore *):visited {
  background-color: white;
  color: black;
}

.typst-document-wrapper :is(a, .external-link):not(.webring *):not(.button-galore *):hover {
  background-color: rgb(25, 245, 190);
  color: black;
  cursor: pointer;
}

.typst-document-wrapper :is(ul, ol) {
  padding-left: 1em;
  margin-top: 0;
  margin-bottom: 0;
}

.typst-document-wrapper {
  color: black;
}

.typst-eqn-inline {
  contain: layout paint style;
}

.typst-eqn-inline svg {
  height: 0.8em !important;
  width: auto !important;
  vertical-align: baseline;
}

.typst-eqn-block {
  display: flex;
  justify-content: safe center;
  align-items: center;
  overflow-x: auto;
  
  contain: layout paint style;
}

.typst-eqn-block > svg {
  padding-top: 1em;
  padding-bottom: 1em;
}

.typst-document-wrapper li > p { margin: 0; }

.typst-codeblock {
  padding-left: 1em;
  padding-right: 1em;
  padding-top: 0.1em;
  padding-bottom: 0.1em;
  background: rgba(1, 42, 70, 0.5);
  overflow-x: auto;
}

.typst-codeblock code, .typst-codeblock code * {
  font-size: 1em;
  color: white;
}

.typst-codeblock pre {
  line-height: 1.5; 
}

.typst-image-container {
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;

  display: flex;
  justify-content: center;
  align-items: center;
}

.typst-image-container img {
  max-width: 100%;
  object-fit: cover;
  box-sizing: border-box;
}

.typst-highlight {
  background-color: rgba(255, 255, 0, 0.6);
  padding-left: 0.1em;
  padding-right: 0.1em;
}

.typst-highlight-more {
  background-color: rgba(1, 50, 141, 0.7);
  color: white;
  padding-left: 0.1em;
  padding-right: 0.1em;
}

.typst-document-wrapper .renderer-container {
  width: 100%;
  max-height: 20em;
  aspect-ratio: 4 / 3;
  touch-action: none;
}

.typst-document-wrapper .renderer-container-internal {
  width: 100%;
  height: 100%;
}

.typst-document-wrapper .renderer-container * {
  touch-action: none;
}

.typst-document-wrapper .typst-container {
  width: 100%;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  background-color: rgba(67, 233, 183, 0.4);
  border-left: 3px solid white;
  color: black;
  position: relative;
  box-sizing: border-box;
}

.typst-document-wrapper .typst-quote-container {
  width: 100%;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  background-color: rgba(67, 233, 183, 0.4);
  border-left: 3px solid white;
  color: black;
  position: relative;
  box-sizing: border-box;
}

.typst-document-wrapper .typst-quote-container:before {
  content: "“";
  font-size: 2em;
  position: absolute;
  top: -0.1em;
  left: 0em;
  font-style: italic;
}

.typst-document-wrapper .typst-quote-container:after {
  content: "”";
  font-size: 2em;
  position: absolute;
  bottom: 0.3em;
  right: 0.3em;
  font-style: italic;
}

.typst-document-wrapper .typst-quote {
  font-style: italic;
  margin-bottom: 0.5em;
  margin-left: 1.5em;
  margin-right: 1.5em;
}

.typst-document-wrapper .typst-attribution {
  font-style: italic;
  font-size: 0.9em;
  width: 100%;
  padding-right: 0.5em;
  box-sizing: border-box;
  text-align: right;
}

.typst-document-wrapper .typst-attribution:before {
  content: "–– ";
}

.typst-document-wrapper  .typst-table {
  max-width: 100%;
  overflow-x: auto;
}

.typst-document-wrapper table {
  border-collapse: collapse;
}

.typst-document-wrapper th, td {
  border: 2px solid black; /* Sets a light gray border around headers and cells */
  padding: 8px;              /* Adds spacing inside the cells */
}