/*
 * The route home, top right, on inner pages.
 *
 * There is no bar any more. This was a white band with the mark and the
 * institute name in it; the customer asked for the band to go, so the strip is
 * now an invisible sticky rail whose only content is the button at its right
 * edge, and the hero photograph runs unbroken to the top of the page.
 *
 * It still occupies its height in flow. --above-content is derived from that
 * height and .content subtracts it, so keeping the strip in flow is what keeps
 * an inner page exactly one viewport tall — see background.css.
 */
.topbar {
	position: sticky;
	top: 0;
	z-index: var(--z-float);
	/*
	 * The strip spans the full width and scrolls over page content. With a
	 * transparent background it is invisible but still a hit target, so it
	 * would swallow clicks on whatever passed beneath it. Only the button
	 * takes pointer events back.
	 */
	pointer-events: none;
}

/* The WordPress admin bar is position:fixed and would sit on top of this. */
.admin-bar .topbar {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .topbar {
		top: 46px;
	}
}

/*
 * Full bleed, not a centred 1180px container: the button belongs at the right
 * edge of the screen with a margin, not floating in the middle of a wide one.
 */
.topbar-inner {
	/* Vertical padding is a token because --above-content derives the strip's
	   height from it, and .content sizes itself against that. */
	padding: var(--topbar-pad) clamp(14px, 2vw, 34px);
	display: flex;
	justify-content: flex-end;
}

/*
 * A solid white pill, where the bar's version was an outline on the bar's own
 * white ground.
 *
 * It now sits on the background photograph, and an outlined button on
 * photography is unreadable at any of the exposures that image has. The white
 * fill gives the label a guaranteed ground, and the border keeps the pill's
 * edge when the page is scrolled far enough that it is standing on the white
 * content card instead.
 *
 * The label is one step darker than --brand-teal-ink, and that is deliberate.
 * The token measures 4.31:1 on white, which clears WCAG AA only for *large*
 * text — 14pt bold and up. This label is at most 13px bold, under 10pt and so
 * plainly not large, and it is now the only route home on the page. #057e65 is
 * the same hue taken to 5.0:1. Everywhere the token is used at display sizes
 * it stays as it is; see the note on .aktuelles-title.
 */
.topbar-home {
	pointer-events: auto;
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	/* Height comes from --topbar-btn-h, which --above-content derives from, so
	   the padding is horizontal only. */
	padding: 0 14px;
	border-radius: 999px;
	border: 1.5px solid #057e65;
	color: #057e65;
	background-color: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
	font-family: 'Open Sans', sans-serif;
	font-size: clamp(11.5px, 0.25vw + 10px, 13px);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	min-height: var(--topbar-btn-h);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.topbar-home:hover,
.topbar-home:focus-visible {
	background-color: #057e65;
	color: #fff;
	text-decoration: none;
}

.topbar-home i {
	font-size: 0.85em;
	transition: transform 0.2s ease;
}

.topbar-home:hover i {
	transform: translateX(-3px);
}

/*
 * Narrow screens: the button keeps only its arrow. Its destination is
 * unambiguous from the icon and it retains an accessible name from the
 * visually hidden label.
 */
@media (max-width: 620px) {
	.topbar-home span {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.topbar-home {
		width: var(--topbar-btn-h);
		padding: 0;
		justify-content: center;
	}

	.topbar-home i {
		font-size: 0.9rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.topbar-home,
	.topbar-home i {
		transition: none;
	}
	.topbar-home:hover i {
		transform: none;
	}
}
