/**
 * Foliora: header layouts (Customizer > Foliora Options > Header).
 *
 * classic  - logo left, menu right (the template's design)
 * topnav   - "Menu bar on top": a slim accent/dark bar with the menu and
 *            search, then the logo and tagline centred below the header
 * navbelow - "Logo between bars": a slim bar with social icons and search,
 *            the centred logo and tagline, then the menu centred in a row
 * fulltop  - "Full-width bar": like topnav, with a full-width bar holding
 *            social icons, the centred menu and search
 * navbelowb - "Bars + latest posts": like navbelow, with a latest posts
 *            ticker and social icons in the top bar and search in the menu row
 * logoad   - "Logo + ad": like topnav, with the logo on the left and an ad
 *            on the right below the bar (inc/customizer/header-ad.php)
 *
 * Below 992px every layout uses the same menu button and panel (menu.css).
 */

/* ---------- Sticky header (992px and up) ---------- */
@media (min-width: 992px) {
	/* The whole header sticks; a negative top (measured by navigation.js)
	   lets the date row / logo row scroll away so only the menu stays. */
	.foliora-header {
		position: sticky;
		top: calc(var(--foliora-admin-bar, 0px) - var(--foliora-header-hide, 0px));
		z-index: 1030;
	}

	.admin-bar .foliora-header {
		--foliora-admin-bar: 32px;
	}

	/* Sticky off: drop the sticky offset too. With position: relative the
	   top above (32px under the admin bar) would push the header down and
	   leave a strip above it. */
	.foliora-header.foliora-header--static {
		position: relative;
		top: auto;
	}

	#inner-navigation .navbar-fixed-top {
		position: relative;
		top: auto;
	}
}

/* ---------- Shared pieces ---------- */
.foliora-header__search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 8px;
	background: none;
	color: var(--foliora-text);
	font-size: 18px;
}

.foliora-header__search:hover {
	background: var(--foliora-surface-hover, var(--foliora-surface));
	color: var(--foliora-text);
}

/* ---------- Bar colours ---------- */
/* The bar in "menu bar on top" and "logo between bars": accent or dark
   (Customizer), with text in the matching contrast. */
.foliora-header--bar-accent {
	--foliora-bar-bg: var(--foliora-accent);
	--foliora-bar-text: var(--foliora-on-accent);
}

/* Dark: near-black with a hint of the scheme's heading colour, so it stays
   clearly different from the accent even when the accent is dark too. */
.foliora-header--bar-dark {
	--foliora-bar-bg: color-mix(in srgb, var(--foliora-text) 25%, #0d0d0f);
	--foliora-bar-text: #ffffff;
}

/* ---------- Top bar (logo between bars) ---------- */
.foliora-topbar {
	background: var(--foliora-surface);
	border-bottom: 1px solid var(--foliora-line);
}

.foliora-topbar .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 38px;
}

.foliora-topbar .foliora-social__list {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.foliora-topbar .foliora-social__list li {
	margin: 0;
	padding: 0;
}

.foliora-topbar .foliora-social__list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 6px;
	background: none;
	color: var(--foliora-muted);
}

.foliora-topbar .foliora-social__list a:hover {
	background: var(--foliora-surface-hover, var(--foliora-line));
	color: var(--foliora-text);
}

.foliora-topbar .foliora-social__icon {
	width: 15px;
	height: 15px;
}

/* ---------- Menu bar on top ---------- */
/* A slim bar (accent or dark) with the menu and search, then the logo and
   tagline centred in a block below the header. Only the bar is sticky. */
.foliora-header__search-label {
	display: none;
}

#inner-navigation.foliora-header--topnav .navbar {
	min-height: 0;
	padding: 0;
	background: var(--foliora-bar-bg);
}

#inner-navigation.foliora-header--topnav .navbar > .container {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
}

/* The highlighted boxes (active item, search hover) line up with the
   content edges below, not the text inside them. */
.foliora-header--topnav .foliora-header__search {
	margin-inline-start: auto;
	margin-inline-end: 0;
	color: var(--foliora-bar-text);
}

.foliora-header--topnav .foliora-header__search:hover {
	background: color-mix(in srgb, var(--foliora-bar-text) 12%, transparent);
	color: var(--foliora-bar-text);
}

.foliora-header--topnav .foliora-header__search:focus-visible {
	outline-color: var(--foliora-bar-text);
	outline-offset: -2px;
}

/* Search is a bar button here, so the menu doesn't repeat it. */
#inner-navigation.foliora-header--topnav #navbar .menu-item-search {
	display: none;
}

@media (min-width: 992px) {
	#inner-navigation.foliora-header--topnav .nav.navbar-nav > li {
		margin: 0 2px;
	}

	#inner-navigation.foliora-header--topnav .nav.navbar-nav > li:first-child {
		margin-inline-start: 0;
	}

	#inner-navigation.foliora-header--topnav .nav.navbar-nav > li > a {
		display: block;
		padding: 18px 14px !important;
		color: var(--foliora-bar-text) !important;
		/* This layout's style: small spaced capitals (the Menu options in
		   Typography still apply). */
		font-size: calc(13px * var(--foliora-menu-scale, 1));
		font-weight: var(--foliora-menu-weight, 600);
		letter-spacing: var(--foliora-menu-spacing, 0.12em);
		text-transform: var(--foliora-menu-transform, uppercase);
		line-height: 16px;
	}

	#inner-navigation.foliora-header--topnav .nav.navbar-nav > li > a:hover,
	#inner-navigation.foliora-header--topnav .nav.navbar-nav > li.current-menu-item > a,
	#inner-navigation.foliora-header--topnav .nav.navbar-nav > li.current-menu-ancestor > a {
		color: var(--foliora-bar-text) !important;
		background: color-mix(in srgb, var(--foliora-bar-text) 12%, transparent);
	}

	#inner-navigation.foliora-header--topnav .nav.navbar-nav > li > a:focus-visible {
		outline: 2px solid var(--foliora-bar-text);
		outline-offset: -4px;
	}

	#inner-navigation.foliora-header--topnav .nav.navbar-nav > li > ul {
		top: 100%;
	}

	.foliora-header--topnav .foliora-header__search.has-label {
		gap: 9px;
		width: auto;
		padding: 0 12px;
	}

	.foliora-header--topnav .foliora-header__search .foliora-icon {
		width: 14px;
		height: 14px;
	}

	.foliora-header--topnav .has-label .foliora-header__search-label {
		display: inline;
		font-family: var(--foliora-font-heading);
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.12em;
		text-transform: uppercase;
	}
}

