.he-pcg {
	--he-pcg-card-bg: #ffffff;
	--he-pcg-card-border: #e7e9ed;
	--he-pcg-panel-bg: #eceef2;
	--he-pcg-title: #1f2937;
	--he-pcg-icon: #1f2937;
	--he-pcg-muted: #8a8f98;
	--he-pcg-radius: 6px;
	/* Nested accordion: header strip + content well (contrast vs panel grey). */
	--he-pcg-nested-chrome-bg: #ffffff;
	--he-pcg-nested-header-bg: #dddddd;
	--he-pcg-nested-well-bg: #d4d4d4;
	--he-pcg-nested-shadow: 0 8px 28px rgba(20, 30, 60, 0.1);
	--he-pcg-card-border-1: #cecfcf;
	box-sizing: border-box;
	font-family: inherit;
	color: var(--he-pcg-title);
	position: relative;
}
.he-pcg.he-pcg *,
.he-pcg.he-pcg *::before,
.he-pcg.he-pcg *::after {
	box-sizing: border-box;
}

/* --- Search bar --------------------------------------------------- */

.he-pcg .he-pcg__search-wrap {
	display: flex;
	justify-content: center;
	margin-bottom: 24px;
}
.he-pcg .he-pcg__search {
	position: relative;
	width: 100%;
	max-width: 480px;
}
.he-pcg input.he-pcg__search-input,
.he-pcg input[type='search'].he-pcg__search-input,
.he-pcg input[type='text'].he-pcg__search-input {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 44px 10px 18px;
	background: #ffffff;
	border: 1px solid var(--he-pcg-card-border);
	border-radius: 0;
	color: var(--he-pcg-title);
	font: inherit;
	font-size: 15px;
	line-height: 1.3;
	box-shadow: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	-webkit-appearance: none;
	appearance: none;
}
.he-pcg input.he-pcg__search-input:focus {
	outline: none;
	border-color: var(--he-pcg-title);
	box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.10);
}
.he-pcg input.he-pcg__search-input::-webkit-search-decoration,
.he-pcg input.he-pcg__search-input::-webkit-search-cancel-button,
.he-pcg input.he-pcg__search-input::-webkit-search-results-button,
.he-pcg input.he-pcg__search-input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}
.he-pcg .he-pcg__search-ico {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	color: var(--he-pcg-muted);
	pointer-events: none;
}

/* --- Grid container ----------------------------------------------- */

.he-pcg .he-pcg__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px !important;
	grid-auto-flow: row;
	align-items: stretch;
	row-gap: 0 !important;
}

.he-pcg .he-pcg__no-results {
	margin-top: 12px;
	padding: 24px;
	text-align: center;
	color: var(--he-pcg-muted);
	font-size: 15px;
}

/* --- Top-level card (shared between leaf & has-children) ---------- */

.he-pcg .he-pcg__card {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 80px;
	padding: 16px;
	background: var(--he-pcg-card-bg);
	border: 1px solid var(--he-pcg-card-border);
	border-radius: 0;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
	overflow: hidden;
	margin-bottom: 12px;
}
.he-pcg .he-pcg__card:hover,
.he-pcg .he-pcg__card:focus{
	border-color: #cfd2d8;
	box-shadow: 0 6px 16px rgba(20, 30, 60, 0.06),0 0 0 5px #1967b521;
}

/* Leaf variant is itself an <a> */
.he-pcg a.he-pcg__card,
.he-pcg a.he-pcg__card:link,
.he-pcg a.he-pcg__card:visited {
	color: var(--he-pcg-title);
	text-decoration: none;
}
.he-pcg a.he-pcg__card--leaf:hover,
.he-pcg a.he-pcg__card--leaf:focus-visible {
	color: var(--he-pcg-title);
	text-decoration: none;
	outline: none;
}

/* has-children: left link + right toggle */
.he-pcg .he-pcg__card--has-children {
	padding: 0;
}
.he-pcg .he-pcg__card--has-children.is-open {
	background: #e6e6e6;
	border-color: transparent;
	margin-bottom: 0;
}
.he-pcg a.he-pcg__card-link,
.he-pcg a.he-pcg__card-link:link,
.he-pcg a.he-pcg__card-link:visited {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	gap: 14px;
	padding: 16px;
	color: var(--he-pcg-title);
	text-decoration: none;
	padding: 0 !important;
}
.he-pcg a.he-pcg__card-link:hover .he-pcg__title,
.he-pcg a.he-pcg__card-link:focus-visible .he-pcg__title {
	text-decoration: underline;
	outline: none;
}

