:root {
    --scale: calc(clamp(900px, 100vw, 1210px) / 1210px);
	--letter-spacing: -0.05em;
}

@view-transition {
	navigation: auto;
}

html, body {
	min-height: 100vh;
}

body {
	background: #1b1b1b;
	color: #d9d9d9;
	font-family: Inter, sans-serif;
	font-size: calc(12.9pt * var(--scale));
	letter-spacing: var(--letter-spacing);
	margin: 0;
	display: flex;
	flex-direction: column;
}

h1 {
	font-weight: bold;
	font-size: calc(26.4pt * var(--scale));
	letter-spacing: var(--letter-spacing);
	margin-bottom: .65em;
}

p + h1,
span + h1 {
	margin-top: 2em;
}

hgroup {
	display: flex;
	gap: calc(45px * var(--scale));
	align-items: baseline;

	& > h2 {
		flex: 1;
		font-weight: inherit;
		font-size: inherit;
	}
}

.body {
	flex: 1;
	padding: calc(98px * var(--scale));

	& > .inner {
		max-width: 1210px;
		margin: 0 auto;
	}
}

body.index-page {
	.body {
		margin-top: 0;
		border-top: calc(1px * var(--scale)) solid #d9d9d9a0;
	}
}

body.login-page,
body.register-page {
	form {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: calc(12px * var(--scale));
		width: calc(452px * var(--scale));
		margin: 0 auto;

		& .logo {
			width: calc(242px * var(--scale));
			margin-bottom: calc(20px * var(--scale));
		}

		h1 {
			font-size: calc(16pt * var(--scale));
			letter-spacing: var(--letter-spacing);
			margin-right: auto;
		}

		input {
			width: 100%;
			box-sizing: border-box;
		}

		button,
		input[type=submit],
		a.button {
			margin-left: auto;
			font-size: calc(12.4pt * var(--scale));
			letter-spacing: var(--letter-spacing);
			padding: calc(10px * var(--scale)) calc(23px * var(--scale));
			border-radius: calc(15px * var(--scale));
		}

		p {
			margin: calc(4px * var(--scale)) 0;
		}

		a {
			text-decoration: underline;
		}

		.error {
			margin-right: auto;
		}
	}
}

body.content-page {
	.body {
		font-size: calc(16.9pt * var(--scale));
	}
}

.price-block {
	border: 1px solid #c3c3c3;
	border-radius: calc(15px * var(--scale));
	padding: calc(17px * var(--scale));
	width: fit-content;
	margin-right: auto;

	h3 {
		margin: calc(-17px * var(--scale));
		padding: calc(17px * var(--scale));
		border-bottom: 1px solid #c3c3c3;
	}

	h3 + *,
	h3 + * > p {
		padding: calc(17px * var(--scale)) 0 0;
		min-height: 8em;
		font-size: calc(10.6pt * var(--scale));
		letter-spacing: var(--letter-spacing);
	}

	ul {
		padding-left: calc(4px * var(--scale));
		margin: 1em;
	}

	p {
		margin: 1em 0;
	}

	.actions {
		padding: 0 calc(12px * var(--scale));
		margin-bottom: 1em;
	}
}

body.pricing-page {
	h1 {
		font-size: calc(31.7pt * var(--scale));
		letter-spacing: var(--letter-spacing);
		font-weight: normal;
	}
	.prices {
		display: flex;
		gap: calc(30px * var(--scale));
		margin: 2em 0 4em;

		& > .price-block {
			flex: 1;
			margin-right: 0;

			.actions {
				padding: 0 calc(12px * var(--scale));
				margin-bottom: 1.5em;

				button {
					padding: calc(3px * var(--scale)) calc(8px * var(--scale)) calc(4px * var(--scale));
					border-radius: calc(9px * var(--scale));
					font-size: calc(9.6pt * var(--scale));
					letter-spacing: var(--letter-spacing);
				}
			}
		}
	}
}

body.decode-page {
	.head {
		display: flex;
		img {
			height: 1em;
			margin-right: 0.5em;
		}
		p {
			flex: 1;
			text-align: right;
			margin: 0;
		}
		margin-bottom: calc(40px * var(--scale));
	}

	.actions {
		margin-top: calc(20px * var(--scale));
	}
}