@media (max-width: 991px) {
	#inner-navigation.foliora-header--topnav .navbar {
		padding: 0;
	}

	/* Phones: menu button left, search right, in the bar. */
	.foliora-js #inner-navigation.foliora-header--topnav .foliora-menu-toggle {
		position: static;
		margin: 0;
		margin-inline-start: -13px;
		color: var(--foliora-bar-text);
	}

	.foliora-header--topnav .foliora-menu-toggle:focus-visible {
		outline-color: var(--foliora-bar-text);
	}
}

/* The logo block below the bar. */
.foliora-brandblock {
	background: var(--foliora-bg);
}

/* A hairline under the header. Single posts and archives start on white,
   so without it the header has no edge and the space below reads as a gap.
   "Logo between bars" layouts skip it: their menu row already has one. */
#inner-navigation.foliora-header--classic,
.foliora-brandblock {
	border-bottom: 1px solid var(--foliora-line);
}

.foliora-brandblock .container {
	padding-top: 56px;
	padding-bottom: 52px;
	text-align: center;
}

.foliora-brandblock .site-branding .site-title {
	margin: 0;
	font-size: calc(60px * var(--foliora-heading-scale, 1));
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.foliora-brandblock .site-branding .custom-logo {
	width: auto;
	max-height: 120px;
}

/* The tagline in small spaced capitals between two thin lines. */
.foliora-brandblock .site-branding .site-description {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 18px 0 0;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--foliora-muted);
}

.foliora-brandblock .site-branding .site-description::before,
.foliora-brandblock .site-branding .site-description::after {
	content: "";
	flex: 0 0 48px;
	height: 1px;
	background: var(--foliora-line-strong);
}

@media (max-width: 767px) {
	.foliora-brandblock .container {
		padding-top: 32px;
		padding-bottom: 30px;
	}

	.foliora-brandblock .site-branding .site-title {
		font-size: calc(40px * var(--foliora-heading-scale, 1));
	}

	/* Automatic size on phones: at most 200px wide (the 260px of wide
	   screens filled most of a 320px screen, more than the page's own
	   heading); a custom phone width (Site Identity) still wins. */
	.foliora-brandblock .site-branding .custom-logo {
		max-height: 80px;
	}

	.foliora-brandblock .site-branding .custom-logo-link:not(.has-logo-size) .custom-logo {
		max-width: min(200px, calc(100vw - 32px));
	}

	.foliora-brandblock .site-branding .site-description {
		gap: 12px;
		font-size: 11px;
		letter-spacing: 0.16em;
	}

	.foliora-brandblock .site-branding .site-description::before,
	.foliora-brandblock .site-branding .site-description::after {
		flex-basis: 24px;
	}
}

/* ---------- Logo + ad ---------- */
/* A variant of "menu bar on top" (the header also has its class): the logo
   block is a band with the logo on the left and the ad on the right. The
   tagline stays centred under the logo, as in the centred block. */
.foliora-brandblock--split .site-branding {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
}

.foliora-header-ad {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 28px;
}

.foliora-header-ad--wide-only {
	display: none;
}

.foliora-header-ad__label,
.foliora-ad__label {
	font-family: var(--foliora-font-heading);
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--foliora-muted);
}

.foliora-header-ad__body {
	max-width: 100%;
}

.foliora-header-ad__link {
	display: block;
	padding: 0;
	background: none;
	transition: opacity 0.2s ease;
}

.foliora-header-ad__link:hover {
	opacity: 0.9;
}

.foliora-header-ad__link:focus-visible {
	outline-offset: 4px;
}

/* Keeps the banner's shape: it shrinks with the column, never stretches. */
.foliora-header-ad__image {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 120px;
}

/* Ad code from the "Header Ad" widget area. */
.foliora-header-ad__widget {
	max-width: 100%;
}

.foliora-header-ad__widget > * {
	margin: 0;
}

.foliora-header-ad__widget img,
.foliora-header-ad__widget iframe {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Customizer preview only: where the ad goes while none is set. */
.foliora-header-ad__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 728px;
	max-width: 100%;
	aspect-ratio: 728 / 90;
	min-height: 64px;
	padding: 8px 16px;
	border: 1px dashed var(--foliora-line-strong);
	border-radius: calc(6px * var(--foliora-corner-scale, 1));
	background: var(--foliora-surface);
	font-family: var(--foliora-font-heading);
	font-size: 12px;
	line-height: 1.3;
	color: var(--foliora-muted);
	text-align: center;
}

.foliora-header-ad__placeholder strong {
	font-size: 14px;
	font-weight: 600;
	color: var(--foliora-text);
}

@media (min-width: 992px) {
	.foliora-brandblock--split .container {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 48px;
		padding-top: 44px;
		padding-bottom: 44px;
		text-align: start;
	}

	.foliora-brandblock--split .site-branding {
		flex: 0 0 auto;
		max-width: 50%;
	}

	.foliora-brandblock--split .site-branding .site-title {
		text-wrap: balance;
	}

	/* The banner shrinks (keeping its shape) before the logo does. */
	.foliora-header-ad,
	.foliora-header-ad--wide-only {
		position: relative;
		display: flex;
		flex: 0 1 728px;
		align-items: flex-end;
		min-width: 0;
		margin: 0;
		margin-inline-start: auto;
	}

	/* The label sits just above the banner without taking part in the
	   centring, so the banner itself lines up with the logo. */
	.foliora-header-ad__label {
		position: absolute;
		inset-inline-end: 0;
		bottom: calc(100% + 8px);
		white-space: nowrap;
	}

	/* A 970px banner gets the room it needs. */
	.foliora-header-ad:has(.foliora-header-ad__image[width="970"]) {
		flex-basis: 970px;
	}
}

@media (min-width: 992px) and (max-width: 1199px) {
	.foliora-brandblock--split .site-branding .site-title {
		font-size: calc(48px * var(--foliora-heading-scale, 1));
	}
}

/* ---------- Full-width bar ---------- */
/* A variant of "menu bar on top" (the header also has its class): the bar
   spans the window, with social icons left, the menu centred and search
   right. The logo block below is the same. */
@media (min-width: 992px) {
	/* The side columns keep at least their own width (social icons; search,
	   mode and header button), so a long menu never runs under them: it
	   takes the space between, centred, and wraps to a second line if it
	   still doesn't fit. */
	#inner-navigation.foliora-header--fulltop .navbar > .container {
		display: grid;
		grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
		max-width: none;
		padding-inline-start: 32px;
		padding-inline-end: 32px;
	}

	/* Fixed columns, so the menu stays centred with social icons off. */
	.foliora-header--fulltop .navbar .foliora-social {
		grid-column: 1;
		justify-self: start;
	}

	#inner-navigation.foliora-header--fulltop #navbar {
		grid-column: 2;
		grid-row: 1;
	}

	.foliora-header--fulltop .navbar .foliora-header__search {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		margin: 0;
	}

	#inner-navigation.foliora-header--fulltop .nav.navbar-nav {
		flex-wrap: wrap;
		justify-content: center;
	}

	#inner-navigation.foliora-header--fulltop #navbar {
		min-width: 0;
	}
}

