/* The space below a heading belongs to the group, including when its first
   controls are hidden. Only the visible rows participate in the flex gap. */
[data-ui-surface="shell"] .inspector-panel__section-rows {
  display: flex;
  flex-direction: column;
  row-gap: var(--arhix-space-gap);
  margin-block-start: var(--arhix-space-block);
}

[data-ui-surface="shell"] .inspector-panel__section-rows:not(:has(> :not([hidden]))) {
  display: none;
}

[data-ui-surface="shell"] .inspector-panel__section-rows :is(
  .inspector-panel__field, .inspector-panel__scope, .inspector-panel__graphic-row
) {
  margin-top: 0;
}
