sh-expander {
	--sh-expander-text-color: var(--sh-color-neutral-0);
	--sh-expander-surface-color: var(--sh-color-neutral-100);

	/* The fade has to land on whatever the content sits on, or it paints a band of a colour the
	   page never uses. Feeding the component's own knob keeps that in one place. */
	--shadow-color: var(--sh-expander-surface-color);

	color: var(--sh-expander-text-color);

	/* Content */

	&::part(content) {
		margin-block-end: var(--sh-space-xs);
	}

	&::part(trigger) {
		padding-block: var(--sh-space-xs);
		font-weight: 700;
		color: var(--sh-expander-text-color);
		text-decoration: underline;
		text-decoration-color: color-mix(in oklch, currentColor, transparent 75%);
		text-underline-offset: 0.3ex;
	}

	&::part(trigger):hover {
		text-decoration-color: currentColor;
	}

	&::part(trigger):focus-visible {
		outline: var(--sh-focus-outline);
		outline-offset: var(--sh-focus-outline-offset);
	}
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
	sh-expander::part(trigger) {
		transition: text-decoration-color 100ms ease;
	}
}