/* Laptops (992-1199px): a little less space between the menu links, so a
   menu of seven or eight items (and a header button) fits on one line. */
@media (min-width: 992px) and (max-width: 1199px) {
	#inner-navigation.foliora-header--topnav .nav.navbar-nav > li > a {
		padding-inline-end: 10px !important;
		padding-inline-start: 10px !important;
	}

	#inner-navigation.foliora-header--fulltop .navbar > .container {
		column-gap: 16px;
		padding-inline-end: 24px;
		padding-inline-start: 24px;
	}

	#inner-navigation.foliora-header--navbelow .nav.navbar-nav > li:not(.menu-item-search):not(.menu-item-button) > a {
		padding-inline-end: 14px !important;
		padding-inline-start: 14px !important;
	}
	/* With a header button: a more compact button, and the links a little
	   closer still (only when a button is there). */
	#inner-navigation .foliora-header-btn,
	#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn {
		height: 36px;
		padding: 0 14px;
		font-size: 13px;
	}

	#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button {
		margin-inline-start: 6px;
	}

	.foliora-header__cta {
		margin-inline-start: 6px;
	}

	#inner-navigation.foliora-header--navbelow .nav.navbar-nav:has(> li.menu-item-button) > li:not(.menu-item-search):not(.menu-item-button) > a {
		padding-inline-end: 8px !important;
		padding-inline-start: 8px !important;
	}

	#inner-navigation.foliora-header--fulltop:has(.foliora-header__cta) .nav.navbar-nav > li > a {
		padding-inline-end: 7px !important;
		padding-inline-start: 7px !important;
	}
}

/* Small laptops: the full-width bar with a header button shows search as
   an icon only (its link keeps the "Open search" name). */
@media (min-width: 992px) and (max-width: 1099px) {
	#inner-navigation.foliora-header--fulltop:has(.foliora-header__cta) .foliora-header__search .foliora-header__search-label {
		display: none;
	}
}

.foliora-header--fulltop .navbar .foliora-social__list {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.foliora-header--fulltop .navbar .foliora-social__list li {
	margin: 0;
	padding: 0;
}

.foliora-header--fulltop .navbar .foliora-social__list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 6px;
	background: none;
	color: color-mix(in srgb, var(--foliora-bar-text) 80%, transparent);
}

.foliora-header--fulltop .navbar .foliora-social__list a:hover {
	background: color-mix(in srgb, var(--foliora-bar-text) 14%, transparent);
	color: var(--foliora-bar-text);
}

.foliora-header--fulltop .navbar .foliora-social__list a:focus-visible {
	outline-color: var(--foliora-bar-text);
	outline-offset: -2px;
}

.foliora-header--fulltop .navbar .foliora-social__icon {
	width: 15px;
	height: 15px;
}

@media (max-width: 991px) {
	/* Phones: the same bar as "menu bar on top" (menu button, search). */
	.foliora-header--fulltop .navbar .foliora-social {
		display: none;
	}
}

/* ---------- Logo between bars ---------- */
/* A slim accent/dark bar with social icons and search, the centred logo
   block, then the menu centred in its own row. The menu row sticks; a
   search button appears in it once the bar above has scrolled away. */
.foliora-header--navbelow {
	--foliora-panel-container: 960px;
}

.foliora-topbar--bar {
	background: var(--foliora-bar-bg);
	border-bottom: 0;
}

.foliora-topbar--bar .container {
	min-height: 40px;
}

.foliora-topbar--bar .foliora-social__list {
	margin: 0;
		margin-inline-end: auto;
}

.foliora-topbar--bar .foliora-social__list a {
	color: color-mix(in srgb, var(--foliora-bar-text) 80%, transparent);
}

.foliora-topbar--bar .foliora-social__list a:hover {
	background: color-mix(in srgb, var(--foliora-bar-text) 14%, transparent);
	color: var(--foliora-bar-text);
}

.foliora-topbar--bar .foliora-social__list a:focus-visible,
.foliora-topbar--bar .foliora-header__search:focus-visible {
	outline-color: var(--foliora-bar-text);
	outline-offset: -2px;
}

.foliora-topbar--bar .foliora-header__search {
	height: 40px;
	margin-inline-start: auto;
	color: var(--foliora-bar-text);
}

.foliora-topbar--bar .foliora-header__search:hover {
	background: color-mix(in srgb, var(--foliora-bar-text) 14%, transparent);
	color: var(--foliora-bar-text);
}

#inner-navigation.foliora-header--navbelow .navbar {
	min-height: 0;
	padding: 0;
	border-top: 1px solid var(--foliora-line);
	border-bottom: 1px solid var(--foliora-line);
}

#inner-navigation.foliora-header--navbelow .navbar > .container {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* The brand block sits inside this header: it doesn't need the space a
   separate block below the header has. */
.foliora-header--navbelow .foliora-brandblock .container {
	padding-top: 48px;
	padding-bottom: 44px;
}

@media (min-width: 992px) {
	.foliora-topbar--bar .foliora-header__search.has-label {
		gap: 9px;
		width: auto;
		padding: 0 12px;
	}

	.foliora-topbar--bar .foliora-header__search .foliora-icon {
		width: 14px;
		height: 14px;
	}

	.foliora-topbar--bar .has-label .foliora-header__search-label {
		display: inline;
		font-family: var(--foliora-font-heading);
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.12em;
		text-transform: uppercase;
	}

	#inner-navigation.foliora-header--navbelow .nav.navbar-nav > li {
		margin: 0;
	}

	#inner-navigation.foliora-header--navbelow .nav.navbar-nav > li > a {
		display: block;
		padding: 20px 22px !important;
		font-size: calc(13px * var(--foliora-menu-scale, 1));
		font-weight: var(--foliora-menu-weight, 500);
		letter-spacing: var(--foliora-menu-spacing, 0.14em);
		text-transform: var(--foliora-menu-transform, uppercase);
		line-height: 16px;
	}

	/* Active and hovered items: a 2px accent rule along the row's bottom. */
	#inner-navigation.foliora-header--navbelow .nav.navbar-nav > li > a:hover,
	#inner-navigation.foliora-header--navbelow .nav.navbar-nav > li.current-menu-item > a,
	#inner-navigation.foliora-header--navbelow .nav.navbar-nav > li.current-menu-ancestor > a {
		box-shadow: inset 0 -2px 0 var(--foliora-accent);
	}

	#inner-navigation.foliora-header--navbelow .nav.navbar-nav > li > a:focus-visible {
		outline-offset: -4px;
	}

	#inner-navigation.foliora-header--navbelow .nav.navbar-nav > li > ul {
		top: 100%;
	}

	/* Search: in the bar above; repeated in the menu row only once stuck.
	   ("Bars + latest posts" keeps it in the menu row all the time.) */
	#inner-navigation.foliora-header--navbelow:not(.foliora-header--navbelowb):not(.is-stuck) #navbar .menu-item-search {
		display: none;
	}

	#inner-navigation.foliora-header--navbelow:not(.foliora-header--navbelowb) .nav.navbar-nav > li.menu-item-search {
		position: absolute;
		inset-inline-end: max(12px, (100% - var(--foliora-panel-container, 960px)) / 2 + 12px);
		margin: 0;
	}

	#inner-navigation.foliora-header--navbelow .nav.navbar-nav > li.menu-item-search > a {
		padding: 20px 12px !important;
		box-shadow: none;
	}
}

