.glossy-term {
	position: relative;
	display: inline;
	border: 0;
	padding: 0;
	margin: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: inherit;
	cursor: pointer;
}

.glossy-term--highlight .glossy-term__label {
	background: linear-gradient(180deg, rgba(255, 224, 130, 0.1) 0%, rgba(255, 224, 130, 0.75) 100%);
	border-radius: 0.2em;
	padding: 0 0.08em;
}

.glossy-term--underline .glossy-term__label {
	border-bottom: 2px dashed #d97706;
	padding-bottom: 0.02em;
}

.glossy-term:focus-visible .glossy-term__label,
.glossy-term:hover .glossy-term__label,
.glossy-term.is-open .glossy-term__label {
	outline: none;
	background-color: rgba(251, 191, 36, 0.2);
}

.glossy-term__tooltip {
	position: absolute;	
	font-weight: 300;
	font-size: 0.8em;
	line-height: 1em;
	left: 50%;
	bottom: calc(100% + 12px);
	z-index: 1000;
	width: min(600px, 80vw);
	padding: 0.9rem 1rem;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 14px;
	background: #fffdf8;
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
	color: #1f2937;
	text-align: left;
	transform: translateX(-50%);
}

.glossy-term__tooltip::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 100%;
	width: 12px;
	height: 12px;
	background: #fffdf8;
	border-right: 1px solid rgba(15, 23, 42, 0.12);
	border-bottom: 1px solid rgba(15, 23, 42, 0.12);
	transform: translateX(-50%) rotate(45deg);
}

.glossy-term__tooltip p:first-child {
	margin-top: 0;
}

.glossy-term__tooltip p:last-child {
	margin-bottom: 0;
}

@media (max-width: 640px) {
	.glossy-term__tooltip {
		left: 0;
		right: auto;
		transform: none;
		width: min(280px, 85vw);
	}

	.glossy-term__tooltip::after {
		left: 24px;
		transform: rotate(45deg);
	}
}
