* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #f7f7f8;
	color: #242424;
	font: 15px/1.5 system-ui,sans-serif;
}

main {
	max-width: 860px;
	margin: auto;
	padding: 32px 20px;
}

header {
	border-bottom: 1px solid #ddd;
	margin-bottom: 24px;
	padding-bottom: 16px;
}

h1 {
	font-size: 23px;
	margin: 0;
	font-weight: 650;
}

h2 {
	font-size: 19px;
	margin: 0;
	font-weight: 600;
}

.muted, #status {
	color: #666;
	font-size: 13px;
}

#auth, #cabinet {
	background: white;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 24px;
}

.tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
}

.tabs button {
	border: 0;
	background: #f1f1f2;
}

.tabs button[aria-pressed=true] {
	background: #222;
	color: white;
}

#questions {
	display: grid;
	grid-template-columns: repeat(2,minmax(0,1fr));
	gap: 12px 20px;
	margin: 18px 0 24px;
}

label {
	display: block;
	font-size: 13px;
}

input {
	font: inherit;
	color: inherit;
	max-width: 100%;
}

label input {
	display: block;
	width: 100%;
	border: 1px solid #ccc;
	border-radius: 5px;
	padding: 8px 10px;
	margin-top: 4px;
}

#user {
	max-width: 320px;
}

button {
	font: inherit;
	font-size: 13px;
	border: 1px solid #d5d5d5;
	background: white;
	color: #222;
	border-radius: 5px;
	padding: 8px 12px;
	cursor: pointer;
}

button:hover {
	background: #eee;
}

button.primary {
	background: #222;
	color: white;
	border-color: #222;
}

button.primary:hover {
	background: #444;
}

button:disabled {
	opacity: .5;
	cursor: wait;
}

button:focus-visible, input:focus-visible {
	outline: 2px solid #555;
	outline-offset: 2px;
}

.toolbar, .upload {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.upload {
	margin: 24px 0;
	padding: 14px 0;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
	flex-wrap: wrap;
}

article {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #eee;
}

.file-info {
	min-width: 0;
	overflow-wrap: anywhere;
}

.file-info strong {
	display: block;
	font-weight: 550;
}

.actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.danger {
	color: #a22;
}

#files:empty {
	display: none;
}

#viewer {
	margin-top: 24px;
	border-top: 1px solid #ddd;
	padding-top: 16px;
}

pre {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	max-height: 60vh;
	overflow: auto;
}

img, video {
	max-width: 100%;
	max-height: 65vh;
}

#preview {
	margin-top: 16px;
}

[hidden] {
	display: none!important;
}

@media(max-width:600px) {
	main {
		padding: 18px 12px;
	}
	#auth, #cabinet {
		padding: 16px;
	}
	#questions {
		grid-template-columns: 1fr;
	}
	article {
		align-items: flex-start;
		flex-direction: column;
	}
	.actions {
		width: 100%;
	}
}
