@layer reset {
	/* iOS Safari inflates small text in landscape while this is auto. On the
	   root it covers the whole page, light DOM and shadow roots alike. */
	html {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}

	html:has(nldd-shell),
	html:has(nldd-shell) body {
		margin: 0;
		height: 100%;
	}

	/* Where the shell does not paint (the overscroll in Safari), the root shows. */
	html:has(nldd-shell) {
		background-color: var(--semantics-surfaces-base-background-color);
	}

	html:has(nldd-shell[background="tinted"]) {
		background-color: var(--semantics-surfaces-tinted-background-color);
	}

	/* Components set their own typography inside their shadow root, but text the
	   consumer writes in the light DOM fell back to the browser default, so every
	   app solved it with its own `body { font: … }`, each one slightly different.
	   Inside @layer reset, so any consumer rule beats it without effort. */
	html:has(nldd-shell) body {
		font: var(--primitives-font-body-md-regular-snug);
		color: var(--semantics-content-color);
	}
}
