/* Citation guidance, shared by the article, the rankings table and the explorer.
   Tokens are read from whichever research surface encloses the block, with
   neutral fallbacks so it also stands alone. */

.g2m-tr-cite {
	margin: 1.5rem 0 0;
	padding: 1.2rem 1.35rem;
	background: var(--g2m-tra-surface, var(--g2m-bme-surface, #ffffff));
	border: 1px solid var(--g2m-tra-line, var(--g2m-bme-line, #d7dde2));
	border-left: 3px solid var(--g2m-tra-teal, var(--g2m-bme-teal, #2fa4b8));
	border-radius: 0 10px 10px 0;
	font-family: inherit;
}

.g2m-tr-cite__title {
	margin: 0 0 0.6rem;
	color: var(--g2m-tra-navy, var(--g2m-bme-navy, #182630));
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.g2m-tr-cite__string {
	max-width: 78ch;
	margin: 0 0 0.85rem;
	color: var(--g2m-tra-ink, var(--g2m-bme-ink, #1f2933));
	font-size: 0.94rem;
	line-height: 1.55;
}

/* The one copy control, on the line and in the block alike: a quiet icon that
   trails the sentence and swaps to a check mark after copying. Hidden until
   citation.js confirms the clipboard API exists. */
.g2m-tr-cite__copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	margin: 0 0 0 0.35rem;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--g2m-tra-muted, var(--g2m-bme-muted, #4b5563));
	vertical-align: middle;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 140ms ease, color 140ms ease, background 140ms ease;
}

.g2m-tr-cite__copy[hidden] {
	display: none;
}

.g2m-tr-cite__copy:hover,
.g2m-tr-cite__copy:focus-visible {
	opacity: 1;
	color: var(--g2m-tra-teal, var(--g2m-bme-teal, #2fa4b8));
	background: var(--g2m-tra-teal-soft, var(--g2m-bme-teal-soft, #e3f3f6));
	outline: none;
}

.g2m-tr-cite__copy svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.g2m-tr-cite__copy .g2m-tr-cite__icon--done {
	display: none;
}

.g2m-tr-cite__copy.is-copied .g2m-tr-cite__icon--copy {
	display: none;
}

.g2m-tr-cite__copy.is-copied .g2m-tr-cite__icon--done {
	display: block;
	color: var(--g2m-tra-teal, var(--g2m-bme-teal, #2fa4b8));
}

.g2m-tr-cite__copy .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.g2m-tr-cite__terms {
	max-width: 78ch;
	margin: 0 0 0.5rem;
	color: var(--g2m-tra-muted, var(--g2m-bme-muted, #4b5563));
	font-size: 0.84rem;
	line-height: 1.5;
}

.g2m-tr-cite__terms:last-child {
	margin-bottom: 0;
}

/* Compact line under a single table or chart. Full width of the content column so
   the sentence wraps with the table above it, not inside a narrower box. */
.g2m-tr-cite__line {
	display: block;
	margin: -0.5rem 0 1.5rem;
	color: var(--g2m-tra-muted, var(--g2m-bme-muted, #4b5563));
	font-size: 0.8rem;
	line-height: 1.5;
}

/* When a legend sits between the table and the citation, drop the negative pull. */
.g2m-tra__legend + .g2m-tr-cite__line,
figcaption + .g2m-tr-cite__line {
	margin-top: 0.25rem;
}


/* The research surfaces cap prose paragraphs (.g2m-tra__section > p at 70ch). The
   citation is a <p> too, so it must opt out at higher specificity or it wraps at
   half the column. */
.g2m-tra .g2m-tra__section > .g2m-tr-cite__line,
.g2m-tra .g2m-tra__intro > .g2m-tr-cite__line,
.g2m-tra figure > .g2m-tr-cite__line,
.g2m-tra details > .g2m-tr-cite__line,
.g2m-trr .g2m-tr-cite__line,
.g2m-bme .g2m-tr-cite__line {
	max-width: none;
	width: 100%;
}


.g2m-tr-cite__line-label {
	color: var(--g2m-tra-navy, var(--g2m-bme-navy, #182630));
	font-weight: 700;
}

@media (max-width: 760px) {
	.g2m-tr-cite {
		padding: 1rem 1.1rem;
	}
}
