html {
	font-family: 'Open sans', sans-serif;

	/*
	 * Style variables
	 */
	--hue: 205;
	--blockBg: hsl(var(--hue), 25%, 100%);
	--blockBgAlt: hsl(var(--hue), 35%, 93%);
	--blockBgDark: hsla(0, 0%, 0%, 25%);

	--borderRadius: 4px;
	--blockBorderRadius: var(--borderRadius);

	--textColor: hsl(var(--hue), 35%, 15%);
	--textColorHighlight: hsl(var(--hue), 80%, 25%);
	--textColorDim: hsl(var(--hue), 15%, 40%);

	--pageEdgeSpacing: 20px;
	--paddingH: 50px;
	--paddingV: 40px;

	--inputBg: hsl(var(--hue), 75%, 98%);
	--inputHoverBg: hsl(var(--hue), 75%, 95%);
	--inputBorder: hsl(var(--hue), 15%, 95%);
	--inputShadow: hsl(var(--hue), 25%, 75%);

	color: var(--textColor);

	background: radial-gradient(100vw 100vw at top right, hsl(var(--hue), 90%, 30%), hsl(var(--hue), 85%, 15%));
	scrollbar-width: thin;
}

/* Global page structure */
body, html {
	min-height: 100%;
	margin: 0;
	font-size: 1em;
}

.page-width {
	max-width: 1200px;
	margin: auto;
}

.page-content {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--pageEdgeSpacing);
}

/* Global page styling */
.highlighted {
	color: var(--textColorHighlight);
	font-family: monospace;
	background: var(--blockBgAlt);
	padding: 3px 5px;
	border-radius: var(--borderRadius);
}

* {
	box-sizing: border-box;
}

*:focus {
	outline: 3px solid hsl(var(--hue), 95%, 45%);
}

a {
	color: var(--textColorHighlight);
	text-decoration: none;
}

a:not(.button):hover {
	text-decoration: underline;
}

[disabled] {
	filter: saturate(0%);
	cursor: not-allowed;
}

[data-tooltip] {
	position: relative;
}

[data-tooltip]:after,
[data-tooltip]:before {
	display: none;
}

[data-tooltip]:hover:after,
[data-tooltip]:hover:before {
	display: block;
}

[data-tooltip]:after {
	content: attr(data-tooltip);
	position: absolute;
	color: white;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	margin-top: 8px;
	background: rgba(0, 0, 0, 0.75);
	border-radius: var(--borderRadius);
	padding: 5px 10px;
}

[data-tooltip]:before {
	content: '';
	position: absolute;
	top: calc(100% - 8px);
	left: 50%;
	transform: translateX(-50%);
	border: 8px solid transparent;
	border-bottom-color: rgba(0, 0, 0, 0.75);
}

/* Blocks */
.block-container {
	border-radius: var(--blockBorderRadius);

	box-shadow: 0 0 3px hsla(var(--hue), 40%, 15%, 50%);
	overflow: hidden;
}

.block-body {
	background: var(--blockBg);
	flex-grow: 1;
	flex-shrink: 0;
	max-width: 450px;
}

.block-body h2 {
	font-weight: 200;
	color: var(--textColorHighlight);
	margin-top: 0;
}

.block-content {
	padding: var(--paddingV) var(--paddingH) 20px;
}

.block-content > * {
	margin-top: 20px;
}

.block-footer {
	background: var(--blockBgAlt);

	border-top: 1px solid hsl(var(--hue), 15%, 85%);
	padding: 20px var(--paddingH);
	text-align: center;
}

.block-footer a {
	color: inherit;
}

header {
	background: var(--blockBgDark) url('../img/domainBackingCircle.svg') bottom center/cover no-repeat;
	text-shadow: 0 0 15px hsla(0, 0%, 0%, 50%);
	padding: 40px var(--paddingH);
	text-align: center;
}

header h1 {
	font-weight: 200;
	color: #fff;
	margin: 0;
}

