:root {
  --chess-rail: 218px;
  --chess-bar: 66px;
  --chess-border: #675477;
  --chess-focus: #fff0ba;
  --chess-brass: #e4b788;
  color-scheme: dark;
}

#site-nav .nav-emblem {
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  height: 31px;
  border: 1px solid #907584;
  border-radius: 5px;
  background: linear-gradient(145deg,#544056,#32283e);
  box-shadow: inset 0 0 0 2px #241b32, 0 2px #191324;
  transition: background-color .19s, border-color .19s, box-shadow .19s;
}
.retro-icon {
  --icon-size: 24px;
  display: inline-block;
  flex: none;
  inline-size: var(--icon-size);
  block-size: var(--icon-size);
  vertical-align: middle;
  background: url("/after-hours/retro-icons.png") no-repeat;
  background-size: auto var(--icon-size);
  background-position: calc(var(--icon-frame) * var(--icon-size) * -1) center;
  image-rendering: pixelated;
  filter: drop-shadow(0 1px #1c142e);
}
.guide-hero::after, .workspace-heading::after {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  background:
    linear-gradient(var(--chess-brass) 0 0) top left / 11px 1px,
    linear-gradient(var(--chess-brass) 0 0) top left / 1px 11px,
    linear-gradient(var(--chess-brass) 0 0) bottom right / 11px 1px,
    linear-gradient(var(--chess-brass) 0 0) bottom right / 1px 11px;
  background-repeat: no-repeat;
  opacity: .65;
}
#site-nav :is(a,button):hover .nav-emblem,
#site-nav [aria-current=page] .nav-emblem {
  background: linear-gradient(145deg,#735359,#43314c);
  border-color: #e9c69d;
  box-shadow: inset 0 0 0 2px #3e2d43, 0 2px #191324;
}
#site-nav [aria-current=page]:is(a,button) { box-shadow: inset 3px 0 #e4b788; border-color: #a58489; }
#site-nav :is(a,button):focus-visible, #site-menu:focus-visible { outline: 2px solid var(--chess-focus); outline-offset: -2px; }

.guide-site .site-bar, .guide-site #site-nav {
  color: #fbecdf;
  background: linear-gradient(155deg, #2a2239, #201c32 58%);
  border-color: #544263;
}
.guide-site .site-bar {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  min-height: var(--chess-bar);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-bottom: 1px solid #544263;
}
.guide-site .logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbecdf;
  text-decoration: none;
  font: 700 1.08rem/1 "Chakra Petch", system-ui, sans-serif;
  text-transform: uppercase;
}
.guide-site .logo img { width: 35px; height: 38px; object-fit: contain; filter: drop-shadow(2px 3px #190f23); }
.guide-site .logo span { color: #d6bdf0; }
.guide-site #site-menu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 .8rem;
  font: 700 .86rem system-ui, sans-serif;
  color: inherit;
  background: #382d49;
  border: 1px solid #695676;
  border-radius: 99px;
  cursor: pointer;
}
.guide-site #site-nav {
  position: fixed;
  inset: var(--chess-bar) 0 auto;
  z-index: 9;
  display: none;
  max-height: calc(100dvh - var(--chess-bar));
  overflow: auto;
  padding: 4px 11px 8px;
  border-bottom: 1px solid #695676;
  box-shadow: 0 10px 24px #17112365;
}
.guide-site.site-menu-open #site-nav { display: block; }
.guide-site .site-nav-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px; padding: 5px 0; }
.guide-site .site-nav-group + .site-nav-group { border-top: 1px solid #544263; }
.guide-site #site-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fbecdf;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
}
.guide-site :is(#site-nav,#site-menu) svg { width: 19px; height: 19px; flex: none; color: #d6bdf0; }
.guide-site #site-nav a:hover { background: #3b2f4b; border-color: #665170; }
.guide-site #site-nav [aria-current=page] { background: #493551; border-color: #a58489; box-shadow: inset 3px 0 #e4b788; }
.guide-site #site-nav [aria-current=page] svg { color: #f3c98b; }

@media (min-width: 1080px) {
  .guide-site { --chess-bar: 76px; padding-inline-start: var(--chess-rail); }
  .guide-site .site-bar, .guide-site #site-nav { position: fixed; width: var(--chess-rail); border-inline-end: 1px solid #544263; }
  .guide-site .site-bar { inset: 0 auto auto 0; }
  .guide-site #site-nav { display: block; inset: var(--chess-bar) auto 0 0; box-shadow: none; }
  .guide-site .site-nav-group { grid-template-columns: minmax(0,1fr); }
  .guide-site .logo img { width: 40px; height: 44px; }
  .guide-site .logo span { display: block; }
  .guide-site #site-menu { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #site-nav .nav-emblem { transition: none; }
}
