/**
 * QE Install Hub — front end.
 * Everything is scoped to .qeih so host themes (Salient/WPBakery) can't bleed in.
 */

.qeih {
	--qeih-ink: #12161a;
	--qeih-steel: #2a333d;
	--qeih-slate: #5e6a76;
	--qeih-line: #dce1e6;
	--qeih-line-soft: #eaedf0;
	--qeih-paper: #f2f4f6;
	--qeih-white: #ffffff;
	--qeih-signal: #ffc400;
	--qeih-signal-deep: #d99e00;

	--qeih-display: "Barlow Condensed", "Oswald", "Arial Narrow", Impact, sans-serif;
	--qeih-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--qeih-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--qeih-radius: 3px;

	font-family: var(--qeih-body);
	color: var(--qeih-ink);
	line-height: 1.5;
	max-width: 1280px;
	margin: 0 auto;
	container-type: inline-size;
}

/* --- reset against opinionated themes ------------------------------- */
.qeih *,
.qeih *::before,
.qeih *::after { box-sizing: border-box; }

.qeih button {
	appearance: none;
	-webkit-appearance: none;
	background: none !important;
	border: 0;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
	box-shadow: none !important;
	letter-spacing: normal;
	text-transform: none;
	border-radius: 0;
	transition: none;
}

.qeih a { text-decoration: none !important; color: inherit; box-shadow: none !important; }
.qeih ul { list-style: none !important; margin: 0; padding: 0; }
.qeih li { margin: 0; padding: 0; }
.qeih img { display: block; max-width: 100%; height: auto; }
.qeih p { margin: 0; }
.qeih input[type="search"] { -webkit-appearance: none; appearance: none; }
.qeih input[type="search"]::-webkit-search-decoration,
.qeih input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Any focusable field must clear 16px, or mobile Safari zooms the page. */
.qeih input,
.qeih select,
.qeih textarea { font-size: 16px !important; }

/* Stop the hub forcing the page wider than the screen. */
.qeih {
	max-width: min(1280px, 100%);
	overflow-wrap: break-word;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

.qeih-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.qeih :focus-visible {
	outline: 3px solid var(--qeih-signal);
	outline-offset: 2px;
}

/* --- header ---------------------------------------------------------- */
.qeih-head { margin-bottom: 26px; }

.qeih-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--qeih-mono);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--qeih-slate);
	margin-bottom: 10px !important;
}

.qeih-eyebrow__mark {
	width: 26px;
	height: 4px;
	background: var(--qeih-signal);
	flex: none;
}

.qeih-title {
	font-family: var(--qeih-display);
	font-weight: 700;
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.02;
	letter-spacing: 0.005em;
	text-transform: uppercase;
	margin: 0 0 8px !important;
	color: var(--qeih-ink);
}

.qeih-sub {
	color: var(--qeih-slate);
	font-size: 16px;
	max-width: 56ch;
}

/* --- toolbar --------------------------------------------------------- */
.qeih-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: stretch;
	margin-bottom: 14px;
}

.qeih-search {
	position: relative;
	flex: 1 1 320px;
	display: flex;
	align-items: center;
	background: var(--qeih-white);
	border: 1px solid var(--qeih-line);
	border-radius: var(--qeih-radius);
}

.qeih-search:focus-within {
	border-color: var(--qeih-ink);
	box-shadow: inset 0 -3px 0 var(--qeih-signal);
}

.qeih-search__icon {
	width: 19px; height: 19px;
	margin: 0 -2px 0 16px;
	flex: none;
	fill: none;
	stroke: var(--qeih-slate);
	stroke-width: 2;
	stroke-linecap: round;
}

.qeih-search__input {
	flex: 1;
	border: 0 !important;
	background: transparent !important;
	padding: 15px 14px !important;
	font-family: inherit;
	/*
	 * iOS Safari force-zooms any focused input under 16px and does not zoom
	 * back out afterwards, leaving the page magnified and clipped. This has to
	 * win against theme styles, hence !important.
	 */
	font-size: 16px !important;
	line-height: 1.4 !important;
	color: var(--qeih-ink);
	box-shadow: none !important;
	min-width: 0;
	height: auto !important;
	margin: 0 !important;
	touch-action: manipulation;
}

