/* ZAUR design tokens — shared by webmail and register */

:root {
	color-scheme: light;

	--font-sans: -apple-system, BlinkMacSystemFont, 'avenir next', avenir, 'segoe ui',
		'helvetica neue', 'Adwaita Sans', Cantarell, Ubuntu, roboto, noto, helvetica, arial,
		sans-serif;
	--font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas,
		'DejaVu Sans Mono', monospace;

	--z-surface: #fafaf9;
	--z-surface-raised: #ffffff;
	--z-surface-sunken: #f5f4f1;
	--z-border: #e8e8e6;
	--z-border-strong: #d5d5d2;
	/* Dividers sit outside container + page brightness (Hobday border rule). */
	--z-divider: var(--z-border-strong);
	--z-fg: #1a1d1f;
	--z-fg-muted: #6b6b69;
	--z-fg-subtle: #9b9a97;
	--z-accent: #3b6abf;
	--z-accent-hover: #2f59ad;
	--z-accent-fg: #ffffff;
	--z-unread: #3b6abf;
	--z-star: #956400;
	--z-danger: #c03734;
	--z-success: #2d6a4f;
	--z-warning: #956400;

	--z-brand-mark: #3b6abf;

	--radius-sm: 0.375rem;
	--radius-md: 0.625rem;
	--radius-lg: 1rem;

	--shadow-sm: 0 1px 3px rgb(0 0 0 / 0.04), 0 1px 2px rgb(0 0 0 / 0.02);
	--shadow-md: 0 4px 16px rgb(0 0 0 / 0.07), 0 1px 4px rgb(0 0 0 / 0.03);

	--height-header: 3.25rem;
	/* ~44rem — same measure column as webmail */
	--z-measure: 44rem;
	--z-measure-wide: 72rem;
	/* Same column width as webmail login (max-w-sm) */
	--z-auth-measure: 24rem;
	--z-register-measure: var(--z-auth-measure);
	/* Register flow: address + password side by side on desktop */
	--z-register-flow-measure: 64rem;

	--z-chrome: var(--z-surface-raised);
	--z-chrome-active: var(--z-surface-sunken);

	--z-scrollbar-size: 0.625rem;
	--z-scrollbar-track: transparent;
	--z-scrollbar-thumb: color-mix(in srgb, var(--z-border-strong) 72%, transparent);
	--z-scrollbar-thumb-hover: color-mix(in srgb, var(--z-fg-subtle) 68%, transparent);
}

:root.dark {
	color-scheme: dark;

	--z-surface: #101010;
	--z-surface-raised: #191919;
	--z-surface-sunken: color-mix(in srgb, var(--z-surface) 92%, var(--z-fg) 8%);
	--z-chrome: var(--z-surface);
	--z-chrome-active: color-mix(in srgb, var(--z-surface) 86%, var(--z-fg) 14%);
	--z-border: #272727;
	--z-border-strong: #383838;
	--z-divider: var(--z-border-strong);
	--z-fg: #ededec;
	--z-fg-muted: #a8a8a6;
	--z-fg-subtle: #787774;
	--z-accent: #4d78cc;
	--z-accent-hover: #5e87d4;
	--z-accent-fg: #ffffff;
	--z-unread: #4d78cc;
	--z-star: #d4a017;
	--z-success: #52b788;
	--z-warning: #d4a017;

	--z-brand-mark: #4d78cc;

	--z-scrollbar-thumb: color-mix(in srgb, var(--z-border-strong) 88%, transparent);
	--z-scrollbar-thumb-hover: color-mix(in srgb, var(--z-fg-subtle) 58%, transparent);
}

@media (prefers-color-scheme: dark) {
	:root:not(.light) {
		color-scheme: dark;

		--z-surface: #101010;
		--z-surface-raised: #191919;
		--z-surface-sunken: color-mix(in srgb, var(--z-surface) 92%, var(--z-fg) 8%);
		--z-chrome: var(--z-surface);
		--z-chrome-active: color-mix(in srgb, var(--z-surface) 86%, var(--z-fg) 14%);
		--z-border: #272727;
		--z-border-strong: #383838;
		--z-divider: var(--z-border-strong);
		--z-fg: #ededec;
		--z-fg-muted: #a8a8a6;
		--z-fg-subtle: #787774;
		--z-accent: #4d78cc;
		--z-accent-hover: #5e87d4;
		--z-accent-fg: #ffffff;
		--z-unread: #4d78cc;
		--z-star: #d4a017;
		--z-success: #52b788;
		--z-warning: #d4a017;

		--z-brand-mark: #4d78cc;

		--z-scrollbar-thumb: color-mix(in srgb, var(--z-border-strong) 88%, transparent);
		--z-scrollbar-thumb-hover: color-mix(in srgb, var(--z-fg-subtle) 58%, transparent);
	}
}


/**
 * Circadian layer — maps animated primitives to existing --z-* tokens.
 * Active when html[data-theme="circadian"].
 *
 * JS sets --z-c-s-* (surface) and --z-c-f-* (foreground) every ~60s.
 * CSS transitions handle the imperceptible drift between ticks.
 */

