/*
 * Header, footer, top bar, social icons and search overlay.
 *
 * Three header layouts and three footer layouts share these rules; only the
 * arrangement differs, under `.mtkb-header--{layout}` and
 * `.mtkb-footer--{layout}`. Everything reads theme.json tokens, which the
 * Customizer's colour controls override at :root — so changing the primary
 * colour recolours the header, the footer and the buttons together.
 */

/* =========================================================================
 * TOP BAR
 * ====================================================================== */

.mtkb-topbar {
	background: var(--wp--preset--color--summit);
	color: var(--wp--preset--color--ice);
	font-size: var(--wp--preset--font-size--xs);
}

.mtkb-topbar__inner {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding: 8px var(--wp--preset--spacing--30);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px var(--wp--preset--spacing--30);
}

.mtkb-topbar__text {
	margin: 0;
}

.mtkb-topbar__contact {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
}

.mtkb-topbar a {
	color: inherit;
	text-decoration: none;
}

.mtkb-topbar a:hover {
	text-decoration: underline;
}

/* =========================================================================
 * HEADER — shared
 * ====================================================================== */

.mtkb-header {
	background: var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wp--preset--color--border);
	position: relative;
	z-index: 30;
}

.mtkb-header.is-sticky {
	position: sticky;
	top: 0;
}

.mtkb-header.is-scrolled {
	box-shadow: 0 2px 12px rgba(15, 23, 32, .10);
}

.mtkb-header__inner {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
}

/* ---- Brand ---- */

.mtkb-header__brand {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-width: 0;
}

.mtkb-header__brand .custom-logo-link {
	display: block;
	line-height: 0;
}

.mtkb-header__brand img {
	display: block;
	max-height: 52px;
	width: auto;
	height: auto;
}

.mtkb-brand__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 600;
	line-height: 1.15;
}

.mtkb-brand__title a {
	color: var(--wp--preset--color--summit);
	text-decoration: none;
}

.mtkb-brand__tagline {
	margin: 0;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--mist);
}

/* ---- Menu ---- */

.mtkb-header__nav {
	flex: 1 1 auto;
	min-width: 0;
}

.mtkb-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
	list-style: none;
	margin: 0;
	padding: 0;
}

.mtkb-menu > li > a {
	display: inline-block;
	padding: 6px 0;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.mtkb-menu > li > a:hover,
.mtkb-menu > li.current-menu-item > a,
.mtkb-menu > li.current_page_item > a {
	color: var(--wp--preset--color--glacier);
	border-bottom-color: var(--wp--preset--color--glacier);
}

/* Sub-menus. One level only — the header is not a sitemap. */
.mtkb-menu li {
	position: relative;
}

.mtkb-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	list-style: none;
	margin: 0;
	padding: 6px 0;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--mtkb-radius);
	box-shadow: 0 6px 18px rgba(15, 23, 32, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity var(--mtkb-transition), transform var(--mtkb-transition), visibility var(--mtkb-transition);
	z-index: 5;
}

.mtkb-menu li:hover > .sub-menu,
.mtkb-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mtkb-menu .sub-menu a {
	display: block;
	padding: 8px 16px;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.mtkb-menu .sub-menu a:hover {
	background: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--glacier);
}

/* ---- Actions ---- */

.mtkb-header__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
}

.mtkb-header__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: none;
	color: var(--wp--preset--color--slate);
	cursor: pointer;
	text-decoration: none;
	transition: background var(--mtkb-transition), color var(--mtkb-transition);
}

.mtkb-header__icon:hover {
	background: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--summit);
}

.mtkb-header__icon svg {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
}

.mtkb-header__icon--shortlist svg {
	fill: none;
}

.mtkb-header__icon .mtkb-fav-count {
	position: absolute;
	top: 2px;
	right: 0;
	margin: 0;
}

.mtkb-header__cta {
	white-space: nowrap;
	font-size: var(--wp--preset--font-size--xs);
	padding: 10px 18px;
}

/* ---- Burger ---- */

.mtkb-header__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 0 9px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--mtkb-radius);
	background: none;
	cursor: pointer;
}

.mtkb-header__burger span {
	display: block;
	height: 2px;
	background: var(--wp--preset--color--ink);
	border-radius: 2px;
}

