* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
}

a {
  text-decoration: none;
  color: #4444FF;
  word-break: break-word;
}

.night a {
  color: #FFF;
}

.night p a, .night li > a, .night h2 > a, .night h3 > a, .night h4 > a, .night .more-tutorials a {
  text-decoration: underline;
}

a:hover {
  color: #6666FF;
}

.night a:hover {
  color: #CCC;
}

article, .home {
  overflow: hidden;
}

article img {
  padding: 0.5em;
}

h3, h4, h5 {
  margin: 0.8em 0;
}

h3 {
  font-size: 1.3em;
}

h4 {
  font-size: 1.2em;
}

h5 {
  font-size: 1.1em;
}

hr {
  width: 100%;
  color: #BBB;
}

img {
  width: 100%;
  height: auto;
}

kbd {
  border: 1px solid #AAAAFF;
  border-radius: 5px;
  padding: 0 0.3em;
  background-color: #EEEEFF;
}

.night kbd {
  background-color: #555599;
}

pre, code {
  background-color: #EEE;
}

.night pre, .night code {
  background-color: #555;
}

code {
  font-size: 1.1em;
}

pre {
  padding: 0.5em;
  font-size: 1.2em;
  overflow-x: auto;
  width: 95%;
}

pre code {
  font-size: 1em;
}

table {
  margin: auto;
}

table, tr, th, td {
  border: 1px solid #AAA;
  border-collapse: collapse;
}

th, td {
  padding: 0.3em;
}

.night table, .night tr, .night th, .night td {
  border-color: #CCC;
}

time {
  font-size: 0.9em;
  font-style: italic;
  color: #555;
}

.night time {
  color: #AAA;
}



.post-meta {
  color: #555;
  font-style: italic;
  margin: 0.5em;
}

.night .post-meta {
  color: #AAA;
}

.post-meta p {
  margin: 0.4em 0;
}

.ad-content-box {
  display: grid;
}

@media screen and (min-width: 1000px) {
  .ad-content-box {
    grid-template-columns: 150px 1fr 150px;
  }
}

aside {
  display: none;
  background-color: #DDDDFF;
}

.night aside {
  background-color: #222;
}

@media screen and (min-width: 1000px) {
  aside {
    display: grid;
  }
}

.ad {
  overflow: hidden;
}

.page-content {
  display: grid;
  padding: 0 0.5em 0.5em 0.5em;
}

.night .page-content {
  background-color: #333;
  color: white;
}

a[href$='.jpg'] {
  display: block;
  width: 100%;
  max-width: 600px;
}

.page-content img {
  width: 100%;
  display: block;
  max-width: 600px;
}

.page-content ul {
  padding-top: 0.2em;
}

.page-content li {
  padding-bottom: 0.4em;
}

.page-content li p {
  margin: 0;
}

.page-content li ul {
  padding-top: 0.3em;
  padding-bottom: 0;
}

.post-content p, .post-content li {
  line-height: 1.2;
}

.site-header, .site-footer {
  background-color: #5555FF;
}

.site-header {
  display: grid;
  color: white;
  grid-template-columns: 1fr 30px 30px 40px;
  gap: 0.3em;
  padding: 0.3em 0.2em;
  align-items: center;
}

@media screen and (min-width: 350px) {
  .site-header {
    grid-template-columns: 1fr 35px 35px 45px;
  }
}

@media screen and (min-width: 710px){
  .site-header {
    grid-template-columns: 1fr 50px 50px auto;
    justify-content: space-between;
  }
}

.night .site-header, .night .site-footer {
  background-color: #222277;
}

.header-title {
  display: grid;
  align-items: center;
  grid-template-columns: 20px 1fr;
  gap: 0.1em;
}

@media screen and (min-width: 300px) {
  .header-title {
    grid-template-columns: 30px 1fr; 
  }
}

@media screen and (min-width: 360px){
 .header-title {
    grid-template-columns: 40px 1fr;
  }
}

.header-title-image {
  display: grid;
}

.site-title, .page-link a {
  color: inherit;
  text-decoration: none;
}

.site-title {
  font-size: 0.9em;
  font-weight: bold;
}

.site-title:hover {
  color: inherit;
}

@media screen and (min-width: 300px) {
  .site-title {
    font-size: 1em;
  }
}

@media screen and (min-width: 360px){
  .site-title {
    font-size: 1.2em;
  }
}

@media screen and (min-width: 800px) {
  .site-title {
    font-size: 1.7em;
  }
}

.menu-icon {
  display: grid;
  padding: 0 0.4em;
  height: 20px;
  align-items: center;
}

.menu-icon-bar {
  background-color: white;
  height: 4px;
}

@media screen and (min-width: 300px) {
  .menu-icon {
    height: 24px;
  }

  .menu-icon-bar {
    height: 5px
  }

}