@property --z-c-s-h {
	syntax: '<number>';
	inherits: true;
	initial-value: 60;
}

@property --z-c-s-s {
	syntax: '<percentage>';
	inherits: true;
	initial-value: 11%;
}

@property --z-c-s-l {
	syntax: '<percentage>';
	inherits: true;
	initial-value: 98%;
}

@property --z-c-f-h {
	syntax: '<number>';
	inherits: true;
	initial-value: 210;
}

@property --z-c-f-s {
	syntax: '<percentage>';
	inherits: true;
	initial-value: 10%;
}

@property --z-c-f-l {
	syntax: '<percentage>';
	inherits: true;
	initial-value: 11%;
}

:root[data-theme='circadian'] {
	color-scheme: light dark;

	/* JS resamples every ~60s. A short ease on the registered primitives turns
	   each tick — including the dusk/dawn crossover step — into a gentle drift
	   instead of a hard repaint, while staying far too brief to strand the
	   palette at unreadable mid-lightness. */
	transition:
		--z-c-s-h 1200ms ease-in-out,
		--z-c-s-s 1200ms ease-in-out,
		--z-c-s-l 1200ms ease-in-out,
		--z-c-f-h 1200ms ease-in-out,
		--z-c-f-s 1200ms ease-in-out,
		--z-c-f-l 1200ms ease-in-out;

	--z-surface: hsl(var(--z-c-s-h) var(--z-c-s-s) var(--z-c-s-l));
	--z-fg: hsl(var(--z-c-f-h) var(--z-c-f-s) var(--z-c-f-l));

	--z-surface-raised: color-mix(in srgb, var(--z-surface) 88%, white);
	--z-surface-sunken: color-mix(in srgb, var(--z-surface) 92%, var(--z-fg) 8%);
	--z-chrome: var(--z-surface-raised);
	--z-chrome-active: var(--z-surface-sunken);

	--z-border: color-mix(in srgb, var(--z-surface) 75%, var(--z-fg) 25%);
	--z-border-strong: color-mix(in srgb, var(--z-surface) 65%, var(--z-fg) 35%);
	--z-divider: var(--z-border-strong);

	--z-fg-muted: color-mix(in srgb, var(--z-fg) 72%, var(--z-surface) 28%);
	--z-fg-subtle: color-mix(in srgb, var(--z-fg) 52%, var(--z-surface) 48%);

	/* Accent stays brand-stable; only hover lightens slightly at night. */
	--z-accent: #3b6abf;
	--z-accent-hover: color-mix(in srgb, var(--z-accent) 85%, white);
	--z-accent-fg: #ffffff;
	--z-unread: var(--z-accent);
	--z-star: #956400;
	--z-danger: #c03734;
	--z-success: #2d6a4f;
	--z-warning: #956400;
	--z-brand-mark: var(--z-accent);

	--z-scrollbar-thumb: color-mix(in srgb, var(--z-border-strong) 72%, transparent);
	--z-scrollbar-thumb-hover: color-mix(in srgb, var(--z-fg-subtle) 68%, transparent);

	--shadow-sm: 0 1px 3px rgb(0 0 0 / 0.04), 0 1px 2px rgb(0 0 0 / 0.02);
	--shadow-md: 0 4px 16px rgb(0 0 0 / 0.07), 0 1px 4px rgb(0 0 0 / 0.03);
}

:root[data-theme='circadian'][data-circadian-dark] {
	--z-accent: #6a9de8;
	--z-accent-hover: #7aa8eb;
	--z-unread: var(--z-accent);
	--z-brand-mark: var(--z-accent);
	--z-star: #e0b030;
	--z-success: #5ec492;
	--z-warning: #e0b030;
	--z-chrome: var(--z-surface);
	--z-chrome-active: color-mix(in srgb, var(--z-surface) 84%, var(--z-fg) 16%);
	--z-surface-raised: color-mix(in srgb, var(--z-surface) 88%, var(--z-fg) 12%);

	/*
	 * Night secondary text. The default mixes fg *toward* the surface, which on
	 * a dark surface drags muted/subtle down into near-invisibility. On dark
	 * backgrounds, bias hard toward fg so secondary text stays legible
	 * (mirrors the fixed dark theme's contrast).
	 */
	--z-fg-muted: color-mix(in srgb, var(--z-fg) 88%, var(--z-surface) 12%);
	--z-fg-subtle: color-mix(in srgb, var(--z-fg) 74%, var(--z-surface) 26%);
	--z-border: color-mix(in srgb, var(--z-surface) 68%, var(--z-fg) 32%);
	--z-border-strong: color-mix(in srgb, var(--z-surface) 55%, var(--z-fg) 45%);

	--shadow-sm: none;
	--shadow-md: none;
}

@media (prefers-reduced-motion: reduce) {
	:root[data-theme='circadian'] {
		transition: none;
	}
}


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

html {
	font-family: var(--font-sans);
	-webkit-font-smoothing: antialiased;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100dvh;
	background-color: var(--z-surface);
	color: var(--z-fg);
	line-height: 1.5;
}

