@font-face {
  font-family: "OpenSans";
  src: url("/fonts/OpenSans.ttf");
  font-weight: 100 900;
}

@font-face {
  font-family: "OpenSans";
  src: url("/fonts/OpenSans-Italic.ttf");
  font-style: italic;
  font-weight: 100 900;
}

@font-face {
  font-family: "Bitter";
  src: url("/fonts/Bitter.ttf");
  font-weight: 100 900;
}

@font-face {
  font-family: "Bitter";
  src: url("/fonts/Bitter-Italic.ttf");
  font-style: italic;
  font-weight: 100 900;
}

:root {
  font-size: 14px;
  font-family: "OpenSans", sans-serif, monospace;
  color-scheme: dark;

  --accent-1: orangered;
  --accent-2: rgb(0, 150, 0);

  --text-100: #EEEEEE;
  --text-300: #ffffff60;

  --bg-500: #202020;
  --bg-400: #292929;
  --bg-300: #393939;

  --bar-w: 17rem;
  --content-w: 55rem;
}

::selection {
  background-color: rgba(255, 69, 0, 0.5);
}

body {
  color: var(--text-100);
  background-color: var(--bg-500);
  line-height: 1.2;
}

h1, h2, h3, h4, h5 {
  font-family: "Bitter";
  font-weight: 700;
}

ul, ol {
  margin-left: 1.15rem;
}

ul {
  list-style: disc;
}

ol {
  list-style: number;
}

ul ul,
ol ol {
  margin-top: .5rem;
}

li {
  margin-bottom: .5rem;
}

ul li::marker {
  font-weight: 700;
}

ol li::marker {
  font-weight: 600;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  text-decoration: underline solid var(--accent-2);
}

a[data-disabled] {
  cursor: default;
  pointer-events: none;
  color: var(--text-300);
  text-decoration: none;
}

button {
  cursor: pointer;
}

pre {
  border: 1px solid #ffffff30;
  padding: .5rem;
  font-family: monospace;
}

code {
  background-color: #ffffff20;
  border: 1px solid #ffffff30;
  padding: 0 .2rem;
}

pre > code {
  background-color: transparent;
  border: none;
  padding: 0;
}

img {
  width: 100%;
}

table {
  border: 1px solid #ffffff30;
  min-width: 20rem;
}

thead {
  border-bottom: 1px solid #ffffff30;
  background-color: var(--bg-300);
  text-align: left;
}

thead:has(th:empty) {
  border: none;
}

tbody tr:nth-child(even) {
  background-color: var(--bg-400);
}

td, th {
  padding: .5rem;
}

th:empty {
  display: none;
}

tr:not(:last-child) {
  border-bottom: 1px solid #ffffff30;
}

td:not(:last-child),
th:not(:last-child) {
  border-right: 1px solid #ffffff30;
}

.layout {
  display: grid;
  min-height: 100svh;
  grid-template-columns: var(--bar-w) 1fr;
  grid-template-rows: auto 1fr auto;
  max-width: calc(var(--bar-w) + var(--content-w));
  margin: 0 auto;
}

.site-bar {
  background-color: var(--bg-400);
  grid-row: 2;
  grid-column: 1;
}

@media screen and (max-width: 700px) {
  .layout {
    display: block;
  }

  .site-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 50;
  }

  .site-bar[data-visible] {
    display: block;
    box-shadow: 0 4px 4px #00000055;
  }
}

.site-bar-item {
  padding: .6rem;
}

.site-bar-item p {
  margin-bottom: .5rem;
}

.site-bar-header {
  background-color: var(--bg-300);
  font-family: "OpenSans";
}

.site-bar-header h3 {
  font-family: "OpenSans";
}

.site-content {
  grid-row: 2;
  grid-column: 2;
  padding: 0 2rem;
}

