/* Search: header icon + full-screen overlay. Fonts and colours follow the theme. */
.sx-open { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 6px; border-radius: 50%; cursor: pointer; color: inherit; transition: background-color .2s ease; }
.sx-open:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.sx-open:focus-visible { outline: 2px solid var(--ap-accent, currentColor); outline-offset: 2px; }
html.sx-lock { overflow: hidden; }

.sx {
	position: fixed; inset: 0; z-index: 99990; overflow: auto; overscroll-behavior: contain;
	background: color-mix(in srgb, var(--ap-bg, Canvas) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	color: var(--ap-text, inherit); font-family: var(--ap-font-body, inherit);
	opacity: 0; transition: opacity .22s ease;
}
.sx.is-open { opacity: 1; }
.sx-inner { max-width: 1400px; margin: 0 auto; padding: clamp(24px, 5vh, 56px) clamp(18px, 3.4vw, 64px) 80px; transform: translateY(10px); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.sx.is-open .sx-inner { transform: none; }
.sx-form { display: flex; align-items: center; gap: 12px; }
.sx .sx-q {
	all: unset; box-sizing: border-box; flex: 1; min-width: 0; padding: 10px 0; border-bottom: 2px solid currentColor;
	font-family: var(--ap-font-head, inherit); font-size: clamp(28px, 4.4vw, 56px); font-weight: 500; line-height: 1.1; color: inherit;
}
.sx .sx-q::placeholder { color: color-mix(in srgb, currentColor 40%, transparent); }
.sx .sx-close { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); cursor: pointer; color: inherit; flex: none; }
.sx .sx-close:hover { background: color-mix(in srgb, currentColor 6%, transparent); }
.sx .sx-close:focus-visible, .sx .sx-chip:focus-visible, .sx .sx-more:focus-visible { outline: 2px solid var(--ap-accent, currentColor); outline-offset: 2px; }
.sx-chips { display: grid; gap: 10px; margin-top: 22px; }
.sx-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sx-chip-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, currentColor 60%, transparent); margin-right: 6px; }
.sx .sx-chip { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: var(--ap-radius, 999px); cursor: pointer; font-size: 14px; color: inherit; transition: background-color .15s ease, border-color .15s ease; }
.sx .sx-chip:hover { background: color-mix(in srgb, currentColor 6%, transparent); }
.sx .sx-chip[aria-pressed="true"] { border-color: var(--ap-accent, currentColor); color: var(--ap-accent, inherit); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ap-accent, currentColor); }
.sx-status { margin: 22px 0 10px; font-size: 14px; color: color-mix(in srgb, currentColor 60%, transparent); min-height: 1em; }
.sx-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); column-gap: 18px; grid-auto-rows: 4px; align-items: start; }
.sx-item { padding-bottom: 18px; animation: sx-in .4s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes sx-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sx-item .ss-card { margin: 0; }
.sx-item .ss-link { display: block; position: relative; overflow: hidden; color: #fff; text-decoration: none; background: color-mix(in srgb, currentColor 6%, transparent); }
.sx-item .ss-img { display: block; width: 100%; height: auto; }
.sx-item .ss-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.84) 0%, rgba(0,0,0,.42) 40%, rgba(0,0,0,0) 68%); pointer-events: none; }
.sx-item .ss-cap { position: absolute; left: 14px; right: 14px; bottom: 12px; display: grid; gap: 4px; }
.sx-item .ss-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .88; }
.sx-item .ss-title { margin: 0; font-family: var(--ap-font-head, inherit); font-weight: 600; font-size: 18px; line-height: 1.2; color: #fff; text-wrap: balance; }
.sx-item .ss-date { font-size: 12px; opacity: .8; }
.sx-item .ss-noimg .ss-link { color: inherit; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.sx-item .ss-noimg .ss-cap { position: static; padding: 18px; }
.sx-item .ss-noimg .ss-title { color: inherit; }
.sx-foot { display: flex; justify-content: center; padding: 24px 0; }
.sx .sx-more { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 46px; padding: 0 26px; border: 1px solid currentColor; border-radius: var(--ap-radius, 999px); cursor: pointer; font-weight: 500; }
.sx .sx-more[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .sx, .sx-inner, .sx-item { transition: none; animation: none; } }
