@media (min-width: 1024px) {
  #header {
    flex-wrap: wrap;
  }
}

.dashboard #content {
  width: auto;
}

.dashboard #content.colMS {
  margin-right: 0 !important;
}

#content-related {
  clear: both;
  float: left;
  width: 100%;
  margin-top: 20px;
  padding-bottom: 1px; /* contain the margin */
}

/* QUICKPANEL TOGGLE
 * The triangle is drawn on #branding and not on #site-name so that projects
 * can still use #site-name::after, e.g. to show the environment. */

.qp-active #branding {
  align-items: center;
  cursor: pointer;
}

.qp-active #branding::after {
  content: "▲";
  font-size: 0.75rem;
  color: var(--header-branding-color);
  margin-inline-start: -0.75em;
  transform: rotate(180deg);
  transition: transform 0.2s;
}

.qp-open #branding::after {
  transform: none;
}

/* GROUPS (dashboard and quickpanel) */

.groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, clamp(225px, 20vw, 350px));
  gap: 30px;
}

.group h2 {
  margin: 0 0 10px;
  color: var(--body-quiet-color);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.groups a.addlink {
  position: relative;
  right: -10px;
}

/* QUICKPANEL: the app list inside the header, on --header-bg */

#quickpanel {
  display: none;
  line-height: normal;
  flex-basis: 100%;
  align-self: stretch;
  padding: 16px 0 8px;
}

.qp-open #quickpanel {
  display: block;
}

#quickpanel .group h2 {
  color: color-mix(in srgb, var(--header-link-color) 75%, var(--header-bg));
}

#quickpanel .module {
  border-color: color-mix(
    in srgb,
    var(--header-link-color) 20%,
    var(--header-bg)
  );
  background: transparent;
  box-shadow: none;
  color: var(--header-link-color);
}

#quickpanel caption {
  border-color: color-mix(
    in srgb,
    var(--header-link-color) 20%,
    var(--header-bg)
  );
  background: color-mix(
    in srgb,
    var(--header-link-color) 10%,
    var(--header-bg)
  );
}

#quickpanel a:link,
#quickpanel a:visited,
#quickpanel caption a.section:link,
#quickpanel caption a.section:visited {
  color: var(--header-link-color);
}

#quickpanel tr {
  background: transparent;
}

#quickpanel tr:hover {
  background: color-mix(in srgb, var(--header-link-color) 8%, var(--header-bg));
}

#quickpanel th,
#quickpanel td {
  border-color: color-mix(
    in srgb,
    var(--header-link-color) 15%,
    var(--header-bg)
  );
}

#quickpanel .module table th {
  width: 100%;
}

#quickpanel tr:last-child td,
#quickpanel tr:last-child th {
  border-bottom: none;
}
