/* Auth pages (signup, login): quiet form column beside the hex-ink story panel (auth-hexink.js). */

.auth-page {
	--au-ink: #191e3a;
	--au-slate: #343f52;
	--au-body: #555b6e;
	--au-muted: #5f6577;
	--au-orange: #ed8134;
	--au-orange-hover: #d9661a;
	--au-orange-text: #9a4f1c;
	--au-wash: #fdf3eb;
	--au-wash-line: #f0d9c5;
	--au-mist: #f1f2f3;
	--au-line: #e0e6ed;
	--au-field: #c9cfd8;
	--au-white: #ffffff;
	--au-ok: #1d6b45;
	--au-ok-bg: #e3f3ea;
	--au-err: #b42318;
	--au-err-bg: #fdeceb;
	--au-err-line: #f3c4bf;
	--au-ease: cubic-bezier(0.22, 1, 0.36, 1);

	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--au-white);
	color: var(--au-body);
	font-family: Manrope, system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

.auth-page ::selection {
	background: #fbe6d6;
	color: var(--au-ink);
}

.auth-page .content-wrapper {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
	background: transparent;
}

/* Split: form column left, art panel right */

.auth-split {
	flex: 1 0 auto;
	display: grid;
	grid-template-columns: 1fr;
	min-height: 100vh;
}

.auth-main {
	display: flex;
	flex-direction: column;
	padding: 24px 16px;
}

.auth-logo {
	display: block;
	width: 100%;
	max-width: 400px;
	margin: 0 auto 48px;
}

.auth-logo img {
	display: block;
	width: 135px;
	height: 30px;
}

.auth-form {
	width: 100%;
	max-width: 400px;
	margin: auto;
}

