html {
    font-family: 'Figtree', sans-serif;
    color: black;
    background-color: #246675;
}

body {
  margin: 0;
}

@media (max-width: 600px) {
    body {
        font-size: 0.9em;
        padding: 12px;
    }

    h1 {
        font-size: 1.8em;
    }
}

@media print {
    html {
        background-color: white;
    }

    body {
        background-color: transparent;
        color: black;
        font-size: 12pt;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3,
    h4 {
        page-break-after: avoid;
    }
}

header {
  position: fixed;
  box-sizing: border-box;
  top: 0;
  left: 0;
  height: 113px;
  width: 100%;
  z-index: 2;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background-color: #fdfdfd;
  padding-top: 1vw;
  padding-bottom: 1vw;
  padding-left: 3vw;
  padding-right: 3vw;
  border-bottom: 2px solid;
  border-image: linear-gradient(to right, #f8cb43, #83cbca) 1;
}

.logo img {
  height: 69px;
  width: auto;
}

nav a {
  text-decoration: none;
  font-size: 18.5px;
}

main {
  border-radius: 10px;
  margin-top: 135px;
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
  max-width: 56%;
  padding-left: 50px;
  padding-right: 50px;
  padding-top: 30px;
  padding-bottom: 50px;
  hyphens: auto;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  background-color: #fdfdfd;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.35);
}

.site-title {
  font-size: xxx-large;
  text-align: center;
  color: #f8cb43;
  margin-top: 0.15em;
  margin-bottom: 0.65em;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fdfdfd;
  border-top: 2px solid;
  border-image: linear-gradient(to right, #f8cb43, #83cbca) 1;

}

.site-footer-content {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
}

.site-footer-content a {
  padding-inline: 3px;
}

p {
    margin: 1em 0;
}

a {
    color: #246675;
}

a:visited {
    color: #246675;
}

img {
    max-width: 100%;
}

svg {
    height: auto;
    max-width: 100%;
}

h1 {
    color: #f9b700;
}

h2,
h3,
h4,
h5,
h6 {
    color: #246675;
}

h1 {
    margin-top: 0.4em;
}

h2,
h3,
h4,
h5,
h6 {
    margin-top: 1.4em;
}

h5,
h6 {
    font-size: 1em;
    font-style: italic;
}

h6 {
    font-weight: normal;
}

ol,
ul {
    padding-left: 1.7em;
    margin-top: 1em;
}

li>ol,
li>ul {
    margin-top: 0;
}

hr {
    border: none;
    border-top: 1px solid #246675;
    height: 1px;
    margin: 1em 0;
}

table {
    margin: 1em 0;
    border-collapse: collapse;
    width: 100%;
    overflow-x: auto;
    display: block;
    font-variant-numeric: lining-nums tabular-nums;
}

tbody {
    margin-top: 0.5em;
    border: 2px solid #246675;
}

th {
    border: 2px solid #246675;
    padding: 0.25em 0.5em 0.25em 0.5em;
    background-color: #83cbca;
    color: white;
}

td {
    border: 1px solid #246675;
    padding: 0.125em 0.5em 0.25em 0.5em;
}

div.columns {
    display: flex;
    gap: min(4vw, 1.5em);
}

div.column {
    flex: auto;
    overflow-x: auto;
}

/* Create a 2-column grid */
.toc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px; /* space between the squares */
    max-width: 500px; /* optional */
    margin: auto; /* center the grid */
}

/* Square gradient buttons */
.toc-button {
    position: relative;

    display: flex;
    align-items: center;      /* vertical centering */
    justify-content: center;  /* horizontal centering */

    aspect-ratio: 1 / 1;      /* forces perfect square */

    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-size: 18px;
    font-weight: 600;

    overflow: hidden;
    background: none;
    border: none;
    outline: none;
}

/* Gradient background layer */
.toc-button::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to bottom,
        #f8cb43,
        #83cbca
    );

    z-index: 1;
}

/* Text layer above the gradient */
.toc-button span {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px;

}

.toc-grid a:visited {
    color: white !important;
}

.sub-toc, .sub-toc-condensed {
    position: fixed;
    top: 135px;
    left: 10px;
    background-color: #fdfdfd;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.35);
    z-index: 1000;
    max-width: 15%;
}

.sub-toc h2, .sub-toc-condensed h2 {
    margin-top: 0;
    margin-bottom: 0;
}

.sub-toc p {
    margin: 10px;
    font-size: small;
}

.sub-toc-condensed p {
    margin: 4px;
    font-size: xx-small;
}

/* This ensures that when navigating to an anchor link, the content is not hidden behind the fixed header. */
*[id] {
  scroll-margin-top: 135px; /* equal to header height */
}

.bibliography-array {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bibliography-array .bib-item {
    list-style: none;
    margin-bottom: 1em;
    display: flex;
    gap: 0.5em;
}

.bib-item #bib-num {
    font-weight: bold;
    min-width: 2.5em;
    flex-shrink: 0;
}
