


/*********************************************************** font imports */

@font-face {
  font-family: 'adelphe';
  src: url("Adelphe-FlorealRegular.woff2") format("woff2");
  font-weight: normal;
  font-display: swap;
}
@font-face {
  font-family: 'adelphe';
  src: url("Adelphe-FlorealItalic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'adelphe';
  src: url("Adelphe-FlorealBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'adelphe';
  src: url("Adelphe-FlorealBoldItalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'dindong';
  src: url("DINdong.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: 'notcourier';
  src: url("NotCourierSans.otf");
  font-display: swap;
}



/*********************************************************** base variables */

:root {

  /* Default The Hmm colors */

  --black: hsl(0, 0%, 0%);
  --white: hsl(0, 0%, 100%);
  --blue: hsl(240, 100%, 50%);
  --yellow: hsl(60, 100%, 50%);

  /* Variables for most used colors */

  --fore: var(--black);
  --back: var(--white);
  --accent: var(--yellow);

  /* Borders, radii and outlines */

  --solid: 1px solid;
  --focus: var(--solid) var(--blue);
  --d-rad: 15px;

  /* Shadow parameters for drop-shadows */

  --shadow: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.5));

  /* Transition and animation speeds */

  --fast: 0.25s;

  /* widths */

  --base-width: min(100%, 50rem);
  --side-width: min(100%, 20rem);
  --full-width: min(100%, 90rem);

}



/*********************************************************** accessibility */


/* forcing an outline on focus */

*:focus {
  outline: var(--focus)
}

/* styling the skip links */

.skip-link {
  position: absolute;
  padding: 0 0.25rem;
  transform: translateY(-300%);
  transition: transform var(--fast) linear;
  z-index: 1;
}
.skip-link:focus-within {
  transform: translateY(0);
}

/* styling alt-texts */

img {
  display: flex;
  justify-content: center;
  font-size: 0.6rem;
  line-height: 1;
  font-style: italic;
  text-align: center;
}

/* brought to you by Dr. Groten */

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
}

/* disabling animations for prefered reduced motion */

@media ( prefers-reduced-motion ) {
  * {
    animation: none !important;
    transform: none !important;
  }
}

/* dark mode */

@media ( prefers-color-scheme: dark ) {
  :root {
    --fore: var(--white);
    --back: var(--black);
    --shadow: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.5));
  }
}

/* high contrast */

@media ( prefers-contrast ) {
  :root {
    --yellow: var(--back);
  }
}

/* inverted */

@media ( inverted-colors ) {
  :root {
    --yellow: hsl(240, 100%, 50%);
    --blue: hsl(60, 100%, 50%);
    --fore: var(--white);
    --back: var(--black);
    --shadow: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.5));
  }
}

/* reduced transparency, inverted */

@media ( prefers-reduced-transparency ) {
  :root {
    --shadow: none;
  }
  header,
  header.visible {
    box-shadow: none;
  }
  * {
    opacity: 1 !important;
  }
}



/*********************************************************** basic elements */

*,
*::before,
*::after {
  box-sizing: border-box;
  position: relative;
}
html,
body {
  padding: 0;
  margin: 0;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* because of sticky header */
}

hr {
  border: unset;
  border-top: var(--solid);
}

a {
  color: var(--fore);
  text-decoration-color: var(--fore);
  text-decoration-thickness: 0.5;
}
a:focus {
  text-decoration: none;
}
.mw-parser-output a {
  word-break: break-all;
}

ul {
  margin: 0;
  padding-inline-start: 1rem;
}

menu {
  padding: 0;
}

input, button {
  color: var(--fore);
  background-color: var(--back);
}

input[type=submit] {
  cursor: pointer;
}

table tr td {
  vertical-align: baseline;
}
table tr td:first-of-type {
  padding-right: 0.5rem;
}



/*********************************************************** headers  */

h1 {
  font-family: 'dindong';
  font-size: 3rem;
  margin-top: 1rem;
  line-height: 1;
}

h2, h3, h4, h5, h6 {
  font-family: 'adelphe';
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1em;
  font-weight: 600;
}

h4 {
  font-family: 'notcourier', 'Courier New', Courier, monospace;
}

h5 {
  font-family: 'dindong';
  font-size: 1.5rem;
  margin-block: 0;
}



/*********************************************************** document structure */

html {
  font-size: 15pt;
  line-height: 1.2;
  font-family: 'adelphe', 'Georgia', 'Times New Roman', Times, serif ;
  color: var(--fore);
  background-color: var(--back);
}

body {
  padding-inline: 1rem;
}



/*********************************************************** NAVIGATION: ALL */

