@layer refine.reset {
  /*
   * Suppress flash of unstyled content (FOUC) for custom elements.
   *
   * :not(:defined) only matches custom elements that have not yet been
   * upgraded — standard HTML elements are always :defined, so this rule is
   * safe globally. Once customElements.define() runs and the element
   * upgrades, :defined matches and this rule no longer applies.
   *
   * Import this file in your application's CSS bundle (not via JS injection)
   * so the rule is available at first paint:
   *
   *   import '@vielzeug/refine/fouc.css';
   *
   * `visibility: hidden` is used instead of `display: none` to preserve
   * layout space — the element occupies its inline size while invisible,
   * reducing layout shift when the shadow DOM attaches.
   */
  :not(:defined) {
    visibility: hidden;
  }
}