.site-header {
  background: linear-gradient(to right, var(--accent-1), darkgreen);
  font-size: 1.5rem;
  grid-row: 1;
  grid-column: 1;
}

.site-header h2 {
  font-family: monospace;
  text-shadow: 1px 1px 2px black;
  font-weight: 700;
  color: var(--text-100);
}

.site-header a:hover {
  text-decoration: none;
}

.site-bar-button {
  display: none;
}

.site-bar-button > img {
  width: 24px;
}

@media screen and (max-width: 700px) {
  .site-header {
    position: fixed;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .site-bar-button {
    display: block;
    line-height: 0;
    background: none;
    border: none;
  }
}

.site-nav-list {
  list-style: '→';
  list-style-position: inside;
  margin-left: 0;
}

.site-nav-list li::marker {
  content: '→ ';
}

.site-nav-list a,
.home-contact a {
  color: inherit;
  text-decoration: underline var(--accent-1) 1px;
}

.home-news {
  padding: 0;
}

.home-news-item {
  padding: .6rem;
}

.home-news-item:not(:last-child) {
  border-bottom: 1px solid #ffffff30;
}

.home-news-item:last-child {
  margin-bottom: .25rem;
}

.hone-news-item-title {
  font-weight: 700;
  margin-bottom: .25rem;
}

.home-news-item-desc {
  line-height: 1.3;
}

.article h1,
.article h2 {
  border-bottom: 1px #ffffff30 solid;
  padding-bottom: .2rem;
}

.article h1 {
  font-size: 2rem;
}

.article h2 {
  font-size: 1.5rem;
}

.article h3 {
  font-size: 1.25rem;
}

.article p {
  line-height: 1.5;
}

.article ul,
.article ol {
  margin-left: 2rem;
}

.article > :not(:first-child) {
  margin-top: 1em;
}

@media screen and (max-width: 700px) {
  .site-content {
    padding: 1rem;
  }
}

.section-content {
  position: relative;
  margin-top: 2rem;
  line-height: 1.4;
}

.section-content h2 {
  font-size: 1.5rem;
  margin-bottom: .25rem;
}

.section-content h2::before {
  content: '→';
  position: absolute;
  left: 0;
}

.section-content-item {
  margin-bottom: 1.25rem;
}

.section-content-item > * {
  margin-left: 2rem;
}

.section-pager {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background-color: var(--bg-400);
  border: 1px solid #ffffff30;
  padding: .5rem;
}

.section-pager-previous {
  grid-column: 1;
}

.section-pager-current {
  text-align: center;
}

.section-pager-next {
  grid-column: 3;
  text-align: end;
}

.site-footer {
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
  grid-row: 3;
  grid-column: 2;
  border-top: 1px solid #ffffff30;
}

.post-info table {
  min-width: 0;
  width: 100%;
}

.post-info * {
  border: none !important;
  padding: .25rem 0 ;
}

.post-info td:last-child {
  text-align: end;
  font-weight: 500;
}

.notice {
  background-color: #e38a0599;
  border: 1px solid #e38a05;
  padding: .5rem;
  font-weight: 500;
}

.notice > p {
  line-height: 1.3;
}

.notice > p:first-child {
  line-height: 1.5;
  font-weight: 700;
  margin-bottom: .25rem;
}

.notice[data-critical] {
  background-color: #e3260599;
  border: 1px solid #e32605;
}

.notice[data-success] {
  background-color: #5db01e99;
  border: 1px solid #5db01e;
}

.img-subtext {
  text-align: center;
  color: #ffffff90;
  margin-top: .5rem !important;
}

.filler {
  grid-column: 1;
  grid-row: 3;
  background-color: var(--bg-400);
  width: 100%;
  height: 100%;
}

.top-bar {
  grid-row: 1;
  grid-column: 2;
  padding: 0 2rem;
  display: grid;
  align-items: center;
}

@media screen and (max-width: 700px) {
  .top-bar {
    display: none;
  }
}