@media (min-width: 1200px) {
	.foliora-header--navbelow {
		--foliora-panel-container: 1140px;
	}
}

@media (min-width: 1400px) {
	.foliora-header--navbelow {
		--foliora-panel-container: var(--foliora-container, 1320px);
	}
}

@media (max-width: 991px) {
	.foliora-header--navbelow .foliora-brandblock .container {
		padding-top: 28px;
		padding-bottom: 26px;
	}

	#inner-navigation.foliora-header--navbelow .navbar {
		border-bottom: 0;
	}

	/* Phones: the menu row is a centred "Menu" button. */
	.foliora-js #inner-navigation.foliora-header--navbelow .foliora-menu-toggle {
		position: static;
		gap: 10px;
		width: auto;
		height: 48px;
		margin: 0 auto;
		padding: 0 16px;
	}

	.foliora-menu-toggle__label {
		font-family: var(--foliora-font-heading);
		font-size: 13px;
		font-weight: 600;
		letter-spacing: 0.12em;
		text-transform: uppercase;
	}

	/* Search is in the bar above, so the menu doesn't repeat it. */
	#inner-navigation.foliora-header--navbelow:not(.foliora-header--navbelowb) #navbar .menu-item-search {
		display: none;
	}
}

/* ---------- Bars + latest posts ---------- */
/* A variant of "logo between bars" (the header also has its class): the
   top bar holds the latest posts ticker on the left and social icons on
   the right; search sits at the end of the menu row. */
.foliora-header--navbelowb .foliora-topbar--bar .foliora-social__list {
	margin: 0;
		margin-inline-start: auto;
}

.foliora-ticker {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 14px;
	min-width: 0;
	height: 40px;
	margin-inline-end: auto;
}

.foliora-ticker__label {
	flex: none;
	font-family: var(--foliora-font-heading);
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--foliora-bar-text) 68%, transparent);
}

/* One headline at a time: the list is a window one line tall. */
.foliora-ticker__list {
	position: relative;
	flex: 0 1 560px;
	min-width: 0;
	height: 40px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	list-style: none;
}

.foliora-ticker__item {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	visibility: hidden;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}

.foliora-ticker__item.is-active {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition-delay: 0s;
}

.foliora-ticker__item::before {
	display: none;
}

/* Long titles end in "…" so the bar never grows to two lines. */
.foliora-ticker__item a {
	display: block;
	max-width: 100%;
	padding: 4px 2px;
	overflow: hidden;
	background: none;
	font-family: var(--foliora-font-heading);
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--foliora-bar-text);
	transition: none;
}

.foliora-ticker__item a:hover {
	color: var(--foliora-bar-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.foliora-ticker__item a:focus-visible,
.foliora-ticker__toggle:focus-visible {
	outline: 2px solid var(--foliora-bar-text);
	outline-offset: -2px;
}

.foliora-ticker__toggle {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--foliora-bar-text) 35%, transparent);
	border-radius: 999px;
	background: none;
	color: var(--foliora-bar-text);
	cursor: pointer;
}

.foliora-ticker__toggle:hover {
	background: color-mix(in srgb, var(--foliora-bar-text) 14%, transparent);
}

/* The 26px circle gets a 40px tap area (the bar's height). */
.foliora-ticker__toggle {
	position: relative;
}

.foliora-ticker__toggle::after {
	content: "";
	position: absolute;
	inset: -7px;
}

.foliora-ticker__icon-play,
.foliora-ticker.is-paused .foliora-ticker__icon-pause {
	display: none;
}

.foliora-ticker.is-paused .foliora-ticker__icon-play {
	display: block;
}

/* Without JavaScript the newest headline shows and there is nothing to pause. */
html:not(.foliora-js) .foliora-ticker__toggle {
	display: none;
}

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

@media (min-width: 992px) {
	/* Search at the end of the menu row, in line with the items. */
	#inner-navigation.foliora-header--navbelowb .nav.navbar-nav > li.menu-item-search > a {
		padding: 20px 14px !important;
		box-shadow: none;
	}
}

@media (max-width: 767px) {
	/* Phones: no room for headlines; the bar keeps the social icons. */
	.foliora-ticker {
		display: none;
	}
}

@media (max-width: 991px) {
	/* Search stays one tap away while the menu row is folded: at the end of
	   the bar, after the headline or the social icons. */
	.foliora-header--navbelowb .foliora-topbar--bar .foliora-header__search {
		margin-inline-start: auto;
	}
}

@media (min-width: 992px) {
	/* Desktop reaches search from the menu row. */
	.foliora-header--navbelowb .foliora-topbar--bar .foliora-header__search {
		display: none;
	}
}

/* ---------- Header image ----------
   Customizer > Header image (inc/customizer/header-image.php).
   Logo block layouts: the image covers the block behind a soft shade and
   the title, tagline and its lines turn white. The block gets more room so
   the photo reads as a photo, not a strip. Its height comes from the
   padding, not the image, so the sticky offsets measured by navigation.js
   don't change when the image loads. Classic: a band above the header. */
.foliora-brandblock.has-header-image {
	position: relative;
	isolation: isolate;
	/* Dark until the photo loads, so white text is never on white. */
	background: color-mix(in srgb, var(--foliora-text) 35%, #0d0d0f);
	border-bottom-color: transparent;
}

.foliora-brandblock__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}

.foliora-brandblock__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The shade: stronger in the middle, where the title sits. */
.foliora-brandblock__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 90% at 50% 50%, rgb(8 10 20 / 0.56), rgb(8 10 20 / 0.3)),
		rgb(8 10 20 / 0.12);
}

