* {
  box-sizing: border-box;
}

html {
  font-size: 90%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #1F1F28;
  color: #FAFAFA;
  font-family: "IBM Plex Sans", "Open Sans", sans-serif;
}

table {
  border-collapse: collapse;
  empty-cells: show;
  border-spacing: 0;
}

th {
  font-weight: bold;
  background-color: #2A2A37;
}

th, td {
  padding: 0.3em 0.5em;
  margin: 0;
  vertical-align: top;
  border: 1px solid #FAFAFA;
}

a {
  color: #7E9CD8;
}

h1, h2, h3, h4 {
  position: relative;
  margin-bottom: 0;
}

.highlight pre {
  padding: 2px 10px;
  overflow-x: scroll;
}

code {
  font-size: 0.85rem;
  background-color: #2A2A37;
  padding: 1px 2px;
  font-family: monospace;
}

blockquote {
  font-family: sans-serif;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 50px;
  padding-left: 15px;
  border-left: 3px solid #ccc;
}

.body-content h2 {
  border-bottom: 1px solid #FAFAFA;
  counter-increment: h2-section;
  counter-set: h3-section h4-section h5-section h6-section;
}
.body-content h3 {
  counter-increment: h3-section;
  counter-set: h4-section h5-section h6-section;
}
.body-content h4 {
  counter-increment: h4-section;
  counter-set: h5-section h6-section;
}
.body-content h5 {
  counter-increment: h5-section;
  counter-set: h6-section;
}
.body-content h6 {
  counter-increment: h6-section;
}
.body-content h2::before {
  content: counter(h2-section) ".";
}
.body-content h3::before {
  content: counter(h2-section) "." counter(h3-section);
}
.body-content h4::before {
  content: counter(h2-section) "." counter(h3-section) "." counter(h4-section);
}
.body-content h5::before {
  content: counter(h2-section) "." counter(h3-section) "." counter(h4-section) "." counter(h5-section);
}
.body-content h6::before {
  content: counter(h2-section) "." counter(h3-section) "." counter(h4-section) "." counter(h5-section) "." counter(h6-section);
}
.body-content h2::before,
.body-content h3::before,
.body-content h4::before,
.body-content h5::before,
.body-content h6::before {
  font-weight: 400;
  margin-right: 1ex;
}

@media screen and (max-width: 1000px) {
  .body-content {
    margin: 0 20px;
  }
}
h1.no-decoration,
h2.no-decoration,
h3.no-decoration,
h4.no-decoration,
h5.no-decoration,
h6.no-decoration {
  border-bottom: none;
  counter-increment: none;
}
h1.no-decoration::before,
h2.no-decoration::before,
h3.no-decoration::before,
h4.no-decoration::before,
h5.no-decoration::before,
h6.no-decoration::before {
  content: none;
}

.wrapped {
  max-width: 1000px;
  margin: auto;
  padding: 6px 8px;
}

.separator::after {
  content: "⌊·· ··· ··⌉";
}

.separator-r::after {
  content: "⌈·· ··· ··⌋";
}

.section {
  background: #16161D;
  padding: 6px;
}
.section h2 {
  margin: 0;
}

.card {
  background: #16161D;
  display: flex;
  margin: 2px;
  padding: 8px;
}
.card .card-image {
  float: left;
  height: 90px;
  margin-right: 8px;
}
.card .card-image-large {
  float: left;
  height: 100px;
  margin-right: 10px;
}
.card .card-content {
  font-size: 0.9rem;
}
.card .card-content .card-p {
  padding: 2px 0;
}
.card .card-content .card-p-align {
  display: flex;
  align-items: center;
  gap: 6px;
}
.card .card-content .card-highlight {
  font-weight: 600;
}
.card .card-content .card-p-large {
  font-size: 1.4rem;
}
.card .card-content .card-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 4px;
}

.taxonomy-group {
  border: 2px solid #363646;
  background-color: #2A2A37;
  margin-top: 8px;
  padding: 4px;
}
.taxonomy-group a {
  margin-right: 4px;
}

