body {
  margin: 0 auto;
  max-width: 50em;
}

body {
  font-family: "Helvetica", "Arial", sans-serif;
  line-height: 1.5;
  padding: 3em 1em;
  color: #555;
}

h1,
h2,
strong {
  color: #333;
}

h2 {
  margin-top: 0em;
  padding-top: 0.5em;
  margin-bottom: 0em;
}

code,
pre {
  background: #eee;
}

code {
  padding: 2px 4px;
  vertical-align: text-bottom;
}

pre {
  padding: 1em;
}

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

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1 a {
  color: inherit;
  text-decoration: none;
}

h1 a:hover {
  text-decoration: none;
}

#mastheader a {
  color: #000;
  marA: 0em;
}

#pagetitle {
  font-size: 1.5em;
}

.home-icon {
  font-size: 24px;
  color: #333;
  text-decoration: none;
  margin: 10px;
}

.home-icon:hover {
  color: #555;
}

.dark-mode-toggle {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

#dark-mode-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
}

.dark-mode-toggle label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.dark-mode-toggle label:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

#dark-mode-checkbox:checked+label {
  background-color: #2196F3;
}

#dark-mode-checkbox:checked+label:before {
  transform: translateX(26px);
}

.fa-moon,
.fa-sun {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
}

.fa-moon {
  left: 10px;
}

.fa-sun {
  right: 10px;
}

.top-right-controls {
  position: fixed;
  /* was absolute */
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  z-index: 1000;
}

.home-icon {
  margin-right: 20px;
  color: #333;
}

.dark-mode {
  background-color: #1a1a1a;
  color: white;
  /* Other dark mode specific styles */
}

.dark-mode .home-icon {
  color: white;
}

.dark-mode #mastheader a {
  color: #eee;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode strong {
  color: #eee;
}

.dark-mode pre {
  background-color: #444;
  color: #f8f8f2;
}

.dark-mode code {
  background-color: #444;
  color: #f8f8f2;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 800px) {

  .top-right-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
  }
}
