:root {
	--bg: #0b0d12;
	--surf: #151923;
	--surf-line: #2a3142;
	--ink: #f5f7fb;
	--muted: #b8c0d0;
	--line: #8a94a8;
	--accent: #ffd60a;
	--accent-ink: #0b0d12;
	--discord: #4752c4;
	--danger: #ff8a80;
	--danger-bg: #3a1414;
	--radius: 16px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	padding: 20px 16px 40px;
	font: 18px/1.55 var(--font);
	color: var(--ink);
	background: var(--bg);
}

a {
	color: var(--accent);
	font-weight: 700;
	text-underline-offset: 3px;
}

a:hover {
	color: #fff;
}

:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.masthead {
	max-width: 780px;
	margin: 0 auto;
	padding: 8px 0 22px;
}

.masthead__kicker {
	margin: 0 0 6px;
	font: 700 14px/1.4 var(--font-mono);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.logo {
	margin: 0;
	font: 800 clamp(34px, 7vw, 52px)/1.05 var(--font);
	letter-spacing: -0.015em;
	color: var(--ink);
	overflow-wrap: anywhere;
}

.shell {
	max-width: 780px;
	margin: 0 auto;
}

.card {
	position: relative;
	padding: clamp(22px, 4vw, 40px);
	background: var(--surf);
	border: 2px solid var(--surf-line);
	border-radius: var(--radius);
}

.card::before {
	content: "";
	position: absolute;
	left: -2px;
	right: -2px;
	top: -2px;
	height: 8px;
	border-radius: var(--radius) var(--radius) 0 0;
	background: var(--accent);
}

.card--center {
	text-align: center;
}

.card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin-bottom: 26px;
}

.card__title {
	margin: 0 0 14px;
	font-size: clamp(30px, 5.4vw, 44px);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.card__head .card__title {
	margin: 0;
	font-size: 30px;
}

.lead {
	max-width: 60ch;
	margin: 0 auto 28px;
	font-size: 19px;
	color: var(--muted);
	text-wrap: pretty;
}

.card--center .lead {
	margin-left: auto;
	margin-right: auto;
}

.lead strong {
	color: var(--ink);
}

.fineprint {
	margin: 22px auto 0;
	max-width: 58ch;
	font-size: 15px;
	color: var(--muted);
}

.card--center .fineprint + .button {
	margin-top: 18px;
}

.steps {
	display: grid;
	gap: 10px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
	text-align: left;
}

.steps li {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border: 2px solid var(--surf-line);
	border-radius: 12px;
	background: var(--bg);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
}

.steps__num {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--accent);
	color: var(--accent-ink);
	font: 800 16px/1 var(--font-mono);
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 58px;
	padding: 14px 30px;
	border: 2px solid transparent;
	border-radius: 12px;
	font: 800 19px/1.2 var(--font);
	letter-spacing: 0.01em;
	text-decoration: none;
	color: var(--accent-ink);
	background: var(--accent);
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.1s ease, background-color 0.15s ease;
}

.button:hover {
	color: var(--accent-ink);
	filter: brightness(1.06);
}

.button:active {
	transform: scale(0.98);
}

.button--primary {
	background: var(--accent);
	color: var(--accent-ink);
}

.button--discord {
	width: 100%;
	background: var(--discord);
	color: #fff;
}

.button--discord:hover {
	color: #fff;
}

.button--ghost {
	min-height: 44px;
	padding: 8px 18px;
	font-size: 16px;
	color: var(--ink);
	background: transparent;
	border-color: var(--line);
}

.button--ghost:hover {
	color: var(--ink);
	border-color: var(--accent);
	filter: none;
}

.button__icon {
	width: 30px;
	height: 30px;
	flex: none;
}

.userbar {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 22px;
	padding: 12px 14px;
	border: 2px solid var(--surf-line);
	border-radius: 12px;
	background: var(--bg);
}

.userbar__avatar {
	flex: none;
	border-radius: 12px;
	background: var(--discord);
}

