* {
  font-family: monospace;
}

body,
html {
  min-height: 100svh;
  margin: 0;
  padding: 0;
  font-size: 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  padding-top: 25px;
  padding-bottom: 15px;
}
h1 a {
  text-decoration: none;
  color: darkblue;
}
h1 {
  font-size: 42px;
}
h2 {
  font-size: 24px;
}
li {
  font-size: 20px;
}
i {
  margin-right: 5px;
}
blockquote {
  color: #656d76;
  border-left: 0.25em solid #d0d7de;
}
blockquote p {
  margin: 10px;
}
code {
  /* Dont wrap spaces */
  white-space: pre-wrap;
  background-color: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 2px 4px;
  font-size: 85%;
  color: #24292f;
}
pre {
  background-color: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  font-size: 85%;
  line-height: 1.45;
}
pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  white-space: pre;
}

li {
  text-align: left;
}

/* Reset margins for nested lists */
ul ul,
ul ol,
ol ul,
ol ol,
li ul,
li ol {
  margin-left: 0;
  margin-right: 0;
  padding-left: 2em;
}

video {
  max-width: 100%;
}

#default__content {
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  /* Firefox */
  min-height: -moz-calc(100% - 30px);
  /* WebKit */
  min-height: -webkit-calc(100% - 30px);
  /* Opera */
  min-height: -o-calc(100% - 30px);
  /* Standard */
  min-height: calc(100vh - 30px);
}

/* Constrain content elements to max-width and center them */
#default__content .default__sitetree,
#default__content table,
#default__content pre,
#default__content pre[class*="language-"],
#default__content .code-toolbar,
#default__content ul,
#default__content ol,
#default__content h1,
#default__content h2,
#default__content h3,
#default__content h4,
#default__content h5,
#default__content h6,
#default__content p,
#default__content blockquote {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

@media only screen and (max-width: 768px) {
  #default__content .default__sitetree,
  #default__content table,
  #default__content pre,
  #default__content pre[class*="language-"],
  #default__content .code-toolbar,
  #default__content ul,
  #default__content ol,
  #default__content h1,
  #default__content h2,
  #default__content h3,
  #default__content h4,
  #default__content h5,
  #default__content h6,
  #default__content p,
  #default__content blockquote {
    margin-left: 10px;
    margin-right: 10px;
  }

  h1 {
    font-size: 32px;
  }
  p {
    font-size: 18px;
  }
}
#default__footer {
  font-size: 16px;
  text-align: center;
  height: 30px;
  margin: 0;
  clear: both;
  width: 100%;
}

/* <centered> */
.default__centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.default__centered > h1,
.default__centered > h2,
.default__centered > h3,
.default__centered > h4,
.default__centered > h5,
.default__centered > h6,
.default__centered > p {
  text-align: center;
}

/* links */
nav.default__links {
  width: 100%;
  float: left;
}
nav.default__links i {
  font-size: 2em;
  margin-right: 20px;
}
nav.default__links a {
  display: inline-block;
  vertical-align: top;
  color: black;
  text-decoration: none;
}
.default__links_box {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 225px;
  height: 225px;
  font-size: 1.3em;
  box-shadow: 4px 4px 4px 4px rgba(0, 0, 0, 0.2);
  background-color: white;
  border-radius: 10px;
  margin: 20px;
  word-wrap: break-word;
}
.default__links_box:hover {
  box-shadow: 8px 8px 8px 8px rgba(0, 0, 0, 0.2);
}

.default__breadcrumbs {
  padding: 20px;
  text-align: left;
}

.default__side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  overflow-y: auto;
  padding: 5px;
  background-color: #f6f8fa;
  border-right: 1px solid #d0d7de;
}
.default__side-menu ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.default__side-menu ul ul {
  padding-left: 15px;
  margin-top: 5px;
  margin-bottom: 5px;
}
.default__side-menu li {
  margin: 5px 0;
}
.default__side-menu__link {
  display: block;
  padding: 5px 10px;
  text-decoration: none;
  color: #24292f;
  border-radius: 6px;
  transition: background-color 150ms;
}
.default__side-menu__link:hover {
  background-color: #d0d7de;
}
.default__side-menu__link--active {
  background-color: #0969da;
  color: white;
  font-weight: bold;
}
.default__side-menu__link--active:hover {
  background-color: #0860ca;
}
.default__side-menu__folder {
  display: block;
  padding: 5px 10px;
  color: #656d76;
  font-weight: bold;
}

/* Adjust content margin when side menu is present */
body:has(.default__side-menu) #default__content {
  margin-left: 270px;
}

@media only screen and (max-width: 975px) {
  .default__side-menu {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #d0d7de;
  }

  body:has(.default__side-menu) #default__content {
    margin-left: 0;
  }
}

.default__links_grid {
  display: flex;
  flex-wrap: wrap;
  margin-left: auto;
  margin-right: auto;
  max-width: 50%;
  margin-top: 50px;
  margin-bottom: 50px;
}
.default__links_grid a {
  text-decoration: none;
  color: black;
  flex-basis: calc(33.3% - 20px);
  margin: 10px;
}
.default__links_grid_card {
  padding: 1rem;
}
.default__links_grid_card:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transition: linear 700ms;
  border-radius: 10px;
}
.default__links_grid_card_title {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  margin: 0;
}
.default__links_grid_card_cover {
  padding: 20px;
}
.default__links_grid_card_cover:hover img,
.default__links_grid_card_cover:hover svg {
  transform: scale(1.05);
  transition: transform 150ms;
}
.default__links_grid_card_cover * {
  object-fit: contain;
}
@media only screen and (max-width: 1100px) {
  .default__links_grid a {
    flex-basis: calc(50% - 20px);
  }
}
@media only screen and (max-width: 768px) {
  .default__links_grid a {
    flex-basis: 100%;
  }
  .default__links_grid {
    max-width: 100%;
  }
}

