@layer blocks {
  /* Pair of exclusive options: DE/EN in the nav and the profile form,
     language and export on /mgm/social-assets. Links and buttons mark the
     active half with aria-current, same hook as the nav. As a form field
     the halves are labels around visually hidden radios, active when
     checked. */
  .choice {
    display: flex;
    inline-size: fit-content;
    overflow: hidden;
    border: var(--stroke-m) solid var(--color-text);
    border-radius: var(--radius-s);
    font-size: var(--text-xs);
    font-weight: var(--weight-semi);
  }

  .choice :is(a, button, label) {
    padding: var(--space-1) var(--space-2);
    line-height: var(--leading-snug);
    color: var(--color-text-faint);
    --link-decoration: none;
  }

  .choice :is(a, button, label):hover {
    color: var(--color-text);
  }

  .choice :is(a, button)[aria-current],
  .choice label:has(:checked) {
    background: var(--color-text);
    color: var(--color-bg);
  }

  /* The radio is hidden, so its focus ring shows on the pair. */
  .choice:has(:focus-visible) {
    outline: var(--stroke-l) solid var(--color-focus);
    outline-offset: 3px;
  }
}