.auth-title {
	margin: 0 0 8px;
	color: var(--au-slate);
	font-family: inherit;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* Brush underline on the heading's key word, the homepage hero's stroke (style.min.css underline-3 style-3) */
.auth-mark {
	position: relative;
	z-index: 0;
	white-space: nowrap;
}

.auth-mark::after {
	content: "";
	position: absolute;
	z-index: -1;
	left: 50%;
	bottom: -0.1em;
	width: 110%;
	height: 0.3em;
	transform: translateX(-50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 205 9.37'%3E%3Cpath fill='%23ed8134' d='M202.47,9.37A1191.26,1191.26,0,0,0,1.79,7.48,1.67,1.67,0,0,1,0,5.92H0A1.76,1.76,0,0,1,1.63,4.21c67-5.71,133.83-5.43,200.8-.27A2.75,2.75,0,0,1,205,6.88h0A2.6,2.6,0,0,1,202.47,9.37Z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}

.auth-lede {
	margin: 0 0 32px;
	color: var(--au-body);
	font-size: 17px;
	line-height: 1.6;
	text-wrap: pretty;
}

.auth-alt {
	margin: 32px 0 0;
	color: var(--au-body);
	font-size: 15px;
	text-align: center;
}

.auth-legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 20px;
	width: 100%;
	max-width: 400px;
	margin: 48px auto 0;
	color: var(--au-muted);
	font-size: 13px;
}

.auth-legal p {
	margin: 0;
}

.auth-legal a {
	color: var(--au-body);
	text-decoration: none;
}

.auth-legal a:hover {
	color: var(--au-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Art panel: hex-ink story canvas (auth-hexink.js) */

.auth-panel {
	display: none;
}

.auth-art {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.auth-pitch {
	position: absolute;
	left: 40px;
	right: 96px;
	bottom: 36px;
	text-align: left;
}

.auth-page .auth-pitch__title {
	max-width: 22ch;
	margin: 0;
	color: var(--au-slate);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.auth-pitch__text {
	max-width: 44ch;
	margin: 12px 0 0;
	color: var(--au-body);
	font-size: 16px;
	line-height: 1.6;
	text-wrap: pretty;
}

.auth-art-toggle {
	position: absolute;
	right: 16px;
	bottom: 16px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--au-wash-line);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.72);
	color: var(--au-ink);
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.2s var(--au-ease), background-color 0.2s var(--au-ease);
}

.auth-art-toggle:hover,
.auth-art-toggle:focus-visible {
	opacity: 1;
	background: var(--au-white);
}

.auth-art-toggle svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.auth-art-toggle .auth-art-play,
.auth-art-toggle[aria-pressed="true"] .auth-art-pause {
	display: none;
}

.auth-art-toggle[aria-pressed="true"] .auth-art-play {
	display: block;
}

@media (prefers-reduced-motion: reduce) {
	.auth-art-toggle {
		display: none;
	}
}

/* Below 992px the art panel is hidden; a trace of its paper drifts behind the form instead. */

@media (max-width: 991.98px) {
	.auth-main {
		position: relative;
		isolation: isolate;
		overflow: hidden;
	}

	.auth-main::before,
	.auth-main::after {
		content: "";
		position: absolute;
		z-index: -1;
		pointer-events: none;
	}

	.auth-main::before {
		inset: -15%;
		background:
			radial-gradient(circle at 94% 26%, rgba(250, 217, 194, 0.55), transparent 26%),
			radial-gradient(circle at 8% 92%, rgba(251, 230, 214, 0.75), transparent 36%);
		-webkit-mask-image: linear-gradient(to bottom, transparent 11%, #000 24%);
		mask-image: linear-gradient(to bottom, transparent 11%, #000 24%);
		animation: auth-drift 22s ease-in-out infinite alternate;
	}

	.auth-main::after {
		inset: 0;
		background:
			radial-gradient(circle, rgba(25, 30, 58, 0.1) 0.9px, transparent 1.2px) 0 0 / 9px 15.6px,
			radial-gradient(circle, rgba(25, 30, 58, 0.1) 0.9px, transparent 1.2px) 4.5px 7.8px / 9px 15.6px;
		-webkit-mask-image:
			radial-gradient(ellipse 70% 45% at 100% 0, #000, transparent),
			radial-gradient(ellipse 60% 35% at 0 100%, #000, transparent);
		mask-image:
			radial-gradient(ellipse 70% 45% at 100% 0, #000, transparent),
			radial-gradient(ellipse 60% 35% at 0 100%, #000, transparent);
	}
}

@keyframes auth-drift {
	from {
		transform: translate3d(0, 0, 0) scale(1);
	}
	to {
		transform: translate3d(-6%, 5%, 0) scale(1.08);
	}
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
	.auth-main::before {
		animation: none;
	}
}

@media (min-width: 992px) {
	.auth-split {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.auth-main {
		padding: 32px 48px;
	}

	.auth-panel {
		position: sticky;
		top: 16px;
		align-self: start;
		display: block;
		height: calc(100vh - 32px);
		margin: 16px 16px 16px 0;
		border-radius: 8px;
		background: var(--au-wash);
		overflow: hidden;
	}
}

@media (max-width: 575.98px) {
	.auth-title {
		font-size: 28px;
	}

	.auth-lede {
		margin-bottom: 24px;
	}
}

/* Focus */

.auth-page .auth-split a:focus-visible,
.auth-page .auth-split button:focus-visible {
	outline: 2px solid var(--au-orange);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.auth-input,
	.auth-btn {
		transition: none;
	}

	.auth-btn .dot {
		animation: none;
	}
}

/* Fields */

.auth-field {
	margin-bottom: 20px;
}

.auth-field__top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.auth-label {
	display: block;
	margin: 0 0 6px;
	color: var(--au-ink);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}

.auth-field__top .auth-label {
	margin: 0;
}

.auth-page .auth-forgot {
	font-size: 14px;
}

.auth-input {
	display: block;
	width: 100%;
	height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--au-field);
	border-radius: 6px;
	background: var(--au-white);
	color: var(--au-ink);
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	caret-color: var(--au-orange);
	transition: border-color 0.15s var(--au-ease), box-shadow 0.15s var(--au-ease);
}

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

.auth-input:hover {
	border-color: var(--au-body);
}

.auth-input:focus {
	border-color: var(--au-orange);
	box-shadow: 0 0 0 3px rgba(237, 129, 52, 0.25);
	outline: none;
}

.auth-input[aria-invalid="true"] {
	border-color: var(--au-err);
}

select.auth-input {
	padding-right: 40px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M4 6l4 4 4-4' fill='none' stroke='%23191e3a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px;
	cursor: pointer;
}

.auth-secret {
	position: relative;
}

.auth-secret .auth-input {
	padding-right: 72px;
}

.auth-reveal {
	position: absolute;
	top: 6px;
	right: 6px;
	height: 36px;
	padding: 0 10px;
	border: 0;
	border-radius: 5px;
	background: none;
	color: var(--au-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.auth-reveal:hover {
	background: var(--au-mist);
}


/* Buttons */

.auth-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	padding: 12px 20px;
	border: 1px solid transparent;
	border-radius: 6px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s var(--au-ease), border-color 0.15s var(--au-ease), color 0.15s var(--au-ease);
}

.auth-page .auth-btn--primary,
.auth-page .auth-btn--primary:hover,
.auth-page .auth-btn--primary:focus {
	background: var(--au-orange);
	color: var(--au-white);
}

.auth-page .auth-btn--primary:hover {
	background: var(--au-orange-hover);
}

.auth-page .auth-btn--secondary {
	border-color: var(--au-field);
	background: var(--au-white);
	color: var(--au-ink);
}

.auth-page .auth-btn--secondary:hover {
	border-color: var(--au-ink);
	color: var(--au-ink);
}

.auth-page .auth-btn--quiet {
	min-height: 40px;
	background: none;
	color: var(--au-body);
	font-weight: 600;
}

.auth-page .auth-btn--quiet:hover {
	background: var(--au-mist);
	color: var(--au-ink);
}

.auth-btn:disabled,
.auth-btn[disabled] {
	cursor: not-allowed;
	opacity: 0.65;
}

/* Loading dots inside a button */
.auth-btn .dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	margin: 0 3px;
	border: 0;
	border-radius: 50%;
	float: none;
	background: currentColor;
	transform: none; /* e2c.css .dot starts at scale(0) */
	animation: auth-dot 1s ease-in-out infinite;
}

.auth-btn .dot:nth-child(2) { animation-delay: 0.15s; }
.auth-btn .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes auth-dot {
	0%, 80%, 100% { opacity: 0.35; }
	40% { opacity: 1; }
}


/* Links, divider, Google */

.auth-page .auth-link {
	color: var(--au-orange-text);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.auth-page .auth-link:hover {
	color: var(--au-ink);
}

.auth-page button.auth-link {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.auth-field__top .auth-link {
	font-size: 14px;
}

.auth-or {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 24px 0;
	color: var(--au-muted);
	font-size: 13px;
}

.auth-or::before,
.auth-or::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--au-line);
}

.auth-google {
	display: flex;
	justify-content: center;
	height: 44px;
	overflow: hidden; /* GSI briefly stacks its placeholder above the iframe */
}


/* Notices (server-rendered and the ones the page scripts inject) */

.auth-page .alert {
	position: relative;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 20px;
	padding: 12px 14px;
	border: 1px solid var(--au-err-line);
	border-radius: 6px;
	background: var(--au-err-bg);
	color: var(--au-err);
	font-size: 14px;
	line-height: 1.5;
	text-align: left;
}

.auth-page .alert.alert-icon {
	padding-left: 14px;
}

.auth-page .alert.alert-dismissible {
	padding-right: 44px;
}

.auth-page .alert.alert-success {
	border-color: var(--au-ok-bg);
	background: var(--au-ok-bg);
	color: var(--au-ok);
}

.auth-page .alert.alert-info {
	border-color: var(--au-line);
	background: var(--au-mist);
	color: var(--au-ink);
}

.auth-page .alert a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.auth-page .alert .uil {
	position: static;
	width: auto;
	height: auto;
	padding: 0;
	flex-shrink: 0;
	font-size: 18px;
	line-height: 1.2;
}

.auth-page .alert .btn-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	padding: 0;
	background-size: 10px;
	opacity: 0.6;
}

.auth-page .alert .btn-close:hover {
	opacity: 1;
}

/* Live password checks (toggled by the page scripts) */
#passwordRequirements,
#passwordMatchMessage {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: opacity 0.25s var(--au-ease), grid-template-rows 0.25s var(--au-ease);
}

#passwordRequirements.show,
#passwordMatchMessage.show {
	grid-template-rows: 1fr;
	opacity: 1;
}

#passwordRequirements > *,
#passwordMatchMessage > * {
	min-height: 0;
	overflow: hidden;
}

#passwordRequirements ul {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	line-height: 1.5;
}

#passwordRequirements li {
	position: relative;
	padding: 2px 0 2px 22px;
	color: var(--au-muted);
}

#passwordRequirements li::before {
	content: '';
	position: absolute;
	top: 8px;
	left: 4px;
	width: 8px;
	height: 8px;
	border: 1.5px solid currentColor;
	border-radius: 50%;
}

.auth-page #passwordRequirements li.text-leaf {
	color: var(--au-ok) !important;
}

.auth-page #passwordRequirements li.text-leaf::before {
	top: 6px;
	left: 3px;
	width: 11px;
	height: 6px;
	border-width: 0 0 2px 2px;
	border-radius: 0;
	transform: rotate(-45deg);
}