.default__carausel {
  width: 70vw;
  margin: 2rem auto;
  position: relative;
}

/* Main viewport */
.default__carausel_viewport {
  overflow: hidden;
  width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  background: transparent;
  position: relative;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
}

.default__carausel_container {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backface-visibility: hidden;
  will-change: transform;
  transform: translate3d(0%, 0, 0);
}

.default__carausel_slide {
  flex: 0 0 100%;
  min-width: 0;
  position: relative;
}

.default__carausel_slide_inner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.default__carausel_slide_inner * {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 80vh;
  display: block;
}

/* Navigation buttons */
.default__carausel_navigation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  z-index: 10;
}

.default__carausel_btn {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  user-select: none;
  padding: 0;
}

.default__carausel_btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.default__carausel_btn:active {
  transform: scale(0.95);
}

.default__carausel_btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Thumbnails */
.default__carausel_thumbs_viewport {
  margin-top: 1rem;
  overflow: hidden;
  width: 100%;
}

.default__carausel_thumbs_container {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.default__carausel_thumbs_container::-webkit-scrollbar {
  height: 6px;
}

.default__carausel_thumbs_container::-webkit-scrollbar-track {
  background: transparent;
}

.default__carausel_thumbs_container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.default__carausel_thumbs_container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.default__carausel_thumb {
  flex: 0 0 auto;
  width: 100px;
  height: 80px;
  border: 3px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-secondary, #f5f5f5);
  padding: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0.5;
  transform: scale(0.9);
}

.default__carausel_thumb:hover {
  opacity: 0.8;
  transform: scale(0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

.default__carausel_thumb.is-active {
  opacity: 1;
  transform: scale(1);
  border-color: var(--primary-color, #007bff);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.default__carausel_thumb_inner {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.default__carausel_thumb_inner * {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media only screen and (max-width: 768px) {
  .default__carausel {
    margin: 1rem auto;
  }

  .default__carausel_viewport {
    border-radius: 8px;
  }

  .default__carausel_slide_inner {
    min-height: 300px;
  }

  .default__carausel_slide_inner * {
    max-height: 400px;
  }

  .default__carausel_btn {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .default__carausel_navigation {
    padding: 0.5rem;
  }

  .default__carausel_thumb {
    width: 80px;
    height: 64px;
  }
}

/* Fix model-viewer height in carousel */
.default__carausel_slide_inner model-viewer {
  height: min(500px, 60vh);
  width: 100%;
  min-height: 300px;
}
@media only screen and (max-width: 768px) {
  .default__carousel model-viewer {
    height: min(400px, 50vh);
    min-height: 250px;
  }
}

@media only screen and (max-width: 480px) {
  .default__carausel_thumb {
    width: 70px;
    height: 56px;
  }

  .default__carausel_thumbs_container {
    gap: 0.5rem;
  }
}

/** https://www.w3schools.com/howto/howto_css_modal_images.asp */
#default__modal {
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: rgb(0, 0, 0);
  background-color: rgba(255, 255, 255, 0.9);
}
#default__modal_image {
  display: block;
  width: auto;
  margin: 5vh auto auto auto;
  max-height: 90vh;
}
#default__modal_caption {
  position: absolute;
  top: 10vh;
  right: 10vw;
  width: 30vw;
  max-width: 700px;
  text-align: center;
  color: black;
  padding: 10px 0;
  height: 150px;
}
#default__modal_close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #3b3b3b;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}
#default__modal_close:hover {
  color: #bbb;
  cursor: pointer;
}
@media only screen and (max-width: 700px) {
  #default__modal_content {
    width: 100%;
  }
}

.default__sitetree {
  line-height: 1.1em;
}
.default__sitetree_folder {
  text-align: left;
  text-overflow: ellipsis;
  overflow: hidden;
  padding-bottom: 8px;
}
.default__sitetree_folder_content {
  padding-left: 10px;
}
.default__sitetree_file {
  text-align: left;
  text-overflow: ellipsis;
  overflow: hidden;
}
.default__sitetree_file > a {
  font-size: 0.95em;
  padding-top: 1px;
}
.default__sitetree_file.default__sitetree_single_file > a {
  font-size: 14px;
  opacity: 0.8;
}

.default__section-link {
  opacity: 0;
  position: absolute;
  float: left;
  padding-right: 4px;
  margin-left: -1em;
}
h2:hover .default__section-link {
  opacity: 1;
}

table {
  border-collapse: collapse;
  margin-top: 20px;
  margin-bottom: 20px;
  font-size: 0.9em;
}
thead {
  background-color: #f6f8fa;
  border-bottom: 2px solid #d0d7de;
}
th,
td {
  border: 1px solid #d0d7de;
  padding: 8px 12px;
  text-align: left;
}
th {
  font-weight: bold;
  color: #24292f;
}
tbody tr:nth-child(even) {
  background-color: #f6f8fa;
}
th[align="center"],
td[align="center"] {
  text-align: center;
}
th[align="right"],
td[align="right"] {
  text-align: right;
}
@media only screen and (max-width: 768px) {
  table {
    font-size: 0.8em;
  }
  th,
  td {
    padding: 6px 8px;
  }
}
