/* Top bar: dropdown menus, server clock, active page marker. Information box for explanatory text. */

.bar nav { flex: 1 1 auto; justify-content: center; align-items: center; gap: 0.25rem 1.5rem; }
.bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1.25rem; margin-left: auto; }

/* Dropdown menus (Tools, Admin and the user menu). They are plain details elements, so they work without JavaScript. */
details.menu { position: relative; }
details.menu > summary {
  display: block;
  padding: 0.35rem 0;
  border-bottom: 3px solid transparent;
  color: var(--grey);
  font: 600 0.875rem var(--head);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after {
  content: "";
  display: inline-block;
  margin: 0 0 0.2rem 0.45rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  padding: 2.5px;
  transform: rotate(45deg);
  transition: transform 0.15s;
}
details.menu[open] > summary::after { margin-bottom: -0.1rem; transform: rotate(-135deg); }
details.menu > summary:hover { color: var(--text); border-bottom-color: var(--line); }
/* The dropdown that holds the current page is marked, even when it is closed. */
details.menu.has-current > summary { color: var(--text); border-bottom-color: var(--lime); }

.menu-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 11rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--lime);
  border-radius: 0 0 6px 6px;
  background: var(--bg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.user-menu .menu-list { left: auto; right: 0; }
nav .menu-list a, .bar-right .menu-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-bottom: 0;
  border-radius: 4px;
  font-size: 0.875rem;
  white-space: nowrap;
}
nav .menu-list a:hover, .bar-right .menu-list a:hover { background: var(--lime-tint); color: var(--text); }
nav .menu-list button, .bar-right .menu-list button {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--grey);
  font: 600 0.875rem var(--head);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
nav .menu-list button:hover, .bar-right .menu-list button:hover { background: var(--lime-tint); color: var(--text); }
/* The current page inside an open dropdown. */
nav .menu-list a[aria-current="page"], .bar-right .menu-list a[aria-current="page"] {
  background: var(--lime-tint);
  color: var(--text);
  box-shadow: inset 4px 0 0 var(--lime);
}
/* The current page among the main links. */
nav > a[aria-current="page"] { color: var(--text); border-bottom-color: var(--lime); }

/* Server clock */
.clock { color: var(--grey); font: 600 0.8125rem var(--head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock-time { color: var(--text); }

@media (max-width: 720px) {
  .bar-right { width: 100%; margin-left: 0; justify-content: space-between; }
  /* On a narrow screen an open dropdown takes its place in the flow instead of floating over the page. */
  .menu-list, .user-menu .menu-list { position: static; margin: 0.2rem 0 0.4rem; box-shadow: none; }
}

/* Information box: neutral on purpose, so help text is not mistaken for a result (green) or an error (red). */
.info {
  max-width: 60rem;
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem 0.5rem;
  border: 1px solid #d3dae3;
  border-left: 4px solid #7b8ba0;
  border-radius: 0 6px 6px 0;
  background: #f3f6f9;
}
.info-title { margin: 0 0 0.5rem; font: 700 0.9375rem var(--head); color: var(--text); }
.info-sub { margin: 0.75rem 0 0.25rem; font: 700 0.8125rem var(--head); color: var(--grey); }
.info ul { margin: 0 0 0.4rem; padding-left: 1.2rem; }
.info li { margin: 0 0 0.3rem; }