.qeih-search__input::placeholder { color: #98a2ac; }
.qeih-search__input:focus { outline: none; }

.qeih-search__clear {
	font-size: 24px;
	line-height: 1;
	padding: 0 16px !important;
	color: var(--qeih-slate);
}

.qeih-tabs {
	display: flex;
	border: 1px solid var(--qeih-line);
	border-radius: var(--qeih-radius);
	overflow: hidden;
	background: var(--qeih-white);
}

.qeih-tab {
	font-family: var(--qeih-display);
	font-size: 17px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 13px 22px !important;
	color: var(--qeih-slate);
	border-right: 1px solid var(--qeih-line);
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.qeih-tab:last-child { border-right: 0; }

.qeih-tab.is-active {
	background: var(--qeih-ink) !important;
	color: var(--qeih-white);
	box-shadow: inset 0 -3px 0 var(--qeih-signal) !important;
}

.qeih-tab__n {
	font-family: var(--qeih-mono);
	font-size: 11px;
	font-weight: 500;
	opacity: 0.62;
}

/* --- product chips --------------------------------------------------- */
.qeih-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.qeih-chip {
	font-family: var(--qeih-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 9px 14px !important;
	border: 1px solid var(--qeih-line) !important;
	border-radius: 999px;
	color: var(--qeih-slate);
	background: var(--qeih-white) !important;
	transition: border-color 0.12s ease, color 0.12s ease;
}

.qeih-chip:hover { border-color: var(--qeih-slate) !important; color: var(--qeih-ink); }

.qeih-chip.is-active {
	background: var(--qeih-ink) !important;
	border-color: var(--qeih-ink) !important;
	color: var(--qeih-white);
}

/* Same filter as a native picker — hidden until the buttons get cramped. */
.qeih-select { display: none; position: relative; margin-bottom: 18px; }

.qeih-select__input {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: var(--qeih-white) !important;
	border: 1px solid var(--qeih-line) !important;
	border-radius: var(--qeih-radius);
	color: var(--qeih-ink) !important;
	padding: 14px 44px 14px 16px !important;
	font-family: var(--qeih-body);
	font-weight: 500;
	line-height: 1.3 !important;
	height: auto !important;
	margin: 0 !important;
	box-shadow: none !important;
	text-transform: none;
}

.qeih-select__input:focus {
	outline: none;
	border-color: var(--qeih-ink) !important;
	box-shadow: inset 0 -3px 0 var(--qeih-signal) !important;
}

.qeih-select__arrow {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	width: 12px;
	height: 8px;
	pointer-events: none;
	fill: none;
	stroke: var(--qeih-slate);
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.qeih-count {
	font-family: var(--qeih-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--qeih-slate);
	margin-bottom: 14px !important;
	min-height: 16px;
}

/* --- grid ------------------------------------------------------------ */
.qeih-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
	gap: 20px;
}

.qeih-card {
	position: relative;
	background: var(--qeih-white);
	border: 1px solid var(--qeih-line);
	border-radius: var(--qeih-radius);
	display: flex;
	flex-direction: column;
	transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

/* the signature: a hi-vis rule that wipes across the top on hover */
.qeih-card::before {
	content: "";
	position: absolute;
	inset: -1px -1px auto -1px;
	height: 3px;
	background: var(--qeih-signal);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
	z-index: 2;
}

.qeih-card:hover,
.qeih-card:focus-within {
	border-color: var(--qeih-steel);
	transform: translateY(-2px);
	box-shadow: 0 10px 26px -18px rgba(18, 22, 26, 0.55);
}

.qeih-card:hover::before,
.qeih-card:focus-within::before { transform: scaleX(1); }

.qeih-card__open {
	display: flex;
	flex-direction: column;
	flex: 1;
	width: 100%;
}

.qeih-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--qeih-steel);
	overflow: hidden;
}

.qeih-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.qeih-card__img--blank {
	display: block;
	width: 100%;
	height: 100%;
	background:
		repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0 10px, transparent 10px 20px),
		var(--qeih-steel);
}

.qeih-card:hover .qeih-card__img { transform: scale(1.035); }

.qeih-card__play {
	position: absolute;
	right: 14px;
	bottom: 14px;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	background: var(--qeih-white);
	border-radius: 50%;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
	transition: background 0.14s ease, transform 0.14s ease;
}

.qeih-card__play svg { width: 22px; height: 22px; fill: var(--qeih-ink); margin-left: 2px; }

.qeih-card:hover .qeih-card__play {
	background: var(--qeih-signal);
	transform: scale(1.06);
}

.qeih-card__dur {
	position: absolute;
	left: 12px;
	bottom: 12px;
	font-family: var(--qeih-mono);
	font-size: 11px;
	font-weight: 500;
	color: var(--qeih-white);
	background: rgba(18, 22, 26, 0.82);
	padding: 3px 7px;
	border-radius: 2px;
}

/* mill tag strip */
.qeih-card__strip {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px 0;
	font-family: var(--qeih-mono);
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--qeih-slate);
	min-width: 0;
}