/* =========================================================================
 * HEADER — layout variants
 * ====================================================================== */

/* ---- Classic: brand, menu, actions on one row ---- */

.mtkb-header--classic .mtkb-header__nav {
	display: flex;
	justify-content: flex-end;
}

/* ---- Centered: brand row above a centred menu ---- */

.mtkb-header--centered .mtkb-header__inner {
	flex-direction: column;
	align-items: stretch;
	gap: var(--wp--preset--spacing--20);
}

.mtkb-header--centered .mtkb-header__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
}

.mtkb-header--centered .mtkb-header__brand {
	align-items: flex-start;
}

.mtkb-header--centered .mtkb-header__nav--center .mtkb-menu {
	justify-content: center;
	border-top: 1px solid var(--wp--preset--color--border);
	padding-top: var(--wp--preset--spacing--10);
}

/* ---- Split: menu | brand | actions ---- */

.mtkb-header--split .mtkb-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}

.mtkb-header--split .mtkb-header__nav--left .mtkb-menu {
	justify-content: flex-start;
}

.mtkb-header--split .mtkb-header__brand {
	justify-self: center;
	text-align: center;
}

.mtkb-header--split .mtkb-header__brand .mtkb-brand__title,
.mtkb-header--centered .mtkb-header__brand .mtkb-brand__title {
	text-align: inherit;
}

.mtkb-header--split .mtkb-header__actions {
	justify-self: end;
}

/* =========================================================================
 * HEADER — mobile
 * ====================================================================== */

.mtkb-header__drawer {
	border-top: 1px solid var(--wp--preset--color--border);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30) var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--surface);
}

.mtkb-header__drawer[hidden] {
	display: none;
}

.mtkb-header__drawer-menu {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.mtkb-header__drawer-menu > li > a {
	display: block;
	padding: 12px 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
	border-bottom-width: 1px;
	font-size: var(--wp--preset--font-size--md);
}

.mtkb-header__drawer-menu .sub-menu {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	border: none;
	box-shadow: none;
	padding: 0 0 0 var(--wp--preset--spacing--20);
}

.mtkb-header__drawer-cta {
	display: block;
	margin-top: var(--wp--preset--spacing--20);
	text-align: center;
}

@media (max-width: 900px) {
	.mtkb-header__burger {
		display: flex;
	}

	/*
	 * The in-header menu gives way to the drawer below the breakpoint.
	 *
	 * Qualified with `.mtkb-header` deliberately: the layout variants above
	 * set `display` via `.mtkb-header--classic .mtkb-header__nav`, which is
	 * specificity (0,2,0). A bare `.mtkb-header__nav` here is (0,1,0) and
	 * loses — media queries add no specificity — so the menu stayed visible
	 * next to the burger on mobile. Matching (0,2,0) lets source order decide,
	 * and this block is last.
	 */
	.mtkb-header .mtkb-header__nav {
		display: none;
	}

	.mtkb-header--classic .mtkb-header__inner,
	.mtkb-header--split .mtkb-header__inner,
	.mtkb-header--centered .mtkb-header__inner {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: var(--wp--preset--spacing--20);
	}

	.mtkb-header--centered .mtkb-header__top {
		display: contents;
	}

	.mtkb-header--split .mtkb-header__brand {
		justify-self: auto;
		text-align: left;
		order: -1;
	}

	.mtkb-header__cta {
		display: none; /* It is repeated at the bottom of the drawer. */
	}
}

@media (max-width: 480px) {
	.mtkb-header__brand img {
		max-height: 40px;
	}
	.mtkb-brand__tagline {
		display: none;
	}
}

/* =========================================================================
 * SEARCH OVERLAY
 * ====================================================================== */

.mtkb-search-overlay {
	position: sticky;
	top: 0;
	z-index: 29;
	background: var(--wp--preset--color--surface-alt);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.mtkb-search-overlay[hidden] {
	display: none;
}

.mtkb-search-overlay__form {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
}

.mtkb-search-overlay input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--mtkb-radius);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
}

.mtkb-search-overlay__close {
	appearance: none;
	border: none;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: var(--wp--preset--color--mist);
	cursor: pointer;
	padding: 0 6px;
}

/* =========================================================================
 * FOOTER — shared
 * ====================================================================== */

