/*
 * Axvoid Learn Accounts. Follows the active AxvoidLearn theme: its tokens (--lrn-*), its card treatment
 * (panel surface, 1px line, 16px radius), its uppercase label style and its button radius and weight.
 * Nothing here sets a colour that is not a theme token.
 */

/* ---------- Page header ---------- */

.axvl-page-head {
	margin: 0 0 28px;
}

.axvl-kicker {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--lrn-accent, inherit);
}

.axvl-title {
	margin: 0 0 10px;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.1;
	letter-spacing: -0.035em;
}

.axvl-lead {
	margin: 0;
	max-width: 56ch;
	color: var(--lrn-muted, inherit);
	font-size: 16px;
	line-height: 1.6;
}

/* ---------- Cards and layout ---------- */

.axvl-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: 1fr;
}

.axvl-card {
	background: var(--lrn-panel, transparent);
	border: 1px solid var(--lrn-line, currentColor);
	border-radius: 16px;
	padding: 24px;
	min-width: 0;
}

.axvl-card__k {
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--lrn-muted, inherit);
}

.axvl-card h3 {
	margin: 0 0 16px;
	font-size: 20px;
	letter-spacing: -0.02em;
}

.axvl-card--danger {
	border-color: var(--lrn-fail, currentColor);
}

@media (min-width: 860px) {
	.axvl-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.axvl-card--wide {
		grid-column: 1 / -1;
	}
}

/* ---------- Forms ---------- */

.axvl-form {
	margin: 0;
	font: inherit;
	color: var(--lrn-text, inherit);
}

.axvl-form p {
	margin: 0 0 16px;
}

.axvl-form label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}

.axvl-form input[type="text"],
.axvl-form input[type="email"],
.axvl-form input[type="password"],
.axvl-form select,
.axvl-form textarea {
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	font: inherit;
	font-weight: 400;
	color: var(--lrn-text, inherit);
	background: var(--lrn-bg, transparent);
	border: 1px solid var(--lrn-line, currentColor);
	border-radius: 10px;
	box-sizing: border-box;
	transition: border-color var(--lrn-dur-fast, 160ms) linear, box-shadow var(--lrn-dur-fast, 160ms) linear;
}

.axvl-form textarea {
	min-height: 120px;
	resize: vertical;
	line-height: 1.6;
}

.axvl-form input:focus,
.axvl-form select:focus,
.axvl-form textarea:focus {
	outline: none;
	border-color: var(--lrn-accent, currentColor);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--lrn-accent, currentColor) 22%, transparent);
}

.axvl-form input:focus-visible,
.axvl-form select:focus-visible,
.axvl-form textarea:focus-visible,
.axvl-btn:focus-visible,
.axvl-file:focus-within {
	outline: 2px solid var(--lrn-accent, currentColor);
	outline-offset: 3px;
}

.axvl-hint {
	margin: -2px 0 12px;
	font-size: 13px;
	color: var(--lrn-muted, inherit);
}

/* Direction and option chips: real checkboxes, visually a pill. */
.axvl-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.axvl-options legend {
	margin: 0 0 10px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
}

.axvl-option {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	margin: 0;
	padding: 8px 16px;
	border: 1px solid var(--lrn-line, currentColor);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color var(--lrn-dur-fast, 160ms) linear, background-color var(--lrn-dur-fast, 160ms) linear;
}

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

.axvl-option:has(input:checked) {
	border-color: var(--lrn-accent, currentColor);
	background: color-mix(in srgb, var(--lrn-accent, currentColor) 14%, transparent);
	color: var(--lrn-accent, inherit);
}

.axvl-option:has(input:focus-visible) {
	outline: 2px solid var(--lrn-accent, currentColor);
	outline-offset: 3px;
}

/* Checkbox rows (terms and privacy). */
label.axvl-check {
	display: flex !important;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 12px !important;
	font-weight: 400 !important;
	font-size: 14px;
	line-height: 1.5;
}

label.axvl-check input {
	margin-top: 3px;
	width: 18px;
	height: 18px;
	accent-color: var(--lrn-accent, auto);
}

/* ---------- Buttons ---------- */

