html {
    font-family: sans-serif;
    /* background-color: blue; */
}

body {
    margin: 0;
    width: 100%;
    position: absolute;
    left: 0;
    right: 0;
    font-size: 17px;
}

article {
    /* font-family: Georgia, Times New Roman, Times, serif; */
    font-size: 100%;

    display: grid;
    align-items: center;

    margin: 0;
    /* padding-top: min(200px, 12%); */
    padding-top: 50px;
    padding-bottom: 12%;

    line-height: 1.5em;
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 70%;
}

.center-wide {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.center-narrow {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%;
}

.section {
    margin-bottom: 40px; /* Adds space below each section */
}

.section h2 {
    margin-top: 20px; /* Adds space above each new subsection heading */
}

#frontmatter {
    display: contents
}

#frontmatter > h1,
#frontmatter > h2,
#frontmatter > h3 {
    text-align: center;
    grid-column: 2 / span 3;
}

#frontmatter h3 {
    font-size: 100%;
    font-weight: 100;
}

#frontmatter p {
    grid-column: 3 / span 1;
}
#frontmatter iframe {
    grid-column: 3 / span 1;
}
article {
    grid-template-columns: 1fr 140px fit-content(600px) 140px 1fr;
    grid-column-gap: 20px;
}
@media only screen and (max-width: 768px) {
    article {
        /* grid-template-columns: 1fr 0 fit-content(600px) 0 1fr; */
        /* grid-template-columns: 1fr 1fr fit-content(600px) 1fr 1fr; */
        grid-template-columns: 1fr 3fr 1fr;
        grid-column-gap: 20px;
    }
    /* #frontmatter p { */
    /*     grid-column: 3 / span 1; */
    /* } */
    /* #frontmatter iframe { */
    /*     grid-column: 3 / span 1; */
    /* } */
    #frontmatter p {
        grid-column: 2 / span 3;
    }
    #frontmatter iframe {
        grid-column: 2 / span 3;
    }
}
@media only screen and (min-width: 768px) and (max-width: 959px) {
    article {
        grid-template-columns: 1fr 1fr fit-content(600px) 1fr 1fr;
        grid-column-gap: 20px;
    }
    #frontmatter p {
        grid-column: 3 / span 1;
    }
    #frontmatter iframe {
        grid-column: 3 / span 1;
    }
}

#authors {
    font-size: 110%;
}
#authors a {
    color: inherit;
    text-decoration: underline;
}
#authors a:hover {
    color: #345cc1;
}
#links {
    font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
    font-size: 115% !important;
    color: #9f9f9f;
}
#links a {
    color: #345cc1;
    padding: 0 0.25em;
}
#links a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 200%;
    margin-bottom: 0;
}

h2 {
    font-size: 130%;
    margin-bottom: 0;
}

h3, h4, h5, h6, p {
    font-size: 100%;
}

h2, h3, p {
    text-align: left;
    text-justify: inter-word;
    grid-column: 2 / span 3;
}

div {
    text-align: justify;
    text-justify: inter-word;
    grid-column: 2 / span 3;
}

pre {
    line-break: anywhere;
    white-space: pre;
    word-wrap: break-word;
    grid-column: 2 / span 3;
    transition: all 1s;
    padding: 1em 0;
    border-radius: 7px;
    font-size: 95%;
}
pre:hover {
    background: #eee;
}

sup {
    position: relative;
    left: -0.25em;
    margin-right: -0.25em;
}

iframe.video {
    margin: 1em 0;
}

a {
    color: #345cc1;
    text-decoration: none;
}

.side-by-side {
    display: flex;
    /* flex-wrap: wrap; */
    /* justify-content: center; */
}

.side-by-side > img,
.side-by-side > div {
    display: flex;
    flex-grow: 1;
}

.side-by-side img {
    padding-left: 2.5em;
    min-width: 25%;
    /* width: 200px; */
    display: flex;
    flex-grow: 1;
    /* align-items: center; */
}

/* Tooltip container */
/* .tooltip { */
/*   position: relative; */
/*   display: inline-block; */
/*   border-bottom: 1px dotted black; /\* If you want dots under the hoverable text *\/ */
/* } */

/* Tooltip text */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  top: -20px;
  right: 130%;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent black;
}
.tooltip:hover .tooltiptext {
  visibility: visible;
}

.code-button {
    display: inline-block;
    padding: 10px 20px;
    text-align: center;
    background-color: #007BFF;
    color: white;
    font-size: 16px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px; /* Adjusts spacing from the title */
    transition: background-color 0.3s;
}

.code-button:hover {
    background-color: #0056b3;
}

.button-container {
    text-align: center;
}