/* Lander specific styles */
.lander {
	display: flex;
	flex-grow: 1;
	align-items: stretch;
}

.lander aside {
	background: var(--blockBgDark) url('../img/domainBackingCircle.svg') bottom center/cover no-repeat;

	flex-grow: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: hsl(var(--hue), 25%, 90%);
	position: relative;
	text-align: center;
	padding: 40px var(--paddingH);

	word-wrap: break-word;
	overflow: auto;

	text-shadow: 0 0 15px hsla(0, 0%, 0%, 50%);
}

.lander aside:after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 20px;
	background: linear-gradient(to left, hsla(0, 0%, 0%, 15%), hsla(0, 0%, 0%, 0%));
}

.lander aside h1 {
	font-size: 1em;
	font-weight: 200;
	margin-bottom: 10px;
	color: #fff;
	max-width: 100%;
	margin-top: 10px
}

.lander aside h3 {
	font-size: 2em;
	margin: 0 0 10px;
	max-width: 100%;
	font-weight: normal;
	font-family: monospace;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.lander aside h3:after {
	content: '';
	background: url('../img/warn.svg') center/contain no-repeat;
	display: inline-block;
	width: 30px;
	height: 30px;
	margin-left: 5px;
}

.lander aside h2 {
	font-size: 1.5em;
	font-weight: normal;
	margin: 0;
}

.user {
	border-radius: var(--borderRadius);
	display: flex;
	padding: 15px;
	box-shadow: inset 0 0 3px hsl(var(--hue), 25%, 75%);
	background: #fff;
	align-items: center;
}

.avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: hsl(var(--hue), 90%, 30%);

	display: none;
	/* TODO re-enable at some point
}

.user .details {
	padding-left: 15px;*/
}

.user h3 {
	display: flex;
	align-items: center;
	flex-wrap: wrap;

	font-weight: normal;
	margin: 0;
	font-size: 1em;
}

.verification {
	display: flex;
	align-items: center;
}

.verification-icon {
	width: 1em;
	margin-left: 4px;
}

.verification-icon path {
	fill: var(--textColorHighlight);
}

.displayname {
	margin-right: 4px;
}

.username {
	margin-top: 2px;
}

.verification,
.username {
	color: var(--textColorDim);
	font-size: .8em;
}

.details {
	flex-grow: 1;
}

/* Block messages */

.block-message {
	display: flex;
	border-radius: var(--borderRadius);
	padding: 10px;
	font-size: .8em;
	align-items: center;

	background: linear-gradient(to bottom, hsl(var(--hue), 85%, 97%), hsl(var(--hue), 85%, 95%));
	border: 1px solid hsl(var(--hue), 65%, 90%);
	color: hsl(var(--hue), 25%, 20%);
	box-shadow: 0 0 3px hsl(var(--hue), 85%, 93%);
	position: relative;
}

.block-message.iconic:before {
	content: '';
	width: 20px;
	height: 20px;
	margin-right: 10px;
	flex-shrink: 0;
}

.block-message p,
.block-message ul {
	margin: 0;
}

.block-message ul {
	/*padding-left: 10px;*/
	padding-left: 0;
	list-style: none;
}

.block-message li:not(:last-child) {
	margin-bottom: 5px;
}

.block-message:before {
	background: url('../img/info.svg') center/contain no-repeat;
}

.block-message.warn {
	--hue: 35;
}

.block-message.warn:before {
	background: url('../img/warn.svg') center/contain no-repeat;
}

.block-message.error {
	--hue: 0;
}

.block-message.error:before {
	background: url('../img/error.svg') center/contain no-repeat;
}

/* Form styling */

form .block-message {
	margin-top: 5px;
}

form label {
	display: block;
	margin-top: 10px;
	font-size: .8em;
	color: var(--textColorDim);
	margin-bottom: 5px;
}

form label.required:after {
	content: 'Required *';
	color: #CD3B3B;
	float: right;
}

