/**
 * Get Involved Interactive Diagram.
 * Uses the original infographic SVG as the visual; transparent hotspot buttons
 * are overlaid on each icon group for keyboard/screen-reader operation. Tier
 * colour mirrors the legacy legend but the popup/list carry the meaning in text.
 */
.yoko-gi-diagram {
	--gi-low: #c4361b;
	--gi-medium: #2f5fae;
	--gi-high: #6a3d9a;
}

/* Legend */
.yoko-gi-diagram__legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.85rem;
	font-size: 0.8rem;
	margin-bottom: 0.5rem;
}

.yoko-gi-diagram__legend-title {
	font-weight: 700;
	color: #222;
}

.yoko-gi-diagram__legend-item {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-weight: 600;
}

.yoko-gi-diagram__legend-swatch {
	width: 0.8rem;
	height: 0.8rem;
	border-radius: 50%;
	background: currentColor;
}

.yoko-gi-diagram__legend-item--low { color: var(--gi-low); }
.yoko-gi-diagram__legend-item--medium { color: var(--gi-medium); }
.yoko-gi-diagram__legend-item--high { color: var(--gi-high); }

/* Figure + hotspot overlay */
.yoko-gi-diagram__figure-wrap {
	position: relative;
	max-width: 1000px;
	margin: 0 auto;
}

.yoko-gi-diagram__svg {
	display: block;
	width: 100%;
	height: auto;
}

.yoko-gi-diagram__overlay {
	position: absolute;
	inset: 0;
}

.yoko-gi-diagram__hotspot {
	position: absolute;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 12%;
	cursor: pointer;
}

.yoko-gi-diagram__hotspot:hover {
	background: rgba( 0, 0, 0, 0.06 );
}

.yoko-gi-diagram__hotspot:focus-visible {
	outline: 3px solid #1b1b1b;
	outline-offset: 2px;
}

/* Modal */
.yoko-gi-modal[hidden] { display: none; }

.yoko-gi-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.yoko-gi-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.5 );
}

.yoko-gi-modal__panel {
	position: relative;
	background: #fff;
	border-radius: 10px;
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	overflow: auto;
	padding: 1.75rem;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.3 );
}

.yoko-gi-modal__close {
	position: absolute;
	top: 0;
	right: 0;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	background: #4464a3;
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	border-bottom-left-radius: 0.5rem;
}

.yoko-gi-modal__close:hover,
.yoko-gi-modal__close:focus-visible {
	background: #2f4a82;
}

.yoko-gi-modal__title {
	margin: 0 2rem 1rem 0;
	color: #007dba;
}

.yoko-gi-modal__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.yoko-gi-modal__list h3 {
	margin: 0 0 0.25rem;
	font-size: 1rem;
}

.yoko-gi-modal__list p {
	margin: 0 0 0.4rem;
	font-size: 0.9rem;
}

body.yoko-gi-modal-open {
	overflow: hidden;
}

.yoko-gi-modal__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}