/* Thumbnail */
.he-pcg .he-pcg__thumb {
	flex: 0 0 auto;
	width: 70px !important;
	height: 70px !important;
	border-radius: 4px;
	background-color: transparent;
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
}
.he-pcg .he-pcg__thumb:not(.he-pcg__thumb--has-img) {
	background-color: #f1f3f7;
}

/* Title */
.he-pcg .he-pcg__title {
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.3;
	color: inherit;
	overflow-wrap: anywhere;
	font-size: 20px;
	font-weight: bold;
	font-family: 'Montserrat';
}

.he-pcg button.he-pcg__toggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	min-height: 56px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	color: var(--he-pcg-icon);
	cursor: pointer;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: background 0.15s ease, color 0.15s ease;
	align-self: stretch;
}
.he-pcg button.he-pcg__toggle:hover {
	background: rgba(0, 0, 0, 0.04);
}
.he-pcg .he-pcg__card--has-children.is-open button.he-pcg__toggle {
	border-left-color: transparent;
	background: transparent;
}

.he-pcg .he-pcg__plus {
	position: relative;
	display: inline-block;
	width: 18px;
	height: 18px;
}
.he-pcg .he-pcg__plus-h,
.he-pcg .he-pcg__plus-v {
	position: absolute;
	background: currentColor;
	border-radius: 1px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.he-pcg .he-pcg__plus-h {
	left: 0;
	right: 0;
	top: 50%;
	height: 2px;
	transform: translateY(-50%);
}
.he-pcg .he-pcg__plus-v {
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
}
.he-pcg .he-pcg__card--has-children.is-open .he-pcg__plus-v {
	transform: translateX(-50%) rotate(90deg);
	opacity: 0;
}

/* --- Expansion panel --------------------------------------------- */

.he-pcg .he-pcg__panel {
	grid-column: 1 / -1;
	width: 100%;
	background: #e6e6e6;
	border-radius: 0;
	padding: 12px;
	margin-bottom: 12px;
}
.he-pcg .he-pcg__panel[hidden] {
	display: none;
}

.he-pcg .he-pcg__panel-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	align-items: start;
}


.he-pcg .he-pcg__panel-grid > .he-pcg__sub-branch.is-open,
.he-pcg .he-pcg__sub-nested > .he-pcg__sub-branch.is-open {
	grid-column: 1 / -1;
	background: var(--he-pcg-nested-chrome-bg);
	border: 1px solid var(--he-pcg-card-border-1);
	box-shadow: var(--he-pcg-nested-shadow);
	overflow: hidden;
}

.he-pcg .he-pcg__sub-branch {
	min-width: 0;
	margin-bottom: 0;
}

.he-pcg .he-pcg__sub-card--has-children {
	display: flex;
	align-items: center;
	gap: 0;
	min-height: 80px;
	padding: 0;
	background: var(--he-pcg-card-bg);
	border: 1px solid var(--he-pcg-card-border);
	border-radius: 0;
	overflow: hidden;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.he-pcg .he-pcg__sub-card--has-children:hover {
	border-color: #cfd2d8;
	box-shadow: 0 0 0 5px #1967b521;
}
.he-pcg .he-pcg__sub-branch.is-open > .he-pcg__sub-card--has-children {
	background: var(--he-pcg-nested-header-bg);
	border-color: transparent;
	border-bottom: 1px solid var(--he-pcg-card-border-1);
	border-radius: 0;
	box-shadow: none;
}

.he-pcg a.he-pcg__sub-card-link,
.he-pcg a.he-pcg__sub-card-link:link,
.he-pcg a.he-pcg__sub-card-link:visited {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	gap: 14px;
	/* padding: 16px; */
	color: var(--he-pcg-title);
	text-decoration: none;
}
.he-pcg a.he-pcg__sub-card-link:hover .he-pcg__title,
.he-pcg a.he-pcg__sub-card-link:focus-visible .he-pcg__title {
	text-decoration: underline;
	outline: none;
}

.he-pcg button.he-pcg__sub-toggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	color: var(--he-pcg-icon);
	cursor: pointer;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	align-self: stretch;
	transition: background 0.15s ease, color 0.15s ease;
}
.he-pcg button.he-pcg__sub-toggle:hover {
	background: rgba(0, 0, 0, 0.04);
}
.he-pcg .he-pcg__sub-branch.is-open > .he-pcg__sub-card--has-children button.he-pcg__sub-toggle {
	background: transparent;
}
.he-pcg .he-pcg__sub-branch.is-open > .he-pcg__sub-card--has-children .he-pcg__plus-v {
	transform: translateX(-50%) rotate(90deg);
	opacity: 0;
}