body.account-page {
	.body > .inner {
		display: flex;

		h1 {
			margin-bottom: 0.6em;
		}

		h2 {
			font-size: calc(18.9pt * var(--scale));
			letter-spacing: var(--letter-spacing);
			font-weight: bold;
			margin: 1.7em 0 1em;
		}

		p {
			margin: 1em 0;
		}

		& > .jobs {
			flex: 0.55;
		}

		& > .divide {
			background: #d9d9d9;
			width: 1px;
			margin: 0 calc(64px * var(--scale));
		}

		& > .details {
			flex: 0.45;
			font-size: calc(15.9pt * var(--scale));
			letter-spacing: var(--letter-spacing);
		}

		.job-list {
			display: grid;
			grid-template-columns: 1fr 1fr;
			gap: calc(45px * var(--scale)) calc(36px * var(--scale));

			& > .job {
				display: flex;
				flex-direction: column;
				min-height: 8.5em;
				background: #d9d9d9;
				color: #737373;
				border-radius: calc(16px * var(--scale));
				padding: calc(12px * var(--scale)) calc(20px * var(--scale));
				font-size: calc(16.7pt * var(--scale));
				letter-spacing: var(--letter-spacing);

				.description {
					flex: 1;
				}

				p {
					margin: 0;
					line-height: 1.2em;
				}

				h3 {
					font-size: calc(18.8pt * var(--scale));
					letter-spacing: var(--letter-spacing);
					color: #000;
					margin: calc(10px * var(--scale)) 0 0.3em;
					font-weight: normal;
				}

				.summary {
					display: flex;

					.date {
						flex: 1;
					}
				}
			}
		}
	}
}

.decoder {
	display: flex;
	min-height: 500px;
	gap: calc(24px * var(--scale));

	& .content {
		display: flex;
		flex-direction: column;
		flex: 2;
		gap: calc(15px * var(--scale));

		& .title {
			input {
				width: 100%;
				margin: calc(-20px * var(--scale)) calc(-26px * var(--scale));
				padding: calc(20px * var(--scale)) calc(26px * var(--scale));
				border-radius: 0;
				background: transparent;
				&:focus {
					outline: none;
				}
			}
		}

		& .content {
			position: relative;
			display: flex;
			flex: 1;

			& > .overlay {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				padding: calc(20px * var(--scale)) calc(26px * var(--scale));
				overflow: hidden;
				color: transparent;
				pointer-events: none;
				white-space-collapse: preserve;

				.replacement {
					display: inline-block;
					padding: 1px 3px;
					margin: -1px -3px;
					pointer-events: all;
					cursor: pointer;

					&.male {
						background: #0e59b288;
					}
					&.female {
						background: #ff313188;
					}
				}

				.spelling-mistake {
					display: inline-block;
					padding: 0px 2px;
					margin: -3px -4px;
					pointer-events: all;
					cursor: pointer;

					border: 2px dashed #ff3131;
					border-radius: 4px;
				}
			}

			& > .suggestions {
				white-space: nowrap;
				display: none;

				& > .words {
					display: flex;
					flex-wrap: wrap;
					gap: 5px;
					margin: 8px 0 0;

					a {
						display: inline-block;
						background: #f6f6f6;
						border-radius: calc(5px * var(--scale));
						padding: calc(6px * var(--scale)) calc(10px * var(--scale));
						text-decoration: none;
						cursor: pointer;

						&:hover {
							background: #fff;
						}
					}
				}
			}

			textarea {
				flex: 1;
				margin: calc(-20px * var(--scale)) calc(-26px * var(--scale));
				padding: calc(20px * var(--scale)) calc(26px * var(--scale));
				border-radius: 0;
				background: transparent;
				font-family: inherit;
				font-size: inherit !important;
				resize: none;
				&:focus {
					outline: none;
				}
			}
		}

	}
	& .summary {
		position: relative;
		flex: 1;
		font-size: calc(13.6pt * var(--scale));
		letter-spacing: var(--letter-spacing);

		& > .inner {
			position: absolute;
			top: 0;
			bottom: 0;
			left: 0;
			right: 0;
			padding: calc(20px * var(--scale)) calc(26px * var(--scale));
			overflow: auto;
		}

		.summary {
			display: flex;
			margin: 1em 0;

			& > * {
				display: inline-block;
				padding: 2px 6px;

				&.male {
					background: #0e59b288;
				}
				&.female {
					background: #ff313188;
				}
			}
		}

		p {
			margin: 1.5em 0;
		}
	}

	& > .content > .title,
	& > .content > .content,
	& > .summary {
		background: #f6f6f6;
		border-radius: calc(12px * var(--scale));
		padding: calc(20px * var(--scale)) calc(26px * var(--scale));
		color: #414141;
	}
}

#navbar {
	position: sticky;
	top: 0;
	border-bottom: calc(1px * var(--scale)) solid #d9d9d9a0;
	z-index: 1;

	& .logo {
		height: calc(50px * var(--scale));
	}
}

#footer {
	border-top: calc(1px * var(--scale)) solid #d9d9d9a0;
}

