@font-face {
  font-family: 'Merriweather';
  src: url('fonts/Merriweather-Regular.ttf') format('truetype');
  font-weight: normal;
}

@font-face {
  font-family: 'Merriweather';
  src: url('fonts/Merriweather-Black.ttf') format('truetype');
  font-weight: bolder;
}

@font-face {
  font-family: 'Merriweather';
  src: url('fonts/Merriweather-BlackItalic.ttf') format('truetype');
  font-weight: bolder;
  font-style: italic;
}

@font-face {
  font-family: 'Merriweather';
  src: url('fonts/Merriweather-Bold.ttf') format('truetype');
  font-weight: bold;
}

@font-face {
  font-family: 'Merriweather';
  src: url('fonts/Merriweather-BoldItalic.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: 'Merriweather';
  src: url('fonts/Merriweather-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Merriweather';
  src: url('fonts/Merriweather-Light.ttf') format('truetype');
  font-weight: light;
}

@font-face {
  font-family: 'Merriweather';
  src: url('fonts/Merriweather-LightItalic.ttf') format('truetype');
  font-weight: light;
  font-style: italic;
}

@font-face {
  font-family: 'Bebas Neue';
  src: url('fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

h1,
h2,
h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: normal;
  color: #eee;
  align-self: center;
  text-align: center;
}


h1 a,
h2 a,
h4 a,
h5 a {
  text-decoration: none;
}

h4 {
  color: #eee;
}

b,
strong {
  color: #eee;
}

a {
  color: #ccc;
  font-weight: bold;
}


body {
  font-family: 'Merriweather', serif;
  background-color: #111;
  color: #ccc;
  display: flex;
  flex-direction: column;
  padding-top: 48px;
  padding-bottom: 20px;
}

html {
  scrollbar-gutter: stable;
  scrollbar-color: #CCCC49 #222;
  overflow-y: scroll;
}

p {
  line-height: 1.4;
}

#top-nav {
  width: 100%;
  padding: 0 16px;
  margin: 0;
  height: 48px;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 60;
  top: 0;
  background-color: #111;
}

#top-nav-container {
  height: 100%;
  width: 100%;
  max-width: 1100px;
  padding: 0 30px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#top-nav-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

#top-nav-brand a {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: normal;
  font-size: 2rem;
  color: #eee;
  text-decoration: none;
  line-height: 1;
}

#top-nav-menu {
  height: 100%;
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow: visible;
}

#top-nav-menu a {
  display: inline-flex;
  align-items: center;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 2px;
  line-height: 1;
  position: relative;
}

#top-nav-menu a:hover {
  text-decoration: none;
}

#top-nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  background: #ccc;
  opacity: 0;
  pointer-events: none;
}

#top-nav-menu a:hover::after {
  opacity: 1;
}

#top-nav-menu a.selected {
  color: #fff;
}

#top-nav-menu a.selected::after {
  opacity: 1;
  background: #CCCC49;
}

#top-nav .lang-switcher {
  display: flex;
  align-items: center;
  gap: 0;
  padding-left: 10px;
  margin-left: 6px;
  border-left: 1px solid #333;
}

#content {
  align-self: center;
  box-sizing: border-box;
  padding: 0 30px;
  max-width: min(1100px, 100%);
}

#content.narrow {
  max-width: min(720px, 100%);
}

.centered {
  align-self: center;
  text-align: center;
}

p:has(+ pre) {
  margin-bottom: 0;
}

p+pre {
  margin-top: 5px;
}

pre {
  overflow: auto;
  border-top: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
  padding: 4px 0;
  background-color: #111;

}

pre.ascii-diagram,
.ascii-diagram pre,
pre:has(> code.ascii),
pre:has(> code.diagram),
pre:has(> code.language-ascii),
pre:has(> code.language-diagram) {
  border-top: none;
  border-bottom: none;
}

code {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

p>code,
a>code,
h1>code,
h2>code,
h3>code,
h4>code,
h5>code,
li>code {
  font-weight: bold;
  color: #ddd;
  font-size: 1em;
}

.copy-button {
  font-family: sans-serif;
  font-size: 0.8rem;
  text-decoration: underline;
}

table th {
  border-bottom: 1px solid #ccc;
}

img,
video {
  margin: 0;
  max-width: 100%;
}

.warning {
  border-color: #CCCC49 !important;
}

.warning h1 {
  border-color: #CCCC49 !important;
  background-color: #CCCC49 !important;
}

.block {
  border: 1px dashed #CCC;
}

.block.padded {
  margin: 10px;
  border: 1px solid #CCC;
}

.block p {
  padding-top: 0;
  font-size: 0.9em;
  padding-left: 15px;
  padding-right: 15px;
}

.block h1 {
  font-size: 1.17em;
  position: relative !important;
  margin: 0 !important;
  text-align: left;
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 2px !important;
  border: 1px solid #CCC;
  color: #111;
  background-color: #CCC;
}

.nopara p {
  padding: 0;
  margin: 0px;
  margin-bottom: -5px;
}

.important {
  color: #F8FA90;
}


li {
  padding: 1px 0;
}

:root {
  font-size: 1rem;
}

@media screen and (min-width: 800px) and (max-width: 1000px) {
  :root {
    zoom: 1.2;
    --viewport-width: calc(100vw / 1.2);
    --viewport-height: calc(100vh / 1.2);
  }
}

@media screen and (min-width: 1000px) and (max-width: 1200px) {
  :root {
    zoom: 1.3;
    --viewport-width: calc(100vw / 1.3);
    --viewport-height: calc(100vh / 1.3);
  }
}

@media screen and (min-width: 1200px) and (max-width: 1400px) {
  :root {
    zoom: 1.4;
    --viewport-width: calc(100vw / 1.4);
    --viewport-height: calc(100vh / 1.4);
  }
}

@media screen and (min-width: 1400px) and (max-width: 1600px) {
  :root {
    zoom: 1.5;
    --viewport-width: calc(100vw / 1.5);
    --viewport-height: calc(100vh / 1.5);
  }
}

@media screen and (min-width: 1400px) and (max-width: 1600px) {
  :root {
    zoom: 1.55;
    --viewport-width: calc(100vw / 1.55);
    --viewport-height: calc(100vh / 1.55);
  }
}


@media screen and (min-width: 1400px) and (max-width: 1600px) {
  :root {
    zoom: 1.6;
    --viewport-width: calc(100vw / 1.6);
    --viewport-height: calc(100vh / 1.6);
  }
}

@media screen and (min-width: 1600px) and (max-width: 1800px) {
  :root {
    zoom: 1.65;
    --viewport-width: calc(100vw / 1.65);
    --viewport-height: calc(100vh / 1.65);
  }
}

@media screen and (min-width: 1800px) {
  :root {
    zoom: 1.7;
    --viewport-width: calc(100vw / 1.7);
    --viewport-height: calc(100vh / 1.7);
  }
}

#top-nav .lang-switcher a + a::before {
  content: "/";
  color: #ccc;
  font-weight: normal;
  display: inline-block;
  margin-right: 10px;
}

@media (max-width: 800px) {
  #top-nav-container {
    padding: 0 16px;
    gap: 10px;
  }

  #content {
    padding: 0 16px;
  }

  #top-nav-menu {
    gap: 10px;
  }
}