.page-navigation {
  display: flex;
  border: 2px solid #363646;
  background-color: #2A2A37;
  margin-top: 8px;
}
.page-navigation .disabled {
  background: repeating-linear-gradient(52.5deg, rgba(84, 84, 109, 0.075), rgba(84, 84, 109, 0.075) 14px, rgba(240, 248, 255, 0) 14px, rgba(240, 248, 255, 0) 28px);
}
.page-navigation .prev, .page-navigation .next {
  display: inline-flex;
  flex-direction: column;
  width: 50%;
  padding: 8px;
  text-decoration: none;
}
.page-navigation .prev:hover, .page-navigation .next:hover {
  background-color: #363646;
}
.page-navigation .prev p, .page-navigation .next p {
  margin: 0;
  color: #FAFAFA;
}
.page-navigation .prev .label, .page-navigation .next .label {
  font-weight: bold;
  text-decoration: underline;
}
.page-navigation .prev .title, .page-navigation .next .title {
  font-size: 0.9em;
}
.page-navigation .next {
  text-align: right;
  margin: 0 0 0 auto;
}

.a-white a {
  color: #FAFAFA;
}

.p-small {
  font-size: 0.85rem;
  font-weight: 400px;
}

#header {
  height: 280px;
}
#header #banner {
  position: relative;
  background-color: #1F1F28;
}
#header #banner #banner-image {
  position: absolute;
  top: 0;
  left: 0;
  height: 280px;
  width: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
}
#header #banner #banner-mask {
  background: linear-gradient(180deg, transparent 40%, #1F1F28);
  position: absolute;
  top: 0;
  left: 0;
  height: 280px;
  width: 100%;
  z-index: -1;
}
#header #navbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
#header #navbar #navbar-brand {
  font-size: 1.2rem;
}
#header #navbar #navbar-list {
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 400;
  text-align: end;
}
#header #navbar #navbar-list li {
  display: inline-block;
  margin-right: 5px;
  text-decoration: underline;
}

#body {
  min-height: calc(100vh - 400px);
  margin-bottom: 30px;
}
#body #intro #intro-image {
  height: 90px;
}
#body #intro #intro-name {
  font-size: 1.5rem;
  font-weight: bold;
}
#body #intro #intro-subname {
  font-size: 1rem;
  font-weight: 300;
}
#body .body-head-image > img {
  width: 100%;
  object-fit: contain;
  box-shadow: 0 0 15px 5px #363646;
}
#body .toc {
  background: repeating-linear-gradient(52.5deg, rgba(84, 84, 109, 0.075), rgba(84, 84, 109, 0.075) 14px, rgba(240, 248, 255, 0) 14px, rgba(240, 248, 255, 0) 28px);
  width: fit-content;
  padding: 0.5rem 1rem 0.5rem 0;
}
#body img {
  max-width: 100%;
}
#body .image-wrapper {
  display: flex;
  flex-direction: column;
  /* align-self: ; */
  align-items: center;
  padding: 0.6rem;
  background: repeating-linear-gradient(52.5deg, rgba(84, 84, 109, 0.15), rgba(84, 84, 109, 0.15) 14px, rgba(240, 248, 255, 0) 14px, rgba(240, 248, 255, 0) 28px);
}
#body .image-wrapper p {
  font-size: 0.8rem;
}
#body .image-wrapper img {
  max-height: 80vh;
}

