/**
 * The glossary's links in guides and their definition card (S012; docs/04 §6.2, 10 §4.17; assets/js/glossary-pop.js).
 * Loaded without blocking, only on an article whose terms were linked. A dotted underline marks a glossary link; the
 * card sits in a fixed layer above the page, so opening it never moves the text.
 */

.mn-gl-link {
	text-decoration-line: underline;
	text-decoration-style: dotted;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.22em;
}
.mn-gl-link:hover { text-decoration-style: solid; }

.mn-gl-pop {
	--mn-gl-arrow: 50%;
	position: fixed;
	z-index: var(--mn-z-toast, 70);
	box-sizing: border-box;
	inline-size: min(21rem, calc(100vw - 24px));
	padding: 16px 18px 6px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--wp--custom--radius--md, 10px);
	background: var(--wp--preset--color--ink-2, #0f1318);
	box-shadow: var(--wp--preset--shadow--pop);
	color: var(--wp--preset--color--on-dark-2, #b3bec9);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	line-height: 1.5;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity var(--wp--custom--motion--micro, 180ms) var(--wp--custom--motion--ease, ease), transform var(--wp--custom--motion--micro, 180ms) var(--wp--custom--motion--ease, ease);
}
.mn-gl-pop.is-above { transform: translateY(-4px); }
.mn-gl-pop.is-open { opacity: 1; transform: none; }
.mn-gl-pop[hidden] { display: none; }
.mn-gl-pop::before {
	content: "";
	position: absolute;
	inset-block-start: -6px;
	inset-inline-start: calc(var(--mn-gl-arrow) - 6px);
	inline-size: 10px;
	block-size: 10px;
	border-block-start: 1px solid rgba(255, 255, 255, 0.1);
	border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
	background: inherit;
	transform: rotate(45deg);
}
.mn-gl-pop.is-above::before { inset-block: auto -6px; transform: rotate(225deg); }
.mn-gl-pop__term {
	display: block;
	margin-block-end: 4px;
	color: var(--wp--preset--color--white, #fff);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.0625rem;
	font-weight: 800;
	letter-spacing: var(--wp--custom--tracking--title, -0.02em);
}
.mn-gl-pop__def { margin: 0; }
.mn-gl-pop__more {
	display: inline-flex;
	align-items: center;
	min-block-size: var(--wp--custom--target--min, 44px);
	color: var(--wp--preset--color--cyan-300, #62cdf6);
	font-weight: 600;
	text-decoration: none;
}
.mn-gl-pop__more::after { content: "→"; margin-inline-start: 6px; }
.mn-gl-pop__more:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.mn-gl-pop__more:focus-visible { outline: 2px solid var(--wp--preset--color--cyan, #00aeef); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	.mn-gl-pop { transition: none; transform: none; }
}