.userbar__who {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.userbar__name {
	font-size: 18px;
	font-weight: 800;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.userbar__tag {
	font: 500 14px/1.4 var(--font-mono);
	color: var(--muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.userbar__logout {
	flex: none;
	margin: 0;
}

.alert {
	margin: 0 0 24px;
	padding: 14px 16px;
	border: 2px solid var(--danger);
	border-radius: 10px;
	text-align: left;
	font-weight: 700;
}

.alert--error {
	background: var(--danger-bg);
	color: #ffd9d4;
}

.badge {
	display: inline-block;
	margin: 0 0 16px;
	padding: 5px 14px;
	border-radius: 8px;
	font: 800 14px/1.5 var(--font-mono);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent-ink);
	background: var(--accent);
}

.badge--error {
	background: var(--danger);
}

.quota {
	margin: 0;
	padding: 6px 12px;
	border: 2px solid var(--accent);
	border-radius: 8px;
	font: 700 15px/1.4 var(--font-mono);
	color: var(--accent);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.quota strong {
	color: var(--ink);
}

.quota--empty {
	border-color: var(--danger);
	color: var(--danger);
}

.quota--empty strong {
	color: var(--danger);
}

.form {
	display: grid;
	gap: 24px;
}

.trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.field {
	margin: 0;
}

.field__label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 8px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
}

.field__num {
	flex: none;
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 30px;
	padding: 0 6px;
	border-radius: 6px;
	background: var(--accent);
	color: var(--accent-ink);
	font: 800 14px/1 var(--font-mono);
	font-variant-numeric: tabular-nums;
}

.field__optional {
	font-style: normal;
	font-weight: 500;
	font-size: 15px;
	color: var(--muted);
}

.field__hint {
	margin: -2px 0 10px 52px;
	font-size: 16px;
	color: var(--muted);
}

.field__input {
	display: block;
	width: 100%;
	min-height: 56px;
	padding: 13px 16px;
	font: inherit;
	font-size: 18px;
	color: var(--ink);
	background: var(--bg);
	border: 2px solid var(--line);
	border-radius: 10px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.field__input {
	min-height: 128px;
	resize: vertical;
	line-height: 1.5;
}

.field__input::placeholder {
	color: #8f98aa;
}

.field__input:hover {
	border-color: #c7cfdd;
}

.field__input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 4px rgba(255, 214, 10, 0.28);
}

.field--invalid .field__input {
	border-color: var(--danger);
	box-shadow: 0 0 0 4px rgba(255, 138, 128, 0.22);
}

.field__error {
	margin: 8px 0 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--danger);
}

.form__actions {
	margin-top: 8px;
	text-align: center;
}

.form__actions .button {
	width: 100%;
	max-width: 420px;
}

.form__actions .fineprint {
	margin-top: 16px;
}

.footer {
	max-width: 780px;
	margin: 0 auto;
	padding: 28px 0 12px;
	font-size: 14px;
	color: var(--muted);
	text-align: center;
}

.footer p {
	margin: 0;
}

.field--half {
	display: flex;
	flex-direction: column;
}

.field--half .field__label {
	order: 0;
}

.field--half .field__input {
	order: 1;
}

.field--half .field__hint {
	order: 2;
	margin: 8px 0 0;
}

.field--half .field__error {
	order: 3;
}

@media (min-width: 700px) {
	.form {
		grid-template-columns: 1fr 1fr;
		gap: 0 24px;
	}

	.field,
	.form__actions {
		grid-column: 1 / -1;
	}

	.field--half {
		grid-column: auto;
	}

	.field {
		margin-bottom: 26px;
	}

	.field__hint {
		margin-left: 52px;
	}

	.steps {
		grid-template-columns: repeat(3, 1fr);
	}

	.steps li {
		flex-direction: column;
		align-items: flex-start;
		font-size: 17px;
	}
}

@media (max-width: 600px) {
	body {
		font-size: 17px;
		padding-left: 12px;
		padding-right: 12px;
	}

	.card {
		padding: 22px 16px;
		border-radius: 14px;
	}

	.card__head .card__title {
		font-size: 26px;
	}

	.field__label {
		font-size: 18px;
	}

	.field__hint {
		margin-left: 0;
	}

	.form__actions .button {
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.button,
	.field__input {
		transition: none;
	}
}
