/* A native modal keeps the page inert. Reserve the scrollbar track before opening it. */
html { scrollbar-gutter: stable; }
html.sy-search-open { overflow: hidden; }
.sy-search, .sy-search-results {
	--search-ink: var(--sy-ink, #1c2840);
	--search-muted: var(--sy-muted, #5e6b7e);
	--search-line: var(--sy-line, #dfe5ea);
	--search-tint: var(--sy-mist-2, #f2f5f6);
	color: var(--search-ink);
	font-family: inherit;
	text-align: start;
}
.sy-search {
	position: fixed;
	inset: 0 0 auto;
	width: min(760px, calc(100% - 48px));
	max-width: none;
	max-height: 80vh;
	max-height: 80dvh;
	margin: 12vh auto 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--search-line);
	border-radius: var(--sy-radius-lg, 14px);
	background: white;
	box-shadow: 0 32px 96px -20px rgb(11 23 42 / 36%);
}
.sy-search[open] { display: flex; flex-direction: column; }
.sy-search::backdrop { background: rgb(16 27 44 / 54%); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sy-search [hidden], .sy-search-results[hidden] { display: none !important; }
.sy-search-bar {
	display: flex; align-items: center; flex: none; gap: 14px; padding: 16px 22px;
	margin: 0; border-bottom: 1px solid var(--search-line); color: var(--sy-navy, #283951);
}
.sy-search-bar > svg { flex: none; }
.sy-search .sy-search-bar input {
	flex: 1; min-width: 0; width: 100%; height: 44px; padding: 0 2px; border: 0; border-radius: 0;
	background: transparent; color: var(--search-ink); box-shadow: none; font: inherit;
	font-size: clamp(17px, 2.2vw, 22px); line-height: 1.4; letter-spacing: -.015em;
}
.sy-search .sy-search-bar input::placeholder { color: var(--search-muted); opacity: 1; }
.sy-search-bar:focus-within { border-color: var(--sy-brass, #b8914a); box-shadow: inset 0 -1px var(--sy-brass, #b8914a); }
/* The caret and the brass underline show focus; a box around the field inside the bar looks like a stray frame. */
.sy-search .sy-search-bar input:focus, .sy-search .sy-search-bar input:focus-visible { outline: none; }
.sy-search button { min-width: 0; min-height: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.sy-search .sy-search-close {
	display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--search-line);
	border-radius: 50%; color: var(--search-ink); font-size: 26px; line-height: 1;
}
.sy-search .sy-search-clear {
	flex: none; min-height: 32px; color: var(--search-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}
.sy-search-scroll { flex: 1 1 auto; min-height: 0; padding: 20px 24px 24px; overflow: auto; overscroll-behavior: contain; }
.sy-search-foot:not(:empty) { flex: none; padding: 14px 24px; border-top: 1px solid var(--search-line); background: #fafbfc; }
.sy-search-status {
	margin: 0 0 16px; color: var(--search-muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere;
}
.sy-search-status:empty { margin: 0; }
.sy-search-group + .sy-search-group, .sy-search-recent:not(:empty) + div { margin-block-start: 22px; }
.sy-search .sy-search-heading, .sy-search-results .sy-search-heading {
	margin: 0 0 9px; color: var(--search-muted); font: inherit; font-size: 12px; font-weight: 650; letter-spacing: .075em; line-height: 1.5;
}
:is(.sy-search, .sy-search-results)[dir="rtl"] .sy-search-heading { letter-spacing: normal; }
.sy-search-row {
	display: flex; align-items: center; gap: 14px; padding: 9px 12px; min-height: 44px; border-radius: 7px;
	background: transparent; color: var(--search-ink); text-decoration: none; scroll-margin-block: 8px;
}
.sy-search-row:visited, .sy-search-row:hover { color: var(--search-ink); text-decoration: none; }
.sy-search-row[aria-selected="true"], .sy-search-row:focus-visible { background: var(--search-tint); box-shadow: inset 3px 0 var(--sy-brass, #b8914a); }
[dir="rtl"] .sy-search-row[aria-selected="true"], [dir="rtl"] .sy-search-row:focus-visible { box-shadow: inset -3px 0 var(--sy-brass, #b8914a); }
.sy-search-thumb { flex: none; width: 52px; height: 52px; object-fit: cover; background: var(--search-tint); border-radius: 5px; }
.sy-search-copy { display: grid; flex: 1; min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.sy-search-copy strong { color: var(--search-ink); font-size: 15px; font-weight: 600; line-height: 1.45; }
.sy-search-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; }
.sy-search-meta, .sy-search-snippet, .sy-search-number { color: var(--search-muted); font-size: 13px; line-height: 1.5; }
.sy-search-sku { padding: 1px 6px; border: 1px solid var(--search-line); border-radius: 4px; font: 12px/1.45 ui-monospace, monospace; }
.sy-search-number { font-variant-numeric: tabular-nums; }
.sy-search-row mark { border-radius: 2px; padding: 0; background: #f5e9cc; color: #3d301c; }
.sy-search-group--chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sy-search-group--chips .sy-search-heading { flex-basis: 100%; margin-bottom: 0; }
.sy-search-group--chips .sy-search-row, .sy-search .sy-search-chip {
	min-height: 40px; max-width: 100%; padding: 7px 13px; border: 1px solid var(--search-line); border-radius: 20px;
}
.sy-search-group--chips .sy-search-copy strong, .sy-search .sy-search-chip { font-size: 14px; font-weight: 500; }
.sy-search .sy-search-chip { margin: 3px; overflow-wrap: anywhere; }
.sy-search-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.sy-search-history-head .sy-search-heading { margin: 0; }
.sy-search-link { color: var(--sy-navy, #283951); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.sy-search :focus-visible, .sy-search-results :focus-visible { outline: 2px solid var(--sy-navy, #283951); outline-offset: 2px; }
@media (hover: hover) {
	.sy-search-row:hover, .sy-search button:hover { background: var(--search-tint); }
}

.sy-search-results { max-width: 900px; margin-inline: auto; }
.sy-search-results .sy-search-group:not(.sy-search-group--chips) { padding: 16px 0; border-top: 1px solid var(--search-line); }
.sy-search-results .sy-search-group + .sy-search-group { margin-block-start: 6px; }
.sy-search-results > .sy-search-link { display: inline-block; margin-block-start: 22px; }
/* Blocksy's populated loop, pagination and zero-post template are siblings of our hook. */
.sy-search-results:not([hidden]) ~ :is(.entries, .ct-pagination),
.ct-no-results > .sy-search-results:not([hidden]) ~ .entry-content,
body.search:has(.ct-no-results .sy-search-results:not([hidden])) .hero-section .page-description { display: none; }

@media (max-width: 640px) {
	.sy-search {
		inset: 0; width: 100%; height: 100%; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0;
		padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
	}
	.sy-search-bar { gap: 9px; padding: 10px 12px; }
	.sy-search-scroll { padding: 16px 14px 20px; }
	.sy-search-foot:not(:empty) { padding: 16px; }
	.sy-search-row { gap: 10px; padding-inline: 7px; }
}
@media (prefers-reduced-motion: no-preference) {
	.sy-search[open] { animation: sy-search-enter 180ms var(--sy-ease, ease-out) both; }
	.sy-search[open]::backdrop { animation: sy-search-fade 180ms ease-out both; }
	.sy-search[open] .sy-search-scroll { animation: sy-search-fade 150ms ease-out 30ms both; }
}
@keyframes sy-search-enter { from { opacity: 0; transform: translateY(-6px); } }
@keyframes sy-search-fade { from { opacity: 0; } }