.auth-page #passwordRequirements li.text-red,
.auth-page #passwordMatchMessage {
	color: var(--au-err) !important;
}

#passwordMatchMessage {
	font-size: 13px;
}

#passwordMatchMessage > span {
	display: block;
	padding-top: 6px;
}

.auth-recaptcha {
	margin-bottom: 20px;
}

.auth-recaptcha .g-recaptcha {
	min-height: 78px; /* widget height, so it doesn't push the button down on load */
}

.auth-recaptcha .valid-feedback,
.auth-recaptcha .invalid-feedback {
	font-size: 13px;
}


/* Other auth pages: dropdowns, one-time codes, checkbox rows, stacked actions, store picker */

select.auth-input {
	padding-right: 40px;
	-webkit-appearance: none;
	appearance: none;
	background: var(--au-white) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23555b6e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m4 6 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 14px center / 16px;
	cursor: pointer;
}

.auth-code {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.4em;
	text-align: center;
}

.auth-check {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 16px 0 0;
	color: var(--au-body);
	font-size: 14px;
	cursor: pointer;
}

/* The theme forces appearance: none on inputs, so the box is drawn here. */
.auth-page .auth-check input[type="checkbox"] {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1px solid var(--au-field);
	border-radius: 4px;
	background: var(--au-white) no-repeat center / 12px;
	cursor: pointer;
	transition: background-color 0.15s var(--au-ease), border-color 0.15s var(--au-ease);
}