body > nav {
	padding: calc(30px * var(--scale)) calc(80px * var(--scale));
	font-size: calc(10pt * var(--scale));
	letter-spacing: var(--letter-spacing);
	background: #1b1b1b;

	& > .inner {
		display: flex;
		justify-content: center;
		align-items: center;
		max-width: 1210px;
		margin: 0 auto;

		& > .gap {
			flex: 1;
		}
	}

	& .logo {
		height: calc(90px * var(--scale));
	}

	.menulist {
		display: flex;
		flex-direction: column;
		gap: calc(27px * var(--scale));
	}

	ul {
		list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		flex-wrap: wrap;
		justify-content: end;
		gap: calc(10px * var(--scale)) calc(40px * var(--scale));
		
		& > li {
			display: block;
			margin: 0;
			padding: calc(3px * var(--scale)) calc(8px * var(--scale)) calc(4px * var(--scale));
			border-radius: calc(9px * var(--scale));

			&.highlight {
				background: #d9d9d9;
				color: #000;
			}

			&.active {
				text-decoration: underline;
			}

			&:hover {
				background: #fff;
				color: #000;
			}

			& > a {
				color: inherit;
				text-decoration: none;
			}
		}
	}
}

body > nav#footer {
	ul {
		gap: calc(10px * var(--scale)) calc(16px * var(--scale));
	}
}

.splash {
	padding: calc(30px * var(--scale)) calc(80px * var(--scale));

	& > .inner {
		position: relative;
		aspect-ratio: 16/9;
		display: flow-root;
		max-width: 1210px;
		margin: 0 auto;

		& > video {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			opacity: 17%;
			mask-image: radial-gradient(ellipse, #fff 50%, transparent 80%);
			z-index: -1;
		}
		.title {
			font-size: calc(67.2pt * var(--scale));
			letter-spacing: var(--letter-spacing);
			font-weight: lighter;
			margin: 28% 0 calc(3px * var(--scale));

			& em {
				font-weight: bold;
				font-style: normal;
			}
		}

		.items {
			display: flex;
			flex-direction: column;
			gap: calc(23px * var(--scale));
		}

		.points {
			display: flex;
			gap: calc(15px * var(--scale));
			font-size: calc(18.2pt * var(--scale));
			letter-spacing: var(--letter-spacing);
			font-weight: 300;
		}

		.actions {
			display: flex;
			gap: calc(25px * var(--scale));

			a {
				padding: calc(4px * var(--scale)) calc(9px * var(--scale));
				border-radius: calc(9px * var(--scale));
				font-size: calc(17.5pt * var(--scale));
				letter-spacing: var(--letter-spacing);
				background: #d9d9d9;
				color: #000;
				text-decoration: none;

				&:hover {
					background: #fff;
				}
			}
		}
	}
}

a {
	color: inherit;
	text-decoration: underline;

	&.plain-link {
		text-decoration: none;
	}

	&:hover {
		color: inherit;
		text-decoration: underline;
	}

	&:focus {
		color: inherit;
	}
}

.nav-tabs {
	a {
		text-decoration: none;

		&:hover {
			color: #000;
		}
	}
}

input[type=text],
input[type=email],
input[type=password],
input:not([type]),
textarea,
textarea.form-control {
	font-size: calc(12.4pt * var(--scale));
	letter-spacing: var(--letter-spacing);
	padding: calc(10px * var(--scale)) calc(23px * var(--scale));
	border-radius: calc(15px * var(--scale));
	border: 0 none;
	background: #fff;
	color: #1b1b1b;

	&:placeholder {
		color: #1b1b1b;
	}
}

button,
a.button,
input[type=submit] {
	font-size: calc(14pt * var(--scale));
	letter-spacing: var(--letter-spacing);
	padding: calc(5px * var(--scale)) calc(11px * var(--scale));
	border-radius: calc(11px * var(--scale));
	border: 0 none;
	background: #fff;
	color: #1b1b1b;
	cursor: pointer;
}

legend {
	color: inherit;
}

.blurred {
	filter: blur(5px);
	user-select: none;
}

.popup {
	position: absolute;
	background: #d9d9d9;
	color: #1b1b1b;
	border-radius: calc(16px * var(--scale));
	padding: calc(17px * var(--scale)) calc(15px * var(--scale));
	border: 0 none;
}

.accordion {
    border-bottom: 1px solid #c3c3c3;
    padding: 0 0 1.2em;
    margin-bottom: 1.7em;

	.arrow {
		height: 1.9em;
		float: right;

		& > svg {
			height: 100%;
			transition: transform 0.2s ease-out;
		}
	}

	&[open] {
		.arrow {
			& > svg {
				transform: rotate(90deg);
			}
		}
	}

	& > summary {
		cursor: pointer;

		&:hover {
			color: #fff;
		}
	}

	& > summary + div {
		margin-top: 1.7em;
	}
}

[data-style="bootstrap"] {
	.modal-dialog {
		color: #222;
	}
}
