/**
 * Foliora: compact menu on wide screens (assets/js/navigation.js).
 *
 * When the menu can't fit on its row (beside the logo in Classic, beside
 * the bar's other parts in the bar layouts), the menu becomes the phone
 * menu: a button and a panel.
 * navigation.js measures the fit and sets .foliora-nav-compact on <html>.
 *
 * GENERATED from the max-width: 991px menu rules in menu.css, header.css
 * and dark.css - change those, then rebuild this file, so both stay in
 * step. Only the last section is written by hand.
 */

@media (min-width: 992px) {
	/* ---------- From menu.css ---------- */

	html.foliora-nav-compact.foliora-js .foliora-menu-toggle {
		--foliora-toggle-edge: 12px;
		position: absolute;
		top: 50%;
		/* 42px wide: the 18px icon sits on the content edge and the button
		ends exactly at the screen edge on phones (44px stuck out 1px). */
		inset-inline-end: calc(var(--foliora-toggle-edge) - 12px);
		display: flex;
		align-items: center;
		justify-content: center;
		width: 42px;
		height: 44px;
		margin-top: -22px;
		padding: 0;
		border: 0;
		border-radius: 8px;
		background: none;
		color: var(--foliora-text);
		cursor: pointer;
		z-index: 2;
	}

	/* Hamburger / close: SVG masks coloured with currentColor, 18x16px (an
	   even height keeps the lines on whole pixels in the 44px button). Thin
	   lines: 2px on standard screens (1.5px would blur across two pixels),
	   1.5px on screens with 1.25 or more device pixels per CSS pixel (Windows
	   scaling 125%, phones, Retina); the close cross is 1.5px. */
	html.foliora-nav-compact .foliora-menu-toggle::before {
		content: "";
		width: 18px;
		height: 16px;
		background-color: currentColor;
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Crect y='2' width='18' height='2' rx='1'/%3E%3Crect y='7' width='18' height='2' rx='1'/%3E%3Crect y='12' width='18' height='2' rx='1'/%3E%3C/svg%3E") center / 18px 16px no-repeat;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Crect y='2' width='18' height='2' rx='1'/%3E%3Crect y='7' width='18' height='2' rx='1'/%3E%3Crect y='12' width='18' height='2' rx='1'/%3E%3C/svg%3E") center / 18px 16px no-repeat;
	}

	html.foliora-nav-compact .foliora-menu-toggle[aria-expanded="true"]::before {
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Cpath d='M3.5 2.5l11 11M14.5 2.5l-11 11' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Cpath d='M3.5 2.5l11 11M14.5 2.5l-11 11' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
	}

	html.foliora-nav-compact .foliora-menu-toggle:focus-visible {
		outline: 2px solid var(--foliora-link);
		outline-offset: 0;
	}

	/* ---------- From menu.css ---------- */

	/* Rows: every row the same height with the capitals centred. Where the
	   browser can trim the line to the cap height (text-box) the padding is
	   equal; otherwise 12/12 with a 20px line (measured for Mukta 13px). */
	html.foliora-nav-compact #inner-navigation #navbar {
		--foliora-mm-pad-top: 12px;
		--foliora-mm-pad-bottom: 12px;
		--foliora-mm-line: color-mix(in srgb, var(--foliora-on-accent) 10%, transparent);
		--foliora-mm-text: color-mix(in srgb, var(--foliora-on-accent) 82%, var(--foliora-accent));
		--foliora-mm-hover: color-mix(in srgb, var(--foliora-on-accent) 12%, var(--foliora-accent));
		--foliora-mm-sub: color-mix(in srgb, var(--foliora-on-accent) 6%, var(--foliora-accent));
		/* Without JavaScript: a full-width block below the title (the header
		container is a wrapping flex row). */
		flex: 0 0 calc(100% + 24px);
		width: calc(100% + 24px);
		margin: 21px -12px -21px;
		text-align: start;
		background: var(--foliora-accent);
	}

	@supports (text-box: trim-both cap alphabetic) {
		html.foliora-nav-compact #inner-navigation #navbar {
			--foliora-mm-pad-top: 18px;
			--foliora-mm-pad-bottom: 18px;
		}

		html.foliora-nav-compact #inner-navigation #navbar a {
			text-box: trim-both cap alphabetic;
		}

	}

	/* With JavaScript the panel is closed until the button opens it, and it
	   floats over the page under the header. */
	html.foliora-nav-compact.foliora-js #inner-navigation #navbar {
		display: none;
		position: absolute;
		top: 100%;
		inset-inline-start: 0;
		inset-inline-end: 0;
		width: auto;
		margin: 0;
		max-height: calc(100vh - 100%);
		max-height: calc(100dvh - 100%);
		overflow-y: auto;
		overscroll-behavior: contain;
		z-index: 1;
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.is-menu-open #navbar {
		display: block;
	}

	html.foliora-nav-compact #inner-navigation #navbar .nav.navbar-nav {
		display: block;
		float: none;
		margin: 0;
		padding: 0;
	}

	html.foliora-nav-compact #inner-navigation #navbar li {
		position: relative;
		display: block;
		margin: 0;
		padding: 0;
		background: none;
	}

	/* Link + toggle side by side; the sub-menu spans the full width below. */
	html.foliora-nav-compact #inner-navigation #navbar li.foliora-has-submenu {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 50px;
	}

	html.foliora-nav-compact #inner-navigation #navbar li.foliora-has-submenu > ul {
		grid-column: 1 / -1;
	}

	html.foliora-nav-compact #inner-navigation #navbar a {
		display: block;
		padding: var(--foliora-mm-pad-top) 20px var(--foliora-mm-pad-bottom) !important;
		border: 0;
		border-bottom: 1px solid var(--foliora-mm-line);
		border-radius: 0;
		background: none;
		color: var(--foliora-mm-text) !important;
		/* Phone menu style: small capitals in the body font, unless the Menu
		options in Typography say otherwise. */
		font-family: var(--foliora-font-menu, var(--foliora-font-body));
		font-size: calc(13px * var(--foliora-menu-scale, 1));
		font-weight: var(--foliora-menu-weight, 400);
		line-height: 20px;
		letter-spacing: var(--foliora-menu-spacing, normal);
		text-transform: var(--foliora-menu-transform, uppercase);
		text-align: start;
		transition: background-color 0.2s ease, color 0.2s ease;
	}

	html.foliora-nav-compact #inner-navigation #navbar a:hover,
	html.foliora-nav-compact #inner-navigation #navbar .foliora-submenu-toggle:hover {
		background: var(--foliora-mm-hover);
		color: var(--foliora-on-accent) !important;
	}

	html.foliora-nav-compact #inner-navigation #navbar a:focus-visible,
	html.foliora-nav-compact #inner-navigation #navbar .foliora-submenu-toggle:focus-visible {
		outline: 2px solid var(--foliora-on-accent);
		outline-offset: -4px;
		background: var(--foliora-mm-hover);
		color: var(--foliora-on-accent) !important;
	}

	/* Desktop arrows are replaced by the toggle buttons. */
	html.foliora-nav-compact #inner-navigation #navbar a .foliora-icon--chevron-down,
	html.foliora-nav-compact #inner-navigation #navbar a .arrow-indicator {
		display: none;
	}

	/* Sub-menu toggle: a 50px cell with a plus (closed) or minus (open). */
	html.foliora-nav-compact #inner-navigation .foliora-submenu-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 50px;
		padding: 0;
		border: 0;
		border-inline-start: 1px solid var(--foliora-mm-line);
		border-bottom: 1px solid var(--foliora-mm-line);
		border-radius: 0;
		background: none;
		color: var(--foliora-mm-text);
		font-size: 14px;
		cursor: pointer;
	}

	html.foliora-nav-compact #inner-navigation .foliora-submenu-toggle .foliora-icon--minus,
	html.foliora-nav-compact #inner-navigation .foliora-submenu-toggle[aria-expanded="true"] .foliora-icon--plus {
		display: none;
	}

	html.foliora-nav-compact #inner-navigation .foliora-submenu-toggle[aria-expanded="true"] .foliora-icon--minus {
		display: inline-block;
	}

	/* Sub-menus: closed until toggled; indented 16px per level on a lighter
	   shade. Without JavaScript they are always shown. */
	html.foliora-nav-compact #inner-navigation #navbar li ul {
		position: static;
		display: block;
		width: auto;
		margin: 0;
		padding: 0;
		border: 0;
		box-shadow: none;
		background: var(--foliora-mm-sub);
		animation: none;
	}

	html.foliora-nav-compact.foliora-js #inner-navigation #navbar li ul {
		display: none;
	}

	html.foliora-nav-compact.foliora-js #inner-navigation #navbar li.is-open > ul {
		display: block;
	}

	html.foliora-nav-compact #inner-navigation #navbar li ul a {
		padding-inline-start: 36px !important;
	}

	html.foliora-nav-compact #inner-navigation #navbar li ul ul a {
		padding-inline-start: 52px !important;
	}

	/* Search row: icon plus a visible label. */
	html.foliora-nav-compact #inner-navigation #navbar .menu-item-search a {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	html.foliora-nav-compact #inner-navigation #navbar .menu-item-search .foliora-menu-search-label {
		display: inline;
	}

	html.foliora-nav-compact #inner-navigation #navbar .menu-item-search .foliora-icon {
		width: 14px;
		height: 14px;
	}

	/* No row line under the last link (the header button, when it is last,
	   keeps its own border). */
	html.foliora-nav-compact #inner-navigation #navbar .nav.navbar-nav > li:last-child > a:not(.foliora-header-btn) {
		border-bottom: 0;
	}

	/* ---------- From menu.css ---------- */

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas {
		--foliora-oc-brand: var(--foliora-accent);
		--foliora-oc-on-brand: var(--foliora-on-accent);
	}

	/* Dark mode: the dark accent is made for light text on it and is too dim
	   as text or an outline on the dark panel (3.1:1). The header button
	   takes the text colour, as it does in the dark header (header.css). */
	html.foliora-nav-compact.foliora-dark.foliora-js #inner-navigation.foliora-header--offcanvas {
		--foliora-oc-brand: var(--foliora-text);
		--foliora-oc-on-brand: var(--foliora-bg);
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar {
		--foliora-accent: var(--foliora-bg);
		--foliora-on-accent: var(--foliora-text);
		--foliora-mm-text: var(--foliora-text);
		--foliora-mm-line: var(--foliora-line);
		--foliora-mm-hover: var(--foliora-surface);
		--foliora-mm-sub: var(--foliora-surface);
		display: block;
		position: fixed;
		/* Under the admin bar when there is one (navigation.js measures it). */
		top: var(--foliora-oc-top, 0px);
		inset-inline-end: 0;
		bottom: 0;
		inset-inline-start: auto;
		width: min(380px, 88vw);
		height: calc(100vh - var(--foliora-oc-top, 0px));
		height: calc(100dvh - var(--foliora-oc-top, 0px));
		max-height: none;
		margin: 0;
		padding: 0 0 32px;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--foliora-bg);
		border-radius: 0;
		box-shadow: calc(-12px * var(--foliora-dir, 1)) 0 40px rgb(0 0 0 / 0.18);
		transform: translateX(calc(105% * var(--foliora-dir, 1)));
		visibility: hidden;
		transition: transform 0.3s ease, visibility 0s linear 0.3s;
		z-index: 100001;
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas.is-menu-open #navbar {
		transform: none;
		visibility: visible;
		transition: transform 0.3s ease;
	}

	/* Layouts with the menu button at the start (left in left-to-right): the
	   panel comes from that side. */
	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas.foliora-header--oc-left #navbar {
		inset-inline-end: auto;
		inset-inline-start: 0;
		box-shadow: calc(12px * var(--foliora-dir, 1)) 0 40px rgb(0 0 0 / 0.18);
		transform: translateX(calc(-105% * var(--foliora-dir, 1)));
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas.foliora-header--oc-left.is-menu-open #navbar {
		transform: none;
	}

	/* The page behind does not scroll while the panel is open. */
	html.foliora-nav-compact.foliora-oc-open,
	html.foliora-nav-compact.foliora-oc-open body {
		overflow: hidden;
	}

	html.foliora-nav-compact .foliora-oc-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 100000;
		background: rgb(10 12 18 / 0.5);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0s linear 0.3s;
	}

	html.foliora-nav-compact.foliora-oc-open .foliora-oc-backdrop {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.3s ease;
	}

	/* Head: the site name and a close button. */
	html.foliora-nav-compact .foliora-oc-head {
		position: sticky;
		top: 0;
		z-index: 2;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		min-height: 68px;
		padding-block: 0;
		padding-inline: 24px 12px;
		border-bottom: 1px solid var(--foliora-line);
		background: var(--foliora-bg);
	}

	html.foliora-nav-compact .foliora-oc-head__title {
		min-width: 0;
		overflow: hidden;
		font-family: var(--foliora-font-heading);
		font-size: 18px;
		font-weight: 600;
		line-height: 1.3;
		color: var(--foliora-text);
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	html.foliora-nav-compact .foliora-oc-close {
		display: flex;
		flex: none;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: none;
		color: var(--foliora-text);
		cursor: pointer;
	}

	html.foliora-nav-compact .foliora-oc-close::before {
		content: "";
		width: 18px;
		height: 16px;
		background-color: currentColor;
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Cpath d='M3.5 2.5l11 11M14.5 2.5l-11 11' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px 16px no-repeat;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Cpath d='M3.5 2.5l11 11M14.5 2.5l-11 11' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px 16px no-repeat;
	}

	html.foliora-nav-compact .foliora-oc-close:hover {
		background: var(--foliora-surface);
	}

	html.foliora-nav-compact .foliora-oc-close:focus-visible {
		outline: 2px solid var(--foliora-link);
		outline-offset: -2px;
	}

	/* The list: search first (navigation.js moves it there), then the
	   links, the dark-mode switch and the header button. Rows are a little
	   roomier than in the drop-down. */
	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar .nav.navbar-nav > li.menu-item-search {
		padding: 20px 24px 12px;
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar a {
		padding-inline-end: 24px !important;
		padding-inline-start: 24px !important;
		font-size: calc(14px * var(--foliora-menu-scale, 1));
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar li ul a {
		padding-inline-start: 40px !important;
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar li ul ul a {
		padding-inline-start: 56px !important;
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar a:focus-visible,
	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar .foliora-submenu-toggle:focus-visible {
		outline-color: var(--foliora-link);
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar .menu-item-mode .foliora-mode-toggle {
		padding-inline-end: 24px;
		padding-inline-start: 24px;
		border-bottom-color: var(--foliora-line);
		font-size: 14px;
	}

	/* Search: a field-like button that opens the search panel. */
	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar .menu-item-search > a {
		gap: 10px;
		min-height: 48px;
		padding: 0 18px !important;
		border: 1px solid var(--foliora-line-strong, var(--foliora-line));
		border-radius: calc(12px * var(--foliora-corner-scale, 1));
		background: var(--foliora-surface);
		color: var(--foliora-muted) !important;
		font-family: var(--foliora-font-body);
		font-size: 15px;
		letter-spacing: 0;
		text-transform: none;
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar .menu-item-search > a:hover {
		border-color: var(--foliora-text);
		color: var(--foliora-text) !important;
	}

	/* The header button in the real accent colour, like everywhere else. */
	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn.foliora-header-btn--filled {
		border-color: var(--foliora-oc-brand);
		background: var(--foliora-oc-brand);
		color: var(--foliora-oc-on-brand) !important;
	}

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn.foliora-header-btn--outline {
		border-color: var(--foliora-oc-brand);
		background: transparent;
		color: var(--foliora-oc-brand) !important;
	}

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

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

	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar .nav.navbar-nav > li.menu-item-button {
		margin: 0; /* The row's gap before the button (wide screens). */
		padding: 20px 24px 0;
	}

	/* ---------- From header.css ---------- */

	/* Phones and tablets: in the menu panel, full width at the bottom. */
	html.foliora-nav-compact .foliora-header__cta {
		display: none;
	}

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

	html.foliora-nav-compact #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.foliora-nav-compact #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.foliora-nav-compact #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.foliora-nav-compact #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn.foliora-header-btn--filled:hover,
	html.foliora-nav-compact #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.foliora-nav-compact #inner-navigation #navbar .nav.navbar-nav > li.menu-item-button > a.foliora-header-btn:focus-visible {
		outline-color: var(--foliora-on-accent);
	}

	/* ---------- From dark.css ---------- */

	html.foliora-nav-compact #inner-navigation #navbar .menu-item-mode .foliora-mode-toggle {
		justify-content: flex-start;
		gap: 8px;
		width: 100%;
		height: auto;
		padding: 18px 20px;
		border-bottom: 1px solid rgb(255 255 255 / 0.1);
		border-radius: 0;
		color: var(--foliora-mm-text);
		font-family: var(--foliora-font-body);
		font-size: 13px;
		line-height: 20px;
		text-align: start;
		text-transform: uppercase;
	}

	html.foliora-nav-compact #inner-navigation #navbar .menu-item-mode .foliora-mode-toggle:hover {
		background: color-mix(in srgb, var(--foliora-on-accent) 8%, transparent);
	}

	html.foliora-nav-compact #inner-navigation #navbar .menu-item-mode .foliora-icon {
		width: 14px;
		height: 14px;
	}

	html.foliora-nav-compact #inner-navigation #navbar .menu-item-mode .foliora-mode-toggle__label {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip-path: none;
	}

	/* A small on/off switch at the end of the row shows the state that
	   aria-pressed gives screen readers. */
	html.foliora-nav-compact #inner-navigation #navbar .menu-item-mode .foliora-mode-toggle::after {
		content: "";
		flex: none;
		width: 32px;
		height: 18px;
		margin-inline-start: auto;
		border-radius: 999px;
		background:
		radial-gradient(circle at 9px 50%, var(--foliora-on-accent) 6px, transparent 6.5px),
		color-mix(in srgb, var(--foliora-on-accent) 22%, transparent);
	}

	html.foliora-nav-compact #inner-navigation #navbar .menu-item-mode .foliora-mode-toggle[aria-pressed="true"]::after {
		background:
		radial-gradient(circle at calc(100% - 9px) 50%, var(--foliora-accent) 6px, transparent 6.5px),
		var(--foliora-on-accent);
	}

	/* ---------- From dark.css ---------- */

	html.foliora-nav-compact.foliora-dark #inner-navigation #navbar {
		--foliora-accent: var(--foliora-accent-deep);
		--foliora-on-accent: var(--foliora-on-deep);
	}

	/* ---------- Hand-written for wide screens ---------- */

	/* On a wide screen the panel is a dropdown card under the button, its
	   end edge (right in left-to-right) on the content edge (960, 1140 and 1320px containers), so
	   the rows stay a comfortable length instead of running across the
	   whole screen. The button's icon sits on the same edge, like the logo
	   on the other side. */
	html.foliora-nav-compact #inner-navigation {
		--foliora-cm-edge: calc((100% - 960px) / 2 + 12px);
	}

	html.foliora-js.foliora-nav-compact .foliora-menu-toggle {
		--foliora-toggle-edge: var(--foliora-cm-edge);
	}

	html.foliora-js.foliora-nav-compact #inner-navigation #navbar {
		inset-inline-start: auto;
		inset-inline-end: var(--foliora-cm-edge);
		width: 340px;
		/* Ends 16px above the bottom of the window (scrolls inside if
		   longer), so its rounded bottom always shows: the visible header
		   is --foliora-sticky-h (navigation.js), plus the admin bar. */
		max-height: calc(100vh - var(--foliora-sticky-h, 0px) - var(--wp-admin--admin-bar--height, 0px) - 16px);
		max-height: calc(100dvh - var(--foliora-sticky-h, 0px) - var(--wp-admin--admin-bar--height, 0px) - 16px);
		border-radius: 0 0 8px 8px;
		/* A thin scrollbar in the panel's own colours (Windows draws a wide
		   grey one with arrows otherwise). */
		scrollbar-width: thin;
		scrollbar-color: color-mix(in srgb, var(--foliora-on-accent) 35%, transparent) transparent;
		box-shadow: 0 16px 32px rgb(0 0 0 / 0.18);
	}

	/* While navigation.js measures the menu row: no transitions, so the
	   links are measured at their row size at once. */
	html.foliora-nav-measure #inner-navigation * {
		transition: none !important;
	}

	/* ---------- Bar layouts (bar on top, logo between bars) ----------
	   The menu button takes the menu's place in its row, with the word
	   "Menu" beside the icon, in the same small capitals as "Search": at
	   the start of the bar in "Menu bar on top" and "Logo + ad" (after the
	   small sticky logo), centred where the centred menu was in "Full-width
	   bar" and the logo-between-bars layouts. Social icons, search, the
	   other bar buttons and the header button stay where they are. */
	html.foliora-js.foliora-nav-compact #inner-navigation:not(.foliora-header--classic) .foliora-menu-toggle {
		position: static;
		display: inline-flex;
		gap: 10px;
		width: auto;
		height: 44px;
		margin: 0;
		padding: 0 12px;
		border-radius: 0;
		font-family: var(--foliora-font-heading);
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.12em;
		text-transform: uppercase;
	}

	html.foliora-js.foliora-nav-compact #inner-navigation.foliora-header--topnav .foliora-menu-toggle {
		color: var(--foliora-bar-text);
	}

	html.foliora-js.foliora-nav-compact #inner-navigation.foliora-header--topnav .foliora-menu-toggle:hover {
		background: color-mix(in srgb, var(--foliora-bar-text) 12%, transparent);
	}

	html.foliora-js.foliora-nav-compact #inner-navigation.foliora-header--topnav .foliora-menu-toggle:focus-visible {
		outline: 2px solid var(--foliora-bar-text);
		outline-offset: -2px;
	}

	/* The word next to the icon (a screen-reader label on phones; the
	   label class positions it with !important). */
	html.foliora-js.foliora-nav-compact #inner-navigation:not(.foliora-header--classic) .foliora-menu-toggle > span {
		position: static !important;
		width: auto;
		height: auto;
		margin: 0;
		overflow: visible;
		clip: auto;
		clip-path: none;
		white-space: nowrap;
		word-wrap: normal;
	}

	/* The header button keeps its place in the bar (bar on top), so the
	   panel doesn't repeat it. */
	html.foliora-nav-compact #inner-navigation.foliora-header--topnav .foliora-header__cta {
		display: flex;
	}

	html.foliora-js.foliora-nav-compact #inner-navigation.foliora-header--topnav #navbar .nav.navbar-nav > li.menu-item-button,
	html.foliora-js.foliora-nav-compact #inner-navigation.foliora-header--topnav.foliora-header--offcanvas #navbar .nav.navbar-nav > li.menu-item-button {
		display: none;
	}

	/* Beside the word the icon is as tall as its capitals (10px for the
	   12px label: the bars on the cap line, the middle and the baseline),
	   so icon and word read as one line; the phone-size icon (16px tall)
	   stood out above and below the letters. */
	html.foliora-js.foliora-nav-compact #inner-navigation:not(.foliora-header--classic) .foliora-menu-toggle::before {
		width: 16px;
		height: 10px;
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Crect width='16' height='2' rx='1'/%3E%3Crect y='4' width='16' height='2' rx='1'/%3E%3Crect y='8' width='16' height='2' rx='1'/%3E%3C/svg%3E") center / 16px 10px no-repeat;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Crect width='16' height='2' rx='1'/%3E%3Crect y='4' width='16' height='2' rx='1'/%3E%3Crect y='8' width='16' height='2' rx='1'/%3E%3C/svg%3E") center / 16px 10px no-repeat;
	}

	html.foliora-js.foliora-nav-compact #inner-navigation:not(.foliora-header--classic) .foliora-menu-toggle[aria-expanded="true"]::before {
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M4 1l8 8M12 1l-8 8' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M4 1l8 8M12 1l-8 8' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
	}

	/* "Menu bar on top", "Logo + ad": the first link's place. */
	html.foliora-js.foliora-nav-compact #inner-navigation.foliora-header--topnav:not(.foliora-header--fulltop) .foliora-menu-toggle {
		margin-inline-start: -12px;
	}

	/* "Full-width bar": the centre column. */
	html.foliora-js.foliora-nav-compact #inner-navigation.foliora-header--fulltop .foliora-menu-toggle {
		grid-column: 2;
		grid-row: 1;
		justify-self: center;
	}

	/* Logo between bars: the middle of the menu row. */
	html.foliora-js.foliora-nav-compact #inner-navigation.foliora-header--navbelow .navbar > .container {
		display: flex;
		justify-content: center;
		align-items: center;
		min-height: 52px;
	}

	/* The panel opens under the button: from its start edge after a button
	   at the start of the bar, centred under a centred one. */
	html.foliora-js.foliora-nav-compact #inner-navigation.foliora-header--topnav:not(.foliora-header--fulltop):not(.foliora-header--offcanvas) #navbar {
		inset-inline-start: var(--foliora-cm-edge);
		inset-inline-end: auto;
	}

	html.foliora-js.foliora-nav-compact #inner-navigation:is(.foliora-header--fulltop, .foliora-header--navbelow):not(.foliora-header--offcanvas) #navbar {
		inset-inline-start: 0;
		inset-inline-end: 0;
		margin-inline: auto;
	}

	/* navigation.js's second measure in "Menu bar on top" and "Logo + ad":
	   the small sticky logo at its full width (does the menu still fit with
	   it?). */
	html.foliora-nav-measure-logo #inner-navigation.foliora-header--topnav:not(.foliora-header--fulltop) .foliora-mini-logo:not([hidden]) {
		max-width: 220px;
		margin-inline-end: 16px;
	}
}

