/* GlossaryForge front-end styles */
.gf-term {
	border-bottom: 1px dotted currentColor;
	text-decoration: none;
	cursor: help;
}
.gf-term:hover,
.gf-term:focus {
	border-bottom-style: solid;
}

.gf-tooltip {
	position: absolute;
	z-index: 9999;
	max-width: 280px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #1f2430;
	color: #fff;
	font-size: 14px;
	line-height: 1.45;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.12s ease, transform 0.12s ease;
}
.gf-tooltip.is-visible {
	opacity: 1;
	transform: translateY(0);
}
.gf-tooltip::after {
	content: "";
	position: absolute;
	left: var(--gf-arrow, 50%);
	bottom: -6px;
	width: 12px;
	height: 12px;
	background: inherit;
	transform: translateX(-50%) rotate(45deg);
}
.gf-tooltip.is-below::after {
	bottom: auto;
	top: -6px;
}

.gf-related,
.gf-mentioned {
	margin: 1.75em 0 0;
	padding: 1em 1.15em;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.02);
}
.gf-related__title,
.gf-mentioned__title {
	margin: 0 0 0.5em;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.8;
}
.gf-related__list,
.gf-mentioned__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em 0.8em;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gf-mentioned__list {
	flex-direction: column;
	gap: 0.35em;
}

/* A–Z index */
.gf-index__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em;
	margin: 0 0 1.25em;
	padding: 0;
	list-style: none;
}
.gf-index__nav a {
	display: inline-block;
	min-width: 1.9em;
	padding: 0.25em 0.4em;
	text-align: center;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	text-decoration: none;
}
.gf-index__group {
	margin: 0 0 1.5em;
}
.gf-index__letter {
	margin: 0 0 0.4em;
	border-bottom: 2px solid currentColor;
}
.gf-index__list {
	columns: 2;
	gap: 2em;
	margin: 0;
	padding-left: 1.1em;
}
@media (max-width: 640px) {
	.gf-index__list {
		columns: 1;
	}
}

@media (prefers-color-scheme: dark) {
	.gf-related,
	.gf-mentioned {
		border-color: rgba(255, 255, 255, 0.12);
		background: rgba(255, 255, 255, 0.04);
	}
	.gf-index__nav a {
		border-color: rgba(255, 255, 255, 0.2);
	}
}