.axvl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 20px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: transform var(--lrn-dur-fast, 160ms) var(--lrn-ease-standard, ease), filter var(--lrn-dur-fast, 160ms) linear;
}

.axvl-btn:hover {
	filter: brightness(1.06);
}

.axvl-btn:active {
	transform: translateY(1px);
}

.axvl-btn--danger {
	background: transparent;
	color: var(--lrn-fail, inherit);
	border: 1.5px solid var(--lrn-fail, currentColor);
}

.axvl-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-top: 4px;
}

/* File picker: a styled button over a visually hidden native input (keeps keyboard access). */
.axvl-file {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	margin: 0 0 8px;
	padding: 0 20px;
	border: 1.5px solid var(--lrn-line, currentColor);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.axvl-file input {
	position: absolute;
	inset: 0;
	opacity: 0;
	width: 100%;
	cursor: pointer;
}

/* ---------- Picture ---------- */

.axvl-avatar {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	align-items: flex-start;
}

.axvl-avatar__img {
	width: 112px;
	height: 112px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--lrn-accent, var(--lrn-line, currentColor));
	box-sizing: border-box;
	background: var(--lrn-raised, transparent);
}

.axvl-avatar form {
	flex: 1 1 260px;
	min-width: 0;
}

/* ---------- Notes ---------- */

