/* The site menu, top right on every page (the markup sits between site-menu markers in each
   page). Wide windows show the links in a row; narrow ones show a Menu button that opens the
   list (a <details>, so it works without script; menu.v1.js only closes it on an outside tap
   or Escape). The home page pins it to the window's top right over the garden's sky
   (.site-menu-fixed); the other pages put it in their header. Self-contained: nothing here
   depends on site.v2.css or home.v8.css, and nothing in them is changed by it. */
.site-menu {
  --menu-green: #2f6b3e;
  --menu-green-deep: #1f4b2b;
  --menu-pill: rgba(255, 253, 247, .92);
  --menu-chosen: #e3f1df;
  font: 600 15px/1.2 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  position: relative;
  z-index: 20;
}
.site-menu-fixed {
  position: fixed;
  top: max(env(safe-area-inset-top), clamp(10px, 2.4vh, 22px));
  right: max(env(safe-area-inset-right), clamp(12px, 3vw, 40px));
}
.site-menu ul { list-style: none; margin: 0; padding: 0; }
.site-menu a { color: var(--menu-green); text-decoration: none; display: block; border-radius: 999px; }
.site-menu a:hover { color: var(--menu-green-deep); background: var(--menu-chosen); }
.site-menu a[aria-current="page"] { color: var(--menu-green-deep); background: var(--menu-chosen); }
.site-menu a:focus-visible, .site-menu summary:focus-visible {
  outline: 3px solid rgba(47, 107, 62, .45);
  outline-offset: 2px;
}

.menu-row {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--menu-pill);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(31, 75, 43, .2);
}
.menu-row a { padding: 7px 13px; }

/* (site.v2.css gives every <details> a rule and padding, for its questions; not this one.) */
.menu-drop { display: none; border: 0; padding: 0; margin: 0; }
.menu-drop summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 15px 0 13px;
  color: var(--menu-green);
  background: var(--menu-pill);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(31, 75, 43, .2);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.menu-drop summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}
.menu-icon { position: relative; }
.menu-icon::before { position: absolute; top: -5px; }
.menu-icon::after { position: absolute; top: 5px; }
.menu-drop[open] .menu-icon { background: transparent; }
.menu-drop[open] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-drop[open] .menu-icon::after { top: 0; transform: rotate(-45deg); }
.menu-drop ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  padding: 6px;
  background: #fffdf7;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(31, 75, 43, .22), 0 1px 3px rgba(31, 75, 43, .2);
}
.menu-drop li a { padding: 11px 14px; font-size: 16px; border-radius: 12px; }

.site-header .site-menu { margin-left: auto; }

@media (max-width: 900px) {
  .menu-row { display: none; }
  .menu-drop { display: block; }
}
/* Phones: just the round button, so it never runs into the name at the top left. */
@media (max-width: 520px) {
  .site-menu-fixed { top: max(env(safe-area-inset-top), 12px); right: max(env(safe-area-inset-right), 10px); }
  .menu-drop summary { width: 42px; height: 42px; padding: 0; justify-content: center; }
  .menu-drop summary span:not(.menu-icon) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
@media (max-width: 340px) {
  .site-menu-fixed { top: max(env(safe-area-inset-top), 10px); right: max(env(safe-area-inset-right), 6px); }
  .menu-drop summary { width: 38px; height: 38px; }
}