* {
	scrollbar-width: thin;
	scrollbar-color: var(--z-scrollbar-thumb) var(--z-scrollbar-track);
}

*::-webkit-scrollbar {
	width: var(--z-scrollbar-size);
	height: var(--z-scrollbar-size);
}

*::-webkit-scrollbar-track {
	background: var(--z-scrollbar-track);
}

*::-webkit-scrollbar-thumb {
	background-color: var(--z-scrollbar-thumb);
	border: 2px solid transparent;
	border-radius: 9999px;
	background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
	background-color: var(--z-scrollbar-thumb-hover);
}

::selection {
	background: color-mix(in srgb, var(--z-accent) 25%, transparent);
}

:where(a[href], button, label:has(input:not([type='hidden'])), select, summary, [role='button']) {
	cursor: pointer;
}

:where(input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']), textarea) {
	cursor: text;
}

:where(a, button, input, textarea, select, [role='button']):focus-visible {
	outline: 2px solid var(--z-accent);
	outline-offset: 2px;
}

@media (max-width: 767px) {
	input:not(
			[type='checkbox'],
			[type='radio'],
			[type='range'],
			[type='file'],
			[type='hidden'],
			[type='color'],
			[type='button'],
			[type='submit'],
			[type='reset']
		),
	textarea,
	select {
		font-size: 1rem;
	}
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@keyframes z-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes z-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* Floating label input — sv-animations label-input pattern */

.z-label-input {
	position: relative;
	display: block;
	--z-label-notch-bg: var(--z-surface-raised);
}

.z-label-input__field {
	display: block;
	width: 100%;
	height: 2.75rem;
	border: 1px solid var(--z-border);
	border-radius: var(--radius-md);
	background-color: var(--z-surface-raised);
	color: var(--z-fg);
	padding: 0.625rem 0.875rem;
	font: inherit;
	font-size: 1rem;
	line-height: 1.25;
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		background-color 180ms ease;
}

@media (min-width: 768px) {
	.z-label-input__field {
		font-size: 0.875rem;
	}
}

.z-label-input__field::placeholder {
	color: var(--z-fg-subtle);
	opacity: 0;
	transition: opacity 180ms ease;
}

.z-label-input__field:focus::placeholder {
	opacity: 1;
}

.z-label-input__field:hover:not(:disabled) {
	border-color: var(--z-border-strong);
}

.z-label-input__field:focus,
.z-label-input__field:focus-visible {
	outline: none;
}

.z-label-input:focus-within .z-label-input__field {
	border-color: color-mix(in srgb, var(--z-accent) 45%, var(--z-border-strong));
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--z-accent) 18%, transparent);
}

.z-label-input__field:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.z-label-input__label {
	position: absolute;
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	max-width: calc(100% - 1.75rem);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	pointer-events: none;
	font-size: 0.9375rem;
	line-height: 1;
	color: var(--z-fg-subtle);
	background-color: transparent;
	padding: 0 0.25rem;
	transition:
		top 180ms cubic-bezier(0.16, 1, 0.3, 1),
		transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
		font-size 180ms cubic-bezier(0.16, 1, 0.3, 1),
		color 180ms ease,
		background-color 180ms ease;
}

@media (min-width: 768px) {
	.z-label-input__label {
		font-size: 0.875rem;
	}
}

.z-label-input:focus-within .z-label-input__label,
.z-label-input.is-filled .z-label-input__label,
.z-label-input__field:not(:placeholder-shown) + .z-label-input__label {
	top: 0;
	left: 0.625rem;
	transform: translateY(-50%);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--z-fg-muted);
	background-color: var(--z-label-notch-bg);
}

.z-label-input:focus-within .z-label-input__label {
	color: var(--z-accent);
}

.z-label-input--password .z-label-input__field {
	padding-right: 2.5rem;
}

.z-label-input__toggle {
	position: absolute;
	top: 50%;
	right: 0.375rem;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: none;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--z-fg-subtle);
	cursor: pointer;
	transition:
		color 150ms ease,
		background-color 150ms ease;
}

.z-label-input__toggle:hover {
	color: var(--z-fg);
	background-color: var(--z-surface-sunken);
}

.z-label-input__toggle:focus-visible {
	outline: 2px solid var(--z-accent);
	outline-offset: 1px;
}

.z-label-input__icon {
	display: block;
}

.z-label-input--compact .z-label-input__field {
	height: 2.5rem;
}

.z-label-input--compact .z-label-input__field:not(:placeholder-shown) + .z-label-input__label,
.z-label-input--compact:focus-within .z-label-input__label,
.z-label-input--compact.is-filled .z-label-input__label {
	top: 0;
	transform: translateY(-50%);
}

/* Multi-line variant: auto-height textarea with a top-anchored label. */
.z-label-input--area .z-label-input__field {
	height: auto;
	min-height: 5rem;
	padding-top: 1rem;
	resize: vertical;
}

.z-label-input--area .z-label-input__label {
	top: 1.25rem;
	transform: none;
}

.z-label-input--area:focus-within .z-label-input__label,
.z-label-input--area.is-filled .z-label-input__label,
.z-label-input--area .z-label-input__field:not(:placeholder-shown) + .z-label-input__label {
	top: 0;
	transform: translateY(-50%);
}