.axvl-notes {
	list-style: none;
	margin: 20px 0 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.axvl-notes li {
	padding: 16px 18px;
	border: 1px solid var(--lrn-line-soft, var(--lrn-line, currentColor));
	border-radius: 12px;
	background: var(--lrn-bg, transparent);
}

.axvl-notes strong {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	letter-spacing: 0.02em;
	color: var(--lrn-accent, inherit);
}

.axvl-notes p {
	margin: 0 0 12px;
	white-space: pre-wrap;
	line-height: 1.6;
}

.axvl-notes .axvl-btn {
	min-height: 36px;
	padding: 0 14px;
	font-size: 13px;
}

/* ---------- Status and misc ---------- */

.axvl-status {
	min-height: 1.4em;
	margin: 0;
	font-size: 14px;
}

.axvl-status--error {
	color: var(--lrn-fail, inherit);
}

.axvl-muted {
	color: var(--lrn-muted, inherit);
}

.axvl-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

[hidden] {
	display: none !important;
}

/* ---------- Bottom bar (phones) ---------- */

.axvl-bottom-nav {
	display: none;
}

@media (max-width: 782px) {
	.axvl-bottom-nav {
		display: flex;
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		justify-content: center;
		padding: 0.75rem;
		background: var(--lrn-panel, transparent);
		border-top: 1px solid var(--lrn-line, currentColor);
		color: var(--lrn-text, inherit);
		z-index: 50;
	}

	.axvl-bottom-nav a {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		color: inherit;
		font-weight: 700;
	}

	.axvl-card {
		padding: 20px;
	}
}

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

.axvl-card--auth {
	max-width: 640px;
	margin: 0 auto;
	padding: 28px;
}

@media (max-width: 520px) {
	.axvl-card--auth {
		padding: 20px;
	}
}

/* Specific overrides: the general label rule must not restyle these controls. */
.axvl-form .axvl-option {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

.axvl-form .axvl-file {
	display: inline-flex;
	align-items: center;
	width: auto;
	margin: 0 0 8px;
}

.axvl-form label.axvl-check {
	display: flex;
	align-items: flex-start;
	margin: 0 0 12px;
}

.axvl-form .axvl-options legend {
	display: block;
	width: 100%;
}

/* Note editing in place: same field treatment as the forms. */
.axvl-note-edit textarea {
	width: 100%;
	min-height: 110px;
	padding: 10px 14px;
	font: inherit;
	line-height: 1.6;
	color: var(--lrn-text, inherit);
	background: var(--lrn-panel, transparent);
	border: 1px solid var(--lrn-accent, currentColor);
	border-radius: 10px;
	box-sizing: border-box;
	resize: vertical;
}

.axvl-note-edit .axvl-status {
	margin-top: 8px;
}

/* ---------- Account dashboard: side menu and wide content ---------- */

.axvl-dash {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.axvl-dash__nav {
	position: sticky;
	top: 96px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px;
	border: 1px solid var(--lrn-line, currentColor);
	border-radius: 16px;
	background: var(--lrn-panel, transparent);
}

.axvl-dash__tab {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: start;
	cursor: pointer;
	transition: background-color var(--lrn-dur-fast, 160ms) linear, border-color var(--lrn-dur-fast, 160ms) linear;
}

.axvl-dash__tab:hover {
	background: var(--lrn-raised, transparent);
}

.axvl-dash__tab[aria-selected="true"] {
	border-color: var(--lrn-accent, currentColor);
	background: color-mix(in srgb, var(--lrn-accent, currentColor) 14%, transparent);
	color: var(--lrn-accent, inherit);
}

.axvl-dash__tab--danger {
	color: var(--lrn-fail, inherit);
}

.axvl-dash__tab:focus-visible {
	outline: 2px solid var(--lrn-accent, currentColor);
	outline-offset: 2px;
}

.axvl-dash__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
	max-width: 960px;
}

.axvl-dash__body .axvl-card {
	width: 100%;
	padding: 28px 30px;
}

.axvl-dash__body .axvl-form {
	max-width: none;
}

.axvl-dash__body .axvl-options {
	max-width: none;
}

@media (max-width: 860px) {
	.axvl-dash {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.axvl-dash__nav {
		position: static;
		flex-direction: row;
		overflow-x: auto;
		padding: 6px;
		scrollbar-width: none;
	}

	.axvl-dash__tab {
		width: auto;
		flex: 0 0 auto;
		white-space: nowrap;
	}
}

@media (max-width: 520px) {
	.axvl-dash__body .axvl-card {
		padding: 20px;
	}
}

/* Wider dashboard on desktop: the theme's reading column is narrower than a control panel needs. */
@media (min-width: 1000px) {
	.wp-block-post-content > .axvl-account,
	.axvl-account.axvl-account {
		max-width: none !important;
		width: min(1140px, calc(100vw - 64px)) !important;
		position: relative;
		left: 50%;
		transform: translateX(-50%);
	}
}

.axvl-welcome {
	margin: 0 0 10px;
	font-size: clamp(26px, 3.4vw, 38px);
	line-height: 1.15;
	letter-spacing: -0.03em;
}

/* Account intro on one line on wide screens; wraps only on phones so nothing overflows. */
@media (min-width: 700px) {
	.axvl-account .axvl-lead {
		max-width: none;
		white-space: nowrap;
	}
}

/* Sign-out: header icon and the panel's last menu item. */
.axvl-signout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
}

.axvl-signout:hover {
	color: var(--lrn-accent, inherit);
}

.axvl-signout:focus-visible {
	outline: 2px solid var(--lrn-accent, currentColor);
	outline-offset: 2px;
}

.axvl-dash__signout {
	margin-top: 10px;
	border-top: 1px solid var(--lrn-line, currentColor);
	border-radius: 0 0 10px 10px;
	color: var(--lrn-muted, inherit);
	text-decoration: none;
}

.axvl-dash__signout:hover {
	color: var(--lrn-fail, inherit);
}

/* Side-menu tabs: icon and label on one line. */
.axvl-dash__tab {
	display: flex;
	align-items: center;
	gap: 12px;
}

.axvl-dash__icon {
	flex: none;
	width: 18px;
	height: 18px;
	opacity: 0.85;
}

.axvl-dash__tab[aria-selected="true"] .axvl-dash__icon {
	opacity: 1;
}

@media (max-width: 860px) {
	.axvl-dash__tab {
		display: inline-flex;
	}
}

/* Short panels keep a readable width instead of stretching across the whole content area.
   The notes panel stays full width because its list needs the room. */
@media (min-width: 1000px) {
	.axvl-dash__body .axvl-card:not(.axvl-card--wide) {
		max-width: 680px;
	}
}

/* Inline confirmation for deletions: a bordered warning block above the choices. */
.axvl-confirm {
	margin-top: 12px;
	padding: 14px 16px;
	border: 1px solid var(--lrn-fail, currentColor);
	border-radius: 12px;
	background: var(--lrn-bg, transparent);
}

.axvl-confirm__text {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--lrn-fail, inherit);
}

/* ---------- Sign-in / sign-up card ---------- */

.axvl-dialog {
	width: min(460px, 92vw);
	max-height: 90vh;
	padding: 0;
	border: 1px solid var(--lrn-line, currentColor);
	border-radius: 20px;
	background: var(--lrn-panel, transparent);
	color: var(--lrn-text, inherit);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.axvl-dialog::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

.axvl-dialog__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 14px 0 14px;
}

.axvl-dialog__tabs {
	position: static;
	flex-direction: row;
	border: 0;
	padding: 0;
	background: none;
	flex: 1 1 auto;
}

.axvl-dialog__close {
	min-width: 40px;
	min-height: 40px;
	padding: 0;
	font-size: 22px;
	line-height: 1;
	border-radius: 10px;
	border: 1px solid transparent;
}

.axvl-dialog__panel {
	padding: 22px 26px 26px;
	overflow: auto;
}

.axvl-dialog__title {
	margin: 0 0 16px;
	font-size: 24px;
	letter-spacing: -0.02em;
}

.axvl-dialog .axvl-card--auth {
	max-width: none;
	padding: 0;
	border: 0;
	background: none;
}

.axvl-dialog .axvl-card--auth .axvl-page-head {
	display: none;
}

@media (max-width: 520px) {
	.axvl-dialog__panel {
		padding: 18px 20px 22px;
	}
}

/* Site logo and name at the top of the sign-in / sign-up card. */
.axvl-dialog__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 18px 22px 0 22px;
}

