/* Keep page spacing predictable without overriding MathJax's generated elements. */
p, ul, ol, h1, h2, h3, h4, h5, h6 {
	margin: 0;
}

ul, ol {
	padding: 0;
}

body {
	margin: 0;
	font-size: 14px;
	background-color: #222d41;
	font-family: Tahoma, sans-serif;
}

*, *::before, *::after {
	box-sizing: border-box;
}

div.err-msg {
	background-color: #f8b0b0;
	padding: 10px;
	margin: 10px 0;
	border-radius: 5px;
}

.auth-box {
	display: flex;
	min-height: 100vh;
	justify-content: center;
	align-items: center;
	position: relative;
	overflow: hidden;
}

/* Drawing Planet */

.galactic {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.auth-box > .galactic {
	z-index: 0;
}

.tasks-page {
	position: relative;
	z-index: 1;
}

.tasks-galactic {
	z-index: 0;
}

.galactic > .planet {
	width: 50px;
	height: 50px;

	border-radius: 100%;

	background-color: #f2c173;

	-webkit-box-shadow:	8px -8px 0px 0px rgba(34, 60, 80, 0.2) inset;
	-moz-box-shadow:	8px -8px 0px 0px rgba(34, 60, 80, 0.2) inset;
	box-shadow:			8px -8px 0px 0px rgba(34, 60, 80, 0.2) inset;

	position:  absolute;
	right: 100px;
	bottom: 50px;
}

/* Drawing Saturn */

.galactic > .saturn {
	position: absolute;

	width: clamp(150px, 22vw, 300px);
	aspect-ratio: 1;

	left: 12%;
	top: 50%;
	transform: translateY(-50%);
}

.galactic > .saturn > .planet {
	width: 100%;
	aspect-ratio: 1/1;
	position: relative;
	z-index: 1;

	border-radius: 100%;

	background-color: #e3f1df;

	-webkit-box-shadow:	8px -8px 0px 0px rgba(145, 187, 201, 1) inset;
	-moz-box-shadow:	8px -8px 0px 0px rgba(145, 187, 201, 1) inset;
	box-shadow:			8px -8px 0px 0px rgba(145, 187, 201, 1) inset;
}
.galactic > .saturn > .ring {
	width: 170%;
	height: 55%;
	border: clamp(10px, 2vw, 22px) solid #f2c173;
	border-radius: 50%;
	position: absolute;
	left: -35%;
	top: 22%;
	transform: rotate(-25deg);
}




/* Authorization window */

.auth-column {
	display: flex;
	width: min(350px, calc(100% - 32px));
	min-height: 300px;

	align-items: center;
	justify-content: center;

	background-color: #eef1f6;
	border-radius: 10px;
	position: relative;
	z-index: 1;
}

.auth {
	padding: 20px 30px;
	width: 100%;
}
.auth > input {
	width:  100%;
	height: 50px;

	margin: 10px 0;
	padding: 0 20px;

	border: 1px solid #bcc7dc;
	border-radius: 5px;

	box-sizing: border-box;
}
.auth > .login {
	width: 100px;
	height: 50px;

	margin: 10px 0;

	border: none;
	border-radius: 5px;

	background-color: #f2c173;

	-webkit-appearance: none;
}
.auth > .login:hover {
	-webkit-box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.4) inset;
	-moz-box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.4) inset;
	box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.4) inset;
}




/* Home window */

.home {
	max-width: 900px;
	margin: 32px auto;
	border-radius: 10px;
	background-color: #eef1f6;
}

.home > .header {
	padding: 10px 30px;
	border-radius: 10px 10px 0 0;
	overflow: auto;
}

.home > .header > .right-info {
	cursor: pointer;
}

.home > .header a,
.home > .header .logout-form button {
	display: inline-block;
	padding: 10px;
	color: #222d41;
	text-decoration: none;
}

.home > .header a:hover,
.home > .header .logout-form button:hover {
	color: #cdd6e5;
}

.logout-form {
	display: inline;
}

.logout-form button {
	border: 0;
	background: transparent;
	font: inherit;
	cursor: pointer;
}

.home > .header > .left-info > ul {
	list-style-type: none;
}
.home > .header > .left-info > ul > li:first-child {
	display: inline-block;
	padding: 0;
}
.home > .header > .left-info > ul > li {
	display: inline-block;
	padding: 0 10px;
	cursor: pointer;
}

