/* plg_content_reffootnotes — numbered {ref} footnotes. Colours inherit from the template where possible. */

.fn-ref {
	font-size: 75%;
	line-height: 0;
}

.fn-ref a {
	text-decoration: none;
	/* the back link (↑) jumps here: land 6rem below the top like the notes do, not under a sticky menu bar (wcf: 60px) */
	scroll-margin-top: 6rem;
}

.footnotes {
	border-top: 1px solid currentColor;
	margin-top: 2em;
	padding-top: 1em;
	font-size: 85%;
	opacity: .95;
}

.footnotes-list {
	margin: 0;
	padding-left: 2em;
}

.footnotes-list li {
	margin-bottom: .4em;
	scroll-margin-top: 6rem;
}

/* The jump target (the note, or on the way back (↑) the marker in the text) is highlighted EXACTLY as the old
   cdfootnotes did it (Stephan 14.11.2026: "Halte dich genau an das Original"): #ffff99 behind it at the click, held
   while the page scrolls there, then faded to transparent in 1s - done in reffootnotes.js, because the fade must
   start only AFTER the (smooth) scroll; a :target animation started at the click and was over before the target
   was on screen. No frame. Without JavaScript there is no highlight - as with the old plugin. */

/* keyboard users keep a visible focus ring (only :focus-visible - a mouse click shows none) */
.fn-link:focus-visible,
.fn-back:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.fn-back {
	text-decoration: none;
	padding: 0 .25em;
}

/* hover / focus preview */
.fn-tip {
	position: absolute;
	z-index: 1000;
	max-width: min(24rem, calc(100vw - 2rem));
	padding: .5em .75em;
	font-size: .9rem;
	line-height: 1.4;
	color: #1a212b;
	background: #fff;
	border: 1px solid #c8cdd3;
	border-radius: 4px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

@media (prefers-color-scheme: dark) {
	.fn-tip {
		color: #e6ebf0;
		background: #1a212b;
		border-color: #33414f;
	}
}

@media print {
	.fn-tip, .fn-back { display: none; }
}