form > p {
	font-size: .8em;
	color: var(--textColorDim);
	margin-bottom: 0;
}

form input,
form select,
form textarea {
	font-size: inherit;
	color: inherit;
	font-family: inherit;

	width: 100%;
	display: block;
	padding: 10px;

	border-radius: var(--borderRadius);
	border: 1px solid var(--inputBorder);
	box-shadow: inset 0 0 3px var(--inputShadow);
	background-color: var(--inputBg);
	transition: border-color 300ms, background-color 300ms;
}

form input:hover,
form select:hover,
form textarea:hover {
	background-color: var(--inputHoverBg);
}

form:not(.button-only) > button,
form #recaptcha {
	margin-top: 15px;
}

form .multi-input {
	display: flex;
}

form .input-message {
	background: var(--blockBgAlt);
	white-space: nowrap;
	border-radius: var(--borderRadius);
	padding: 10px;
}

form .multi-input > *:not(:last-child) {
	margin-right: 5px;
}

form .input-offer > *:last-child {
	flex-grow: 1;
}

form .input-offer > *:first-child {
	width: auto;
	flex-shrink: 1;
}

/* Button styling */
button,
.button {
	font-size: inherit;
	font-family: inherit;

	padding: 10px;

	border-radius: var(--borderRadius);
	border: 1px solid hsla(0, 0%, 0%, 4%);
	box-shadow: inset 0 0 3px hsla(0, 0%, 100%, 25%);
	cursor: pointer;
	transition: opacity 300ms;
	display: inline-block;

	color: hsl(var(--hue), 50%, 95%);
	background: linear-gradient(to bottom, hsl(var(--hue), 90%, 35%), hsl(var(--hue), 85%, 25%));
}

button:hover,
.button:hover {
	opacity: 0.9;
}

/* Footer styling */
footer {
	--ctaBackground: var(--blockBgDark) url("../img/swoop.svg") bottom left/contain no-repeat;

	padding: var(--pageEdgeSpacing);
	color: hsl(var(--hue), 25%, 90%);
}

footer .cta {
	background: var(--ctaBackground);
	padding: var(--paddingV) var(--paddingH);

	display: flex;
	align-items: center;
}

footer .cta p {
	margin: 0 40px;
}

footer .button {
	white-space: nowrap;
}

footer img {
	display: block;
}

footer .copyright {
	font-size: .7em;
	text-align: center;
	margin-bottom: 0;
}

footer .copyright a {
	color: inherit;
}

/* Handle domain sizing on different screen sizes */
@media (max-width: 1240px) {
	.lander aside h1 {
		font-size: 1vw;
	}
}

/* Handle lander area on smaller screen sizes */
@media (max-width: 1000px) {
	.screen-l {
		display: none;
	}

	html {
		--paddingH: 20px;
		--paddingV: 20px;
	}

	.block-container {
		box-shadow: none;
	}

	.page-wrapper {
		min-height: auto;
	}

	.lander {
		flex-direction: column;
	}

	.lander aside h1 {
		font-size: 2vw;
	}

	.lander aside h2 {
		font-size: 3vw;
	}

	.lander aside:after {
		display: none;
	}

	.block-body {
		max-width: 100%;
		display: flex;
		flex-direction: column-reverse;
	}

	.block-footer {
		border-top: none;
		border-bottom: 1px solid hsl(var(--hue), 15%, 85%);
	}
}

/* Handle footer on smaller screens */
@media (max-width: 800px) {
	.screen-m {
		display: none;
	}

	html {
		--pageEdgeSpacing: 0px;
		--blockBorderRadius: 0px;
	}

	.page-content {
		min-height: auto;
	}

	footer {
		background: var(--ctaBackground);
		padding: 40px var(--paddingH) var(--paddingV);
	}

	footer .cta {
		flex-direction: column;
		background: none;
		padding-top: 0;
	}

	footer .cta p {
		margin: var(--paddingV) 0;
		text-align: center;
	}

	footer .copyright {
		margin: 0;
	}
}