.home > .content {
	padding: 20px 30px;
}

.user-info {
	padding: 20px 30px;
	background-color: #cdd6e5;
	overflow: auto;
}

.user-info > .common {
	display: flex;
	margin-bottom: 20px;
	align-items: center;
}

.user-info > .common div {
	flex: 1;
}

.user-info > .common div:first-child {
	font-weight: bold;
	font-size: 20pt;
}

.user-info > .common div:last-child {
	text-align: right;
}

.task-score-info > ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style-type: none;
}
.task-score-info > ul > li {
	flex: 1 1 140px;
}

p.score {
	display: inline-block;
	background-color: #222d41;
	color: #f2c173;
	font-weight: bold;
	padding: 8px 8px;
}




/* Team info */
.team-info {
	margin-bottom: 20px;
}
.team-info > p.name {
	display: inline-block;
	font-weight: bold;
}

.team-members > ul {
	list-style-type: none;

	margin-top: 20px;
	padding: 20px;

	background-color: #222d41;
	color: #eef1f6;
}
.team-members > ul > li:first-child {
	display: block;
	padding-bottom: 10px;
	font-weight: bold;
	font-size: large;
}
.team-members > ul > li {
	display: inline-block;
}




/* Tasks info */

.task-name {
	display: flex;
	align-items: center;
	padding: 20px 30px;
	background-color: #cdd6e5;
	overflow: auto;
}

.task-name .task-status {
	display: inline-block;
	padding: 2px 5px 3px 5px;
	border-radius: 5px;
	margin-left: 8px;
	font-weight: bold;
	font-size: 8pt;
}

.task-name .task-deadline {
	margin-left: 8px;
	font-size: 12px;
}

.task-name .task-on {
	background-color: #3b7a57;
	color: #eef1f6;
}

.task-name .task-off {
	background-color: #db5353;
	color: #eef1f6;
}

.task-name .task-wait {
	background-color: #e1a94f;
	color: #eef1f6;
}

.task-info {
	padding: 20px 30px;
}

.task-info > .attempts {
	list-style-type: none;
}

.task-info > .attempts .attempt {
	list-style-type: none;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;

	margin-top: 10px;
	padding: 10px;

	background-color: #cdd6e5;
}

.task-info > .attempts .attempt > li:first-child {
	font-weight: bold;
	margin-right: 5px;
	color: #eef1f6;
	background-color: #222d41;
	width: auto;
}

.task-info > .attempts .attempt > li {
	padding: 5px 8px;
}

.task-info > .attempts .attempt > li p {
	display: inline-block;
	font-weight: bold;
	padding: 0 8px;
}



/* --- SETTINGS INFO --- */

.settings-info {
	padding: 0 30px;
	margin: 20px 0;
}

.form_radio_btn {
	display: inline-block;
	margin: 0 10px 10px 0;
}
.form_radio_btn input[type=radio] {
	display: none;
}
.form_radio_btn label {
	display: inline-block;
	cursor: pointer;
	padding: 0px 15px;
	line-height: 34px;
	border: 1px solid #999;
	border-radius: 6px;
	user-select: none;
}
 
/* Checked */
.form_radio_btn input[type=radio]:checked + label {
	background: #ffe0a6;
}
 
/* Hover */
.form_radio_btn label:hover {
	color: #666;
}
 
/* Disabled */
.form_radio_btn input[type=radio]:disabled + label {
	background: #efefef;
	color: #666;
}

.form_upload_btn {
	padding: 10px;
	background-color: #cdd6e5;
}

.form_upload_btn input[type=file]::file-selector-button {
	display: inline-block;
	cursor: pointer;
	padding: 0px 15px;
	line-height: 34px;
	border: 1px solid #999;
	border-radius: 6px;
	user-select: none;
	background-color: #efefef;
}

.form_upload_btn input[type=file]::file-selector-button:hover {
	color: #666;
}

.settings-info .send {
	display: inline-block;
	cursor: pointer;
	padding: 0px 15px;
	line-height: 36px;
	border: none;
	border-radius: 6px;
	user-select: none;
	border: #222d41 solid 1px;
	background-color: #222d41;
	color: #eef1f6;
	font-weight: bold;
}

.settings-info .send:hover {
	color: #222d41;
	background: none;
}

@media (min-width: 576px) and (max-width: 931.98px) {
	.home {
		margin: 16px;
	}
}