.mtkb-footer {
	margin-top: var(--wp--preset--spacing--70);
	font-size: var(--wp--preset--font-size--sm);
}

.mtkb-footer__inner {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

/* ---- Colour schemes ---- */

.mtkb-footer--dark {
	background: var(--wp--preset--color--summit);
	color: var(--wp--preset--color--ice);
}

.mtkb-footer--light {
	background: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--slate);
	border-top: 1px solid var(--wp--preset--color--border);
}

.mtkb-footer--accent {
	background: var(--wp--preset--color--ember);
	color: #fff;
}

.mtkb-footer--dark a,
.mtkb-footer--accent a {
	color: #fff;
	text-decoration: none;
}

.mtkb-footer--dark a:hover,
.mtkb-footer--accent a:hover {
	text-decoration: underline;
}

.mtkb-footer--light a {
	color: var(--wp--preset--color--glacier);
	text-decoration: none;
}

.mtkb-footer--light a:hover {
	text-decoration: underline;
}

.mtkb-footer--dark .mtkb-footer__heading,
.mtkb-footer--accent .mtkb-footer__heading {
	color: #fff;
}

.mtkb-footer--light .mtkb-footer__heading {
	color: var(--wp--preset--color--summit);
}

/* ---- Brand ---- */

.mtkb-footer__brand {
	margin-bottom: var(--wp--preset--spacing--20);
}

.mtkb-footer__brand img,
.mtkb-footer__logo img {
	display: block;
	max-height: 56px;
	width: auto;
	height: auto;
}

.mtkb-footer--dark .mtkb-brand__title a,
.mtkb-footer--accent .mtkb-brand__title a {
	color: #fff;
}

.mtkb-footer__about-text {
	margin: 0 0 var(--wp--preset--spacing--20);
	max-width: 42ch;
	line-height: 1.6;
	opacity: .9;
}

/* ---- Headings and menus ---- */

.mtkb-footer__heading {
	margin: 0 0 var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--sm);
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.mtkb-footer__menu,
.mtkb-footer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mtkb-footer__menu a,
.mtkb-footer__contact a {
	opacity: .9;
}

.mtkb-footer__menu a:hover {
	opacity: 1;
}

/* ---- Layout: columns ---- */

.mtkb-footer__columns {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
	gap: var(--wp--preset--spacing--50);
}

@media (max-width: 900px) {
	.mtkb-footer__columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--40);
	}
	.mtkb-footer__column--about {
		grid-column: 1 / -1;
	}
}

@media (max-width: 520px) {
	.mtkb-footer__columns {
		grid-template-columns: 1fr;
	}
}

/* ---- Layout: centered ---- */

.mtkb-footer__centered {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--wp--preset--spacing--20);
}

.mtkb-footer__centered .mtkb-footer__about-text {
	max-width: 56ch;
}

/* ---- Layout: minimal ---- */

.mtkb-footer--minimal .mtkb-footer__inner {
	padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
}

.mtkb-footer__minimal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
}

.mtkb-footer__minimal .mtkb-footer__brand {
	margin-bottom: 0;
}

/* ---- Inline nav (centered + minimal) ---- */

.mtkb-footer__inline-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
	list-style: none;
	margin: 0;
	padding: 0;
}

.mtkb-footer__inline-menu a {
	font-weight: 600;
}

/* ---- Bottom strip ---- */

.mtkb-footer__bottom {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid currentColor;
	/* currentColor at full strength would be a hard rule against a dark
	   background; this keeps it a divider rather than a border. */
	border-top-color: color-mix(in srgb, currentColor 22%, transparent);
}

.mtkb-footer__legal {
	margin: var(--wp--preset--spacing--20) 0 0;
	font-size: var(--wp--preset--font-size--xs);
	opacity: .75;
	max-width: 80ch;
}

.mtkb-footer__baseline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	margin-top: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--xs);
}

.mtkb-footer__copyright {
	margin: 0;
	opacity: .75;
}

.mtkb-footer__legal-menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* The disclosure inside a dark footer needs its own treatment — the amber
   left border from style.css disappears against the navy. */
