body {
  margin: 0;
}
/* COMMON HTML */
h1 {
  font-family: sans-serif;
  color: #404142;
  text-align: center;
}
h2 {
  font-family: sans-serif;
  color: #404142;
  font-size: 24pt;
  font-weight: normal;
}
h3 {
  font-family: sans-serif;
  color: #404142;
  font-weight: normal;
  text-transform: uppercase;
}
h4 {
  font-family: sans-serif;
  color: #404142;
  font-weight: normal;
  /* text-transform: uppercase; */
  /* text-align: center; */
  margin: 0;
}
h5 {
  font-family: sans-serif;
  color: #404142;
  font-weight: normal;
  text-transform: uppercase;
  margin: 0;
  text-align: center;
}
h6 {
  font-family: sans-serif;
  color: #404142;
  font-weight: normal;
  text-transform: uppercase;
  margin: 0;
  text-align: center;
}
input {
  height: 28px;
  box-sizing: border-box;
  border-style: solid;
  border-width: 1px;
  border-color: #777;
  border-radius: 3px;
  background-color: #FFF;
}
button,
input[type=submit] {
  height: 28px;
  box-sizing: border-box;
  border-style: solid;
  border-width: 1px;
  border-color: #777;
  border-radius: 3px;
  background-color: #FFF;
  background: linear-gradient(#EEE, #CCC);
}
button:active,
input[type=submit]:active {
  background: linear-gradient(#CCC, #EEE);
}
input[type=checkbox] {
  height: 16px;
  margin: 6px 0px;
}
input[type=radio] {
  height: unset;
}
a {
  color: #18617E;
  text-decoration-style: dotted;
  text-decoration-color: #18617E;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-style: solid;
  background-color: #F0F0F0;
}
a:focus {
  text-decoration-style: solid;
  background-color: #F0F0F0;
}
a:focus {
  background-color: unset;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-color: #5c636e;
}
pre {
  overflow-x: auto;
  padding: 10px;
  max-width: 1000px;
  background-color: #F8F8F8;
}
video {
  max-width: 100%;
}
img {
  max-width: 100%;
  max-height: 95vh;
}
.moin-showhide {
  margin-left: 10px;
}
.moin-item-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.moin-transclusion {
  display: inline-block;
  max-width: 100%;
}
.moin-transclusion > img {
  display: inline-block;
  max-width: 100%;
}
.moin-item-wrapper.left {
  float: left;
}
.moin-item-wrapper.right {
  float: right;
}
.moin-item-wrapper.center {
  text-align: center;
}
.moin-item-wrapper.bottom {
  vertical-align: bottom;
}
.moin-item-wrapper.middle {
  vertical-align: middle;
}
.moin-item-wrapper.top {
  vertical-align: top;
}
a.moin-item-overlay-lr {
  font-size: 1.5rem;
  line-height: 20px;
  width: 20px;
  text-align: center;
  color: #18617E;
  background-color: #F0F0FF77;
  text-decoration-line: none;
  display: none;
  position: absolute;
  top: 0px;
  left: 0px;
}
a.moin-item-overlay-ul {
  font-size: 1.5rem;
  line-height: 20px;
  width: 20px;
  text-align: center;
  color: #18617E;
  background-color: #F0F0FF77;
  text-decoration-line: none;
  display: none;
  position: absolute;
  bottom: 0px;
  right: 0px;
}
.moin-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  border-style: solid;
  border-width: 1px;
  border-color: #777;
}
thead {
  border-bottom-style: solid;
  border-bottom-width: 1px;
  border-bottom-color: #AAA;
}
td {
  padding-left: 5px;
  padding-right: 5px;
}
td.center {
  text-align: center;
}
td.right {
  text-align: right;
}
td.left {
  text-align: left;
}
object[data*="://"] {
  max-width: 100%;
}
li:not(.loose) > p {
  margin: 0;
}
.katex-display {
  overflow: auto clip;
  overflow-clip-margin: 1em;
}
/* COMMON MOIN */
.moin-table-of-contents {
  width: 300px;
  float: right;
  margin-left: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 5px;
  background-color: #F8F8F8;
}
.moin-table-of-contents ol {
  padding-left: 20px;
}
.tablesorter-header-inner {
  display: inline;
}
.tablesorter-header {
  cursor: pointer;
}
.tablesorter-header::before {
  padding-right: 5px;
  font-family: FontAwesome;
  content: "\f0dc";
}
.footer-image-link img {
  max-height: 130px;
}
.tablesorter-header.tablesorter-headerDesc::before {
  content: "\f0dd";
}
.tablesorter-header.tablesorter-headerAsc::before {
  content: "\f0de";
}
.moin-diff-removed span {
  background-color: #EEEE6644;
}
.moin-diff-added span {
  background-color: #66EEEE44;
}
.moin-form dl {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px;
  margin: 0;
}
.moin-form dl dt {
  grid-column: 1;
  align-content: center;
}
.moin-form dl dd {
  grid-column: 2;
  margin: 0;
}
.moin-form dl .moin-inline-label {
  align-content: center;
}
.moin-form dl > input[type=checkbox] {
  justify-self: end;
}
@media (max-width: 400px) {
  .moin-form dl {
    grid-template-columns: auto;
  }
  .moin-form dl dd {
    grid-column: 1;
    margin: 0;
  }
}
.moin-form input[type=submit] {
  margin-top: 20px;
}
.moin-form .hint {
  color: #555;
  font-size: 0.8em;
  padding: 5px 0;
}
#popup {
  padding: 0;
  width: 80%;
  position: absolute;
  top: 10em;
  left: 10%;
  display: none;
  z-index: 10;
  border: 1px solid #777777;
  background: #ffffff;
}
.popup-header {
  background-color: #5c636e;
  padding: 10px;
}
.popup-body {
  padding: 10px;
}
#moin-initials {
  display: flex;
  flex-direction: row;
  column-gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.moin-flash {
  margin-left: 20px;
  margin-right: 20px;
  margin-top: 5px;
  margin-bottom: 5px;
  border-radius: 3px;
  padding: 10px;
}
.moin-flash-info {
  background-color: #E0E0FF;
}
.moin-error {
  margin: 5px 3px;
  border-radius: 3px;
  padding: 5px;
  background-color: #ff99ad;
  line-height: 2;
}
/* BASE */
#moin-main-wrapper {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "header header" "sidebar page" "footer footer";
  font-family: serif;
  color: #000;
  min-height: 100vh;
}
@media (max-width: 800px) {
  #moin-main-wrapper {
    grid-template-columns: initial;
    grid-template-rows: initial;
    grid-template-areas: "header" "page" "sidebar" "footer";
  }
}
header {
  grid-area: header;
}
header .header-1 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "logo sitename search";
  gap: 5px;
  padding: 10px;
  background-color: #5c636e;
  color: #FFFFFF;
  font-family: sans-serif;
  box-shadow: 0 -5px 10px #000;
  position: relative;
}
header .header-2 {
  display: flex;
  flex-direction: row;
  justify-content: end;
  column-gap: 10px;
  padding: 10px;
  background-color: #848b97;
  color: #FFFFFF;
  font-family: sans-serif;
}
header #matfyz-wiki-logo {
  max-height: 30px;
}
#moin-siebar {
  grid-area: sidebar;
}
#moin-page {
  grid-area: page;
  padding: 10px;
  padding-bottom: 30px;
  background: #ffffff;
  min-width: 200px;
}
#moin-footer {
  grid-area: footer;
}
/* HEADER/FOOTER */
:is(header, footer) a {
  text-decoration-line: none;
  color: #FFFFFF;
}
:is(header, footer) a:is(:hover, :focus) {
  background-color: unset;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-color: #FFFFFF;
}
footer {
  display: grid;
  grid-template-areas: "pageinfo image" "credits image";
  row-gap: 10px;
  padding: 10px;
  background-color: #848b97;
}
@media (max-width: 800px) {
  footer {
    grid-template-areas: "pageinfo" "credits" "image";
  }
}
footer a {
  text-decoration-line: none;
  color: #FFFFFF;
}
footer a:hover {
  background-color: unset;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-color: #FFFFFF;
}
footer .footer-image-link {
  grid-area: image;
  justify-self: end;
}
footer .footer-image-link img {
  height: 3em;
}
#moin-logo {
  grid-area: logo;
}
.logo-title {
  font-size: 150%;
  margin: auto 0;
  padding-left: 10px;
}
#moin-searchform {
  grid-area: search;
  justify-self: end;
  align-items: center;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
}
#moin-searchform input[name=q] {
  appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #FFFFFF;
  color: #FFFFFF;
}
#moin-searchform input[name=q]::placeholder {
  color: #FFFFFFDD;
}
@media (max-width: 600px) {
  #moin-searchform input[name=q] {
    display: none;
  }
}
#moin-searchform button {
  background: none;
  border: none;
  color: #FFFFFF;
}
h2:hover > .moin-permalink,
h3:hover > .moin-permalink,
h4:hover > .permalink,
h5:hover > .moin-permalink {
  visibility: initial;
}
.moin-permalink {
  text-decoration: none;
  box-sizing: border-box;
  opacity: 0.5;
  padding-left: 0.3em;
  visibility: hidden;
}
.moin-permalink::after {
  content: "\f064";
  font-family: FontAwesome;
}
.moin-sitename {
  grid-area: sitename;
  align-self: center;
  font-size: 24pt;
  font-family: sans-serif;
  color: unset;
}
#moin-username {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  grid-area: user;
  justify-self: end;
}
@media (max-width: 600px) {
  #moin-username {
    justify-self: start;
  }
}
#moin-navibar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  grid-area: navibar;
  padding-left: 10px;
}
.moin-panel-heading {
  display: none;
}
.moin-breadcrumb {
  grid-area: breadcrumb;
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
#moin-pageinfo {
  grid-area: pageinfo;
  margin: 0;
}
#moin-credits {
  grid-area: credits;
  margin: 0;
}
/* SIDEBAR */
#moin-sidebar {
  padding: 10px;
  background-color: #f9fcff;
}
#moin-sidebar h2 {
  font-size: 14pt;
  margin: 5px;
  margin-bottom: 10px;
}
#moin-sidebar .moin-itemviews {
  display: grid;
  grid-template-columns: auto 1fr;
  flex-direction: column;
  flex-wrap: wrap;
  row-gap: 5px;
  column-gap: 10px;
  list-style: none;
  margin: 0;
  padding-left: 10px;
}
#moin-sidebar .moin-itemviews li {
  display: contents;
}
#moin-sidebar .moin-itemviews .moin-panel-heading {
  display: none;
}
#moin-sidebar .moin-itemviews a {
  display: contents;
}
#moin-sidebar .moin-itemviews .fa {
  align-self: center;
  justify-self: center;
}
#moin-content-data {
  max-width: 1000px;
  margin: auto;
}
.moin-watermark {
  max-width: 1000px;
}
.moin-expanded-macro[data-macro=FlexContainer] > .flex-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.moin-expanded-macro[data-macro=Box] {
  display: contents;
}
.moin-expanded-macro[data-macro=Box] > .box.box-bordered {
  padding: 10px;
  margin: 10px;
  border-style: solid;
  border-width: 1px;
  border-color: #ccc;
}
.moin-expanded-macro[data-macro=Box] > .box.box-bordered.box-half-width {
  box-sizing: border-box;
  width: calc(50% - 20px);
}
@media (max-width: 600px) {
  .moin-expanded-macro[data-macro=Box] > .box.box-bordered.box-half-width {
    width: calc(100% - 20px);
  }
}
.moin-expanded-macro[data-macro=Box] > .box.box-bordered.box-full-width {
  box-sizing: border-box;
  width: calc(100% - 20px);
}
.moin-expanded-macro[data-macro=Box] > .box.box-avoid-column-break {
  break-inside: avoid-column;
}
.moin-expanded-macro[data-macro=Box] > .box.box-titled {
  display: flex;
  flex-direction: column;
  padding: 0;
}
.moin-expanded-macro[data-macro=Box] > .box.box-titled > * {
  margin-left: 10px;
  margin-right: 10px;
}
.moin-expanded-macro[data-macro=Box] > .box.box-titled h2:first-child {
  text-align: center;
  padding: 10px;
  margin: 0;
  font-size: 18pt;
}
.moin-expanded-macro[data-macro=Box] > .box.box-titled h2:first-child a {
  color: #000;
}
.moin-expanded-macro[data-macro=Box] > .box.box-titled h2:first-child .moin-permalink {
  display: none;
}
.moin-expanded-macro[data-macro=Box] > .box.box-infobox {
  padding: 5px;
  margin: 10px;
  border-style: solid;
  border-width: 1px;
  border-color: #ccc;
  min-width: 200px;
  max-width: 400px;
  float: right;
}
.moin-expanded-macro[data-macro=Box] > .box.box-infobox h3 {
  margin: 0;
  text-align: center;
}
.moin-expanded-macro[data-macro=Box] > .box.box-infobox table {
  border-style: none;
}
.moin-expanded-macro[data-macro=Box] > .box.box-infobox thead {
  display: none;
}
.moin-expanded-macro[data-macro=Box] > .box.box-infobox td {
  padding-top: 5px;
}
.moin-expanded-macro[data-macro=Box] > .box.box-infobox td:first-child {
  font-weight: bold;
  padding-left: 0;
  padding-right: 10px;
  vertical-align: top;
}
/* MACROS */
.macro-spoiler-text {
  background-color: #ffffff;
  color: transparent;
  user-select: none;
}
.macro-spoiler-text:hover {
  background-color: inherit;
  color: inherit;
}
.moin-expanded-macro[data-macro=MultiColumn] > div {
  /* We can't just do "columns: attr(...)", since that's not supported in
		 * browsers today. So we hardcode a few reasonable values. */
  /* Sometimes the first element with a margin is actually nested...
		 * TODO: more principled solution? */
}
.moin-expanded-macro[data-macro=MultiColumn] > div[data-columns="2"] {
  column-count: 2;
  /* Reduce the number of columns for smaller screens */
}
@media (max-width: 600px) {
  .moin-expanded-macro[data-macro=MultiColumn] > div[data-columns="2"] {
    column-count: 1;
  }
}
.moin-expanded-macro[data-macro=MultiColumn] > div[data-columns="3"] {
  column-count: 3;
}
@media (max-width: 600px) {
  .moin-expanded-macro[data-macro=MultiColumn] > div[data-columns="3"] {
    column-count: 1;
  }
}
@media (max-width: 800px) {
  .moin-expanded-macro[data-macro=MultiColumn] > div[data-columns="3"] {
    column-count: 2;
  }
}
.moin-expanded-macro[data-macro=MultiColumn] > div > :first-child {
  margin-top: 0;
}
.moin-expanded-macro[data-macro=MultiColumn] > div > :first-child > :first-child {
  margin-top: 0;
}
.moin-expanded-macro[data-macro=MultiColumn] > div > :first-child > :first-child > :first-child {
  margin-top: 0;
}
.moin-expanded-macro[data-macro=ForumPost] > div {
  border-style: solid;
  border-width: 1px;
  border-color: #000;
  border-radius: 10px;
  margin: 20px;
}
.moin-expanded-macro[data-macro=ForumPost] > div > .post-header {
  background-color: #eee;
  border-top-right-radius: 10px;
  border-top-left-radius: 10px;
  padding: 10px;
}
.moin-expanded-macro[data-macro=ForumPost] > div > .post-header > .poster {
  font-weight: bold;
}
.moin-expanded-macro[data-macro=ForumPost] > div > .post-content {
  padding: 10px;
}
.moin-expanded-macro[data-macro=ImageGallery] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: start;
}
.moin-expanded-macro[data-macro=ImageGallery] > .image {
  display: block;
  padding: 10px;
}
@media (min-width: 450px) {
  .moin-expanded-macro[data-macro=ImageGallery] > .image {
    max-width: 50%;
  }
}
@media (min-width: 800px) {
  .moin-expanded-macro[data-macro=ImageGallery] > .image {
    max-width: 33%;
  }
}
.moin-expanded-macro[data-macro=Nsfw] > label {
  display: block;
  overflow: hidden;
  position: relative;
}
.moin-expanded-macro[data-macro=Nsfw] > label > input {
  display: none;
}
.moin-expanded-macro[data-macro=Nsfw] > label > div {
  transition: filter 0.3s ease;
}
.moin-expanded-macro[data-macro=Nsfw] > label > div > p {
  margin: 0;
}
.moin-expanded-macro[data-macro=Nsfw] > label > input:not(:checked) + div {
  filter: blur(100px) brightness(0.5);
}
.moin-expanded-macro[data-macro=Nsfw] > label:has( > input:not(:checked)) {
  border-radius: 10px;
}
.moin-expanded-macro[data-macro=Nsfw] > label:has( > input:not(:checked))::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24pt;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 6px black;
  pointer-events: none;
}
.moin-expanded-macro[data-macro=Spoiler] > label > input {
  display: none;
}
.moin-expanded-macro[data-macro=Spoiler] > label > input:not(:checked) + span {
  visibility: hidden;
}
.moin-expanded-macro[data-macro=Spoiler]:has( > label > input:not(:checked)) {
  border-radius: 5px;
  background-color: black;
}
/* SPECIFIC PAGES */
#moin-modify {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "content-actions preview-actions" "content-editor content-preview" "meta meta";
  width: 100%;
  gap: 10px;
}
#moin-modify form {
  display: contents;
}
#moin-modify .moin-modify-content-actions {
  grid-area: content-actions;
}
#moin-modify .moin-modify-content-actions input {
  margin: 0;
}
#moin-modify .moin-modify-preview-actions {
  grid-area: preview-actions;
}
#moin-modify .moin-modify-preview-actions input {
  margin: 0;
}
#moin-modify .moin-modify-content {
  grid-area: content-editor;
}
#moin-modify .moin-modify-content textarea {
  width: 100%;
  height: 70vh;
  box-sizing: border-box;
}
#moin-modify .moin-modify-preview {
  grid-area: content-preview;
  height: 70vh;
  overflow-y: auto;
}
#moin-modify .moin-modify-meta {
  grid-area: meta;
}
#moin-modify .moin-modify-tabs {
  grid-area: tabs;
  display: none;
}
#moin-modify .moin-diff-collapsible {
  border-style: solid;
  border-width: 1px;
  border-color: #777;
}
#moin-modify .moin-diff-collapsible > summary {
  padding: 5px 10px;
}
#moin-modify .moin-diff-collapsible > .moin-diff {
  border-style: none;
}
#moin-modify input[name="_tabs"] {
  display: none;
}
@media (max-width: 800px) {
  #moin-modify {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "content-actions preview-actions" "tabs tabs" "tab-content tab-content";
  }
  #moin-modify .moin-modify-preview-actions {
    justify-self: end;
  }
  #moin-modify .moin-modify-tabs {
    display: initial;
  }
  #moin-modify .moin-modify-tabs label {
    padding: 5px;
    border-style: solid;
    border-top-right-radius: 3px;
    border-top-left-radius: 3px;
    border-width: 1px;
    border-color: #555;
    border-bottom-style: none;
    background: linear-gradient(#CCC, #EEE);
  }
  #moin-modify .moin-modify-content,
  #moin-modify .moin-modify-preview,
  #moin-modify .moin-modify-meta {
    grid-area: tab-content;
    display: none;
  }
  #moin-modify input[name="_tabs"]:checked + * {
    display: initial;
  }
  #moin-modify:has(#moin-modify-content-tab:checked) label[for="moin-modify-content-tab"],
  #moin-modify:has(#moin-modify-preview-tab:checked) label[for="moin-modify-preview-tab"],
  #moin-modify:has(#moin-modify-meta-tab:checked) label[for="moin-modify-meta-tab"] {
    background: linear-gradient(#F0F0F0, #F8F8F8);
  }
}
#cke_f_content_form_data_text {
  grid-area: text;
  max-height: 800px;
}
.moin-hist-rev {
  display: flex;
}
.moin-index-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 10px;
  color: #18617E;
}
.moin-index-menu p {
  width: 100%;
  color: #000;
}
.moin-index {
  width: 100%;
}
.login-page {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 50px;
}
#moin-content-meta {
  word-break: break-all;
}
/* Scoreboard */
#scoreboard {
  margin: 0 auto;
}
#scoreboard th {
  border: 1px solid #777;
}
#scoreboard td {
  border-top: 1px solid #ccc;
}
#scoreboard th,
#scoreboard td {
  border-left: 1px solid #777;
  border-right: 1px solid #777;
  padding: 0.5em;
}