@media (max-width: 575.98px) {
	.home {
		margin: 0;
		border-radius: 0;
		min-height: 100vh;
	}

	.home > .header,
	.home > .content,
	.user-info,
	.task-name,
	.task-info {
		padding: 16px;
	}

	.home > .header > .left-info > ul > li {
		padding: 0;
	}

	.home > .header a,
	.home > .header .logout-form button {
		padding: 8px;
	}

	.user-info > .common {
		flex-wrap: wrap;
		gap: 12px;
	}

	.user-info > .common div {
		flex: 1 1 100%;
	}

	.user-info > .common div:last-child {
		text-align: left;
	}

	.task-name {
		flex-wrap: wrap;
		gap: 8px;
	}

	.task-name .task-status {
		margin-left: 0;
	}

	.settings-info {
		padding: 0 16px;
	}

	.form_upload_btn input[type=file] {
		max-width: 100%;
	}

	.settings-info .send {
		max-width: 100%;
		white-space: normal;
	}

	.auth-column {
		min-height: 300px;
	}

	.auth-box > .galactic {
		display: none;
	}
}

/* Task list and detail pages */
.page-title,
.task-page-heading h1 {
	font-size: clamp(24px, 4vw, 32px);
	font-weight: bold;
	margin-bottom: 20px;
}

.task-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

.task-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	padding: 18px;
	border: 1px solid #bcc7dc;
	border-radius: 8px;
	background: #fff;
	color: #222d41;
	text-decoration: none;
}

.task-card-top {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
}

.task-card:hover,
.task-card:focus-visible {
	border-color: #526b91;
	box-shadow: 0 3px 12px rgba(34, 45, 65, .15);
	color: #222d41;
}

.task-card-number {
	font-weight: bold;
	color: #526b91;
}

.task-card h2,
.submission-panel h2,
.task-description h2,
.task-submissions h2 {
	font-size: 20px;
	font-weight: bold;
}

.task-card p {
	color: #526071;
}

.task-card-state {
	font-weight: bold;
	color: #8b4b2a;
}

.task-card-state-open {
	color: #276344;
}

@media (max-width: 767.98px) {
	.task-card-top {
		grid-template-columns: 1fr;
		gap: 8px;
	}
}

.task-page-heading {
	margin-bottom: 26px;
}

.task-page-heading h1 {
	margin: 6px 0;
}

.submission-panel,
.task-description,
.task-submissions {
	padding: 24px;
	border-radius: 8px;
}

.submission-panel {
	background: #cdd6e5;
	margin-bottom: 24px;
}

.submission-panel h2,
.task-description h2,
.task-submissions h2 {
	margin-bottom: 16px;
}

.submission-field {
	margin-bottom: 16px;
}

.submission-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: bold;
}

.submission-field input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #9eacc0;
	border-radius: 6px;
	background: #fff;
}

.submission-check {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
}

.submission-panel .send {
	padding: 10px 18px;
	border: 1px solid #222d41;
	border-radius: 6px;
	background: #222d41;
	color: #fff;
	font-weight: bold;
}

.submission-panel .send:hover {
	background: #374b6d;
}

.submission-message {
	padding: 10px;
	margin-bottom: 16px;
	border-radius: 6px;
	background: #e3f1df;
}

.submission-panel .errorlist {
	color: #9e2626;
	list-style: none;
}

.task-description {
	border: 1px solid #cdd6e5;
	background: #fff;
}

.markdown-body {
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
	font-size: 1.35em;
	font-weight: bold;
	margin: 20px 0 10px;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body pre,
.markdown-body table {
	margin: 0 0 14px;
}

.markdown-body ul,
.markdown-body ol,
.task-submissions ul {
	padding-left: 24px;
}

.markdown-body img {
	display: block;
	max-width: 100%;
	height: auto;
}

.markdown-body .arithmatex {
	overflow-x: auto;
}

.markdown-body pre {
	padding: 12px;
	overflow-x: auto;
	background: #eef1f6;
}

.markdown-body table {
	display: block;
	overflow-x: auto;
}

.markdown-body th,
.markdown-body td {
	padding: 6px 10px;
	border: 1px solid #bcc7dc;
}

.task-submissions {
	margin-bottom: 24px;
	background: #f8f9fb;
}

@media (max-width: 575.98px) {
	.submission-panel,
	.task-description,
	.task-submissions {
		padding: 16px;
	}
}
