/*
 * MA-ZAL Group — base: page ground, type, links, containers, section rhythm. Loaded on every page by the theme.
 * Values come from tokens.css only. Components live in components.css; bars and menus in shell.css.
 * Element rules use :where(.mzs) (no added weight): any component class wins over them without extra selectors.
 */
body.mzs {
	margin: 0;
	background: var(--c-paper);
	color: var(--c-ink);
	font-family: var(--f-text);
	font-size: var(--fs-body);
	line-height: var(--lh-text);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	-webkit-tap-highlight-color: transparent;
}

:where(.mzs) h1,
:where(.mzs) h2,
:where(.mzs) h3,
:where(.mzs) h4 {
	margin: 0;
	font-family: var(--f-text);
	font-weight: var(--fw-bold);
	line-height: var(--lh-tight);
	color: inherit;
	text-wrap: balance;
}

:where(.mzs) h1 { font-size: var(--fs-h1); }
:where(.mzs) h2 { font-size: var(--fs-h2); }
:where(.mzs) h3 { font-size: var(--fs-h3); }

:where(.mzs) p {
	margin: 0;
}

:where(.mzs) a {
	color: var(--c-gold-text);
	text-decoration: none;
	transition: color var(--t-fast);
}

:where(.mzs) a:hover {
	color: var(--c-ink);
}

:where(.mzs) :focus-visible {
	outline: 2px solid var(--c-gold);
	outline-offset: 3px;
	border-radius: var(--r-sm);
}

:where(.mzs) img {
	max-width: 100%;
	height: auto;
	display: block;
}

.mzs-main {
	display: block;
}

/* line icons are drawn with strokes: the theme's svg fill must not paint them */
:where(.mzs) svg[fill="none"] {
	fill: none;
}

/* icons that point (arrows) follow the reading direction */
.mzs-arrow {
	transform: scaleX(var(--dir-x));
}

/* width of the page content */
.mzs-container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
	box-sizing: border-box;
}

/* one home section */
.mzs-section {
	padding-block: var(--section-y);
	scroll-margin-top: calc(var(--bar-h) + var(--safe-top));
}

.mzs-section--night {
	background: var(--c-night);
	color: var(--c-on-night);
}

/* inner pages: space under the header and above the dock */
.mzs-inner {
	padding-block: var(--s-6) var(--s-8);
}

.mzs-muted {
	color: var(--c-ink-2);
}

.mzs-num {
	font-variant-numeric: tabular-nums;
}

.mzs-ltr {
	direction: ltr;
	unicode-bidi: isolate;
}

.mzs-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.mzs *,
	.mzs *::before,
	.mzs *::after {
		animation-duration: 0.01ms;
		transition-duration: 0.01ms;
		scroll-behavior: auto;
	}
}
