@media (prefers-color-scheme: dark) {

	BODY
	{
	background:#222 !important;
	}

	.whitepage
	{
	background-color:#333 !important;
	color:#FFF;
	}

	.navbar-fixed-top,
	HEADER,
	.navbar-nav>li>.dropdown-menu
	{
	box-shadow:inset 0 0 0 500px rgba(0,0,0,0.2);
	}

	A:not(.btn,.navbar-brand,.protectedlink),
	A:not(.btn,.navbar-brand,.protectedlink):visited
	{
	color:#CCC !important;
	filter:grayscale(1);
	}

	A:not(.btn,.navbar-brand,.protectedlink):focus,
	A:not(.btn,.navbar-brand,.protectedlink):hover
	{
	color:#FFF !important;
	}

	.form-control
	{
	background:transparent;
	color:#DDD;
	}

	TEXTAREA.hootdown
	{
	color:#DDD;
	}

	.hootdown-toolbar
	{
	filter: grayscale(1) invert(1) contrast(0.64);
	border: 0;
	}

	.hootdown-toolbar A,
	.hootdown-toolbar A:visited
	{
	color:#333 !important;
	}

	.hootdown-toolbar A:focus,
	.hootdown-toolbar A:hover
	{
	color:#000 !important;
	}

	.hootdown-prev-editor
	{
	color:#CCC !important;
	}

	.hootdown-prev-editor:focus,
	.hootdown-prev-editor:hover
	{
	color:#FFF !important;
	}

	#hootdown-prompt
	{
	background-color:#333 !important;
	color:#FFF;
	}

	.btn
	{
	filter:brightness(0.9) !important;
	}

	.btn:hover,
	.btn:focus
	{
	filter:brightness(1) !important;
	}

	.btn:active
	{
	filter:brightness(0.8) !important;
	}

	.input-group-addon
	{
	filter: grayscale(1) invert(1) contrast(0.64);
	}

	.input-group-addon:first-child
	{
	border-color:#000;
	}

	.input-group-addon:last-child
	{
	border-color:#000;
	}

	.loginpages FORM
	{
	background-color:#333 !important;
	color:#FFF;
	border:1px solid #DDD;
	}

	SELECT.form-control OPTION
	{
	background:#333;
	color:#FFF;
	}

	.table-striped,
	.table-striped *,
	#attachments .attachment
	{
	color:#FFF !important;
	}

	.table-striped>tbody>tr:nth-of-type(odd),
	#attachments .attachment:nth-child(odd)
	{
	background-color:#444 !important;
	}

	.table-striped>tbody>tr:nth-of-type(even),
	#attachments .attachment:nth-child(even)
	{
	background-color:#555 !important;
	}

	.table-hover>tbody>tr:hover
	{
	background-color:#656565 !important;
	}

	#attachments .attachment BUTTON IMG
	{
	filter:invert(1) !important;
	}

	#attachments .attachment BUTTON:hover,
	#attachments .attachment BUTTON:focus
	{
	background-color:#777 !important;
	}

	#attachments .attachment BUTTON.btn-delete:hover,
	#attachments .attachment BUTTON.btn-delete:focus
	{
	background-color:var(--critical-button-color) !important;
	}

	#pg-article .articleblock #tags
	{
	border:1px solid rgba(255,255,255,0.5) !important;
	}

	#pg-search #articles TBODY TD:nth-child(2) .tags I,
	#pg-article .articleblock #tags .tag
	{
	background-color:transparent !important;
	border:1px solid rgba(255,255,255,0.5) !important;
	}

	#ays
	{
	background-color: #333 !important;
	color: #FFF;
	}

	#ays-confirm
	{
	background-color:#444 !important;
	}

	#pg-article .buttons IMG
	{
	filter:invert(1);
	}
	
	#pg-article .buttons A:hover IMG
	{
	filter:invert(1) !important;
	}

	#pg-article #author
	{
	background-color:transparent !important;
	}

	#pg-article .articleblock #title TT
	{
	color:#FFF !important;
	}

	#pg-search.usermode .user-id-row .user-fullname
	{
	background:#777 !important;
	color:#FFF;
	}

	#pg-search.usermode .user-btn-edit
	{
	background:transparent !important;
	filter:invert(1);
	}


}