.axvl-dialog__logo {
	height: 28px;
	width: auto;
}

.axvl-dialog__logo--day {
	display: none;
}

@media (prefers-color-scheme: light) {
	.axvl-dialog__logo--night {
		display: none;
	}

	.axvl-dialog__logo--day {
		display: block;
	}
}

.axvl-dialog__site {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--lrn-muted, inherit);
}

/* Member in the header: picture and name, linking to the account page. */
.axvl-account-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 4px 10px 4px 4px;
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
	font-weight: 600;
}

.axvl-account-link:hover {
	color: var(--lrn-accent, inherit);
}

.axvl-account-link:focus-visible {
	outline: 2px solid var(--lrn-accent, currentColor);
	outline-offset: 2px;
}

.axvl-account-link__avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--lrn-accent, var(--lrn-line, currentColor));
	box-sizing: border-box;
}

@media (max-width: 782px) {
	.axvl-account-link__name {
		display: none;
	}
}

/* Header member item: picture and name on one line, centred vertically. */
.wp-block-navigation .axvl-nav-account {
	display: flex;
	align-items: center;
}

.wp-block-navigation .axvl-account-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	line-height: 1;
	padding: 4px 10px 4px 4px;
}

.wp-block-navigation .axvl-account-link__name {
	display: inline-block;
	font-size: 15px;
	line-height: 1.2;
	white-space: nowrap;
}

.wp-block-navigation .axvl-account-link__avatar {
	display: block;
	flex: none;
}

/* Sign-out confirmation from the header: a card under the icon, not covering the page. */
.wp-block-navigation .axvl-nav-signout {
	position: relative;
}

.wp-block-navigation .axvl-nav-signout > .axvl-confirm {
	position: absolute;
	top: calc(100% + 8px);
	inset-inline-end: 0;
	z-index: 70;
	width: min(280px, 80vw);
	margin: 0;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
	background: var(--lrn-panel, transparent);
}

.wp-block-navigation .axvl-nav-signout > .axvl-confirm .axvl-actions {
	flex-wrap: nowrap;
}

.wp-block-navigation .axvl-nav-signout > .axvl-confirm .axvl-btn {
	min-height: 38px;
	padding: 0 12px;
	font-size: 13px;
}

/* ---------- Sign-in / sign-up card: layout refinements ---------- */

.axvl-dialog {
	width: min(440px, 92vw);
	border-radius: 20px;
}