.mtkb-footer .mtkb-disclosure {
	background: transparent;
	border-left-color: var(--wp--preset--color--caution);
	padding-block: var(--wp--preset--spacing--10);
	font-size: var(--wp--preset--font-size--xs);
	line-height: 1.6;
}

.mtkb-footer .mtkb-disclosure p {
	margin: 0;
	opacity: .95;
}

.mtkb-footer--dark .mtkb-disclosure,
.mtkb-footer--accent .mtkb-disclosure {
	color: #fff;
}

/* =========================================================================
 * SOCIAL
 * ====================================================================== */

.mtkb-social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: var(--wp--preset--spacing--20) 0 0;
	padding: 0;
}

.mtkb-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: color-mix(in srgb, currentColor 12%, transparent);
	transition: background var(--mtkb-transition);
}

.mtkb-social a:hover {
	background: color-mix(in srgb, currentColor 24%, transparent);
}

.mtkb-social svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* =========================================================================
 * BLOG / SEARCH / 404 ODDS AND ENDS
 * ====================================================================== */

.mtkb-article__header {
	margin-bottom: var(--wp--preset--spacing--30);
}

.mtkb-article__meta {
	color: var(--wp--preset--color--mist);
	font-size: var(--wp--preset--font-size--sm);
	margin: 8px 0 0;
}

.mtkb-article__image img {
	width: 100%;
	height: auto;
	border-radius: var(--mtkb-radius);
}

.mtkb-article {
	max-width: 72ch;
}

.mtkb-guide-card__meta {
	color: var(--wp--preset--color--mist);
	font-size: var(--wp--preset--font-size--xs);
	margin: 0 0 6px;
}

.mtkb-search-result {
	padding: var(--wp--preset--spacing--20) 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.mtkb-search-result h2 {
	margin: 0 0 6px;
	font-size: var(--wp--preset--font-size--lg);
}

.mtkb-searchform {
	display: flex;
	gap: 8px;
}

.mtkb-searchform input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--mtkb-radius);
	font-family: inherit;
}

/* Prevent scrolling behind the open mobile drawer. */
body.mtkb-menu-open {
	overflow: hidden;
}

/* The independence variant is good news, not a caution — the amber rule that
   flags a real conflict would misrepresent it. */
.mtkb-disclosure--independence {
	border-left-color: color-mix(in srgb, currentColor 35%, transparent);
}

/* =========================================================================
 * HEADER — Marketplace bar
 *
 * The reference design: a dark full-width strip. Its background is a
 * Customizer colour rather than a theme token, because it is the one surface
 * deliberately independent of the page palette — a green header over a navy
 * site is a legitimate choice here.
 * ====================================================================== */

.mtkb-header--bar {
	background: var(--mtkb-header-bg, var(--wp--preset--color--summit));
	border-bottom: none;
	color: #fff;
}

.mtkb-header--bar .mtkb-header__inner {
	gap: var(--wp--preset--spacing--40);
	padding-block: 12px;
	align-items: center;
}

/* ---- Brand lockup ---- */

.mtkb-lockup {
	display: flex;
	align-items: center;
	gap: 11px;
	text-decoration: none;
	color: #fff;
}

.mtkb-lockup__mark {
	width: 34px;
	height: 26px;
	flex: 0 0 auto;
	fill: #fff;
}