.foliora-brandblock.has-header-image .container {
	padding-top: 96px;
	padding-bottom: 92px;
}

.foliora-header--navbelow .foliora-brandblock.has-header-image .container {
	padding-top: 88px;
	padding-bottom: 84px;
}

.foliora-brandblock.has-header-image .site-branding .site-title a {
	color: #fff;
	text-shadow: 0 1px 16px rgb(0 0 0 / 0.25);
}

.foliora-brandblock.has-header-image .site-branding .site-description {
	color: rgb(255 255 255 / 0.92);
	text-shadow: 0 1px 8px rgb(0 0 0 / 0.35);
}

.foliora-brandblock.has-header-image .site-branding .site-description::before,
.foliora-brandblock.has-header-image .site-branding .site-description::after {
	background: rgb(255 255 255 / 0.5);
}

.foliora-brandblock.has-header-image .foliora-header-ad__label {
	color: rgb(255 255 255 / 0.8);
}

.foliora-brandblock.has-header-image .site-branding a:focus-visible {
	outline-color: #fff;
}

@media (max-width: 991px) {
	.foliora-header--navbelow .foliora-brandblock.has-header-image .container {
		padding-top: 56px;
		padding-bottom: 52px;
	}
}

@media (max-width: 767px) {
	.foliora-brandblock.has-header-image .container {
		padding-top: 56px;
		padding-bottom: 52px;
	}
}

/* Classic: the photo alone, as wide as the page, scrolling away under the
   sticky header. Its height follows the window (about 7:1 on desktop),
   never a sliver on phones nor a wall on large screens. */
.foliora-header-band {
	height: clamp(100px, 14vw, 240px);
	overflow: hidden;
	background: var(--foliora-surface);
}

.foliora-header-band__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* A logo image can't turn white like the title: by default it sits on a
   light panel so a dark logo stays readable on any photo. Off for light
   logos (Customizer > Header image > Logo on a light panel). */
.foliora-brandblock.has-logo-plate .custom-logo-link {
	display: inline-block;
	padding: 16px 28px;
	border-radius: calc(12px * var(--foliora-corner-scale, 1));
	background: rgb(255 255 255 / 0.94);
	box-shadow: 0 8px 32px rgb(0 0 0 / 0.18);
}

/* The template's logo hover (style.css) removes link backgrounds. */
.foliora-brandblock.has-logo-plate .custom-logo-link:hover {
	background: rgb(255 255 255 / 0.94) !important;
}

@media (max-width: 767px) {
	.foliora-brandblock.has-logo-plate .custom-logo-link {
		padding: 12px 20px;
	}
}

/* Phones: the panel hugs the logo and stays inside the content area. The
   logo's limit is worked out from the screen width (16px page margins and
   the panel's padding), not as a percentage of the panel: a percentage
   would make the panel take the logo's full upload width. Applies to a
   custom phone width too, so no logo runs to the screen edge on a 320px
   phone (or the Customizer's phone preview). */
@media (max-width: 767px) {
	.foliora-brandblock.has-logo-plate .custom-logo-link {
		box-sizing: border-box;
		max-width: 100%;
		vertical-align: top;
	}

	.foliora-brandblock.has-logo-plate .site-branding .custom-logo-link .custom-logo {
		max-width: min(100%, calc(100vw - 72px));
	}

	.foliora-brandblock.has-logo-plate .site-branding .custom-logo-link:not(.has-logo-size) .custom-logo {
		max-width: min(200px, calc(100vw - 72px));
	}
}

@media (max-width: 360px) {
	.foliora-brandblock.has-logo-plate .custom-logo-link {
		padding: 10px 16px;
	}

	.foliora-brandblock.has-logo-plate .site-branding .custom-logo-link .custom-logo {
		max-width: min(100%, calc(100vw - 64px));
	}

	.foliora-brandblock.has-logo-plate .site-branding .custom-logo-link:not(.has-logo-size) .custom-logo {
		max-width: min(200px, calc(100vw - 64px));
	}
}

/* ---------- Logo size and extra logos (Customizer > Site Identity) ----------
   inc/customizer/logo.php. "Custom" size: one width for computers and
   tablets, one for phones; the height follows the logo's shape and the
   logo never grows wider than its space. Placed last so it wins over each
   layout's own logo size. */
.custom-logo-link.has-logo-size .custom-logo {
	width: var(--foliora-logo-w, auto);
	max-width: 100%;
	height: auto;
	max-height: none;
}

/* The phone logo is hidden until the phone width. */
.custom-logo-link .custom-logo.custom-logo--mobile {
	display: none;
}

@media (max-width: 767.98px) {
	.custom-logo-link.has-logo-size .custom-logo {
		width: var(--foliora-logo-w-sm, auto);
	}

	.custom-logo-link:has(.custom-logo--mobile) .custom-logo:not(.custom-logo--mobile, .custom-logo--dark) {
		display: none;
	}

	.custom-logo-link .custom-logo.custom-logo--mobile {
		display: inline-block;
	}

	/* Classic: the logo shares the row with the menu button, so it stops
	   short of it (16px page edges, the 42px button and a 22px gap). */
	#inner-navigation.foliora-header--classic .custom-logo {
		max-width: calc(100vw - 96px);
	}
}


/* ---------- Header button (Customizer > Header > Header button) ----------
   inc/customizer/header.php. Classic and "logo between bars": the last item
   of the menu row. Bar on top (topnav, full-width bar, logo + ad): after
   search at the bar's edge on wide screens (.foliora-header__cta), and in
   every layout a full-width button at the bottom of the phone menu panel
   (.menu-item-button). Corners follow Customizer > General > Buttons. */

/* The tools group also holds the button when dark mode is off (dark.css,
   which has these rules too, only loads with dark mode). */
.foliora-header__tools {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-inline-start: auto;
}

.foliora-header__tools .foliora-header__search {
	margin-inline-start: 0;
}

#inner-navigation .foliora-header-btn,
#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 20px;
	border: 2px solid var(--foliora-accent);
	border-radius: var(--foliora-btn-radius, 999px); /* Same default as the other buttons (Pill). */
	background: var(--foliora-accent);
	color: var(--foliora-on-accent) !important;
	font-family: var(--foliora-font-heading);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#inner-navigation .foliora-header-btn:hover,
#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn:hover {
	border-color: var(--foliora-accent-hover);
	background: var(--foliora-accent-hover);
	color: var(--foliora-on-accent) !important;
}

#inner-navigation .foliora-header-btn--outline,
#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn--outline {
	background: transparent;
	color: var(--foliora-accent) !important;
}