nav ul {
  list-style: none;
  padding: 0.3rem 0.5rem;
  display: flex;
  background-color: var(--back);
  border: var(--solid);
  border-radius: var(--d-rad);
}
nav ul li a {
  padding: 0 0.25rem;
}



/*********************************************************** NAVIGATION: header */

header {
  position: fixed;
  left: 0;
  margin-inline: 1rem;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-family: 'dindong';
  font-size: 1.6rem;
  z-index: 10000;
  translate: 0 calc(2rem - 100%);
  color: var(--fore);
  background-color: transparent;
  box-shadow: 0 0 4rem 5rem transparent;
  transition: all var(--fast) linear;
}
header.visible {
  translate: 0;
  background-color: var(--back);
  box-shadow: 0 0 3rem 5rem var(--back);
}

header nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
header nav ul {
  flex-wrap: wrap;
  justify-content: center;
  background-color: unset;
  border: unset;
  border-radius: unset;
  padding: 0;
  gap: 0.5rem;
}
header nav ul li {
  background-color: var(--back);
  border: var(--solid);
  border-radius: var(--d-rad);
  padding: 0.5rem;
}

/* black header list items */

#meta-nav {
  background-color: unset;
  border: unset;
  padding: unset;
  border-radius: unset;
}
#meta-nav li {
  background-color: var(--fore);
  border: var(--solid);
  padding: 0.3rem 0.5rem;
  border-radius: var(--d-rad);
}
#meta-nav li a {
  color: var(--back) !important;
  text-decoration-color: var(--back);
}
#meta-nav li:has(a:hover),
#meta-nav li:has(a:active) {
  background-color: var(--back);
}
#meta-nav li a:hover,
#meta-nav li a:active {
  color: var(--fore) !important;
  text-decoration-color: var(--fore);
}

/* header inputs */

header form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
header input {
  padding: 0.7rem 0.5rem 0.5rem 0.5rem;
  border: var(--solid);
  border-radius: var(--d-rad);
}

/* header searhbar */

header form input {
  font-family: 'dindong';
  font-size: 1.6rem;
}
header form input[type="search"] {
  background-color: var(--accent);
  max-width: 10rem;
  z-index: 1;
}
header form input[type="search"]::placeholder {
  color: var(--black);
}
header form input[type="search"] + label {
  position: absolute;
  margin-top: 4px;
  margin-inline: 0.5rem;
}
header form input[type="submit"]:hover,
header form input[type="submit"]:active {
  background-color: var(--accent);
}

/* show/hide button */

header input#menu-button {
  max-height: 2.25rem;
  min-width: 2.25rem;
  margin-left: calc(100% - 2.5rem);
  margin-top: calc( 0.5rem + 2px );
  padding: 0rem 0.5rem 0.5rem 0.5rem;
  text-align: center;
  font-size: 1.2rem;
}



/*********************************************************** NAVIGATION: footer */

footer {
  font-family: 'notcourier';
  font-size: 0.8rem;
  margin-bottom: 5rem;
}

/* meta info on page bottom */

footer #meta {
  padding-block: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}
footer #meta .metadata,
footer #meta .backlinks {
  padding: 0.5rem;
}

/* sticky footer nav */

footer nav {
  width: fit-content;
  position: fixed;
  right:  1rem;
  bottom: 1rem;
}
footer nav ul {
  flex-direction: column;
  flex-wrap: wrap;
  padding: 0.2rem 0.2rem;
  padding-top: 0.1rem;
}



/*********************************************************** images, audio and video */

figure {
  margin-block: 1rem;
  padding: 1rem;
  border: var(--solid);
  background-color: var(--back);
}
figure:focus-within {
  outline: var(--focus);
}
img {
  height: auto;
  max-width: 100%;
}
figure audio,
figure video {
  max-width: 100%;
}
figure figcaption,
.thumbcaption,
.gallerytext {
  margin-block: 0.5rem;
  margin-inline: auto;
  font-family: 'adelphe';
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
}
.mw-parser-output > .thumb:has(.image):first-of-type img {
}



/*********************************************************** correcting Mediawiki parser */

.mw-parser-output>table:first-of-type {
  display: none;
}
.mw-pt-languages {
  margin-block: 1rem;
  width: fit-content;
  padding: 0.5rem;
  border: var(--solid);
  border-radius: var(--d-rad);
}
.mw-pt-languages .mw-pt-languages-label {
  display: none;
}
.mw-pt-languages ul {
  padding: 0;
}
.mw-pt-languages ul li {
  display: inline-block;
}
.image {
  width: unset !important;
  text-align: center;
}



/*********************************************************** COMPONENT: table of contents  */