@media (min-width: 1200px) {
	html.foliora-nav-compact #inner-navigation {
		--foliora-cm-edge: calc((100% - 1140px) / 2 + 12px);
	}
}

@media (min-width: 1400px) {
	html.foliora-nav-compact #inner-navigation {
		--foliora-cm-edge: calc((100% - 1320px) / 2 + 12px);
	}
}
/* Thinner bars where pixels are smaller (as on phones, menu.css). */
@media (min-width: 992px) and (min-resolution: 1.25dppx) {
	html.foliora-js.foliora-nav-compact #inner-navigation:not(.foliora-header--classic) .foliora-menu-toggle:not([aria-expanded="true"])::before {
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Crect y='0.25' width='16' height='1.5' rx='0.75'/%3E%3Crect y='4.25' width='16' height='1.5' rx='0.75'/%3E%3Crect y='8.25' width='16' height='1.5' rx='0.75'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Crect y='0.25' width='16' height='1.5' rx='0.75'/%3E%3Crect y='4.25' width='16' height='1.5' rx='0.75'/%3E%3Crect y='8.25' width='16' height='1.5' rx='0.75'/%3E%3C/svg%3E");
	}
}

/* ---------- From menu.css ---------- */
@media (min-width: 992px) and (min-resolution: 1.25dppx) {
	html.foliora-nav-compact .foliora-menu-toggle::before {
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Crect y='2' width='18' height='1.5' rx='0.75'/%3E%3Crect y='7' width='18' height='1.5' rx='0.75'/%3E%3Crect y='12' width='18' height='1.5' rx='0.75'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Crect y='2' width='18' height='1.5' rx='0.75'/%3E%3Crect y='7' width='18' height='1.5' rx='0.75'/%3E%3Crect y='12' width='18' height='1.5' rx='0.75'/%3E%3C/svg%3E");
	}
}

/* ---------- From menu.css ---------- */
@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
	html.foliora-nav-compact.foliora-js #inner-navigation.foliora-header--offcanvas #navbar,
	html.foliora-nav-compact .foliora-oc-backdrop {
		transition: none !important;
	}
}
