:root {
	--ink: #ffffff;
	--muted: rgba(255, 255, 255, 0.7);
	--card: rgba(0, 0, 0, 0.3);
	--field: rgba(255, 255, 255, 0.2);
	--field-focus: rgba(255, 255, 255, 0.3);
	--orange: #f26d00;
	--danger: #ff6b6b;
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	min-height: 100%;
	font-family: 'Poppins', sans-serif;
	color: var(--ink);
}

main {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}

.card {
	width: 100%;
	max-width: 700px;
	background: var(--card);
	border-radius: 24px;
	padding: 56px 48px 64px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.logo {
	width: 100px;
	align-self: center;
	margin-bottom: 16px;
}

.alert {
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 14px;
	line-height: 1.4;
	background: rgba(255, 255, 255, 0.1);
}

.alert p {
	margin: 0;
}

.alert-error {
	background: rgba(255, 107, 107, 0.16);
	border: 1px solid rgba(255, 107, 107, 0.5);
}

/* The CMS notice: a light card with an info mark, as drawn on story 59073. */
.notice {
	display: grid;
	grid-template-columns: 18px 1fr;
	column-gap: 10px;
	align-items: start;
	background: #f4f3fa;
	color: #1c1650;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13px;
	line-height: 1.45;
}

.notice-icon {
	width: 18px;
	height: 18px;
	margin-top: 1px;
}

.notice-body p {
	margin: 0;
}

.notice-body b, .notice-body strong {
	font-weight: 600;
}

.notice-body a {
	color: inherit;
}

.field {
	display: block;
}

.field input {
	width: 100%;
	font: inherit;
	font-size: 18px;
	color: var(--ink);
	background: var(--field);
	border: 1px solid transparent;
	border-radius: 8px;
	height: 64px;
	padding: 0 24px;
}

/* Chrome paints autofilled fields light blue and allows no override; the long transition keeps the field colour. */
.field input:-webkit-autofill {
	-webkit-text-fill-color: var(--ink);
	caret-color: var(--ink);
	transition: background-color 9999s ease-out;
}

.field input::placeholder {
	color: var(--muted);
	opacity: 1;
}

.field input:focus {
	outline: none;
	background: var(--field-focus);
	border-color: rgba(255, 255, 255, 0.6);
}

.field input.invalid {
	border-color: var(--danger);
}

.warning {
	margin: -8px 0 0;
	font-size: 14px;
	color: var(--danger);
}

.btn-login {
	font: inherit;
	font-size: 18px;
	font-weight: 600;
	color: #fff;
	background: var(--orange);
	border: 1px solid var(--orange);
	border-radius: 8px;
	height: 64px;
	padding: 0 24px;
	cursor: pointer;
}

.btn-login:hover {
	background: #ff7f14;
}

.btn-login:focus-visible, .remember input:focus-visible + .box, .links a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.links {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 16px;
	padding: 0 2px;
	font-size: 14px;
	color: var(--muted);
}

.links-centred {
	justify-content: center;
}

.links a {
	color: inherit;
	text-decoration: none;
}

.links a:hover {
	text-decoration: underline;
}

.remember {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
}

.remember + a {
	border-left: 1px solid var(--muted);
	padding-left: 16px;
}

.remember input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.remember .box {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.3);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.remember input:checked + .box::after {
	content: '';
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translateY(-1px) rotate(45deg);
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-height: 820px) {
	main {
		padding: 16px;
	}

	.card {
		padding: 32px 40px;
		gap: 20px;
	}

	.logo {
		margin-bottom: 0;
	}

	.field input, .btn-login {
		height: 52px;
		font-size: 16px;
	}

	.links {
		margin-top: 0;
	}
}

@media (max-width: 480px) {
	.card {
		padding: 44px 20px 48px;
	}

	.logo {
		width: 80px;
	}

	.links {
		flex-direction: column;
		align-items: flex-start;
	}

	.links-centred {
		align-items: center;
	}

	.remember + a {
		border-left: 0;
		padding-left: 0;
	}
}

h1.title {
	font-size: 22px;
	font-weight: 600;
	text-align: center;
	margin: 0;
	line-height: 1.3;
}

.subtitle {
	text-align: center;
	color: var(--muted);
	margin: -8px 0 0;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.centred {
	align-items: center;
	text-align: center;
}

.btn-secondary {
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	color: #fff;
	background: var(--orange);
	border: 1px solid var(--orange);
	border-radius: 8px;
	padding: 12px 22px;
	text-decoration: none;
	display: inline-block;
}

.btn-secondary:hover {
	background: #f58a3c;
}

.rules {
	margin: -6px 0 0;
	padding: 0;
	list-style: none;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.7;
}

.rules li::before {
	content: '\2022';
	margin-right: 8px;
}

.setup-key {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.qr {
	width: 264px;
	height: 264px;
	border-radius: 8px;
	background: #fff;
}

.manual-label {
	margin: 0;
	font-size: 14px;
	color: var(--muted);
	text-align: center;
}

.manual-key {
	margin: 0;
	font-family: monospace;
	font-size: 18px;
	letter-spacing: 1px;
	text-align: center;
	overflow-wrap: anywhere;
}

.backup-codes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	font-family: monospace;
	font-size: 18px;
	text-align: center;
}

.backup-codes li {
	background: var(--field);
	border-radius: 8px;
	padding: 12px;
}

.status-list {
	display: grid;
	grid-template-columns: max-content max-content;
	justify-content: center;
	gap: 12px 24px;
	margin: 0;
}

.status-list dt {
	color: var(--muted);
}

.status-list dd {
	margin: 0;
}

.section {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.section h2 {
	margin: 0;
	text-align: center;
	font-size: 18px;
	font-weight: 600;
}
