:root { --jj-nav: 52px; }

html { scroll-behavior: smooth; }
html:has(body.jj-has-nav) { scroll-padding-top: calc(var(--jj-nav) + 8px); }

.jj-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000002;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #071007;
  color: #d7ffe2;
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  line-height: 1.3;
  border-bottom: 2px solid #33ff66;
  box-shadow: 0 2px 0 #06210e;
}
.jj-nav a {
  color: #d7ffe2;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  line-height: 1.3;
}
.jj-nav a:hover,
.jj-nav a:focus-visible {
  color: #06210e;
  background: #33ff66;
  outline: 2px solid #e8ffe9;
  outline-offset: 2px;
}
.jj-nav a[aria-current="true"] {
  color: #06210e;
  background: #33ff66;
  text-decoration: none;
}
#jj-menu {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0 6px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: #33ff66 #071007;
}
#jj-menu a {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  padding: 0 0.75em;
  white-space: nowrap;
}
body.jj-has-nav { padding-top: var(--jj-nav); }
h1, h2, #top { scroll-margin-top: 0; }
.jj-skip {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  transform: translateY(-160%);
  background: #33ff66;
  color: #06210e;
  padding: 8px 12px;
  font-family: "Courier New", Courier, monospace;
}
.jj-skip:focus { transform: none; }
body .jj-archive { top: var(--jj-nav); z-index: 1000001; }

@media (min-width: 960px) {
  #jj-menu { flex-wrap: wrap; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