#toc {
  padding: 0.5rem;
  max-width: var(--side-width);
  background-color: var(--back);
  border-radius: var(--d-rad);
  border: var(--solid);
}
#mw-toc-heading {
  margin: 0;
}
.tocnumber {
  display: none;
}



/*********************************************************** COMPONENT: info box */

main aside {
  max-width: var(--side-width);
  font-family: 'notcourier';
  font-size: 0.8rem;
  margin-block: 1rem;
}
main aside .info {
  padding: 0.5rem;
  width: 100%;
  border: var(--solid);
  background-color: var(--back);
  border-radius: var(--d-rad);
}



/*********************************************************** COMPONENT: galleries */

ul.gallery {
  margin-block: 1rem;
  margin-left: -1rem;
  padding-inline: 1rem;
  width: calc( 100% + 2rem );
  display: flex;
  align-items: end;
  align-content: flex-start;
  justify-content: flex-start;
  overflow: scroll;
  gap: 1rem;
}
ul.gallery li {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}
ul.gallery li,
ul.gallery li div {
  margin: 0 !important;
  width: unset !important;
  max-width: 80vw;
}
ul.gallery li div img {
  height: auto !important;
  width: unset;
  max-height: 70vh;
  max-width: 80vw;
}
ul.gallery+menu ul {
  list-style: none;
  display: flex;
  padding: 0;
  gap: 0.5rem;
}
ul.gallery+menu ul li button {
  height: 2.25rem;
  width: 2.25rem;
  padding: 0.15rem 0.5rem 0.5rem 0.5rem;
  border-radius: var(--d-rad);
  background-color: var(--back);
  border: var(--solid);
  font-size: 1.2rem;
}



/*********************************************************** COMPONENT: <tool /> embed */

.tool {
  margin-block: 1rem;
  border: var(--solid);
  border-radius: var(--d-rad);
  background: var(--accent);
}
.toolHeader {
  text-align: center;
  padding: 0.3rem;
}
.toolContent {
  max-height: 80vh;
  overflow: scroll;
  padding: 1rem;
  border-top: var(--solid);
}
.toolFooter {
  text-align: center;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}
.toolFooter a {
  width: 100%;
  padding: 0.3rem;
  border-top: var(--solid);
  border-right: var(--solid);
  border-top-right-radius: var(--d-rad);
}
.toolFooter a:last-of-type {
  border-right: none;
}



/*********************************************************** INDEX: events + publishing */

/* event type filter menu */

menu.types {
  text-align: center;
  margin-inline: auto;
}
menu.types label {
  font-family: 'notcourier';
  font-size: 0.8rem;
  display: inline-block;
}

/* event and publishing lists */

ul.events,
ul.publishing {
  width: fit-content;
  max-width: 100%;
  min-width: calc( var(--base-width) + 2rem);
  margin-left: -1rem;
  padding-inline: 1rem;
  padding-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}
li.event-item,
li.publishing-item {
  list-style: none;
  max-width: 20rem;
  min-width: 12rem;
}
li.event-item a,
li.publishing-item a {
  text-decoration: none;
}
li.event-item div:has( a.related-item ),
li.publishing-item div:has( a.related-item ) {
  font-family: 'notcourier';
  font-size: 0.8rem;
}
li.event-item a.related-item,
li.publishing-item a.related-item {
  text-decoration: underline !important;
}
li.event-item .title,
li.publishing-item .title {
  font-family: dindong;
  font-size: 1.5rem;
  margin-bottom: 0.65rem;
  line-height: 1.1;
  text-decoration: underline;
  text-decoration-thickness: 0.5;
  text-decoration-color: var(--fore);
}
li.event-item p,
li.publishing-item p {
  margin-block: 0.5rem;
}
li.event-item time,
li.publishing-item time {
  max-width: 15rem;
  font-family: 'notcourier';
  font-size: 0.8rem;
}
li.event-item img,
li.publishing-item img {
  min-height: 8rem;
  max-height: 10rem;
  filter: var(--shadow);
  border-radius: var(--d-rad);
}



/*********************************************************** INDEX: frontpage */

.grid section > h2 {
  font-size: 1.4rem;
  font-family: 'notcourier', 'Courier New', Courier, monospace;
}
.index_row ul.events,
.index_row ul.publishing {
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow: scroll;
}
.index_row .publishing-item p:has(time),
.index_row .publishing-item div:has(a.related-item) {
  display: none;
}



/*********************************************************** INDEX: tools */

table.tools th {
  text-align: left;
  font-family: 'notcourier', 'Courier New', Courier, monospace;
  font-size: 0.8rem;
}
table.tools tr th,
table.tools tr td {
  padding-block: 0.25rem;
  box-sizing:  content-box;
}
table.tools tr td.icon img {
  max-height: 4rem;
  max-width: 4rem;
}
table.tools tr td.title h3 {
  margin: 0;
}
table.tools tr td ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: 'notcourier', 'Courier New', Courier, monospace;
  font-size: 0.8rem;
}