@media screen and (max-width: 950px) {
  .page-cards {
    display: flex !important;
    flex-direction: column;
  }
}
@media screen and (max-width: 500px) {
  .page-card {
    flex-direction: column;
  }
  .page-card-image {
    width: 100% !important;
    margin: 0 !important;
  }
  .page-card-content {
    padding: 0.5rem;
  }
}
.page-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}
.page-cards a {
  text-decoration: none;
  color: inherit;
}
.page-cards .page-card:first-of-type {
  flex-direction: column;
  grid-column: 1/span 2;
}
.page-cards .page-card:first-of-type .page-card-image {
  width: 100%;
  height: 300px;
  max-height: 300px;
  margin: 0;
}
.page-cards .page-card:first-of-type .page-card-content {
  padding: 0.5rem;
}
.page-cards .page-card {
  display: flex;
  width: 100%;
  border: 2px solid #363646;
  background-color: #2A2A37;
}
.page-cards .page-card p {
  margin: 0;
}
.page-cards .page-card .page-card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 6px;
}
.page-cards .page-card .page-card-title {
  font-size: 1.05rem;
  font-weight: bold;
}
.page-cards .page-card .page-card-description,
.page-cards .page-card .page-card-meta {
  font-size: 0.9rem;
}
.page-cards .page-card .page-card-meta {
  display: flex;
  align-items: center;
  margin-top: 6px;
}
.page-cards .page-card .page-card-meta img {
  margin-right: 2px;
}
.page-cards .page-card .page-card-meta .page-card-tags {
  word-break: keep-all;
}
.page-cards .page-card .page-card-image {
  display: flex;
  width: 200px;
  height: 120px;
  margin-right: 10px;
  background: repeating-linear-gradient(52.5deg, rgba(84, 84, 109, 0.15), rgba(84, 84, 109, 0.15) 14px, rgba(240, 248, 255, 0) 14px, rgba(240, 248, 255, 0) 28px);
}
.page-cards .page-card .page-card-image img {
  width: 100%;
  object-fit: cover;
}

#footer-absolute {
  position: relative;
  height: 40px;
}
#footer-absolute img {
  position: absolute;
}

#footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
#footer #footer-left, #footer #footer-right {
  max-width: 50%;
}
#footer #footer-right {
  text-align: right;
}
#footer #footer-button {
  margin-top: 1rem;
  column-width: 88px; /* Universal button size */
  column-gap: 0.4em;
  column-count: 2;
  width: calc((88px + 0.4em) * 2);
}

.cite {
  text-align: right;
  font-size: 0.9rem;
  font-style: italic;
}

.ul-m0-s ul {
  padding-left: 0px;
}

.ul-m0a-s ul {
  margin-bottom: 0px;
  padding-left: 0px;
}
.ul-m0a-s ul li {
  margin: 0;
}
.ul-m0a-s p {
  margin-top: 0;
}

.col-2 {
  column-count: 2;
}
.col-2 > * {
  page-break-inside: avoid;
  display: inline-block;
  width: 100%;
}

@media screen and (max-width: 600px) {
  .col-2 {
    column-count: 1;
  }
}
.cross-ref {
  border: 2px solid #54546D;
  background-color: #2A2A37;
  display: flex;
  margin: 6px 0;
}
.cross-ref p {
  margin: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.cross-ref .cover-mask {
  height: 100px;
  width: 145px;
  background: repeating-linear-gradient(52.5deg, rgba(84, 84, 109, 0.075), rgba(84, 84, 109, 0.075) 14px, rgba(240, 248, 255, 0) 14px, rgba(240, 248, 255, 0) 28px);
}
.cross-ref .cover-mask img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.cross-ref .details {
  margin-left: 8px;
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cross-ref .title {
  font-weight: 500;
  color: #FAFAFA;
}
.cross-ref .title:hover {
  text-decoration: underline;
}
.cross-ref .description,
.cross-ref .link {
  font-size: 0.85em;
}

.banner {
  margin: 8px 0;
  padding: 10px;
  min-height: 130px;
}
.banner .mas {
  padding: 6px;
}
.banner.note {
  border: 2px ridge #7E9CD8;
  background-color: #223249;
}
.banner.notice {
  border: 2px ridge #DCA561;
  background-color: #49443C;
}
.banner.warning {
  border: 2px ridge #C34043;
  background-color: #43242B;
}

.floating-div {
  max-width: 250px;
  float: right;
  border: 2px ridge #54546D;
  background-color: #2A2A37;
  padding: 8px;
  margin: 5px;
}

.float-clear {
  clear: both;
}

.webring-list img {
  width: 88px;
  height: 31px;
}

.featured-tracks > div:first-of-type {
  box-shadow: 0 0 8px 2px #363646;
  margin-bottom: 24px;
}

#TableOfContents {
  margin: 20px;
  padding: 20px 40px;
  padding-left: 0;
  width: fit-content;
  background-color: #2A2A37;
}
#TableOfContents ul {
  margin: 0;
}