#inner-navigation .foliora-header-btn--outline:hover,
#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn--outline:hover {
	border-color: var(--foliora-accent);
	background: var(--foliora-accent);
	color: var(--foliora-on-accent) !important;
}

/* Dark mode: a filled button is light with dark text. A scheme's accent can
   be a dark colour (Paper's brown) that almost disappears on the dark
   header. */
html.foliora-dark #inner-navigation .foliora-header-btn--filled,
html.foliora-dark #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn--filled {
	border-color: var(--foliora-text);
	background: var(--foliora-text);
	color: var(--foliora-bg) !important;
}

html.foliora-dark #inner-navigation .foliora-header-btn--filled:hover,
html.foliora-dark #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn--filled:hover {
	border-color: color-mix(in srgb, var(--foliora-text) 82%, var(--foliora-bg));
	background: color-mix(in srgb, var(--foliora-text) 82%, var(--foliora-bg));
	color: var(--foliora-bg) !important;
}

html.foliora-dark #inner-navigation .foliora-header-btn--outline:hover,
html.foliora-dark #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn--outline:hover {
	border-color: var(--foliora-text);
	background: var(--foliora-text);
	color: var(--foliora-bg) !important;
}

/* Dark mode: an outline button takes the menu's text colour (the accent,
   even lightened, looks dim next to the bright menu links), with a lighter
   border. */
html.foliora-dark #inner-navigation .foliora-header-btn--outline,
html.foliora-dark #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn--outline {
	border-color: color-mix(in srgb, var(--foliora-text) 55%, transparent);
	color: var(--foliora-text) !important;
}

#inner-navigation .foliora-header-btn:focus-visible {
	outline: 2px solid var(--foliora-accent);
	outline-offset: 3px;
}

/* Menu-link effects never reach the button: the hover line of "logo
   between bars" (an inset box-shadow) and the underline drawn as a
   background image on links. */
#inner-navigation .foliora-header-btn,
#inner-navigation .foliora-header-btn:hover,
#inner-navigation .foliora-header-btn:focus,
#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn,
#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn:hover,
#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn:focus {
	box-shadow: none;
	background-image: none;
}

/* The template colours every menu link with !important
   (#inner-navigation .nav.navbar-nav > li > a), so the button's text
   colours above need it too. No menu-link underline or hover bar. */
#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a::before,
#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a::after {
	display: none;
}

/* In the coloured bar the button takes the bar's text colour. */
#inner-navigation.foliora-header--topnav .foliora-header__cta .foliora-header-btn {
	border-color: var(--foliora-bar-text);
	background: var(--foliora-bar-text);
	color: var(--foliora-bar-bg) !important;
}

#inner-navigation.foliora-header--topnav .foliora-header__cta .foliora-header-btn:hover {
	border-color: color-mix(in srgb, var(--foliora-bar-text) 85%, var(--foliora-bar-bg));
	background: color-mix(in srgb, var(--foliora-bar-text) 85%, var(--foliora-bar-bg));
	color: var(--foliora-bar-bg) !important;
}

#inner-navigation.foliora-header--topnav .foliora-header__cta .foliora-header-btn--outline {
	border-color: color-mix(in srgb, var(--foliora-bar-text) 70%, transparent);
	background: transparent;
	color: var(--foliora-bar-text) !important;
}

#inner-navigation.foliora-header--topnav .foliora-header__cta .foliora-header-btn--outline:hover {
	border-color: var(--foliora-bar-text);
	background: var(--foliora-bar-text);
	color: var(--foliora-bar-bg) !important;
}

#inner-navigation.foliora-header--topnav .foliora-header__cta .foliora-header-btn:focus-visible {
	outline-color: var(--foliora-bar-text);
}

.foliora-header__cta {
	display: flex;
	margin-inline-start: 12px;
}

@media (min-width: 992px) {
	/* Menu row: the button after the last item, centred in the row. */
	#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button {
		display: flex;
		align-items: center;
		margin-inline-start: 12px;
	}

	/* Full-width bar: the tools group (search, mode, button) in the bar's
	   last grid column; dark.css has the same rule, but only loads with
	   dark mode. */
	.foliora-header--fulltop .navbar .foliora-header__tools {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		margin: 0;
	}

	/* Bar on top: the button sits after search, not in the menu. */
	#inner-navigation.foliora-header--topnav #navbar .nav.navbar-nav > li.menu-item-button {
		display: none;
	}
}

@media (max-width: 991px) {
	/* Phones and tablets: in the menu panel, full width at the bottom. */
	.foliora-header__cta {
		display: none;
	}

	#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button {
		display: block;
		padding: 16px 20px 20px;
		border: 0;
	}

	#inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn {
		display: flex;
		width: 100%;
		height: 48px;
		font-size: 15px;
	}

	/* The panel is the accent colour (menu.css): the button takes the
	   panel's text colour, like in the coloured bar. Listed after the dark
	   mode rule above, which it must beat. */
	html #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn.foliora-header-btn--filled {
		border-color: var(--foliora-on-accent);
		background: var(--foliora-on-accent);
		color: var(--foliora-accent) !important;
	}

	html #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn.foliora-header-btn--outline {
		border-color: color-mix(in srgb, var(--foliora-on-accent) 70%, transparent);
		background: transparent;
		color: var(--foliora-on-accent) !important;
	}

	html #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn.foliora-header-btn--filled:hover,
	html #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn.foliora-header-btn--outline:hover {
		border-color: var(--foliora-on-accent);
		background: color-mix(in srgb, var(--foliora-on-accent) 88%, var(--foliora-accent));
		color: var(--foliora-accent) !important;
	}

	html #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn:focus-visible {
		outline-color: var(--foliora-on-accent);
	}
}

/* ---------- Classic: logo and menu always share the row ----------
   The row used to wrap, so a menu too wide for the space beside the logo
   dropped below it as a whole and left the logo stranded. Now the logo
   keeps its size, the menu takes the rest and, only if it still doesn't
   fit, wraps onto a second line on its own side. Below 1400px (content
   1140px wide or less) the links sit a little closer; closer still with a
   header button. */
@media (min-width: 992px) {
	#inner-navigation.foliora-header--classic .navbar > .container {
		flex-wrap: nowrap;
		gap: 24px;
	}

	#inner-navigation.foliora-header--classic .navbar .site-branding {
		flex: 0 0 auto;
	}

	#inner-navigation.foliora-header--classic #navbar {
		flex: 0 1 auto;
		min-width: 0;
	}

	#inner-navigation.foliora-header--classic .nav.navbar-nav {
		flex-wrap: wrap;
		justify-content: flex-end;
		row-gap: 4px;
	}
}