.axvl-dialog::backdrop {
	background: rgba(0, 0, 0, 0.72);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

/* Header: logo and name on one baseline, close button in the corner. */
.axvl-dialog__brand {
	align-items: center;
	padding: 22px 26px 0 26px;
	gap: 12px;
}

.axvl-dialog__logo {
	height: 26px;
}

.axvl-dialog__site {
	font-size: 15px;
	line-height: 1;
	font-weight: 600;
	color: var(--lrn-text, inherit);
	opacity: 0.85;
}

.axvl-dialog__head {
	position: relative;
	display: block;
	padding: 18px 26px 0 26px;
}

/* Tabs: one segmented control across the card. */
.axvl-dialog__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--lrn-line, currentColor);
	border-radius: 12px;
	background: var(--lrn-raised, transparent);
}

.axvl-dialog__tabs .axvl-dash__tab {
	min-height: 40px;
	margin: 0;
	padding: 8px 12px;
	border-radius: 9px;
	text-align: center;
	font-size: 14px;
	color: var(--lrn-muted, inherit);
	border-color: transparent;
	background: none;
}

.axvl-dialog__tabs .axvl-dash__tab[aria-selected="true"] {
	background: var(--lrn-panel, transparent);
	border-color: transparent;
	color: var(--lrn-text, inherit);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.axvl-dialog__close {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px;
	min-width: 36px;
	min-height: 36px;
	width: 36px;
	height: 36px;
	border: 0;
	background: none;
	color: var(--lrn-muted, inherit);
}

.axvl-dialog__close:hover {
	color: var(--lrn-text, inherit);
	background: var(--lrn-raised, transparent);
}

.axvl-dialog__panel {
	padding: 22px 26px 26px;
}

.axvl-dialog__title {
	margin: 0 0 18px;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

/* Form rhythm: one consistent gap between fields. */
.axvl-dialog .axvl-form p {
	margin: 0 0 16px;
}

.axvl-dialog .axvl-form label {
	margin-bottom: 6px;
	font-size: 13px;
}

/* The remember-me row is a plain option, not a bordered box. */
.axvl-dialog .axvl-form p:has(.axvl-check) {
	margin-bottom: 18px;
}

.axvl-dialog .axvl-check {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	box-shadow: none;
	font-size: 14px;
	font-weight: 400;
}

.axvl-dialog .axvl-check input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	flex: none;
}

/* Primary action spans the form; the reset link sits below it with room. */
.axvl-dialog .axvl-actions {
	margin: 0;
}

.axvl-dialog .axvl-actions .axvl-btn--primary {
	width: 100%;
	min-height: 48px;
}

.axvl-dialog .axvl-dialog__forgot {
	margin: 16px 0 0 0;
	text-align: center;
	font-size: 14px;
}

.axvl-dialog .axvl-dialog__forgot a {
	color: var(--lrn-muted, inherit);
	text-underline-offset: 3px;
}

.axvl-dialog .axvl-dialog__forgot a:hover {
	color: var(--lrn-accent, inherit);
}

@media (max-width: 520px) {
	.axvl-dialog__brand,
	.axvl-dialog__head {
		padding-inline: 20px;
	}

	.axvl-dialog__panel {
		padding: 20px;
	}
}

/* Close button: on the logo line in the top-right corner, clear of the tabs, no outline. */
.axvl-dialog .axvl-dialog__close {
	top: 14px;
	inset-inline-end: 16px;
	border: 0 !important;
	box-shadow: none;
	background: none;
}

.axvl-dialog .axvl-dialog__head {
	padding-top: 12px;
}

/* Position the close button against the card, on the logo line. */
.axvl-dialog {
	position: relative;
}

.axvl-dialog .axvl-dialog__head {
	position: static;
}

.axvl-dialog .axvl-dialog__close {
	top: 18px;
	inset-inline-end: 18px;
}

/* Tab labels centred in each half of the segmented control. */
.axvl-dialog .axvl-dialog__tabs .axvl-dash__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
}

/* Breathing room between a field's label and the field itself. Option chips and checkbox rows keep their own spacing. */
.axvl-form label:not(.axvl-check):not(.axvl-option) {
	margin-bottom: 10px;
}