/* Shared UI components */

.z-panel {
	border-bottom: 1px solid var(--z-border);
	background-color: var(--z-chrome);
}

.z-btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: none;
	border-radius: var(--radius-sm);
	background-color: var(--z-accent);
	color: var(--z-accent-fg);
	padding: 0.5rem 1rem;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color 150ms ease,
		transform 100ms ease;
}

.z-btn-primary:hover {
	background-color: var(--z-accent-hover);
	color: var(--z-accent-fg);
}

.z-btn-primary:active {
	transform: scale(0.98);
}

.z-btn-primary:disabled,
.z-btn-primary[aria-disabled='true'] {
	opacity: 0.5;
	pointer-events: none;
}

.z-btn-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: none;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--z-fg-muted);
	padding: 0.5rem 0.75rem;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color 150ms ease,
		color 150ms ease;
}

.z-btn-ghost:hover {
	background-color: var(--z-surface-sunken);
	color: var(--z-fg);
}

.z-btn-danger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: none;
	border-radius: var(--radius-sm);
	background: color-mix(in srgb, var(--z-danger) 12%, transparent);
	color: var(--z-danger);
	padding: 0.5rem 0.75rem;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	cursor: pointer;
	transition:
		background-color 150ms ease,
		color 150ms ease;
}

.z-btn-danger:hover {
	background-color: var(--z-danger);
	color: #fff;
}

.z-btn-sm {
	padding: 0.25rem 0.625rem;
	font-size: 0.75rem;
}

.z-btn-block {
	width: 100%;
}

.z-btn-lg {
	padding: 0.625rem 1rem;
	font-size: 0.9375rem;
}

.z-input {
	display: block;
	width: 100%;
	border: 1px solid var(--z-border);
	border-radius: var(--radius-sm);
	background-color: var(--z-surface-raised);
	color: var(--z-fg);
	padding: 0.5rem 0.75rem;
	font: inherit;
	font-size: 1rem;
	line-height: 1.5;
	transition:
		border-color 150ms ease,
		box-shadow 150ms ease;
}

@media (min-width: 768px) {
	.z-input {
		font-size: 0.875rem;
	}
}

.z-input::placeholder {
	color: var(--z-fg-subtle);
}

.z-input:hover {
	border-color: var(--z-border-strong);
}

.z-input:focus {
	outline: none;
	border-color: var(--z-border-strong);
	box-shadow: 0 0 0 1px var(--z-border-strong);
}

.z-card {
	background-color: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.z-card--raised {
	background-color: var(--z-surface-raised);
	border: 1px solid var(--z-border);
	border-radius: var(--radius-md);
	box-shadow: none;
}

.z-card__body {
	padding: 1.25rem;
}

.z-type-brand {
	color: var(--z-fg);
	font-size: 1rem;
	font-weight: 800;
	letter-spacing: -0.04em;
	text-decoration: none;
}

.z-type-brand:hover {
	color: var(--z-fg-muted);
}

.z-type-title {
	margin: 0;
	font-size: clamp(1.375rem, 2.5vw, 1.75rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: var(--z-fg);
}

.z-type-lead {
	margin: 0;
	font-size: 1rem;
	color: var(--z-fg-muted);
}

.z-type-label {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--z-fg-subtle);
}

.z-field-label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--z-fg);
}

.z-field {
	margin-bottom: 1rem;
}

.z-link {
	color: var(--z-accent);
	text-decoration: none;
}

.z-link:hover {
	color: var(--z-accent-hover);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.z-link-muted {
	color: var(--z-fg-muted);
	text-decoration: none;
}

.z-link-muted:hover {
	color: var(--z-fg);
	text-decoration: underline;
}

.z-alert {
	display: none;
	padding: 0.75rem 0.875rem;
	border-radius: var(--radius-md);
	font-size: 0.875rem;
	margin-bottom: 1rem;
}

.z-alert.is-visible,
.z-alert--error.is-visible,
.z-alert--success.is-visible {
	display: block;
}

.z-alert--error {
	background: color-mix(in srgb, var(--z-danger) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--z-danger) 25%, transparent);
	color: var(--z-danger);
}

.z-alert--success {
	background: color-mix(in srgb, var(--z-success) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--z-success) 25%, transparent);
	color: var(--z-success);
}

.z-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 600;
	border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
	line-height: 1;
}

.z-badge::before {
	content: '';
	display: inline-block;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	margin-right: 0.35rem;
	background-color: currentColor;
}

.z-badge--success {
	background: color-mix(in srgb, var(--z-success) 12%, transparent);
	color: var(--z-success);
}

.z-badge--warning {
	background: color-mix(in srgb, var(--z-warning) 12%, transparent);
	color: var(--z-warning);
}

.z-badge--danger {
	background: color-mix(in srgb, var(--z-danger) 12%, transparent);
	color: var(--z-danger);
}

.z-badge--pending {
	background: color-mix(in srgb, var(--z-accent) 12%, transparent);
	color: var(--z-accent);
}

