/**
 * Sign in, register, recover. One centred card, shared by all three.
 */

.arm-auth-page {
	display: flex;
	justify-content: center;
	padding-block: 72px;
}

.arm-auth {
	width: 100%;
	max-width: 440px;
	padding: 36px 32px 28px;
	background: var(--arm-surface);
	border: 1px solid var(--arm-line);
	border-radius: var(--arm-radius);
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.arm-auth__title {
	margin: 0 0 24px;
	text-align: center;
	font-size: clamp(26px, 3vw, 34px);
	letter-spacing: 0.06em;
	color: var(--arm-text);
}

.arm-auth__hint {
	margin: -8px 0 20px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--arm-muted);
}

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

.arm-auth__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.arm-field {
	display: block;
}

.arm-field__label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--arm-muted);
}

.arm-field__label em {
	font-style: normal;
	color: #b32d2e;
}

.arm-input {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--arm-line);
	border-radius: 4px;
	background: #fff;
	color: var(--arm-text);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.arm-input:focus {
	outline: none;
	border-color: var(--arm-brown);
	box-shadow: 0 0 0 3px rgba(111, 75, 62, 0.12);
}

.arm-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--arm-muted);
}

.arm-auth__submit {
	width: 100%;
	margin-top: 4px;
	padding-block: 13px;
}

.arm-auth__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--arm-line);
	font-size: 13px;
}

.arm-auth__links a {
	color: var(--arm-brown);
	text-decoration: none;
}

.arm-auth__links a:hover {
	text-decoration: underline;
}

/* Messages */

.arm-auth__msg {
	margin-bottom: 16px;
	padding: 11px 14px;
	border-radius: 4px;
	border-inline-start: 3px solid;
	font-size: 13px;
	line-height: 1.5;
}

.arm-auth__msg--error {
	border-color: #b32d2e;
	background: #fdf0f0;
	color: #8a2223;
}

.arm-auth__msg--ok {
	border-color: #2f7a3e;
	background: #f0f7f1;
	color: #1f5b2c;
}

/*
 * Honeypot. Never `display:none` — some bots skip hidden inputs, and some
 * screen readers would still announce it. Move it out of view instead and take
 * it out of the tab order.
 */
.arm-auth__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 520px) {
	.arm-auth {
		padding: 28px 20px 22px;
	}

	.arm-auth__row {
		grid-template-columns: 1fr;
	}
}

/* ---------------------------------------------------------------- switch */

/* Who is registering: a two-way switch whose thumb slides under the chosen
   side. The inputs are real radios, kept for keyboard and screen readers. */
.arm-switch {
	margin: 0;
	padding: 0;
	border: 0;
}

.arm-switch__track {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 4px;
	border: 1px solid var(--arm-line);
	border-radius: 999px;
	background: var(--arm-bg-alt);
}

.arm-switch__option {
	position: relative;
	z-index: 1;
	display: block;
	cursor: pointer;
}

.arm-switch__option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.arm-switch__option span {
	display: block;
	padding: 10px 12px;
	border-radius: 999px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--arm-muted);
	transition: color 0.18s ease;
}

.arm-switch__option input:checked + span {
	color: #fff;
}

.arm-switch__option input:focus-visible + span {
	outline: 2px solid var(--arm-brown);
	outline-offset: 2px;
}

.arm-switch__thumb {
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: 4px;
	width: calc(50% - 4px);
	border-radius: 999px;
	background: var(--arm-brown);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The second radio moves the thumb under the second option. */
.arm-switch__track:has(.arm-switch__option:nth-child(2) input:checked) .arm-switch__thumb {
	transform: translateX(100%);
}

/* The form's own display rules must not undo the `hidden` attribute. */
.arm-auth__form [hidden] {
	display: none !important;
}
