fieldset.cmp-news-setting {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset.cmp-news-setting > legend {
  padding: 0;
  font-weight: 650;
}

fieldset.cmp-news-setting > p {
  margin: .35rem 0;
  line-height: 1.45;
}

/* A small visible control inside a comfortable touch target. */
button.cmp-news-switch[role="switch"],
#profile-email-updates-choice,
#md-news-switch {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  align-self: start;
  gap: 7px;
  box-sizing: border-box;
  width: fit-content;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 0 3px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--text, inherit);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

.cmp-news-track,
.profile-updates-track,
.md-profile-news .md-news-track {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 26px;
  height: 14px;
  padding: 2px;
  border: 1px solid currentColor;
  border-radius: 8px;
  color: var(--muted, currentColor);
}

.cmp-news-track::after,
.profile-updates-track::after,
.md-profile-news .md-news-track::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

[aria-checked="true"] > :is(.cmp-news-track, .profile-updates-track, .md-news-track) {
  justify-content: flex-end;
  border-color: var(--yellow, #236947);
  background: var(--yellow, #236947);
  color: var(--panel, white);
}

button.cmp-news-switch:focus-visible,
#profile-email-updates-choice:focus-visible,
#md-news-switch:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

button.cmp-news-switch:disabled,
#profile-email-updates-choice:disabled,
#md-news-switch:disabled {
  opacity: .62;
  cursor: default;
}

button.cmp-news-switch[hidden],
#profile-email-updates-choice[hidden],
#md-news-switch[hidden],
.cmp-news-setting[hidden] {
  display: none;
}

@media (forced-colors: active) {
  [aria-checked="true"] > :is(.cmp-news-track, .profile-updates-track, .md-news-track) {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }
}

@media (max-width: 540px) {
  .pr-actions:has(#pr-submit:not([hidden])),
  #profile-form:has(#invite-news:not([hidden])) .profile-actions {
    flex-wrap: wrap;
  }

  .pr-actions #pr-submit,
  .pr-actions #pr-news-skip,
  .profile-actions #invite-news-skip,
  #profile-form:has(#invite-news:not([hidden])) #profile-save {
    box-sizing: border-box;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
}