.auth-page .auth-check input[type="checkbox"]:hover {
	border-color: var(--au-ink);
}

.auth-page .auth-check input[type="checkbox"]:checked {
	border-color: var(--au-orange);
	background-color: var(--au-orange);
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.auth-page .auth-check input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--au-orange);
	outline-offset: 2px;
}

.auth-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.auth-actions form {
	margin: 0;
}

.auth-note {
	margin: 16px 0 0;
	color: var(--au-muted);
	font-size: 14px;
	text-align: center;
}

.auth-stores {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 16px;
}

.auth-page .auth-store {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--au-field);
	border-radius: 6px;
	background: var(--au-white);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s var(--au-ease), background-color 0.15s var(--au-ease);
}

.auth-page .auth-store:hover {
	border-color: var(--au-ink);
}

.auth-page .auth-store.is-current {
	border-color: var(--au-orange);
	background: var(--au-wash);
}

.auth-store__avatar {
	display: grid;
	flex: 0 0 40px;
	place-items: center;
	height: 40px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--au-wash);
	color: var(--au-orange-text);
	font-size: 14px;
	font-weight: 700;
}

.auth-store__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.auth-store__text {
	flex: 1;
	min-width: 0;
}

.auth-store__name {
	display: block;
	overflow: hidden;
	color: var(--au-ink);
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.auth-store__role {
	display: block;
	color: var(--au-muted);
	font-size: 13px;
}

.auth-store__flag {
	color: var(--au-orange-text);
	font-weight: 700;
}

.auth-store__go {
	flex-shrink: 0;
	color: var(--au-muted);
	font-size: 20px;
}
