@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. The pair is a gapless cluster; each half is a --size-target
     wide, so their hit areas never overlap. */
  .choice {
    --cluster-space: 0;
    --cluster-align: stretch;
    inline-size: fit-content;
    border: var(--stroke-m) solid var(--color-text);
    border-radius: var(--radius-s);
    font-size: var(--text-xs);
    font-weight: var(--weight-semi);
  }

  /* The halves round to the border's inner edge, so the active fill stays
     inside the corners without clipping the hit areas. */
  .choice :is(a, button, label) {
    min-inline-size: var(--size-target);
    padding: var(--space-1) var(--space-2);
    border-radius: calc(var(--radius-s) - var(--stroke-m));
    line-height: var(--leading-snug);
    text-align: center;
    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;
  }
}