.he-pcg .he-pcg__sub-nested {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 16px;
	background: var(--he-pcg-nested-well-bg);
	border: none;
	border-left: none;
	align-items: start;
}
.he-pcg .he-pcg__sub-nested[hidden] {
	display: none;
}

/* Grandchild leaf cards: explicit white on well (stronger tile read). */
.he-pcg .he-pcg__sub-nested > a.he-pcg__sub-card--leaf {
	background: var(--he-pcg-card-bg);
	min-height: 80px;
	padding: 16px;
}
.he-pcg .he-pcg__sub-nested > a.he-pcg__sub-card--leaf .he-pcg__thumb {
	width: 48px;
	height: 48px;
}

.he-pcg a.he-pcg__sub-card--leaf,
.he-pcg a.he-pcg__sub-card--leaf:link,
.he-pcg a.he-pcg__sub-card--leaf:visited {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background: var(--he-pcg-card-bg);
	border: 1px solid var(--he-pcg-card-border);
	border-radius: 0;
	color: var(--he-pcg-title);
	text-decoration: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.he-pcg a.he-pcg__sub-card--deep {
	padding-top: 10px;
	padding-bottom: 10px;
}
.he-pcg a.he-pcg__sub-card--leaf:hover,
.he-pcg a.he-pcg__sub-card--leaf:focus-visible {
	border-color: #cfd2d8;
	box-shadow: 0 0 0 5px #1967b521;
	color: var(--he-pcg-title);
	text-decoration: none;
	outline: none;
}
.he-pcg .he-pcg__sub-card--has-children .he-pcg__title,
.he-pcg a.he-pcg__sub-card-link .he-pcg__title {font-size: 20px;font-weight: bold;}
.he-pcg a.he-pcg__sub-card--leaf .he-pcg__title {
	font-size: 20px;
	font-weight: bold;
}
.he-pcg a.he-pcg__sub-card--deep .he-pcg__title {
	font-size: 20px;
	font-weight: bold;
}
.he-pcg .he-pcg__sub-card--has-children .he-pcg__thumb,
.he-pcg a.he-pcg__sub-card-link .he-pcg__thumb {
	width: 48px;
	height: 48px;
}
.he-pcg a.he-pcg__sub-card--leaf .he-pcg__thumb {
	width: 40px;
	height: 40px;
}

/* Search: hide top-level card */
.he-pcg .he-pcg__card[data-hidden='1'] {
	display: none !important;
}


.he-pcg .he-pcg__empty {
	grid-column: 1 / -1;
	padding: 32px 12px;
	text-align: center;
	color: var(--he-pcg-muted);
	font-size: 15px;
}

/* --- Responsive -------------------------------------------------- */

@media (max-width: 600px) {
	.he-pcg .he-pcg__list,
	.he-pcg .he-pcg__panel-grid,
	.he-pcg .he-pcg__sub-nested {
		grid-template-columns: 1fr;
	}
	.he-pcg .he-pcg__sub-card--has-children .he-pcg__title, .he-pcg a.he-pcg__sub-card-link .he-pcg__title,
	.he-pcg a.he-pcg__sub-card--leaf .he-pcg__title,
	.he-pcg .he-pcg__title {
		font-size: 15px;
	}
	.he-pcg .he-pcg__thumb{
		width: 40px !important;
		height: 40px !important;
	}
	.he-pcg button.he-pcg__toggle {
		width: 48px;
		min-height: 48px;
	}
	.he-pcg button.he-pcg__sub-toggle {
		width: 48px;
		min-height: 48px;
	}
}