.axvl-dialog .axvl-form label:not(.axvl-check) {
	margin-bottom: 10px;
}

/* Each field's label wraps its input, so the gap goes between the label text and the field. */
.axvl-form label:not(.axvl-check):not(.axvl-option) {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 0;
}

/* Reset link: clear space below the primary button. */
.axvl-dialog .axvl-form p.axvl-dialog__forgot {
	margin: 22px 0 0;
}

/* Password row: the generate and copy buttons sit below the field with space, on one line. */
.axvl-form p:has(> label > [data-axvl-password]) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.axvl-form p:has(> label > [data-axvl-password]) > label {
	flex: 1 1 100%;
}

.axvl-form p:has(> label > [data-axvl-password]) > .wp-element-button {
	margin: 0;
}

.axvl-form p:has(> label > [data-axvl-password]) > .axvl-meter {
	margin: 0;
}

/* Terms and privacy: two plain checkbox lines, one under the other, without boxes. */
.axvl-form .axvl-check,
.axvl-form label.axvl-check {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	margin: 0 0 12px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-size: 14px;
	font-weight: 400;
}

.axvl-form p:has(> .axvl-check) {
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	background: none;
}

/* Select fields: the arrow sits inside the field with room from its edge, in the theme's text colour. */
.axvl-form select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-inline-end: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b8b8bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 16px 16px;
	cursor: pointer;
}

/* The sign-up card is a little wider than the sign-in card, to fit its longer form. */
.axvl-dialog:has([data-axvl-auth-panel="signup"]:not([hidden])) {
	width: min(500px, 92vw);
}

/* On larger screens the sign-up card gets more room. */
@media (min-width: 900px) {
	.axvl-dialog:has([data-axvl-auth-panel="signup"]:not([hidden])) {
		width: min(640px, 92vw);
	}
}

/* The file picker is a button, not a field label: keep its own row layout. */
.axvl-form label.axvl-file {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 0;
	width: auto;
	margin: 0 0 8px;
}

/* Picture button: stronger rule than the general field-label rule above, so it keeps its button layout. */
.axvl-form label.axvl-file:not(.axvl-check):not(.axvl-option) {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: auto;
	margin: 0 0 8px;
}

/* Sign-in and create-account tabs: a visible divider and clearer text, also when neither tab is selected. */
.axvl-dialog .axvl-dialog__tabs .axvl-dash__tab {
	color: var(--lrn-text, inherit);
	opacity: 0.78;
}

.axvl-dialog .axvl-dialog__tabs .axvl-dash__tab + .axvl-dash__tab {
	position: relative;
}

.axvl-dialog .axvl-dialog__tabs .axvl-dash__tab + .axvl-dash__tab::before {
	content: "";
	position: absolute;
	top: 22%;
	bottom: 22%;
	inset-inline-start: 0;
	width: 1px;
	background: var(--lrn-line, currentColor);
}

.axvl-dialog .axvl-dialog__tabs .axvl-dash__tab[aria-selected="true"] {
	opacity: 1;
}

.axvl-dialog .axvl-dialog__tabs .axvl-dash__tab:hover,
.axvl-dialog .axvl-dialog__tabs .axvl-dash__tab:focus-visible {
	opacity: 1;
}

/* The divider uses the text colour mixed in, so it stays visible on the tab bar. */
.axvl-dialog .axvl-dialog__tabs .axvl-dash__tab + .axvl-dash__tab::before {
	background: color-mix(in srgb, var(--lrn-text, currentColor) 38%, transparent);
	width: 1.5px;
}

/* The divider between the two tabs shows only on the reset-password card, where neither tab is selected. */
.axvl-dialog .axvl-dialog__tabs .axvl-dash__tab + .axvl-dash__tab::before {
	display: none;
}

.axvl-dialog:has([data-axvl-auth-panel="forgot"]:not([hidden])) .axvl-dialog__tabs .axvl-dash__tab + .axvl-dash__tab::before {
	display: block;
}