/*********************************************************** INDEX: search  */

.searchmatch {
  background-color: var(--accent);
}



/*********************************************************** breakpoints */

/* anything larger than a mobile phone of 600px wide */

@media (min-width: 600px) {

  /* widths for long form reading elements */

  footer,
  p,
  div:not(.mw-parser-output, .grid),
  ul:not(.gallery, .events, .publishing),
  aside,
  menu,
  pre,
  ol,
  iframe,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    max-width: var(--base-width);
  }

  /* header */

  header {
    padding-block: 1rem;
    margin-inline: unset;
    position: sticky;
    top: 0;
    flex-direction: row;
    justify-content: space-between;
    translate: 0;
  }
  header nav {
    flex-direction: row;
  }
  header nav ul {
    flex-wrap: nowrap;
    background-color: var(--back);
    border: var(--solid);
    border-radius: var(--d-rad);
    padding: 0.3rem 0.5rem;
    gap: 0;
  }
  header nav ul li {
    background-color: unset;
    border: unset;
    border-radius: unset;
    padding: unset;
  }
  header #menu-button {
    display: none;
  }

  /* footer */

  footer #meta {
    flex-wrap: nowrap;
  }
  footer #meta .metadata,
  footer #meta .backlinks {
    width: 50%;
  }
  footer nav ul {
    flex-direction: row;
  }

  /* other stuff */

  h1 {
    margin-top: 2rem;
  }
  main aside {
    float: right;
    margin-top: 0;
    margin-left: 1rem;
    margin-right: calc(( 100% - var(--base-width)));
  }
  .mw-pt-languages {
    display: inline-block;
    margin-block: unset;
  }
  .mw-parser-output img {
    margin-inline: auto;
  }
  .index_row ul.events,
  .index_row ul.publishing {
    overflow: auto;
  }
  li.event-item,
  li.publishing-item {
    max-width: 15rem;
  }
  li.event-item img,
  li.publishing-item img {
    max-height: 12rem;
  }

}

/* anything larger than a tablet of 600px wide */

@media (min-width: 900px) {
  .grid {
    display: grid;
    grid-template-columns: fit-content(1fr) 2fr fit-content(1fr);
    grid-template-rows: 1fr;
    gap: 0px 1rem;
    grid-auto-flow: row;
    grid-template-areas: ". . .";
    width: calc( 100% + 2rem );
    margin-left: -1rem;
  }
  .grid .mw-parser-output > * {
    max-width: unset;
  }
  .grid .index_row > h2,
  .grid .index_row > p {
    margin-inline: 1rem;
  }
  .grid .index_row ul {
    display: block;
    min-width: unset;
    margin-left: unset;
  }
}

/* very large screens, where body has a max width */

@media (min-width: 2000px) {
  body {
    max-width: 2000px;
    margin-inline: auto;
  }
  footer nav {
    right: calc( 1rem + ( 100% - 2000px) / 2 )
  }
}

/* Force table to not be like tables anymore */
/* only time we use max-wdith breakpoint becasue its easier */

@media (max-width: 600px) {
  table.tools,
  table.tools thead,
  table.tools tbody,
  table.tools th,
  table.tools td,
  table.tools tr {
    display: block;
  }
  table.tools thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
    opacity: 0;
  }
  table.tools tr {
    margin: 0 0 1rem 0;
    padding-bottom: 1rem;
    border-bottom: var(--solid) red;
  }
  table.tools tr td {
    border: none;
    position: relative;
    padding: 0;
    padding-left: 35%;
  }
  table.tools tr td.title h3 {
    margin-block: 0.25rem;
  }
  table.tools tr td:before {
    position: absolute;
    top: 0;
    left: 6px;
    width: 35%;
    padding-right: 10px;
    white-space: nowrap;
    font-family: 'notcourier', 'Courier New', Courier, monospace;
    font-size: 0.8rem;
  }
  table.tools td:nth-of-type(1):not(:empty):before { content: ""; }
  table.tools td:nth-of-type(2):not(:empty):before { content: "Title"; }
  table.tools td:nth-of-type(3):not(:empty):before { content: "Repositories"; }
  table.tools td:nth-of-type(4):not(:empty):before { content: "In Use"; }
}

/*********************************************************** print styles! */

@media print {
  .noprint,
  nav,
  form,
  menu {
    display: none !important;
  }
  .index_row ul.events,
  .index_row ul.publishing,
  .gallery {
    flex-wrap: wrap;
  }
}