@media screen and (min-width: 360px){
  .menu-icon {
    height: 30px;
  }

  .menu-icon-bar {
    height: 6px;
  }
}

@media screen and (min-width: 710px){
  .menu-icon {
    display: none;
  }
}

.searchBox, .night-switch {
  padding: 0 0.4em;
  display: grid;
  justify-content: center;
}

.searchBox:hover, .night-switch:hover {
  cursor: pointer;
}

.searchBox img, .night-switch img {
  max-width: 30px; 
}

.searchInputBox {
  display: none;
  position: absolute;
  top: 8px;
  width: 100%;
  max-width: 200px;
  height: 35px;
  z-index: 999;
}

@media screen and (min-width: 800px) {
  .searchInputBox {
    max-width: 250px;
  }
}

.searchInputBox form {
  width: 100%;
  height: 100%;
}

.searchInputBox input {
  width: 100%;
  height: 100%;
  padding: 0.2em;
  outline: none;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
}

.night .searchInputBox input {
  background-color: #888;
  color: white;
}

.night .searchInputBox input::placeholder {
  color: white;
}

.trigger {
  display: none;
  position: absolute;
  background-color: #5555FF;
  height: 100vh;
  width: 55%;
  right: 0;
  z-index: 998;
}

.night .trigger {
  background-color: #222277;
}

@media screen and (min-width: 710px){
  .trigger {
    display: flex;
    justify-content: space-between;
    position: initial;
    background-color: initial;
    height: initial;
    width: initial;
    right: initial;
  }
}

.page-link {
  padding: 0.5em;
  display: grid;
  align-content: center;
  text-align: center;
  border-bottom: 1px solid #AAAAFF;
}

.page-link a {
  font-size: 1.5em;
}

@media screen and (min-width: 710px){
  .page-link {
    padding: 0 0.5em;
    text-align: initial;
    border: none;
  }

  .page-link a {
    font-size: 1.2em;
  }
}

.slogan {
  text-align: center;
  padding: 0.5em 0;
}

.slogan h1 {
  font-weight: normal;
}

.slogan p {
  margin: 0;
  font-size: 2em;
  padding: 0.2em 0;
}

.slogan p.sub {
  font-size: 1.5em;
  color: #555;
}

.night .slogan p.sub {
  color: #BBB;
}

.notice {
  text-align: center;
  color: red;
}

.social {
  display: grid;
  width: 95%;
  max-width: 250px;
  margin: auto;
  grid-template-columns: repeat(3, auto);
  padding: 0.5em 0;
  justify-content: space-around;
}

.social-item {
  max-width: 50px;
}

.social-item a {
  display: grid;
}

.social-item img {
  padding: 0;
}

.home-text {
  font-size: 1.4em;
  text-align: center;
  font-style: italic;
}

.post-tags a {
  margin-right: 0.5em;
}

.tag-list ul {
  list-style-type: none;
  padding: 0;
}

.tag-list li {
  display: inline;
  padding: 0 0.2em;
  line-height: 1.3em;
  font-size: 1.1em;
}

.post-list {
  padding: 0.5em 0.4em;
}

.post-list-title {
  font-size: 1.4em;
  padding-bottom: 0.3em;
  color: #222;
}

.night .post-list-title {
  color: #EEE;
}
.post-list ul {
  display: grid;
  list-style: none;
  padding-left: 0;
  margin: 0;
  gap: 0.4em;
}

.mastodon-polls {
  display: grid;
  gap: 0.4em;
}