.qeih-card__line {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.qeih-card__title {
	display: block;
	font-family: var(--qeih-display);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
	padding: 8px 16px 0;
	color: var(--qeih-ink);
}

.qeih-card__desc {
	display: block;
	font-size: 14px;
	color: var(--qeih-slate);
	padding: 7px 16px 16px;
	flex: 1;
}

.qeih-card__docs {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	padding: 11px 16px;
	border-top: 1px solid var(--qeih-line-soft);
	background: var(--qeih-paper);
}

.qeih-card__docs-label {
	font-family: var(--qeih-mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--qeih-slate);
	margin-right: 2px;
}

.qeih-pill {
	font-family: var(--qeih-mono);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	padding: 4px 9px;
	border: 1px solid var(--qeih-line);
	border-radius: 2px;
	background: var(--qeih-white);
	color: var(--qeih-steel) !important;
	transition: background 0.12s ease, border-color 0.12s ease;
}

.qeih-pill:hover {
	background: var(--qeih-signal);
	border-color: var(--qeih-signal-deep);
	color: var(--qeih-ink) !important;
}

/* --- documents list -------------------------------------------------- */
.qeih-doclist {
	border: 1px solid var(--qeih-line);
	border-radius: var(--qeih-radius);
	background: var(--qeih-white);
	overflow: hidden;
}

.qeih-doc + .qeih-doc { border-top: 1px solid var(--qeih-line-soft); }

.qeih-doc__link {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 18px;
	transition: background 0.12s ease;
}

.qeih-doc__link:hover { background: var(--qeih-paper); }

.qeih-doc__icon {
	flex: none;
	font-family: var(--qeih-mono);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--qeih-white);
	background: var(--qeih-steel);
	padding: 7px 8px;
	border-radius: 2px;
}

.qeih-doc__link:hover .qeih-doc__icon { background: var(--qeih-ink); }

.qeih-doc__text { min-width: 0; flex: 1; }

.qeih-doc__title {
	display: block;
	font-weight: 600;
	font-size: 15.5px;
	color: var(--qeih-ink);
}

.qeih-doc__meta {
	display: block;
	font-family: var(--qeih-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--qeih-slate);
	margin-top: 3px;
}

.qeih-doc__lang {
	font-family: var(--qeih-mono);
	font-size: 11px;
	font-weight: 600;
	color: var(--qeih-slate);
	border: 1px solid var(--qeih-line);
	padding: 4px 8px;
	border-radius: 2px;
	flex: none;
}

/* --- empty state ----------------------------------------------------- */
.qeih-empty {
	border: 1px dashed var(--qeih-line);
	border-radius: var(--qeih-radius);
	padding: 48px 24px;
	text-align: center;
	background: var(--qeih-white);
}

.qeih-empty__head {
	font-family: var(--qeih-display);
	font-size: 24px;
	font-weight: 700;
	text-transform: uppercase;
	margin-bottom: 6px !important;
}

.qeih-empty__body { color: var(--qeih-slate); margin-bottom: 18px !important; }

.qeih-btn {
	display: inline-block;
	font-family: var(--qeih-display);
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 11px 22px !important;
	border: 1px solid var(--qeih-ink) !important;
	border-radius: var(--qeih-radius);
	color: var(--qeih-ink) !important;
	background: var(--qeih-white) !important;
	transition: background 0.12s ease, color 0.12s ease;
}

.qeih-btn:hover { background: var(--qeih-signal) !important; }

.qeih-btn--solid {
	background: var(--qeih-ink) !important;
	color: var(--qeih-white) !important;
}

.qeih-btn--solid:hover {
	background: var(--qeih-signal) !important;
	color: var(--qeih-ink) !important;
	border-color: var(--qeih-signal) !important;
}

.qeih-gate { text-align: center; padding: 56px 20px; }
.qeih-gate .qeih-eyebrow { justify-content: center; }
.qeih--empty { padding: 32px; border: 1px dashed var(--qeih-line); color: var(--qeih-slate); }

.qeih [hidden] { display: none !important; }

/* --- modal ----------------------------------------------------------- */
.qeih-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(10, 13, 16, 0.86);
	backdrop-filter: blur(3px);
	font-family: var(--qeih-body, sans-serif);
	animation: qeih-fade 0.16s ease-out;
}

@keyframes qeih-fade { from { opacity: 0; } to { opacity: 1; } }