.z-spinner {
	display: inline-block;
	width: 1rem;
	height: 1rem;
	border: 2px solid var(--z-border);
	border-top-color: var(--z-accent);
	border-radius: 50%;
	animation: z-spin 0.7s linear infinite;
}

.z-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	text-align: left;
}

.z-table th,
.z-table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--z-border);
}

.z-table th {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--z-fg-subtle);
	background-color: var(--z-surface-sunken);
}

.z-table tbody tr:hover {
	background-color: var(--z-surface-sunken);
}

.z-table tbody tr:last-child td {
	border-bottom: none;
}

.z-stat-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

@media (min-width: 640px) {
	.z-stat-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.z-stat-card {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0.875rem;
}

.z-stat-card__value {
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1;
	color: var(--z-fg);
}

.z-stat-card__value--success {
	color: var(--z-success);
}

.z-stat-card__value--warning {
	color: var(--z-warning);
}

.z-stat-card__value--danger {
	color: var(--z-danger);
}

.z-details summary {
	cursor: pointer;
	color: var(--z-fg-muted);
	font-size: 0.875rem;
	margin-bottom: 0.5rem;
}

.z-details[open] summary {
	margin-bottom: 0.75rem;
}


/* Auth pages — register, webmail sign-in, password reset */

.z-auth-page {
	display: flex;
	min-height: 100dvh;
	align-items: center;
	justify-content: center;
	padding: 2.5rem 1rem;
}

.z-auth-page--in-shell {
	flex: 1;
	min-height: 0;
	width: 100%;
}

.z-auth-card {
	width: 100%;
	max-width: var(--z-auth-measure);
	min-width: 0;
	padding: 2rem 1.5rem;
	border: 1px solid var(--z-border);
	border-radius: var(--radius-lg);
	background-color: var(--z-surface-raised);
	--z-label-notch-bg: var(--z-surface-raised);
}

@media (min-width: 480px) {
	.z-auth-card {
		padding: 2.25rem 2rem;
	}
}

.z-auth-hero {
	margin-bottom: 2rem;
	text-align: center;
}

.z-auth-hero--compact {
	margin-bottom: 1.5rem;
}

.z-auth-sprite {
	display: flex;
	justify-content: center;
	margin-bottom: 1rem;
	color: var(--z-accent);
}

.z-auth-sprite img,
.z-auth-sprite svg {
	display: block;
	height: auto;
}

.z-auth-brand {
	font-size: 1.5rem;
	line-height: 1.1;
}

.z-auth-tagline {
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--z-fg-muted);
}

.z-auth-aside {
	margin-top: 1.5rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--z-fg-muted);
	text-align: center;
}

.z-auth-footer {
	margin-top: 2rem;
	text-align: center;
	font-size: 0.75rem;
	color: var(--z-fg-subtle);
}

.z-form-stack {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
}

.z-field-stack {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.z-callout {
	padding: 0.625rem 0.75rem;
	border: 1px solid color-mix(in srgb, var(--z-accent) 28%, transparent);
	border-radius: var(--radius-lg);
	background: color-mix(in srgb, var(--z-accent) 5%, transparent);
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--z-fg);
}

.z-callout:not(.z-hidden) {
	margin-bottom: 0;
}

.z-callout__title {
	display: block;
	font-weight: 600;
}

.z-callout__body {
	margin: 0.25rem 0 0;
	color: var(--z-fg-muted);
}

.z-btn-lg {
	padding: 0.625rem 1rem;
	font-size: 0.9375rem;
}

.z-link {
	color: var(--z-accent);
	text-decoration: none;
}

.z-link:hover {
	color: var(--z-accent-hover);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.z-link-muted {
	color: var(--z-fg-muted);
	text-decoration: none;
}

.z-link-muted:hover {
	color: var(--z-fg);
	text-decoration: underline;
}


/* Site shell — register.zaur.app ↔ webmail cross-nav */

.z-site-shell {
	display: flex;
	min-height: 100dvh;
	flex-direction: column;
}

.z-site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	height: var(--height-header);
}

.z-site-header__inner {
	display: flex;
	height: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: min(var(--z-register-flow-measure), 92vw);
	margin-inline: auto;
	padding-inline: 1rem;
}

.z-site-nav {
	display: flex;
	align-items: center;
	gap: 0.125rem;
	margin-left: 0.25rem;
	padding-left: 0.75rem;
	border-left: 1px solid color-mix(in srgb, var(--z-border) 70%, transparent);
}

.z-site-nav__link {
	display: inline-flex;
	align-items: center;
	padding: 0.375rem 0.625rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--z-fg-muted);
	text-decoration: none;
	transition:
		color 150ms ease,
		text-decoration-color 150ms ease;
}

.z-site-nav__link:hover {
	color: var(--z-fg);
}

.z-site-nav__link--active {
	color: var(--z-fg);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.35rem;
	text-decoration-thickness: 2px;
	text-decoration-color: color-mix(in srgb, var(--z-fg) 30%, transparent);
}