@media screen and (min-width: 350px) {
  .post-list ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 550px) {
  .post-list ul {
    grid-template-columns: repeat(3, 1fr);
  }
  .mastodon-polls {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 800px) {
  .post-list ul {
    grid-template-columns: repeat(4, 1fr);
  }
  .mastodon-polls {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-list-item {
  position: relative;
}

.post-list-item-image {
  display: grid;
}

.post-list-item:hover img {
  filter: brightness(150%);
}

.post-list-item-image img {
  padding: 0;
}

.post-list-item-title {
  position: absolute;
  width: 100%;
  padding: 0.4em;
  bottom: 0;
  color: white;
  background-color: rgba(0,0,0,0.7);
}

.post-list-item-title h2 {
  font-size: 1em;
  margin: 0.2em;
}

@media screen and (min-width: 1200px) {
  .post-list-item-title h2 {
    font-size: 1.2em;
  }
}

.post-list p {
  margin: 0;
}

.post-list li {
  padding-bottom: 0.7em;
}

.post-list time {
  font-size: 0.8em;
  font-weight: normal;
}

.post-list-item time {
  color: white;
}

.post-list li p {
  padding-left: 0.8em;
  margin: 0;
}

.more-tutorials {
  font-size: 1.2em;
  font-style: italic;
  padding: 0.4em 0;
}

.add-content {
  font-size: 1.3em;
  font-style: italic;
  text-align: center;
}

.add-content p {
  color: #222;
}

.night .add-content p {
  color: #EEE;
}

#markdown-toc {
  font-size: 1.1em;
}

#markdown-toc li {
  padding-bottom: 0.5em;
}

.post {
  padding: 0 0.5em;
}

.post-header {
  font-size: 2.2em;
  margin: 0;
  padding: 0.5em 0;
  font-weight: normal;
  text-align: center;
}

.post-header h1{
  margin: 0;
}

.iframe-mastodon {
  width: 90%;
  max-width: 500px;
  margin: auto;
}

.iframe-cltool {
  width: 100%;
  max-width: 400px;
}

.iframe-cltool-title {
  font-size: 1.2em;
  font-weight: bold;
  padding-bottom: 0.5em;
}

iframe {
  border: none;
}

.pager {
  display: grid;
  padding: 0.6em 0 0.4em 0;
}

.pagination {
  display: flex;
  list-style: none;
  margin: auto;
  padding: 0;
  align-items: center;
}

.pagination li {
  padding: 0 0.4em;
  font-size: 1.3em;
}

.current-page {
  color: #4444FF;
  font-size: 1em;
}

.night .current-page {
  color: white;
}

.comments {
  padding-top: 0.5em;
}

.comments-title {
  display: grid;
}

.comments-title span {
  font-weight: bold;
  font-style: italic;
  font-size: 1.1em;
}

.site-footer {
  display: grid;
  width: 100%;
  padding: 0.4em 0.3em;
  color: white;
}

.footer-heading {
  margin: 0;
}

.footer-heading a {
  color: inherit;
}

.footer-content {
  display: grid;
}

.footer-content p {
  margin: 0.2em 0;
}

.footer-content a {
  color: inherit;
  text-decoration: underline;
}

.footer-social {
  display: grid;
  width: 100%;
  max-width: 150px;
  padding-top: 0.5em;
  padding-bottom: 0.2em;
  grid-template-columns: repeat(3, auto);
  justify-content: space-around;
}

.footer-social-item {
  display: grid;
}

.footer-social-item a {
  display: grid;
  align-items: center;
  max-width: 40px;
}

.cookie-consent-bg {
  display: none;
  position: fixed;
  align-items: center;
  justify-items: center;
  top: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0,0,0,0.5);
  z-index: 99;
}

.cookie-consent {
  width: 90%;
  max-width: 600px;
  background-color: white;
  padding: 0.5em;
}

.cc-text {
  padding-bottom: 0.2em;
}

.cc-text p {
  margin: 0.1em;
}

p.cc-description {
  color: #333;
  font-size: 0.8em;
}

p.cc-privacy {
  color: #333;
  font-size: 0.9em; 
}

.night p.cc-privacy a {
  color: #4444FF;
}

.cc-btn-row {
  display: grid;
  justify-items: center;
}

.cc-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4em;
  width: 100%;
  max-width: 500px;
}

.cc-buttons.more {
  grid-template-columns: auto;
  max-width: 650px;
}

@media screen and (min-width: 600px) {
  .cc-buttons.more {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cc-analytics, .cc-npa, .cc-deny {
  display: none;
}

.cc-manage, .cc-deny, .cc-analytics, .cc-npa, .cc-accept {
  width: 100%;
}

.cc-manage button, .cc-deny button, .cc-analytics button, .cc-npa button, .cc-accept button {
  padding: 0.3em 0.1em;
  font-size: 1.2em;
  width: 100%;
  color: white;
  border: none;
}

button:hover {
  cursor: pointer;
}

.cc-manage button {
  background-color: #4444FF;
}

.cc-manage button:hover {
  background-color: #2222FF;
}

.cc-deny button {
  background-color: #FF4444;
}

.cc-deny button:hover {
  background-color: #FF2222;
}

.cc-analytics button {
  background-color: #FC7A00;
}

.cc-analytics button:hover {
  background-color: #EB6900;
}

.cc-npa button {
  background-color: #33BB33;
}

.cc-npa button:hover {
  background-color: #11AA11;
}

.cc-accept button {
  background-color: #33BB33;
}

.cc-accept button:hover {
  background-color: #11AA11;
}

#restart {
  background-color: #33BB33;
  color: white;
  border: none;
  font-size: 1em;
  padding: 0.4em;
}

#restart:hover {
  background-color: #11AA11;
}

.pagefind-ui {
  --pagefind-ui-primary: #eeeeee;
  --pagefind-ui-text: #eeeeee;
  --pagefind-ui-background: #152028;
  --pagefind-ui-border: #3e637e;
  --pagefind-ui-tag: #152028;
}
