/**
 * 더푸른미래 정책·생활 용어 해설 — 점선 밑줄 + 해설 카드
 * 외부 요청 없음. 기사 본문 텍스트에만 적용된다.
 */

.gfg {
	position: relative;
	display: inline;
	font: inherit;
	line-height: inherit;
	color: inherit;
	cursor: help;
	text-decoration: underline dashed rgba(34, 55, 43, 0.42);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	-webkit-text-decoration: underline dashed rgba(34, 55, 43, 0.42);
	-webkit-tap-highlight-color: rgba(34, 55, 43, 0.10);
	touch-action: manipulation;
}

.gfg:focus {
	outline: none;
}

.gfg:focus-visible {
	outline: 2px solid rgba(34, 55, 43, 0.45);
	outline-offset: 2px;
	border-radius: 2px;
}

.gfg__card {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 11px);
	z-index: 99970;
	display: block;
	box-sizing: border-box;
	width: max-content;
	max-width: min(344px, 80vw);
	margin: 0;
	padding: 13px 16px 14px;
	border: 1px solid rgba(169, 198, 174, 0.45);
	border-radius: 3px;
	background: #22372B;
	color: #EEF3EF;
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.62;
	letter-spacing: -0.01em;
	text-align: left;
	text-transform: none;
	white-space: normal;
	word-break: keep-all;
	overflow-wrap: break-word;
	box-shadow: 0 14px 34px rgba(12, 29, 20, 0.30);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(-50%, 4px);
	transition: opacity 0.14s ease, transform 0.14s ease;
}

.gfg__card::after {
	content: "";
	position: absolute;
	top: 100%;
	left: calc(50% + var(--gfg-caret, 0px));
	margin-left: -6px;
	border: 6px solid transparent;
	border-top-color: #22372B;
}

.gfg__card::before {
	content: "";
	position: absolute;
	top: calc(100% + 1px);
	left: calc(50% + var(--gfg-caret, 0px));
	margin-left: -7px;
	border: 7px solid transparent;
	border-top-color: rgba(169, 198, 174, 0.45);
}

.gfg__card--down {
	bottom: auto;
	top: calc(100% + 11px);
}

.gfg__card--down::after {
	top: auto;
	bottom: 100%;
	border-top-color: transparent;
	border-bottom-color: #22372B;
}

.gfg__card--down::before {
	top: auto;
	bottom: calc(100% + 1px);
	border-top-color: transparent;
	border-bottom-color: rgba(169, 198, 174, 0.45);
}

/* JS가 화면 좌표로 띄울 때 — 테마 기사 영역의 overflow:hidden에 잘리지 않도록 */
.gfg__card--float {
	position: fixed;
	bottom: auto;
	left: 0;
	top: 0;
	transform: none;
}

.gfg__card-title {
	display: block;
	margin: 0 0 5px;
	padding: 0 0 5px;
	border-bottom: 1px dashed rgba(169, 198, 174, 0.45);
	color: #A9C6AE;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.45;
}

.gfg__card-body {
	display: block;
	margin: 0;
}

/* 데스크톱: 마우스 오버 / 키보드 포커스 / 모바일 탭(.is-open) */
@media (hover: hover) {
	.gfg:hover .gfg__card {
		opacity: 1;
		visibility: visible;
	}

	.gfg:hover .gfg__card:not(.gfg__card--float) {
		transform: translate(-50%, 0);
	}
}

.gfg:focus-visible .gfg__card,
.gfg.is-open .gfg__card {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.gfg:focus-visible .gfg__card:not(.gfg__card--float),
.gfg.is-open .gfg__card:not(.gfg__card--float) {
	transform: translate(-50%, 0);
}

@media (max-width: 600px) {
	.gfg__card {
		max-width: 85vw;
		font-size: 13.5px;
		line-height: 1.64;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gfg__card {
		transition: none;
	}
}

@media print {
	.gfg {
		text-decoration: none;
	}

	.gfg__card {
		display: none !important;
	}
}
