If a component is reused across multiple sections of the same page, define it at the page level:
```jsx
<!-- Used in multiple places on the same page -->
<sectiondata-component="install">
<divdata-component="method">
<h3data-component="title">npm</h3>
</div>
<divdata-component="method">
<h3data-component="title">bun</h3>
</div>
</section>
<sectiondata-component="screenshots">
<divdata-slot="left">
<divdata-component="title">Screenshot Title</div>
</div>
</section>
```
```css
[data-page="home"] {
/* Reusable title component defined at page level since it's used in multiple components */
[data-component="title"] {
text-transform: uppercase;
font-weight: 400;
}
[data-component="install"] {
/* install-specific styles */
}
[data-component="screenshots"] {
/* screenshots-specific styles */
}
}
```
This is correct because the `title` component has consistent styling and behavior across the page.
## Key Clarifications
1.**JSX Nesting is Flexible**: Components can be nested inside slots, slots can contain components - whatever makes semantic sense
2.**CSS Hierarchy is Strict**: Follow pages → components → slots structure in CSS
3.**Reusable Components**: Define at the appropriate level where they're shared (page level if used across the page, component level if only used within that component)
4.**DOM vs CSS Structure**: These don't need to match - optimize each for its purpose