/* Site menu: three menus with their sub-pages underneath. The HTML comes from tools/nav.py. */
.navlinks { gap: .4rem 1.3rem; flex-wrap: wrap; position: relative; }
.menu { position: relative; display: flex; align-items: center; gap: .1rem; }
.menu-toggle { background: none; border: 0; padding: .45rem .35rem; margin: 0; cursor: pointer; color: inherit; line-height: 1; border-radius: 6px; }
.menu-toggle::before { content: ""; display: block; width: .45rem; height: .45rem; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.menu.open .menu-toggle::before { transform: translateY(2px) rotate(225deg); }
.submenu { display: none; position: absolute; top: 100%; right: 0; z-index: 20; min-width: 17rem; margin: 0; padding: .45rem; list-style: none; background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); }
.menu.open .submenu { display: block; }
@media (hover: hover) { .menu:hover .submenu { display: block; } }
.navlinks .submenu a { display: block; padding: .5rem .7rem; border-bottom: 0; border-radius: 8px; font-weight: 600; line-height: 1.3; }
.navlinks .submenu a:hover, .navlinks .submenu a[aria-current] { background: var(--sky); }

/* Highlighter stroke: blue by default, green with .hl-green, yellow with .hl-yellow */
.hl, .navlinks a.hl {
  --hl: 96,190,255;
  padding: .12em .5em .16em; margin: 0 -.15em; border-bottom: 0;
  border-radius: .9em .35em 1em .3em / .5em 1em .45em .9em;
  background: linear-gradient(100deg, rgba(var(--hl),0) 0, rgba(var(--hl),.9) 4%, rgba(var(--hl),.6) 55%, rgba(var(--hl),.85) 95%, rgba(var(--hl),0) 100%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hl-green, .navlinks a.hl-green { --hl: 88,214,141; }
.hl-yellow, .navlinks a.hl-yellow { --hl: 255,206,51; }
.navlinks a.hl:hover { background-color: rgba(var(--hl),.35); }
.latest-post .hl { margin-right: .35em; }

@media (max-width: 760px) {
  .menu { position: static; }
  .submenu { left: 0; right: 0; min-width: 0; margin-top: .3rem; }
}
@media (prefers-reduced-motion: reduce) { .menu-toggle::before { transition: none; } }
