.qpstoc {
	--qpstoc-accent: #c8102e;
	--qpstoc-accent-soft: #fff0f2;
	--qpstoc-card-width: 320px;
	--qpstoc-sticky-offset: 120px;
	--qpstoc-gray-50: #f9fafb;
	--qpstoc-gray-100: #f3f4f6;
	--qpstoc-gray-200: #e5e7eb;
	--qpstoc-gray-400: #9ca3af;
	--qpstoc-gray-600: #6b7280;
	--qpstoc-gray-700: #374151;
	--qpstoc-gray-900: #111827;
	box-sizing: border-box;
	max-width: var(--qpstoc-card-width);
	width: 100%;
}

.qpstoc *,
.qpstoc *::before,
.qpstoc *::after {
	box-sizing: inherit;
}

.qpstoc[data-sticky="true"] {
	position: sticky;
	top: var(--qpstoc-sticky-offset);
	align-self: start;
}

.qpstoc__card {
	background: #fff;
	border: 1px solid var(--qpstoc-gray-200);
	border-radius: 18px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.05);
	padding: 1.5rem;
	width: 100%;
}

.qpstoc__toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: inherit;
	cursor: default;
	display: flex;
	font: inherit;
	gap: 1rem;
	justify-content: space-between;
	margin: 0 0 0.9rem;
	padding: 0;
	text-align: left;
	width: 100%;
}

.qpstoc .qpstoc__toggle,
.qpstoc .qpstoc__toggle:hover,
.qpstoc .qpstoc__toggle:active,
.qpstoc .qpstoc__toggle:focus {
	background: transparent;
	color: inherit;
	text-decoration: none;
}

.qpstoc__toggle:focus-visible,
.qpstoc__link:focus-visible {
	outline: 2px solid var(--qpstoc-accent);
	outline-offset: 3px;
}

.qpstoc__heading {
	display: grid;
	gap: 0.25rem;
	min-width: 0;
}

.qpstoc__title {
	color: var(--qpstoc-gray-400);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.5px;
	line-height: 1.25;
	text-transform: uppercase;
}

.qpstoc__subtitle {
	color: var(--qpstoc-gray-600);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
}

.qpstoc__chevron {
	display: none;
	flex: 0 0 auto;
	height: 10px;
	position: relative;
	width: 10px;
}

.qpstoc__chevron::before {
	border-bottom: 2px solid var(--qpstoc-gray-600);
	border-right: 2px solid var(--qpstoc-gray-600);
	content: "";
	height: 7px;
	left: 1px;
	position: absolute;
	top: -1px;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	width: 7px;
}

.qpstoc__toggle[aria-expanded="true"] .qpstoc__chevron::before {
	transform: rotate(225deg);
}

.qpstoc__list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	list-style: none;
	margin: 0;
	max-height: min(68vh, 680px);
	overflow: auto;
	padding: 0;
	scrollbar-width: thin;
}

.qpstoc__item {
	margin: 0;
	padding: 0;
}

.qpstoc .qpstoc__link,
.qpstoc .qpstoc__link:visited {
	border-left: 2px solid transparent;
	border-radius: 7px;
	color: var(--qpstoc-gray-600) !important;
	display: block;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	padding: 7px 10px;
	text-decoration: none !important;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.qpstoc .qpstoc__link:hover,
.qpstoc .qpstoc__link:active,
.qpstoc .qpstoc__link:focus,
.qpstoc .qpstoc__link[aria-current="true"] {
	background: var(--qpstoc-accent-soft) !important;
	border-left-color: var(--qpstoc-accent) !important;
	color: var(--qpstoc-accent) !important;
	text-decoration: none !important;
}

.qpstoc .qpstoc__link[aria-current="true"] {
	font-weight: 700;
}

.qpstoc .qpstoc__link--h3 {
	color: var(--qpstoc-gray-600) !important;
	font-size: 12px;
	margin-left: 12px;
	padding-left: 13px;
}

.qpstoc .qpstoc__link--h3:hover,
.qpstoc .qpstoc__link--h3:active,
.qpstoc .qpstoc__link--h3:focus,
.qpstoc .qpstoc__link--h3[aria-current="true"] {
	color: var(--qpstoc-accent) !important;
}

.qpstoc[data-ready="false"],
.qpstoc:empty {
	display: none;
}

.qpstoc[data-animate="true"] .qpstoc__card {
	animation: qpstoc-fade-up 0.35s ease both;
}

@keyframes qpstoc-fade-up {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 1024px) {
	.qpstoc {
		max-width: 100%;
	}

	.qpstoc[data-sticky="true"] {
		position: static;
		top: auto;
	}
}

@media (max-width: 767px) {
	.qpstoc__card {
		border-radius: 14px;
		padding: 1rem;
	}

	.qpstoc__toggle {
		cursor: pointer;
		margin-bottom: 0;
		padding: 0.15rem 0;
	}

	.qpstoc__chevron {
		display: block;
	}

	.qpstoc[data-mobile-collapse="true"] .qpstoc__list {
		max-height: 0;
		opacity: 0;
		overflow: hidden;
		padding-top: 0;
		transition: max-height 0.25s ease, opacity 0.2s ease, padding-top 0.25s ease;
	}

	.qpstoc[data-mobile-collapse="true"][data-open="true"] .qpstoc__list {
		max-height: 70vh;
		opacity: 1;
		padding-top: 0.9rem;
	}

	.qpstoc:not([data-mobile-collapse="true"]) .qpstoc__list {
		padding-top: 0.9rem;
	}

	.qpstoc__link {
		font-size: 14px;
		min-height: 42px;
		padding: 11px 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qpstoc *,
	.qpstoc *::before,
	.qpstoc *::after {
		animation-duration: 0.001ms !important;
		scroll-behavior: auto !important;
		transition-duration: 0.001ms !important;
	}
}