.z-site-main {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.z-site-footer {
	margin-top: auto;
	border-top: 1px solid var(--z-border);
	background-color: var(--z-chrome);
	padding-block: 0.875rem;
}

.z-site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	width: min(var(--z-register-flow-measure), 92vw);
	margin-inline: auto;
	padding-inline: 1rem;
	font-size: 0.75rem;
	color: var(--z-fg-subtle);
}


/* Register flow */

.z-auth-page--register {
	align-items: flex-start;
	padding-block: 1.25rem 2rem;
}

@media (min-width: 768px) {
	.z-auth-page--register {
		padding-block: 1.75rem 2.5rem;
	}
}

.z-auth-card--register {
	max-width: var(--z-register-flow-measure);
	padding-inline: clamp(1.25rem, 4vw, 2.25rem);
}

@media (min-width: 768px) {
	.z-auth-card--register {
		padding-inline: 3rem;
		padding-block: 2.75rem;
	}
}

.z-auth-hero--register {
	margin-bottom: 1.25rem;
}

.z-auth-hero--register .z-auth-hero__row {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	text-align: left;
}

.z-auth-hero--register .z-auth-sprite {
	margin-bottom: 0;
	flex-shrink: 0;
}

.z-auth-hero--register .z-auth-tagline {
	margin-top: 0.25rem;
}

.z-register-flow {
	margin-top: 0;
}

#apply-intro:not(.z-hidden) {
	margin-bottom: 1.5rem;
}

.z-register-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
}

@media (min-width: 768px) {
	.z-register-split {
		grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
		gap: 0;
		align-items: start;
	}

	.z-register-pick {
		padding-right: 2.75rem;
		border-right: 1px solid var(--z-divider);
	}

	.z-register-create {
		display: block;
		padding-left: 2.75rem;
		padding-right: 0.125rem;
	}

	.z-register-create.z-panel-collapsible {
		display: block;
	}
}

.z-register-create {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.z-register-create__heading {
	margin: 0 0 1rem;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--z-fg-subtle);
}

.z-register-create__idle {
	display: none;
	margin: 0;
	min-height: 12rem;
	border: 1px dashed var(--z-border);
	border-radius: var(--radius-md);
	background: color-mix(in srgb, var(--z-surface-sunken) 40%, transparent);
}

@media (min-width: 768px) {
	.z-register-create__idle {
		display: block;
	}

	.z-register-create.is-visible .z-register-create__idle {
		display: none;
	}

	.z-register-create__body {
		display: none;
	}

	.z-register-create.is-visible .z-register-create__body {
		display: block;
	}
}

@media (max-width: 767px) {
	.z-register-create.z-panel-collapsible {
		display: none;
	}

	.z-register-create.z-panel-collapsible.is-visible {
		display: block;
		margin-top: 0.5rem;
		padding-top: 1.5rem;
		border-top: 1px solid var(--z-divider);
	}

	.z-register-create__idle {
		display: none !important;
	}
}

.z-register-create.is-visible .z-register-create__body {
	display: block;
}

.z-invite-status {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 0.625rem;
	margin-bottom: 1.25rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--z-border);
	border-radius: var(--radius-md);
	background: var(--z-surface);
	font-size: 0.875rem;
	line-height: 1.4;
}

.z-invite-status__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.125rem 0.5rem;
	border-radius: var(--radius-sm);
	background: color-mix(in srgb, var(--z-success) 12%, transparent);
	color: var(--z-success);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.z-invite-status__email {
	color: var(--z-fg-muted);
	word-break: break-all;
}

#register-content.has-invitation .z-auth-hero--register {
	margin-bottom: 1rem;
}

.z-selected-address {
	margin-bottom: 1rem;
	padding: 0.625rem 0.75rem;
	border: 1px solid color-mix(in srgb, var(--z-accent) 18%, var(--z-border));
	border-radius: var(--radius-md);
	background: color-mix(in srgb, var(--z-accent) 4%, var(--z-surface-raised));
}

.z-selected-address__email {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--z-fg);
	word-break: break-all;
}

.z-domain-pick-label {
	margin: 0.875rem 0 0;
}

@media (max-width: 767px) {
	.z-register-pick,
	.z-register-create.z-panel-collapsible.is-visible {
		padding-inline: 0;
	}

	button.z-domain-option.available {
		min-height: 2.75rem;
	}

	.z-selected-address {
		margin-bottom: 0.875rem;
	}

	.z-register-create__heading {
		display: block;
		margin-bottom: 0.75rem;
	}
}

.z-domain-pick-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	margin-top: 0.5rem;
	border: 1px solid var(--z-border);
	border-radius: var(--radius-md);
	background: var(--z-surface);
	overflow: hidden;
}

.z-domain-pick-list {
	display: flex;
	flex-direction: column;
	margin-top: 0.5rem;
	border: 1px solid var(--z-border);
	border-radius: var(--radius-md);
	background: var(--z-surface);
	overflow: hidden;
}

.z-domain-option {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	margin: 0;
	padding: 0.625rem 0.875rem;
	border: none;
	border-bottom: 1px solid var(--z-divider);
	border-radius: 0;
	background: transparent;
	color: var(--z-fg);
	font: inherit;
	text-align: left;
	transition:
		background-color 120ms ease,
		box-shadow 120ms ease;
}