@media (min-width: 992px) and (max-width: 1399px) {
	#inner-navigation.foliora-header--classic .nav.navbar-nav > li {
		margin-inline-start: 20px;
	}

	#inner-navigation.foliora-header--classic .nav.navbar-nav:has(> li.menu-item-button) > li {
		margin-inline-start: 12px;
	}
}

/* ---------- See-through header ----------
   Customizer > Header > See-through header (Classic layout;
   foliora_header_is_transparent() decides where). The header lies over the
   full-width photo that starts the page, its text white over a soft dark
   fade; once the page scrolls (navigation.js adds is-solid) it gets its
   background back. On phones and with a non-sticky header it simply
   scrolls away with the page. The photo below makes room for it: its
   height (--foliora-transparent-h, navigation.js) is added on top. */
.has-transparent-header .foliora-site {
	position: relative;
}

#inner-navigation.foliora-header--transparent {
	position: absolute;
	top: 0;
	inset-inline-end: 0;
	inset-inline-start: 0;
	z-index: 1030;
	border-bottom-color: rgb(255 255 255 / 0.18);
	transition: border-color 0.25s ease;
}

#inner-navigation.foliora-header--transparent::before {
	content: "";
	position: absolute;
	inset: 0 0 -48px;
	z-index: -1;
	background: linear-gradient(to bottom, rgb(0 0 0 / 0.5), rgb(0 0 0 / 0));
	pointer-events: none;
	transition: opacity 0.25s ease;
}

#inner-navigation.foliora-header--transparent .navbar {
	background: transparent;
	transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* White text while it lies on the photo. */
#inner-navigation.foliora-header--transparent:not(.is-solid) .site-branding,
#inner-navigation.foliora-header--transparent:not(.is-solid) .site-branding a,
#inner-navigation.foliora-header--transparent:not(.is-solid) .site-branding .site-description {
	color: #fff !important;
}

#inner-navigation.foliora-header--transparent:not(.is-solid) .foliora-menu-toggle {
	color: #fff;
}

#inner-navigation.foliora-header--transparent:not(.is-solid) .foliora-menu-toggle:focus-visible {
	outline-color: #fff;
}

/* With a dark-mode logo, that one shows on the photo. */
html:not(.foliora-dark) #inner-navigation.foliora-header--transparent:not(.is-solid) .custom-logo-link:has(.custom-logo--dark) .custom-logo:not(.custom-logo--dark) {
	display: none !important;
}

html:not(.foliora-dark) #inner-navigation.foliora-header--transparent:not(.is-solid) .custom-logo--dark {
	display: inline-block !important;
}

/* ... or, with "Invert the logo in dark mode" and no dark-mode logo, the
   inverted logo (a dark logo turns light), as in dark mode. */
html:not(.foliora-dark) #inner-navigation.foliora-header--transparent:not(.is-solid) .custom-logo-link.is-dark-invert:not(:has(.custom-logo--dark)) .custom-logo {
	filter: invert(1) hue-rotate(180deg);
	mix-blend-mode: lighten;
}

@media (min-width: 992px) {
	/* Sticky: fixed at the top (under the admin bar) instead of sticky, so
	   it doesn't take room above the photo. */
	#inner-navigation.foliora-header--transparent:not(.foliora-header--static) {
		position: fixed;
		top: var(--foliora-admin-bar, 0px);
	}

	html:not(.foliora-nav-compact) #inner-navigation.foliora-header--transparent:not(.is-solid) .nav.navbar-nav > li > a,
	html:not(.foliora-nav-compact) #inner-navigation.foliora-header--transparent:not(.is-solid) .nav.navbar-nav > li > a:hover,
	html:not(.foliora-nav-compact) #inner-navigation.foliora-header--transparent:not(.is-solid) .nav.navbar-nav > li.current-menu-item > a,
	html:not(.foliora-nav-compact) #inner-navigation.foliora-header--transparent:not(.is-solid) .nav.navbar-nav > li > .foliora-mode-toggle {
		color: #fff !important;
	}

	html:not(.foliora-nav-compact) #inner-navigation.foliora-header--transparent:not(.is-solid) .nav.navbar-nav > li > a:focus-visible,
	html:not(.foliora-nav-compact) #inner-navigation.foliora-header--transparent:not(.is-solid) .nav.navbar-nav > li > .foliora-mode-toggle:focus-visible {
		outline-color: #fff;
	}

	html:not(.foliora-nav-compact) #inner-navigation.foliora-header--transparent:not(.is-solid) .nav.navbar-nav > li > .foliora-mode-toggle:hover {
		background: rgb(255 255 255 / 0.14);
	}

	/* An outlined header button turns white on the photo. */
	html:not(.foliora-nav-compact) #inner-navigation.foliora-header--transparent:not(.is-solid) .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn--outline {
		border-color: rgb(255 255 255 / 0.85);
		color: #fff !important;
	}

	/* Scrolled: the normal header again. */
	#inner-navigation.foliora-header--transparent.is-solid {
		border-bottom-color: var(--foliora-line);
	}

	#inner-navigation.foliora-header--transparent.is-solid::before {
		opacity: 0;
	}

	#inner-navigation.foliora-header--transparent.is-solid .navbar {
		background: var(--foliora-bg);
	}
}

/* The photo makes room for the header: taller by the header's height, its
   text kept below it. */
.has-transparent-header .foliora-stage:is(.foliora-stage--bold, .foliora-stage--large) .foliora-stage__slide,
.has-transparent-header .foliora-stage:is(.foliora-stage--bold, .foliora-stage--large).is-ready .foliora-stage__track {
	height: calc(var(--stage-h) + var(--foliora-transparent-h, 0px));
}

.has-transparent-header .foliora-stage:is(.foliora-stage--bold, .foliora-stage--large) .foliora-stage__body {
	border-top: var(--foliora-transparent-h, 0px) solid transparent;
}

.has-transparent-header .foliora-article__cover > .container {
	padding-top: calc(96px + var(--foliora-transparent-h, 0px));
}

@media (max-width: 767px) {
	.has-transparent-header .foliora-article__cover > .container {
		padding-top: calc(72px + var(--foliora-transparent-h, 0px));
	}
}

@media (prefers-reduced-motion: reduce) {
	#inner-navigation.foliora-header--transparent,
	#inner-navigation.foliora-header--transparent::before,
	#inner-navigation.foliora-header--transparent .navbar {
		transition: none;
	}
}

