header {
    background-color: rgb(107, 148, 103);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 40px;
    height: 10vh;
}


header h3 {
    font-family: 'SourceCodePro', monospace;
    font-size: 34px;
    color: #ffffff;
    text-align: left;
}

.header-buttons a:hover {
    color: rgb(4, 113, 255);
    transform: translateY(-5px);
}

.button-container img {
    width: 28px;
    height: 28px;
}
.header-buttons {
    display: flex;
    text-align: right;
}

.left-buttons,
.right-buttons {
    display: flex;
    gap: 20px;
}

.header-buttons a {
    display: flex;
    flex-direction: column;
    color: white;
    align-items: center;
}

.header-buttons img {
    width: 28px;
    height: 28px;
}


.back {
    margin-right: auto;
}

#header2 a, #header2 a:visited, #header2 a:active {
  color: white;
}

/* shrink header and buttons on narrow screens */
header {
    padding: 0 clamp(10px, 3vw, 40px);
    height: auto;
    min-height: 10vh;
}

header h3 {
    font-size: clamp(18px, 4vw, 34px);
}

.left-buttons,
.right-buttons {
    gap: clamp(8px, 2vw, 20px);
}

.header-buttons a {
    font-size: clamp(10px, 2.5vw, 16px);
}

.header-buttons img,
.button-container img {
    width: clamp(18px, 5vw, 28px);
    height: clamp(18px, 5vw, 28px);
}
/* Colours for the sidebar. Set these to match header.css. */
:root {
  --sidebar-bg: #1f2937;
  --sidebar-text: #f3f4f6;
  --sidebar-hover: rgba(255, 255, 255, 0.12);
  --sidebar-width: 260px;
}

/* menu icon + title, sitting on the left of the header */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

#menu-toggle,
#sidebar-close {
  display: inline-flex;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: inherit;
  cursor: pointer;
}

#menu-toggle:hover,
#sidebar-close:hover {
  background: rgba(128, 128, 128, 0.25);
}

#menu-toggle:focus-visible,
#sidebar-close:focus-visible,
#sidebar a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* the sidebar, hidden off-screen until opened */
#sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  width: min(var(--sidebar-width), 85vw);
  padding: 12px 0;
  overflow-y: auto;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}

#sidebar-close {
  align-self: flex-end;
  margin: 0 12px 8px;
  color: var(--sidebar-text);
}

#sidebar a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  color: inherit;
  text-decoration: none;
}

#sidebar a:hover {
  background: var(--sidebar-hover);
}

#sidebar a img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

/* dark layer behind the sidebar, click it to close */
#sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* open state */
.sidebar-open #sidebar {
  transform: none;
  visibility: visible;
  transition: transform 0.25s ease;
}

.sidebar-open #sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.sidebar-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  #sidebar,
  #sidebar-overlay {
    transition: none;
  }
}

/*Dropdown Stuff*/

#sidebar .nav-dropdown-toggle {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#sidebar .nav-dropdown-toggle img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

#sidebar .nav-dropdown-toggle .chevron {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

#sidebar .nav-dropdown-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

#sidebar .nav-dropdown-menu {
  display: none;
}

#sidebar .nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu {
  display: block;
}

#sidebar .nav-dropdown-menu a {
  padding-left: 62px;   /* lines up with the other labels */
  font-size: 0.95em;
}

@media (max-width: 600px) {
header {
  min-height: 0;
  padding: 4px 10px;
}

.header-left {
  gap: 6px;
}

#menu-toggle {
  padding: 4px;
}
#menu-toggle svg {
  width: 22px;
  height: 22px;
}

.site-logo {
  height: 24px;
  width: auto;
}

.beta-tag {
  font-size: 10px;
}

.header-buttons a {
  font-size: 10px;
}
.header-buttons img {
  width: 18px;
  height: 18px;
}
}