.z-domain-pick-list .z-domain-option:last-child {
	border-bottom: none;
}

.z-domain-pick-grid .z-domain-option {
	flex-direction: row;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 0.875rem;
	border: none;
	border-bottom: 1px solid var(--z-divider);
	border-radius: 0;
	background: transparent;
}

.z-domain-pick-grid .z-domain-option:last-child {
	border-bottom: none;
}

.z-domain-pick-grid .z-domain-option__addr {
	font-size: 0.8125rem;
}

.z-domain-pick-grid .z-domain-option__status {
	font-size: 0.75rem;
}

button.z-domain-option.available {
	cursor: pointer;
}

button.z-domain-option.available:hover {
	background: var(--z-surface-sunken);
}

.z-domain-pick-grid button.z-domain-option.available:hover {
	background: var(--z-surface-sunken);
}

.z-domain-option.selected {
	background: color-mix(in srgb, var(--z-accent) 6%, var(--z-surface));
	box-shadow: inset 3px 0 0 var(--z-accent);
}

.z-domain-pick-grid .z-domain-option.selected {
	box-shadow: inset 2px 0 0 var(--z-accent);
}

.z-domain-option.taken {
	opacity: 0.5;
}

.z-domain-option__addr {
	flex: 1;
	min-width: 0;
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.z-domain-option__status {
	flex-shrink: 0;
	font-size: 0.75rem;
}

.z-domain-option__status .z-spinner {
	width: 0.875rem;
	height: 0.875rem;
}

.z-theme-toggle {
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	font-size: inherit;
	color: var(--z-accent);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.z-theme-toggle:hover {
	color: var(--z-accent-hover);
}

.z-section {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--z-divider);
}

.z-section:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.z-section .z-type-lead {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.55;
}

.z-panel-collapsible {
	display: none;
}

.z-panel-collapsible.is-visible {
	display: block;
}

/* Domain selector */

.z-domain-list {
	margin-top: 0.75rem;
	border-top: 1px solid var(--z-divider);
}

.z-results-header {
	margin-top: 1rem;
	margin-bottom: 0.375rem;
}

.z-results-empty {
	padding: 1.25rem 0;
	text-align: center;
	color: var(--z-fg-muted);
	font-size: 0.875rem;
}

.z-result-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--z-divider);
	transition: background-color 150ms ease;
}

.z-result-row:last-child {
	border-bottom: none;
}

.z-result-row.available {
	cursor: pointer;
	border-radius: var(--radius-sm);
	margin-inline: -0.375rem;
	padding-inline: 0.375rem;
}

.z-result-row.available:hover {
	background-color: var(--z-surface-sunken);
}

.z-result-row.selected {
	background: color-mix(in srgb, var(--z-accent) 6%, transparent);
	box-shadow: inset 2px 0 0 var(--z-accent);
}

.z-result-row.taken {
	opacity: 0.55;
	cursor: default;
}

.z-result-domain {
	font-size: 0.9375rem;
	color: var(--z-fg);
	min-width: 0;
}

.z-result-name {
	font-weight: 600;
}

.z-result-tld {
	color: var(--z-fg-muted);
}

.z-result-status {
	font-size: 0.8125rem;
	flex-shrink: 0;
}

.z-result-status.available {
	color: var(--z-success);
	font-weight: 500;
}

.z-result-status.taken {
	color: var(--z-fg-subtle);
}

.z-validation-hint {
	min-height: 1.25rem;
	margin-top: 0.375rem;
	font-size: 0.8125rem;
	color: var(--z-danger);
}

.z-domain-teaser {
	margin-top: 1rem;
}

.z-domain-teaser__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
}

.z-domain-teaser__item {
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	line-height: 1;
	padding: 0.375rem 0.5rem;
	border: 1px solid var(--z-border);
	border-radius: var(--radius-sm);
	background: var(--z-surface);
	color: var(--z-fg);
}

.z-domain-teaser__sample {
	margin: 0.875rem 0 0;
	font-family: var(--font-mono);
	font-size: 1rem;
	line-height: 1.4;
	color: var(--z-fg-subtle);
}

.z-domain-teaser__name {
	color: var(--z-fg);
	font-weight: 600;
}

.z-domain-teaser__at {
	color: var(--z-fg-muted);
}

.z-domain-teaser__hint {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--z-fg-subtle);
}

/* Password strength */

.z-strength-bar {
	height: 3px;
	margin-top: 0.5rem;
	border-radius: 999px;
	background: var(--z-border);
	overflow: hidden;
}

.z-strength-fill {
	height: 100%;
	width: 0;
	border-radius: 999px;
	transition:
		width 0.3s ease,
		background 0.3s ease;
}

.z-strength-fill[data-score='1'] {
	width: 25%;
	background: var(--z-danger);
}

.z-strength-fill[data-score='2'] {
	width: 50%;
	background: var(--z-warning);
}

.z-strength-fill[data-score='3'] {
	width: 75%;
	background: color-mix(in srgb, var(--z-accent) 70%, var(--z-success));
}

