/* ==[ Themes ]============================================================================================ */

html[data-theme="Dark"] {
	--focus: #8173bf;
	--h1-color: #a3c1fb;
	--hr-bg: linear-gradient(90deg, #15202b, #607ba6, #15202b);
	--html-bg: #15202b;
	--html-color: #ccc;
	--link-color: #89c2ff;
	--link-button-bg: linear-gradient(to bottom, #596375, #153864);
	--link-button-bg-active: #223a57;
	--link-button-bg-hover: #3e5e88;
	--link-button-color: #ccc;
	--link-button-color-hover: #bed1ff;
	--link-hover: #ed88fb;
	--navigation-bg: linear-gradient(to bottom, #5070b5, #0f2037);
	--navigation-link-border: #002b60;
	--reply-bg: #192734;
	--reply-border: #25323d;
}

html[data-theme="Light"] {
	--focus: #4d87c4;
	--h1-color: #71819f;
	--hr-bg: linear-gradient(90deg, #eee, #7a95c1, #eee);
	--html-bg: #eee;
	--html-color: #34343f;
	--link-color: #0f73c8;
	--link-button-bg: linear-gradient(to bottom, #c9d4e6, #577dae);
	--link-button-bg-active: #5b7ca9;
	--link-button-bg-hover: #7f9cc2;
	--link-button-color: #fff;
	--link-button-color-hover: #fff;
	--link-hover: #dd0000;
	--navigation-bg: linear-gradient(to top, #c1d3fb, #375a88);
	--navigation-link-border: #c0ccd7;
	--reply-bg: #ddd;
	--reply-border: #ccc;
}

/* ==[ Main rules ]======================================================================================== */

:focus-visible {
	outline: 2px solid var(--focus);
}

a {
	color: var(--link-color);
	text-decoration: none;
}

a:hover {
	color: var(--link-hover);
}

body {
	margin: 0;
	text-align: center;
}

body, html {
	background: var(--html-bg);
	color: var(--html-color);
	font: 14px Helvetica, Arial, sans-serif;
	scroll-behavior: smooth;
}

h1 {
	margin: 7px 0;
	clear: both;
	text-align: center;
	font-size: 2em;
	line-height: 1em;
	color: var(--h1-color);
	width: 100%;
}

h2 {
	margin: 20px 0 10px 8px;
	font-weight: bold;
	font-size: 16px;
}

hr {
	margin: 20px 0;
	border: none;
	background-image: var(--hr-bg);
	height: 2px;
	clear: both;
}

footer {
	font: 12px serif;
	text-align: center;
}

p {
	margin: 8px;
}

.reply {
	max-width: calc(100vw - 255px);
	margin-bottom: 10px;
	background: var(--reply-bg);
	border: 1px solid var(--reply-border);
	padding: 4px 4px 4px 10px;
	border-radius: 8px;
}

.wrapper {
	display: inline-block;
	width: calc(100% - 210px);
	max-width: 1224px;
	text-align: left;
}

/* ==[ Links and buttons ]================================================================================= */

.link-button {
	display: inline-block;
	padding: 4px 10px;
	background: var(--link-button-bg);
	color: var(--link-button-color) !important;
	border: none;
	border-radius: 4px;
	box-sizing: border-box;
	font: bold 13px Helvetica, Arial, sans-serif;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.link-button:not([disabled]):hover {
	background: var(--link-button-bg-hover);
  	color: var(--link-button-color-hover) !important;
}

.link-button:not([disabled]):active {
	background: var(--link-button-bg-active);
	transform: translateY(1px);
}

/* ==[ Navigation panels ]================================================================================= */

.navigation {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	background-image: var(--navigation-bg);
}

.navigation-link {
	margin: -1px 0 0 -1px;
	padding: 2px 8px 4px 8px;
	border: 1px solid var(--navigation-link-border);
	color: var(--link-button-color) !important;
	font-size: 13px;
	font-weight: bold;
}

.navigation-link:hover {
	background: #5d7aa8;
}

.navigation-separator {
	flex-grow: 1;
}

.panel {
	text-align: center;
	clear: both;
}

#panel-top, #panel-bottom {
	margin: 10px 0;
}

.select-style {
	background: none;
	font: bold 13px Helvetica, Arial, sans-serif;
	cursor: pointer;
}

/* ==[ Mobile devices ]==================================================================================== */

@media only screen and (max-width: 770px) {
	article.reply {
		max-width: 95vw;
	}
	.nav-separator {
		flex-grow: 0;
	}
	.wrapper {
		display: block;
		width: auto;
	}
}
