@layer components {
  /* Base
  /* -------------------------------------------------------------------------- */

  /* A settings page: a card per section, spaced well apart so the destructive
     one never sits against an everyday save button */
  .settings {
    display: flex;
    flex-direction: column;
    gap: calc(var(--block-space-double) * 1.5);
    max-inline-size: 44rem;
  }

  /* Elements
  /* -------------------------------------------------------------------------- */

  .settings__section {
    --card-gap: var(--block-space);

    /* The form fills its card rather than keeping to its own width */
    .form {
      max-inline-size: none;
    }

    /* The form's trailing actions sit on the card's padding, not below it */
    .form__actions {
      margin-block-start: var(--block-space);
    }
  }

  .settings__title {
    font-size: var(--text-medium);
    font-weight: 600;
    margin: 0;
  }

  .settings__title--danger {
    color: var(--color-negative);
  }

  /* One destructive action: what it does on the left, the button on the right,
     stacking on narrow screens */
  .settings__action {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--block-space);
    justify-content: space-between;
  }

  .settings__action-label {
    font-weight: 600;
    margin: 0 0 var(--block-space-half);
  }
}
