/* RSP Glossary: inline term buttons and their popovers.
   Native popover API. Tap or click opens; Esc or tapping elsewhere closes.
   Browsers with interest invokers also open it on hover. */

:root {
	--rsp-gt-navy: #003087;
	--rsp-gt-orange: #f47920;
	--rsp-gt-cream: #faf6f0;
	--rsp-gt-ink: #1d2433;
	--rsp-gt-radius: 12px;
	--rsp-gt-width: min(320px, calc(100vw - 32px));
}

.rsp-gt {
	display: inline;
	margin: 0;
	padding: 0;
	border: 0;
	border-bottom: 1px dashed var(--rsp-gt-orange);
	background: none;
	color: inherit;
	font: inherit;
	line-height: inherit;
	text-align: inherit;
	cursor: help;
}
.rsp-gt:hover,
.rsp-gt:focus-visible { color: var(--rsp-gt-navy); border-bottom-style: solid; }
.rsp-gt:focus-visible { outline: 2px solid var(--rsp-gt-orange); outline-offset: 2px; border-radius: 2px; }

.rsp-gt__pop {
	width: var(--rsp-gt-width);
	margin: 0;
	padding: 14px 16px;
	border: 1px solid #e3dacd;
	border-radius: var(--rsp-gt-radius);
	background: #fff;
	color: var(--rsp-gt-ink);
	box-shadow: 0 10px 30px rgb(0 48 135 / .16);
	font-size: .95rem;
	line-height: 1.5;
	text-align: left;
}
.rsp-gt__pop:popover-open { display: block; }
.rsp-gt__term { display: block; margin-bottom: 4px; color: var(--rsp-gt-navy); font-family: "Playfair Display", Georgia, serif; font-size: 1.05rem; }
.rsp-gt__more { display: inline-block; margin-top: 6px; color: var(--rsp-gt-navy); font-weight: 600; }

/* Anchor the popover under its word where supported. */
@supports (position-area: bottom) {
	.rsp-gt__pop {
		position-area: bottom span-right;
		position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
		margin-block-start: 6px;
	}
}

/* Without anchor positioning, show a bottom sheet. */
@supports not (position-area: bottom) {
	.rsp-gt__pop {
		position: fixed;
		inset: auto 16px 16px 16px;
		width: auto;
		max-width: 520px;
		margin-inline: auto;
	}
}

@media (max-width: 600px) {
	.rsp-gt__pop {
		position: fixed;
		inset: auto 12px 12px 12px;
		width: auto;
		position-area: none;
	}
}