.z-strength-fill[data-score='4'] {
	width: 100%;
	background: var(--z-success);
}

.z-strength-label {
	min-height: 1rem;
	margin-top: 0.25rem;
	font-size: 0.75rem;
	color: var(--z-fg-subtle);
}

.z-captcha-row {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.625rem;
}

@media (min-width: 480px) {
	.z-captcha-row {
		flex-direction: row;
		align-items: center;
		gap: 0.75rem;
	}

	.z-captcha-row .z-label-input {
		flex: 0 0 6.5rem;
	}
}

.z-captcha-question {
	flex: 1;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--z-fg);
}

/* Success page */

.z-success-email {
	margin: 0.75rem 0 0;
	font-size: clamp(1.0625rem, 2vw, 1.25rem);
	font-weight: 600;
	color: var(--z-fg);
}

.z-action-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.z-settings-table td:first-child {
	width: 40%;
	color: var(--z-fg-muted);
}

/* Admin dashboard — editorial, settings-inspired */

.z-admin-shell {
	min-height: 100dvh;
	padding: 2rem 1rem 3rem;
}

.z-admin-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: var(--z-measure);
	margin: 0 auto 2rem;
}

.z-admin-content {
	max-width: var(--z-measure);
	margin-inline: auto;
}

.z-admin-shell--wide .z-admin-content,
.z-admin-shell--wide .z-admin-topbar {
	max-width: var(--z-measure-wide);
}

.z-admin-split {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 960px) {
	.z-admin-split {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}
}

.z-admin-split .z-admin-section {
	border-top: none;
	padding-top: 0;
}

.z-status-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.z-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.25rem 0.625rem;
	border: 1px solid var(--z-divider);
	border-radius: var(--radius-sm);
	font-size: 0.8125rem;
	color: var(--z-fg-muted);
}

.z-status-pill.is-ok {
	border-color: color-mix(in srgb, var(--z-success) 35%, var(--z-divider));
	color: var(--z-success);
}

.z-status-pill.is-warn {
	border-color: color-mix(in srgb, var(--z-warning) 35%, var(--z-divider));
	color: var(--z-warning);
}

.z-status-pill.is-off {
	opacity: 0.72;
}

.z-account-lookup-result {
	margin-top: 0.75rem;
	padding: 0.75rem 0;
	border-top: 1px solid var(--z-divider);
	font-size: 0.875rem;
}

.z-account-lookup-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.375rem 0;
}

.z-account-lookup-label {
	color: var(--z-fg-muted);
	min-width: 5rem;
}

.z-inline-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.z-page-intro {
	margin-bottom: 1.5rem;
}

.z-page-intro .z-type-lead {
	margin-top: 0.375rem;
	font-size: 0.875rem;
}

.z-stat-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--z-divider);
}

@media (min-width: 640px) {
	.z-stat-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.z-stat-card {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.z-stat-card__value {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1;
	color: var(--z-fg);
}

.z-stat-card__value--success {
	color: var(--z-success);
}

.z-stat-card__value--warning {
	color: var(--z-warning);
}

.z-stat-card__value--danger {
	color: var(--z-danger);
}

.z-admin-section {
	padding-block: 1.25rem;
	border-top: 1px solid var(--z-divider);
}

.z-admin-section:first-child {
	border-top: none;
	padding-top: 0;
}

.z-section-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
}

.z-table-scroll {
	overflow-x: auto;
	border-block: 1px solid var(--z-divider);
}

.z-audit-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.5rem;
	margin-top: 0.75rem;
	padding-bottom: 0.75rem;
}

@media (min-width: 640px) {
	.z-audit-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.z-audit-results {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

@media (min-width: 640px) {
	.z-audit-results {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.z-audit-list {
	border-top: 1px solid var(--z-divider);
}

.z-audit-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--z-divider);
	font-size: 0.875rem;
}

.z-audit-row:last-child {
	border-bottom: none;
}

.z-audit-empty {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: var(--z-fg-muted);
}

.z-td-code {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-mono);
	font-size: 0.875rem;
}

.z-code-text {
	font-weight: 600;
}

.z-btn-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem;
	border: none;
	border-radius: var(--radius-sm);
	background: none;
	color: var(--z-fg-subtle);
	cursor: pointer;
}

.z-btn-copy:hover {
	color: var(--z-fg);
	background: var(--z-surface-sunken);
}

.z-btn-copy.is-copied {
	color: var(--z-success);
}

.z-icon-copy {
	width: 1rem;
	height: 1rem;
	fill: currentColor;
}

.z-used-meta {
	font-size: 0.8125rem;
	color: var(--z-fg-muted);
}

.z-dashboard {
	animation: z-fade-in 0.35s ease-out;
}

.z-stack {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.z-stack-lg {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.z-mb-4 {
	margin-bottom: 1rem;
}

.z-mb-6 {
	margin-bottom: 1.5rem;
}

.z-text-muted {
	color: var(--z-fg-muted);
}

.z-text-subtle {
	color: var(--z-fg-subtle);
}

.z-text-hint {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
}

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

.z-hidden {
	display: none !important;
}
