.m1toc-wrapper {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	margin: 20px 0;
	width: 100%;
	box-sizing: border-box;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: all 0.3s ease;
}
.m1toc-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	padding: 14px 20px;
	background: #f8fafc;
	user-select: none;
	border-bottom: 1px solid #e2e8f0;
}
.m1toc-title {
	font-weight: 800;
	font-size: 1.1rem;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: 10px;
}
.m1toc-toggle-icon {
	background: #5391a8;
	color: #ffffff;
	padding: 4px 14px;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
}
#m1toc-content {
	padding: 15px;
	display: grid;
	grid-template-columns: repeat(3, 1fr); /* Desktop: 3 Columns */
	gap: 10px;
	transition: all 0.3s ease-in-out;
}

/* Default Hidden State */
.m1toc-wrapper.collapsed #m1toc-content {
	display: none;
}
.m1toc-wrapper.collapsed {
	border-bottom: 1px solid #e2e8f0;
}

/* List Style Items with Sky Blue Background */
.m1toc-link {
	text-decoration: none;
	color: #334155;
	font-size: 0.9rem;
	background: #f0f9ff; /* Light Sky Blue Background */
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid #e0f2fe;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	line-height: 1.4;
	white-space: normal;
	word-break: break-word;
}

/* Updated Arrow before each item (Using › symbol) */
.m1toc-link::before {
	content: '\203A'; /* Single Right Angle Quote (›) */
	margin-right: 8px;
	font-weight: bold;
	font-size: 1.2rem;
	color: #0ea5e9; /* Sky blue arrow color */
	flex-shrink: 0;
	line-height: 1;
}

/* Mouse Over Highlight (Orange) */
.m1toc-link:hover {
	background: #fff7ed;
	color: #f97316;
	border-color: #fdba74;
	transform: translateX(3px);
}

/* Selected/Active Item Styling (Blue BG, White Text) */
.m1toc-link.m1-active {
	background: #2563eb !important; /* Blue Background */
	color: #ffffff !important;      /* White Text */
	border-color: #1d4ed8 !important;
}
.m1toc-link.m1-active::before {
	color: #ffffff !important;      /* White Arrow when active */
}

/* Hierarchy visual aids */
.m1toc-level-H1 { font-weight: 700; color: #0f172a; }
.m1toc-level-H2 { padding-left: 12px; }
.m1toc-level-H3 { padding-left: 12px; font-size: 0.85rem; }

/* Responsive adjustments */
@media (max-width: 1024px) {
	#m1toc-content { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
	#m1toc-content { 
		grid-template-columns: 1fr; /* Mobile: Single Column */
		padding: 10px;
	}
	.m1toc-header { padding: 12px 15px; }
	.m1toc-link { font-size: 0.85rem; }
}