.mtkb-lockup__words {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.mtkb-lockup__name {
	font-family: var(--wp--preset--font-family--body);
	font-size: 19px;
	font-weight: 700;
	letter-spacing: .055em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.mtkb-lockup__tagline {
	font-size: 9.5px;
	letter-spacing: .1em;
	text-transform: uppercase;
	line-height: 1;
	/* Held back so the name reads first. */
	color: color-mix(in srgb, #fff 72%, transparent);
}

.mtkb-header--bar .mtkb-header__brand img,
.mtkb-header--bar .custom-logo {
	max-height: 46px;
}

/* ---- Menu on the dark bar ---- */

.mtkb-header--bar .mtkb-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
}

.mtkb-header--bar .mtkb-menu {
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
}

.mtkb-header--bar .mtkb-menu > li > a {
	color: #fff;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	border-bottom-color: transparent;
}

.mtkb-header--bar .mtkb-menu > li > a:hover,
.mtkb-header--bar .mtkb-menu > li.current-menu-item > a,
.mtkb-header--bar .mtkb-menu > li.current_page_item > a {
	color: #fff;
	border-bottom-color: #fff;
}

/* Dropdowns land on a light card, so they keep the normal ink colour. */
.mtkb-header--bar .mtkb-menu .sub-menu a {
	color: var(--wp--preset--color--ink);
}

/* ---- Actions ---- */

.mtkb-header--bar .mtkb-header__actions {
	gap: var(--wp--preset--spacing--20);
}

.mtkb-header__shortlist {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	text-decoration: none;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	white-space: nowrap;
}

.mtkb-header__shortlist:hover {
	color: #fff;
	opacity: .85;
}

.mtkb-header__shortlist-icon {
	position: relative;
	display: inline-flex;
}

.mtkb-header__shortlist-icon svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

.mtkb-header__shortlist-icon .mtkb-fav-count {
	position: absolute;
	top: -6px;
	right: -9px;
	margin: 0;
	background: var(--wp--preset--color--ember);
	color: #fff;
}

/* ---- Inline search ---- */

.mtkb-header__search {
	display: flex;
	align-items: center;
	background: color-mix(in srgb, #fff 14%, transparent);
	border: 1px solid color-mix(in srgb, #fff 22%, transparent);
	border-radius: var(--mtkb-radius);
	overflow: hidden;
	transition: background var(--mtkb-transition), border-color var(--mtkb-transition);
}

.mtkb-header__search:focus-within {
	background: #fff;
	border-color: #fff;
}

.mtkb-header__search input {
	width: 168px;
	max-width: 26vw;
	padding: 8px 12px;
	border: none;
	background: none;
	color: #fff;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
}

.mtkb-header__search input::placeholder {
	color: color-mix(in srgb, #fff 70%, transparent);
}

.mtkb-header__search input:focus {
	outline: none;
}

.mtkb-header__search:focus-within input {
	color: var(--wp--preset--color--ink);
}

.mtkb-header__search:focus-within input::placeholder {
	color: var(--wp--preset--color--mist);
}

.mtkb-header__search button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: none;
	color: #fff;
	cursor: pointer;
}

.mtkb-header__search:focus-within button {
	color: var(--wp--preset--color--summit);
}

.mtkb-header__search button svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

/* ---- Burger on the dark bar ---- */

.mtkb-header--bar .mtkb-header__burger {
	border-color: color-mix(in srgb, #fff 35%, transparent);
}

.mtkb-header--bar .mtkb-header__burger span {
	background: #fff;
}

@media (max-width: 1080px) {
	.mtkb-header--bar .mtkb-header__search input {
		width: 120px;
	}
}

@media (max-width: 900px) {
	.mtkb-header--bar .mtkb-header__inner {
		gap: var(--wp--preset--spacing--20);
	}
	/* The field would crowd the burger; the drawer carries the links instead. */
	.mtkb-header--bar .mtkb-header__search {
		display: none;
	}
	.mtkb-header__shortlist-label {
		display: none;
	}
}

/* =========================================================================
 * HERO — search bar design
 * ====================================================================== */

.mtkb-hero--searchbar {
	min-height: var(--mtkb-hero-height, 480px);
	display: flex;
	align-items: center;
	text-align: center;
}

.mtkb-hero--searchbar .mtkb-hero__inner {
	width: 100%;
	padding-block: var(--wp--preset--spacing--50);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.mtkb-hero--searchbar .mtkb-hero__title {
	max-width: 22ch;
	font-size: clamp(1.9rem, 4.6vw, 2.85rem);
	font-weight: 500;
	letter-spacing: -0.005em;
	/* The photo behind is arbitrary, so the type carries its own contrast. */
	text-shadow: 0 1px 5px rgba(0, 0, 0, .55);
	margin-bottom: 10px;
}

.mtkb-hero--searchbar .mtkb-hero__lede {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: clamp(1rem, 2.2vw, 1.28rem);
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
	margin-bottom: var(--wp--preset--spacing--40);
	max-width: 46ch;
}

/* Without a photo the hero still needs a ground, or white type and a white
   bar sit on nothing. */
.mtkb-hero--searchbar:not(.mtkb-hero--image) {
	background: linear-gradient(160deg,
		var(--wp--preset--color--summit) 0%,
		color-mix(in srgb, var(--wp--preset--color--summit) 78%, #000) 100%);
}

/* ---- The bar ---- */

.mtkb-herobar {
	display: flex;
	align-items: stretch;
	background: var(--wp--preset--color--surface);
	border-radius: var(--mtkb-radius);
	padding: 5px;
	box-shadow: 0 6px 24px rgba(15, 23, 32, .28);
	max-width: 100%;
}

.mtkb-herobar__field {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1px;
	margin: 0;
	padding: 7px 16px;
	text-align: left;
	border-right: 1px solid var(--wp--preset--color--border);
	min-width: 0;
}

.mtkb-herobar__field:last-of-type {
	border-right: none;
}

.mtkb-herobar__field label {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 600;
	color: var(--wp--preset--color--mist);
	letter-spacing: .02em;
	white-space: nowrap;
}

.mtkb-herobar__field label svg {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: var(--wp--preset--color--glacier);
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: 0 0 auto;
}

.mtkb-herobar__field select,
.mtkb-herobar__field input {
	border: none;
	background: none;
	padding: 0;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	max-width: 100%;
	/* The label above names the field; the control shows only its value. */
	appearance: none;
	cursor: pointer;
}

.mtkb-herobar__field select:focus,
.mtkb-herobar__field input:focus {
	outline: none;
}

.mtkb-herobar__field:focus-within {
	background: var(--wp--preset--color--surface-alt);
	border-radius: 4px;
}

.mtkb-herobar__submit {
	margin: 0;
	display: flex;
}

.mtkb-herobar__submit .wp-element-button {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 100%;
	padding: 12px 26px;
	white-space: nowrap;
	font-size: var(--wp--preset--font-size--sm);
}

@media (max-width: 860px) {
	.mtkb-herobar {
		flex-direction: column;
		width: 100%;
		max-width: 420px;
		padding: 8px;
	}
	.mtkb-herobar__field {
		border-right: none;
		border-bottom: 1px solid var(--wp--preset--color--border);
		padding: 9px 12px;
	}
	.mtkb-herobar__field:last-of-type {
		border-bottom: none;
	}
	.mtkb-herobar__submit .wp-element-button {
		width: 100%;
		justify-content: center;
		margin-top: 4px;
	}
	.mtkb-hero--searchbar {
		min-height: 0;
	}
}

.mtkb-hero--searchbar .mtkb-hero__stats {
	justify-content: center;
}

/* -------------------------------------------------------------------------
 * Marketplace bar — mobile
 *
 * This block must sit at the END of the file. The shared mobile rule further
 * up is `.mtkb-header .mtkb-header__nav` — specificity (0,2,0) — and the bar
 * layout's own `.mtkb-header--bar .mtkb-header__nav` is also (0,2,0). On a
 * tie, source order decides, and the bar rules are appended after. So the
 * menu stayed visible next to the burger until this override was added below
 * them. Media queries add no specificity; only position saves it.
 * ---------------------------------------------------------------------- */

@media (max-width: 900px) {
	.mtkb-header--bar .mtkb-header__nav {
		display: none;
	}

	.mtkb-header--bar .mtkb-header__inner {
		justify-content: space-between;
	}

	/* The lockup is the widest thing left; let it shrink before the actions. */
	.mtkb-header--bar .mtkb-header__brand {
		min-width: 0;
		flex: 0 1 auto;
	}

	.mtkb-lockup__name {
		font-size: 16px;
		white-space: normal;
	}
}

@media (max-width: 420px) {
	.mtkb-lockup__mark {
		width: 26px;
		height: 20px;
	}

	.mtkb-lockup__tagline {
		display: none;
	}
}

/* A short explanation under a filter that needs one. */
.mtkb-facet-panel__hint {
	display: block;
	margin-top: 5px;
	font-size: var(--wp--preset--font-size--xs);
	line-height: 1.45;
	color: var(--wp--preset--color--mist);
}

/* The keyword box is the widest thing in the hero bar; let it take the slack
   so four fields and a button still sit on one row. */
.mtkb-herobar__field--text {
	flex: 1 1 190px;
	min-width: 150px;
}

.mtkb-herobar__field--text input {
	width: 100%;
	cursor: text;
}