/* Homepage header: sign-in and sign-up buttons for guests, the member's avatar when signed in. */
.axvl-home-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.axvl-home-actions__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 18px;
	border: 1px solid var(--lrn-line, #3f3f46);
	border-radius: 999px;
	color: var(--lrn-text, #f8f9fa);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.axvl-home-actions__button--solid {
	background: var(--lrn-accent, #5eead4);
	border-color: var(--lrn-accent, #5eead4);
	color: var(--lrn-on-accent, #0a0a0a);
}

.axvl-home-actions__button:hover {
	border-color: var(--lrn-accent, #5eead4);
	color: var(--lrn-accent, #5eead4);
}

.axvl-home-actions__button--solid:hover {
	color: var(--lrn-on-accent, #0a0a0a);
	filter: brightness(1.08);
}

.axvl-home-actions__avatar {
	display: inline-flex;
	border-radius: 50%;
	outline: 1px solid var(--lrn-line, #3f3f46);
	outline-offset: 2px;
}

.axvl-home-actions__avatar img {
	display: block;
	width: 36px;
	height: 36px;
	border-radius: 50%;
}

@media (max-width: 600px) {
	.axvl-home-actions__button {
		min-height: 36px;
		padding: 0 12px;
		font-size: 14px;
	}
}

.axvl-home-actions__link {
	color: var(--lrn-text, #f8f9fa);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.axvl-home-actions__link:hover {
	color: var(--lrn-accent, #5eead4);
}

/* Lesson header when it shrinks on scroll: keep room for the member's avatar. */
body.single-lesson .axvl-header.is-reading {
	padding-block: 16px;
}

.axvl-home-actions__signout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: var(--lrn-text, #f8f9fa);
}

.axvl-home-actions__signout:hover {
	color: var(--lrn-accent, #5eead4);
}

/* Homepage header menu: a button opens the actions on phones; on larger screens the actions stay inline. */
.axvl-home-menu {
	position: relative;
	margin-left: auto;
}

.axvl-home-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid var(--lrn-line, #3f3f46);
	border-radius: 999px;
	color: var(--lrn-text, #f8f9fa);
	cursor: pointer;
	list-style: none;
}

.axvl-home-menu__toggle::-webkit-details-marker {
	display: none;
}

@media (min-width: 783px) {
	.axvl-home-menu {
		display: contents;
	}

	.axvl-home-menu__toggle {
		display: none;
	}

	.axvl-home-menu > .axvl-home-actions {
		margin-left: auto;
	}
}

@media (max-width: 782px) {
	.axvl-home-menu[open] > .axvl-home-actions {
		position: absolute;
		top: calc(100% + 10px);
		right: 0;
		z-index: 110;
		flex-direction: column;
		align-items: stretch;
		min-width: 200px;
		padding: 12px;
		border: 1px solid var(--lrn-line, #3f3f46);
		border-radius: 16px;
		background: var(--lrn-panel, #18181a);
		box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
	}

	.axvl-home-menu > .axvl-home-actions {
		display: none;
	}

	.axvl-home-menu[open] > .axvl-home-actions {
		display: flex;
	}
}

/* Phone menu: keep the avatar round and its row aligned with the sign-out icon. */
@media (max-width: 782px) {
	.axvl-home-menu[open] > .axvl-home-actions > * {
		align-self: flex-start;
	}

	.axvl-home-menu[open] .axvl-home-actions__avatar,
	.axvl-home-menu[open] .axvl-home-actions__signout {
		width: 36px;
		height: 36px;
		outline-offset: 2px;
	}
}

/* Homepage header on phones: logo first, then the display button, then the menu; no sideways spill. */
@media (max-width: 782px) {
	body.home .axvl-header > .wp-block-group {
		flex-wrap: nowrap;
		gap: 10px;
		min-width: 0;
	}

	body.home .axvl-header .wp-block-site-title {
		order: 1;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	body.home .axvl-header .axvl-display {
		order: 2;
		margin-left: auto;
	}

	body.home .axvl-header .axvl-home-menu {
		order: 3;
		margin-left: 0;
	}

	body.home .axvl-home-actions,
	body.home .axvl-home-menu {
		max-width: 100%;
	}
}