.qeih-modal__panel {
	position: relative;
	background: #ffffff;
	border-radius: 4px;
	width: min(1100px, 100%);
	max-height: 92vh;
	display: grid;
	grid-template-columns: minmax(0, 1.62fr) minmax(280px, 0.9fr);
	overflow: hidden;
	animation: qeih-rise 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes qeih-rise {
	from { transform: translateY(10px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.qeih-modal__media {
	background: #12161a;
	display: flex;
	align-items: center;
	min-width: 0;
}

.qeih-modal__media video,
.qeih-modal__media iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	display: block;
	background: #000;
}

.qeih-modal__side {
	padding: 26px 26px 30px;
	overflow-y: auto;
	border-left: 1px solid #eaedf0;
	-webkit-overflow-scrolling: touch;
}

.qeih-modal__strip {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--qeih-mono);
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #5e6a76;
	margin-bottom: 12px;
}

.qeih-modal__code {
	font-weight: 600;
	color: #12161a;
	background: #f2f4f6;
	border: 1px solid #dce1e6;
	padding: 2px 6px;
}

.qeih-modal__title {
	font-family: var(--qeih-display);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.05;
	text-transform: uppercase;
	margin: 0 0 10px !important;
	color: #12161a;
}

.qeih-modal__desc { color: #5e6a76; font-size: 15px; margin-bottom: 22px !important; }

.qeih-modal__label {
	font-family: var(--qeih-mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #5e6a76;
	padding-bottom: 8px;
	border-bottom: 2px solid #12161a;
	margin-bottom: 14px !important;
	display: block;
}

.qeih-modal__docs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }

.qeih-modal__doc {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid #dce1e6;
	border-radius: 3px;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.qeih-modal__doc:hover { border-color: #12161a; background: #f2f4f6; }

.qeih-modal__doc-icon {
	font-family: var(--qeih-mono);
	font-size: 9.5px;
	font-weight: 600;
	color: #fff;
	background: #2a333d;
	padding: 6px 7px;
	border-radius: 2px;
	flex: none;
}

.qeih-modal__doc-title { font-size: 14.5px; font-weight: 600; color: #12161a; display: block; }
.qeih-modal__doc-meta { font-family: var(--qeih-mono); font-size: 10.5px; color: #5e6a76; }

.qeih-modal__tags { display: flex; flex-wrap: wrap; gap: 6px; }

.qeih-modal__tag {
	font-family: var(--qeih-mono);
	font-size: 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #5e6a76;
	border: 1px solid #dce1e6;
	border-radius: 999px;
	padding: 5px 10px;
}

.qeih-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 3;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	font-size: 26px;
	line-height: 1;
	color: #fff;
	background: rgba(18, 22, 26, 0.72) !important;
	border-radius: 50%;
	cursor: pointer;
	border: 0;
}

.qeih-modal__close:hover { background: #12161a !important; }

.qeih-modal__copy {
	font-family: var(--qeih-mono);
	font-size: 10.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #5e6a76;
	margin-top: 18px;
	padding: 9px 12px !important;
	border: 1px solid #dce1e6 !important;
	border-radius: 3px;
	background: #fff !important;
	width: 100%;
	text-align: center;
}

.qeih-modal__copy:hover { border-color: #12161a !important; color: #12161a; }

.qeih-modal__nav {
	position: absolute;
	bottom: 0;
	left: 0;
	display: flex;
	gap: 1px;
}

.qeih-modal__nav button {
	background: rgba(18, 22, 26, 0.72) !important;
	color: #fff;
	font-family: var(--qeih-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 10px 16px !important;
}

.qeih-modal__nav button:hover { background: #12161a !important; }
.qeih-modal__nav button[disabled] { opacity: 0.35; cursor: default; }

body.qeih-locked { overflow: hidden; }

/* --- responsive ------------------------------------------------------ */
@media (max-width: 900px) {
	.qeih-modal { padding: 0; }

	.qeih-modal__panel {
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(0, 1fr);
		max-height: 100vh;
		height: 100%;
		border-radius: 0;
	}

	.qeih-modal__side { border-left: 0; border-top: 1px solid #eaedf0; padding: 20px 18px 32px; }
	.qeih-modal__title { font-size: 25px; }
	.qeih-modal__nav { position: static; margin-top: 22px; }
	.qeih-modal__nav button { flex: 1; text-align: center; border: 1px solid #dce1e6; background: #fff !important; color: #12161a; }
}

@media (max-width: 640px) {
	.qeih-grid { grid-template-columns: 1fr; gap: 14px; }
	.qeih-search { flex: 1 1 100%; }
	.qeih-tabs { width: 100%; }
	.qeih-tab { flex: 1; justify-content: center; }
	.qeih-card__title { font-size: 20px; }
	.qeih-doc__link { padding: 14px; gap: 12px; }

	/* Seven wrapping buttons push the grid off screen — use the picker. */
	.qeih-chips { display: none; }
	.qeih-select { display: block; }
}

@media (prefers-reduced-motion: reduce) {
	.qeih *,
	.qeih-modal * {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
	.qeih-card:hover { transform: none; }
	.qeih-card::before { transition: none; }
}

@media print {
	.qeih-card__media, .qeih-tabs, .qeih-search { display: none; }
	.qeih-card { break-inside: avoid; }
}