/* ---------- Small logo in the sticky menu ----------
   Customizer > Header (inc/customizer/header.php). Large screens only,
   where the header sticks. navigation.js adds .is-brand-away to the header
   once the real logo has scrolled out of sight. "Logo between bars": over
   the start of the centred menu row, mirroring the search button at its
   end (so the menu doesn't move), shrunk to the room before the menu and
   left out when there is hardly any (.is-mini-nofit). Bar on top: the first item of the bar, which opens
   to make room for it. */
.foliora-mini-logo {
	display: none;
}

@media (min-width: 992px) {
	/* It fades in once the big logo has gone, but leaves at once when the
	   big logo comes back: a fade-out there showed both logos for a moment
	   while scrolling up quickly. */
	.foliora-mini-logo {
		display: flex;
		flex: none;
		align-items: center;
		visibility: hidden;
		opacity: 0;
		transition: none;
	}

	.foliora-header.is-brand-away:not(.is-mini-nofit) .foliora-mini-logo {
		visibility: visible;
		opacity: 1;
		transition: opacity 0.2s ease, visibility 0.2s ease;
	}

	.foliora-header--navbelow .foliora-mini-logo {
		position: absolute;
		inset-block: 0;
		inset-inline-start: max(12px, (100% - var(--foliora-panel-container, 960px)) / 2 + 12px);
	}

	/* Only the room before the menu (measured by navigation.js). */
	.foliora-header--navbelow .foliora-mini-logo .custom-logo {
		max-width: min(160px, var(--foliora-mini-room, 160px));
	}

	.foliora-header--navbelow .foliora-mini-logo__link--text {
		max-width: min(220px, var(--foliora-mini-room, 220px));
	}

	/* The place opens and closes smoothly (the menu slides); the logo itself
	   fades in, and goes at once (above). */
	.foliora-header--topnav .foliora-mini-logo {
		overflow: hidden;
		max-width: 0;
		transition: max-width 0.3s ease, margin 0.3s ease;
	}

	.foliora-header--topnav.is-brand-away .foliora-mini-logo {
		max-width: 220px;
		margin-inline-end: 16px;
		transition: max-width 0.3s ease, margin 0.3s ease, opacity 0.2s ease, visibility 0.2s ease;
	}

	/* No room for it beside the whole menu (navigation.js): the menu wins
	   and the small logo stays out. */
	.foliora-header--topnav.is-mini-crowded .foliora-mini-logo {
		display: none;
	}

	/* Full-width bar: the logo takes the social icons' place in the first
	   column (they come back at the top of the page). Both keep the cell's
	   width, so the centred menu doesn't move. */
	.foliora-header--fulltop .foliora-mini-logo {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		overflow: visible;
		max-width: none;
		margin: 0;
	}

	.foliora-header--fulltop.is-brand-away .foliora-mini-logo {
		max-width: none;
		margin: 0;
	}

	.foliora-header--fulltop .navbar .foliora-social {
		grid-row: 1;
		transition: opacity 0.2s ease, visibility 0.2s ease;
	}

	.foliora-header--fulltop.is-brand-away:has(.foliora-mini-logo:not([hidden])) .navbar .foliora-social {
		visibility: hidden;
		opacity: 0;
	}

	/* The template's link underline (default.css) is off here. */
	.foliora-mini-logo__link {
		display: flex;
		align-items: center;
		padding: 4px 0;
		background-image: none;
		color: var(--foliora-text);
		transition: opacity 0.2s ease;
	}

	.foliora-mini-logo__link:hover {
		color: var(--foliora-text);
		opacity: 0.8;
	}

	/* Inside the box: the bar clips what sticks out while it opens. */
	.foliora-mini-logo__link:focus-visible {
		outline: 2px solid currentColor;
		outline-offset: -2px;
	}

	.foliora-mini-logo .custom-logo {
		display: block;
		width: auto;
		max-width: 160px;
		height: auto;
		max-height: 32px;
	}

	/* On the coloured bar (bar-on-top layouts) a logo made for light pages
	   sits on a light plate, like the logo over a header image. */
	.foliora-mini-logo__link.has-plate {
		padding: 4px 10px;
		border-radius: calc(8px * var(--foliora-corner-scale, 1));
		background: rgb(255 255 255 / 0.94);
	}

	.foliora-mini-logo__link.has-plate .custom-logo {
		max-height: 28px;
	}

	/* Inside the plate, in a colour that always shows on white. */
	.foliora-mini-logo__link.has-plate:focus-visible {
		outline-color: var(--foliora-accent);
	}

	/* No logo: the site title, one line, cut short with "..." if long. */
	.foliora-mini-logo__link--text {
		display: block;
		overflow: hidden;
		max-width: 220px;
		font-family: var(--foliora-font-heading);
		font-size: 17px;
		font-weight: 600;
		line-height: 1.4;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.foliora-header--topnav .foliora-mini-logo__link,
	.foliora-header--topnav .foliora-mini-logo__link:hover {
		color: var(--foliora-bar-text);
	}
}

@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
	.foliora-mini-logo,
	.foliora-header--topnav .foliora-mini-logo,
	.foliora-header--fulltop .navbar .foliora-social {
		transition: none;
	}
}

/* Phones: the top bar keeps one row however many social icons and header
   tools (cart, side panel) it holds; extra icons scroll sideways. */
@media (max-width: 575px) {
	.foliora-topbar .container {
		gap: 8px;
	}

	/* Bootstrap's clearfix pseudo-elements would take a gap each. */
	.foliora-topbar .container::before,
	.foliora-topbar .container::after {
		content: none;
	}

	.foliora-topbar .foliora-social {
		min-width: 0;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.foliora-topbar .foliora-social::-webkit-scrollbar {
		display: none;
	}

	.foliora-header--navbelowb .foliora-topbar .foliora-social + .foliora-header__tools {
		margin-inline-start: 0;
	}

	.foliora-topbar .foliora-social__list {
		flex-wrap: nowrap;
		gap: 0;
	}

	.foliora-topbar .foliora-social__list a {
		width: 28px;
	}
}

/* ---------- Wide screens: no flash of the wrong menu ----------
   Whether the menu fits its row is measured in navigation.js at the end of
   the page; until then (first visit at this window width, nothing
   remembered: foliora_js_class()) the row stays invisible but keeps its
   size, so the measuring works. foliora-nav-ready shows it. Without
   JavaScript the class foliora-js is missing and nothing is hidden; if the
   script fails, the row shows after 3 seconds anyway. */
@media (min-width: 992px) {
	html.foliora-js:not(.foliora-nav-ready) #inner-navigation .navbar > .container {
		visibility: hidden;
		animation: foliora-nav-reveal 0s 3s forwards;
	}
}

@keyframes foliora-nav-reveal {
	to {
		visibility: visible;
	}
}
