/* Minao base layer: focus ring, selection, reduced motion, scroll offsets.
   Token variables only (raw values: 0, 1px hairlines). Loaded on the front end and in the editor. */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--border--focus) solid var(--wp--preset--color--focus);
	outline-offset: var(--wp--custom--border--focus-offset);
}

/* The parent theme rings every focused element (:where(.wp-site-blocks :focus), currentColor), so a mouse click left a
   rectangle on links and buttons, square or round depending on the element. The ring stays for the keyboard only. */
:where(.wp-site-blocks) :focus:not(:focus-visible) {
	outline: 0;
}

::selection {
	background: var(--wp--preset--color--signature-2);
	color: var(--wp--preset--color--contrast);
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:target,
[id^="comment-"],
#reviews {
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--layout--header-height-mobile) + var(--wp--preset--spacing--40));
}

@media (min-width: 1024px) {
	:target,
	[id^="comment-"],
	#reviews {
		scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--40));
	}
}

@media (max-width: 600px) {
	:target,
	[id^="comment-"],
	#reviews {
		scroll-margin-top: calc(var(--wp--custom--layout--header-height-mobile) + var(--wp--preset--spacing--40));
	}
}

/* Dark and photo grounds use the inverse focus ring. */
:where(.is-style-section-deep, .is-style-section-accent, .wp-block-cover) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: var(--wp--preset--color--focus-inverse);
}

/* buttons: lift and press (motion review 2026-11-13). The lift only where a real pointer hovers (a tap on a phone left
   the button lifted); every button presses to motion.press-scale on the scale property, so it never fights the lift's
   transform. Cards and rows (wider surfaces) do not scale. Transitions: core/button in theme.json, woo-base.css. */
@media (hover: hover) and (pointer: fine) {
	.wp-block-button .wp-block-button__link:hover,
	.wc-block-components-button:not(.is-link):hover,
	.woocommerce :is(a.button, button.button, input.button):hover {
		transform: translateY(-2px);
	}
}
.wp-block-button .wp-block-button__link:active,
.wc-block-components-button:not(.is-link):active,
.woocommerce :is(a.button, button.button, input.button):active {
	scale: var(--wp--custom--motion--press-scale);
}

/* article title links: a 44px target over a one-line title (the visual stays the same) */
.wp-block-post .wp-block-post-title a {
	position: relative;
}

.wp-block-post .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 50%;
	height: max(100%, var(--wp--custom--control--min));
	translate: 0 -50%;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Articles (template single, post content class mn-article; owner 2026-10-30): the headings an author types are the
   article's sub-headings, one step quieter than the site's section titles, with more room above than below. The post editor (body
   .post-type-post, without the template) shows the same. */
:is(.mn-article, .post-type-post .is-root-container) > h2 { font-size: var(--wp--preset--font-size--x-large); margin-block-start: var(--wp--preset--spacing--60); }
:is(.mn-article, .post-type-post .is-root-container) > h3 { font-size: var(--wp--preset--font-size--large); margin-block-start: var(--wp--preset--spacing--50); }
:is(.mn-article, .post-type-post .is-root-container) > :is(h2, h3) + * { margin-block-start: var(--wp--preset--spacing--30); }
