/* ZLXWR account system — sign-in, player dashboard, owner dashboard, legal pages.
 * Design system: Ice Grey canvas, white cards, Obsidian glass sidebar, Racing Red for action and energy.
 * The pages run under a strict CSP: no inline styles, no external fonts — system fonts only. */

:root {
	/* Palette: Obsidian Black + Ice Grey set the mood, Racing Red gives the energy. */
	--white: #ffffff;
	--paper: #dfe5eb;       /* Ice Grey canvas */
	--obsidian: #111217;
	--obsidian-2: #1a1c22;
	--obsidian-3: #262931;
	--ink: #111217;
	--ink-2: #464b56;
	--ink-3: #5c616c;       /* small text stays at 4.5:1+ on white and Ice Grey */
	--brand: #ef233c;       /* Racing Red: accents, focus, stars, active states */
	--brand-hover: #bd1a2f;
	--brand-fill: #d41e35;  /* behind white text: 5:1 */
	--brand-ink: #c11a30;   /* small red text on light: 4.7:1+ */
	--brand-tint: rgba(239, 35, 60, .10);
	--brand-ring: rgba(239, 35, 60, .22);
	--attention: #d41e35;

	--good: #1a7f37;
	--good-tint: rgba(52, 199, 89, .14);
	--warn: #a15c00;
	--warn-tint: rgba(255, 159, 10, .16);
	--bad: #b3001b;
	--bad-tint: rgba(239, 35, 60, .10);

	--line: rgba(17, 18, 23, .08);
	--line-strong: rgba(17, 18, 23, .14);
	--hover: rgba(17, 18, 23, .05);

	--glass-strong: rgba(255, 255, 255, .82);

	/* Shape, depth, motion */
	--r-s: 10px;
	--r-m: 12px;
	--r-l: 18px;
	--r-xl: 24px;
	--shadow-s: 0 1px 2px rgba(17, 18, 23, .05);
	--shadow-m: 0 14px 40px rgba(17, 18, 23, .12), 0 2px 6px rgba(17, 18, 23, .05);
	--ease: cubic-bezier(.22, .8, .24, 1);
	--fast: .18s;

	--font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--serif: "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	color: var(--ink);
	background: var(--paper);
	font: 15px/1.5 var(--font);
	letter-spacing: -.005em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--brand-ring); }

h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
a { color: var(--brand-ink); text-decoration: none; transition: color var(--fast); }
a:hover { color: var(--brand); }
code, .z-mono { font-family: var(--mono); font-size: .92em; }
.z-mono { overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Liquid Glass — floating surfaces only (sidebar, sign-in card, dialogs, toasts).
 * Clear body, light blur with boosted saturation, a bright specular rim and an inner glow. */
.z-side, .z-auth-card, .z-dialog, .z-toast {
	position: relative;
	background: linear-gradient(135deg, rgba(255, 255, 255, .50), rgba(255, 255, 255, .22));
	-webkit-backdrop-filter: blur(14px) saturate(190%) brightness(1.04);
	backdrop-filter: blur(14px) saturate(190%) brightness(1.04);
	border: 1px solid rgba(255, 255, 255, .35);
	box-shadow:
		inset 1.5px 1.5px 0 rgba(255, 255, 255, .85),
		inset -1px -1px 0 rgba(255, 255, 255, .25),
		inset 0 0 24px rgba(255, 255, 255, .3),
		0 14px 44px rgba(17, 18, 23, .13),
		0 2px 6px rgba(0, 0, 0, .05);
}
.z-side::after, .z-auth-card::after, .z-dialog::after {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	padding: 1.2px;
	background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, .15) 30%, rgba(239, 35, 60, .35) 65%, rgba(255, 255, 255, .85) 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
}
.z-dialog, .z-toast { background: linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .62)); }

/* Colour fields behind the glass, so it has something to refract. */
.z-app::before, .z-auth::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(360px 300px at 4% 6%, rgba(239, 35, 60, .34), transparent 70%),
		radial-gradient(260px 220px at 2% 62%, rgba(239, 35, 60, .20), transparent 70%),
		radial-gradient(180px 160px at 14% 92%, rgba(17, 18, 23, .18), transparent 70%),
		radial-gradient(520px 380px at 100% 100%, rgba(239, 35, 60, .08), transparent 70%),
		var(--paper);
}

/* Brand */
.z-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.z-brand:hover { color: var(--ink); }
.z-mark {
	flex: none;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: var(--brand);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 12px rgba(239, 35, 60, .3);
	position: relative;
}
.z-mark::after {
	content: "Z";
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: #fff;
	font: 700 14px/1 var(--font);
}
.z-brand-name { display: block; font-weight: 600; font-size: 16px; letter-spacing: .02em; line-height: 1.15; }
.z-brand small { display: block; color: var(--ink-3); font-size: 11px; font-weight: 500; letter-spacing: .08em; }

/* Sign-in pages */
.z-auth { position: relative; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1fr); min-height: 100vh; overflow: hidden; isolation: isolate; }
.z-auth-brand { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 44px 56px; }
.z-auth-brand > a, .z-auth-pitch, .z-auth-points { position: relative; z-index: 1; }
.z-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.z-glow-a { width: 520px; height: 520px; left: -140px; bottom: -180px; background: rgba(239, 35, 60, .32); animation: z-drift 18s ease-in-out infinite alternate; }
.z-glow-b { width: 380px; height: 380px; right: 14%; top: 14%; background: rgba(239, 35, 60, .30); animation: z-drift 22s ease-in-out infinite alternate-reverse; }
.z-glow-b::after { content: ""; position: absolute; width: 140px; height: 140px; right: -20px; bottom: 10px; border-radius: 50%; background: rgba(17, 18, 23, .25); filter: blur(40px); }
.z-auth-pitch h2 { font-size: clamp(36px, 3.6vw, 54px); line-height: 1.06; letter-spacing: -.035em; font-weight: 700; }
.z-auth-pitch em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--brand); }
.z-auth-pitch p { margin-top: 18px; max-width: 36ch; color: var(--ink-2); font-size: 17px; }
.z-auth-points { list-style: none; display: grid; gap: 10px; color: var(--ink-2); font-size: 14px; }
.z-auth-points li { display: flex; align-items: center; gap: 10px; }
.z-auth-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.z-auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 32px; }
.z-auth-mobile-brand { display: none; margin-bottom: 24px; }
.z-auth-card { width: 100%; max-width: 440px; padding: 36px; border-radius: var(--r-xl); animation: z-rise .45s var(--ease) both; }
.z-auth-card h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.025em; font-weight: 700; }
.z-auth-card .z-sub { margin: 8px 0 26px; color: var(--ink-2); overflow-wrap: anywhere; }
.z-auth-card .z-sub strong { color: var(--ink); font-weight: 600; }
.z-auth-foot { margin-top: 22px; text-align: center; color: var(--ink-2); font-size: 14px; }
.z-step { animation: z-rise .35s var(--ease) both; }

.z-success-icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 18px;
	border-radius: 50%;
	color: var(--good);
	background: var(--good-tint);
	font-size: 22px;
	animation: z-pop .45s var(--ease) both;
}

/* Forms */
.z-field { margin-bottom: 16px; }
.z-field label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 13px; font-weight: 500; }
.z-input, .z-select, .z-textarea {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	color: var(--ink);
	background-color: rgba(255, 255, 255, .9);
	border: 1px solid var(--line-strong);
	border-radius: var(--r-m);
	outline: 0;
	transition: border-color var(--fast), box-shadow var(--fast), background-color var(--fast);
}
.z-textarea { display: block; height: 120px; padding: 11px 14px; resize: vertical; line-height: 1.5; }
.z-select {
	padding-right: 36px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
}
.z-select option { background: #fff; color: var(--ink); }
.z-select-sm { width: auto; height: 40px; font-size: 14px; }
.z-input::placeholder, .z-textarea::placeholder { color: var(--ink-3); }
.z-input:hover, .z-select:hover, .z-textarea:hover { border-color: rgba(0, 0, 0, .2); }
.z-input:focus, .z-select:focus, .z-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); background-color: #fff; }
.z-input:-webkit-autofill, .z-input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--ink);
	box-shadow: 0 0 0 1000px #fff inset;
	caret-color: var(--ink);
}
.z-field.z-has-error .z-input, .z-field.z-has-error .z-textarea { border-color: var(--bad); }
.z-error { margin-top: 6px; color: var(--bad); font-size: 13px; animation: z-rise .2s var(--ease) both; }
.z-form-error { margin: 0 0 12px; }
.z-hint { margin-top: 6px; color: var(--ink-3); font-size: 13px; }
.z-gap { margin-bottom: 18px; }
.z-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.z-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; font-size: 14px; }
.z-check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); cursor: pointer; }
.z-check input { width: 16px; height: 16px; accent-color: var(--brand); }

.z-password { position: relative; }
.z-password .z-input { padding-right: 64px; }
.z-reveal {
	position: absolute;
	right: 5px;
	top: 5px;
	height: 34px;
	padding: 0 10px;
	color: var(--ink-2);
	background: none;
	border: 0;
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
	transition: background var(--fast), color var(--fast);
}
.z-reveal:hover { color: var(--ink); background: var(--hover); }

.z-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.z-meter span { height: 3px; border-radius: 2px; background: var(--line-strong); transition: background .25s; }
.z-meter[data-score="1"] span:nth-child(-n+1) { background: var(--bad); }
.z-meter[data-score="2"] span:nth-child(-n+2) { background: #ff9f0a; }
.z-meter[data-score="3"] span:nth-child(-n+3) { background: #8fb339; }
.z-meter[data-score="4"] span { background: #34c759; }

.z-codes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 8px; }
.z-codes input {
	width: 100%;
	min-width: 0;
	height: 56px;
	padding: 0;
	text-align: center;
	font: 600 23px var(--mono);
	color: var(--ink);
	background: rgba(255, 255, 255, .9);
	border: 1px solid var(--line-strong);
	border-radius: var(--r-m);
	outline: 0;
	transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast) var(--ease);
}
.z-codes input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); transform: translateY(-1px); }
.z-codes.z-shake { animation: z-shake .4s; }
.z-codes.z-shake input { border-color: var(--bad); }

/* Buttons */
.z-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 38px;
	padding: 0 16px;
	color: var(--ink);
	background: rgba(255, 255, 255, .85);
	border: 1px solid var(--line-strong);
	border-radius: var(--r-s);
	font-weight: 500;
	font-size: 14px;
	white-space: nowrap;
	cursor: pointer;
	transition: transform var(--fast) var(--ease), box-shadow var(--fast), background var(--fast), border-color var(--fast), color var(--fast), opacity var(--fast);
}
.z-btn:hover { background: #fff; border-color: rgba(0, 0, 0, .2); color: var(--ink); box-shadow: var(--shadow-s); }
.z-btn:active { transform: scale(.98); }
/* Long labels (e.g. "Send test email to <address>") wrap on phones instead of running off the screen. */
@media (max-width: 600px) { .z-btn { max-width: 100%; height: auto; min-height: 38px; padding-top: 8px; padding-bottom: 8px; white-space: normal; text-align: center; overflow-wrap: anywhere; } }
.z-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.z-btn-primary { color: #fff; background: var(--brand-fill); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.z-btn-primary:hover { color: #fff; background: var(--brand-hover); border-color: transparent; box-shadow: 0 6px 18px rgba(239, 35, 60, .28), inset 0 1px 0 rgba(255, 255, 255, .2); }
.z-btn-danger { color: var(--bad); border-color: rgba(215, 0, 21, .22); }
.z-btn-danger:hover { color: var(--bad); background: var(--bad-tint); border-color: rgba(215, 0, 21, .35); }
.z-btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.z-btn-ghost:hover { background: var(--hover); border-color: transparent; box-shadow: none; }
.z-btn-sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.z-btn-block { width: 100%; height: 46px; border-radius: var(--r-m); font-size: 15px; font-weight: 600; }
.z-side-foot .z-btn-block { height: 38px; font-size: 14px; font-weight: 500; }
.z-btn.z-loading { color: transparent; pointer-events: none; }
.z-btn.z-loading::before {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(0, 0, 0, .15);
	border-top-color: var(--ink-2);
	border-radius: 50%;
	animation: z-spin .7s linear infinite;
}
.z-btn-primary.z-loading::before { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.z-link { padding: 0; color: var(--brand-ink); background: none; border: 0; cursor: pointer; font-size: inherit; }
.z-link:hover { color: var(--brand); }
.z-link:disabled { color: var(--ink-3); cursor: default; }

/* Dashboard layout: a floating glass sidebar beside a window that scrolls on its own. */
.z-app { position: relative; isolation: isolate; display: grid; grid-template-columns: 268px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.z-side {
	display: flex;
	flex-direction: column;
	height: calc(100% - 24px);
	min-height: 0;
	margin: 12px 0 12px 12px;
	padding: 20px 12px 14px;
	border-radius: 22px;
}
.z-side > .z-brand { padding: 0 8px; margin-bottom: 22px; }
.z-nav {
	display: grid;
	flex: 1 1 auto;
	align-content: start;
	gap: 2px;
	min-height: 0;
	margin: 0 -6px 0 0;
	padding: 2px 6px 12px 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-mask-image: linear-gradient(180deg, transparent 0, #000 8px, #000 calc(100% - 16px), transparent 100%);
	mask-image: linear-gradient(180deg, transparent 0, #000 8px, #000 calc(100% - 16px), transparent 100%);
}
.z-nav a {
	position: relative;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 38px;
	padding: 0 12px;
	color: var(--ink-2);
	font-size: 14px;
	border-radius: var(--r-s);
	transition: background var(--fast), color var(--fast);
}
.z-nav a:hover { color: var(--ink); background: var(--hover); }
.z-nav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-tint); font-weight: 600; }
.z-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--attention); color: var(--ink); font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.z-side-foot { flex: none; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.z-side-foot .z-switch { display: block; margin: 0 8px 10px; color: var(--brand-ink); font-weight: 500; }
.z-side-foot .z-who { margin: 0 8px 10px; color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.z-side-foot .z-who strong { color: var(--ink); font-weight: 600; }

.z-nav, .z-main { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .18) transparent; }
.z-nav::-webkit-scrollbar, .z-main::-webkit-scrollbar { width: 8px; }
.z-nav::-webkit-scrollbar-track, .z-main::-webkit-scrollbar-track { background: transparent; }
.z-nav::-webkit-scrollbar-thumb, .z-main::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .16); border: 2px solid transparent; border-radius: 8px; background-clip: padding-box; }
.z-nav::-webkit-scrollbar-thumb:hover, .z-main::-webkit-scrollbar-thumb:hover { background-color: rgba(0, 0, 0, .28); }

.z-main { min-width: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.z-content { max-width: 1120px; padding: 40px 44px 72px; animation: z-rise .35s var(--ease) both; }
.z-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.z-head h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.03em; font-weight: 700; }
.z-head p { margin-top: 6px; color: var(--ink-2); }

.z-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.z-grid-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 32px; }

.z-card {
	position: relative;
	padding: 22px 24px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--r-l);
	box-shadow: var(--shadow-s);
	margin-bottom: 16px;
}
.z-grid-2 > .z-card { margin-bottom: 0; }
.z-card-lit { border-color: rgba(239, 35, 60, .22); box-shadow: 0 0 0 4px rgba(239, 35, 60, .05), var(--shadow-s); }
.z-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.z-card h2 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.z-section-title { margin-bottom: 12px; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.z-muted { color: var(--ink-2); }
.z-faint { color: var(--ink-3); }
.z-narrow { max-width: 560px; }
.z-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }

.z-stat { padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-s); transition: transform var(--fast) var(--ease), box-shadow var(--fast); }
.z-stat:hover { transform: translateY(-1px); box-shadow: var(--shadow-m); }
.z-stat span { display: block; color: var(--ink-3); font-size: 13px; }
.z-stat strong { display: block; margin-top: 4px; font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.z-stat small { display: block; margin-top: 2px; font-size: 12px; }

.z-device { display: flex; align-items: center; gap: 14px; }
.z-device strong { font-weight: 600; }
.z-device-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; color: var(--brand); background: var(--brand-tint); border-radius: var(--r-m); }

/* Attention: the one place yellow is used as a surface. */
.z-banner { position: relative; margin-bottom: 16px; padding: 18px 20px 18px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-s); overflow: hidden; }
.z-banner::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--attention); }
.z-banner h2 { margin-bottom: 4px; font-size: 16px; font-weight: 600; }
.z-banner form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 14px; }
.z-banner .z-btn { height: 44px; border-radius: var(--r-m); }
.z-banner .z-field { flex: 1 1 260px; margin: 0; }

/* Status pills */
.z-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.z-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.z-pill-good { color: var(--good); background: var(--good-tint); }
.z-pill-warn { color: var(--warn); background: var(--warn-tint); }
.z-pill-bad { color: var(--bad); background: var(--bad-tint); }
.z-pill-idle { color: var(--ink-2); background: rgba(0, 0, 0, .05); }
.z-pill-mod { color: #1f4fa8; background: rgba(46, 108, 230, .12); }

/* Tables */
.z-table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-s); }
.z-card .z-table-wrap { margin-top: 8px; border-radius: var(--r-m); box-shadow: none; }
.z-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.z-table th { padding: 11px 16px; color: var(--ink-3); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; background: var(--paper); border-bottom: 1px solid var(--line); }
.z-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.z-table tr:last-child td { border-bottom: 0; }
.z-table tbody tr { transition: background var(--fast); }
.z-table tbody tr:hover { background: #fcfcfd; }
.z-table strong { font-weight: 600; }
.z-table .z-wrap { white-space: normal; min-width: 180px; overflow-wrap: anywhere; }
.z-table .z-right { position: sticky; right: 0; text-align: right; background: rgba(255, 255, 255, .94); box-shadow: -12px 0 12px -12px rgba(0, 0, 0, .12); }
.z-table th:last-child:empty { position: sticky; right: 0; background: var(--paper); }
.z-empty { padding: 32px 16px; color: var(--ink-3); text-align: center; }

.z-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.z-toolbar .z-input { flex: 1 1 240px; width: auto; height: 40px; }
.z-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--ink-2); font-size: 14px; }
.z-pager div { display: flex; align-items: center; gap: 10px; }

.z-gen { display: grid; grid-template-columns: 110px minmax(0, 1fr) 150px auto; gap: 12px; align-items: end; }
.z-gen .z-field { margin: 0; }
.z-gen .z-btn { height: 44px; }

.z-request { padding: 12px 0; border-bottom: 1px solid var(--line); }
.z-request:last-child { border-bottom: 0; }
.z-request-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: var(--ink-3); font-size: 13px; }
.z-request p { color: var(--ink-2); overflow-wrap: anywhere; white-space: pre-wrap; }
.z-request-who strong { color: var(--ink); font-size: 15px; font-weight: 600; }

.z-keys { display: grid; gap: 6px; max-height: 280px; overflow: auto; margin: 12px 0; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); color: var(--ink); font-family: var(--mono); font-size: 14px; user-select: all; }

.z-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 6px 0 2px; font-size: 14px; }
.z-facts dt { color: var(--ink-3); }
.z-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

.z-prose h2 { margin: 26px 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); }
.z-prose h2:first-of-type { margin-top: 18px; }
.z-prose ul { padding-left: 20px; }
.z-prose li { margin-bottom: 8px; }
.z-prose, .z-prose p, .z-prose li { color: var(--ink-2); line-height: 1.6; }
.z-prose strong { color: var(--ink); font-weight: 600; }

.z-steps { padding-left: 20px; color: var(--ink-2); }
.z-steps li { margin-bottom: 8px; }
.z-steps li::marker { color: var(--brand); font-weight: 600; }
.z-steps strong { color: var(--ink); }

.z-setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.z-setting:last-of-type { border-bottom: 0; }
.z-setting p { color: var(--ink-3); font-size: 13px; }
.z-setting input { flex: none; width: 18px; height: 18px; accent-color: var(--brand); }

/* Dialog */
.z-overlay {
	position: fixed;
	inset: 0;
	z-index: 40;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(250, 250, 250, .25);
	-webkit-backdrop-filter: blur(6px) saturate(150%);
	backdrop-filter: blur(6px) saturate(150%);
	animation: z-fade .2s both;
}
.z-dialog { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; padding: 26px; border-radius: var(--r-xl); animation: z-rise .28s var(--ease) both; }
.z-dialog h2 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.z-dialog-body { color: var(--ink-2); }
.z-dialog .z-field { margin: 14px 0 0; }
.z-dialog .z-actions { justify-content: flex-end; margin-top: 22px; }
.z-dialog .z-prose { max-height: 62vh; overflow-y: auto; padding-right: 6px; }
.z-manage { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Toasts */
.z-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.z-toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--ink); border-radius: 14px; font-size: 14px; animation: z-rise .25s var(--ease) both; }
.z-toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #34c759; }
.z-toast-bad::before { background: var(--bad); }

.z-skeleton { height: 120px; border-radius: var(--r-l); background: linear-gradient(90deg, #f2f2f4, #fafafa, #f2f2f4); background-size: 200% 100%; animation: z-shimmer 1.3s linear infinite; }

@keyframes z-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes z-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes z-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes z-spin { to { transform: rotate(360deg); } }
@keyframes z-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, -30px) scale(1.1); } }
@keyframes z-shimmer { to { background-position: -200% 0; } }
@keyframes z-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Owner dashboard additions */
.z-table td .z-row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 300px; max-width: 420px; margin: 0; }
.z-bar-row { display: grid; grid-template-columns: 120px 1fr 56px; gap: 10px; align-items: center; margin: 10px 0; font-size: 14px; }
.z-bar-row b { text-align: right; font-weight: 600; }
.z-btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; justify-content: flex-start; }
.z-table td .z-btn-row { margin: 8px 0 0; gap: 6px; }

/* Downloads: three products */
.z-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.z-grid-3 > .z-card { margin-bottom: 0; display: flex; flex-direction: column; }
.z-product .z-facts { margin: 12px 0; }
.z-product .z-btn-row { margin-top: auto; }
.z-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.z-os-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 18px 0; }
.z-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .05); }
.z-seg-btn { padding: 7px 18px; color: var(--ink-2); background: transparent; border: 0; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background var(--fast), color var(--fast), box-shadow var(--fast); }
.z-seg-btn:hover { color: var(--ink); }
.z-seg-btn[aria-pressed="true"] { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 0 0 .5px rgba(0, 0, 0, .04); }
.z-seg-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Privacy / Terms links: in the sidebar on dashboards, bottom corner on sign-in pages. */
.z-legal-links { margin: 0; font-size: 12px; color: var(--ink-3); }
.z-legal-links a { color: var(--ink-3); }
.z-legal-links a:hover { color: var(--ink); }
.z-legal-fixed { position: fixed; right: 16px; bottom: 12px; }
.z-side > .z-legal-links { flex: none; margin: 10px 8px 0; }

/* Reviews (member panel, Subscribers only) */
.z-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.z-reviews { align-items: start; }
.z-stars { display: inline-flex; gap: 2px; color: rgba(0, 0, 0, .12); vertical-align: middle; }
.z-stars .on { color: var(--brand); }
.z-stars svg { display: block; }
.z-review-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.z-review-top h2 { margin: 0; }
.z-review-body { margin: 10px 0 8px; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.z-review-meta { color: var(--ink-3); font-size: 13px; }
.z-review-meta strong { color: var(--ink-2); font-weight: 600; }
.z-review-list { display: grid; }
.z-review { padding: 16px 0; border-top: 1px solid var(--line); }
.z-review:first-child { border-top: 0; padding-top: 4px; }
.z-review-score { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: #fff; box-shadow: var(--shadow-s); white-space: nowrap; }
.z-review-score strong { font-size: 22px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.z-review-score span:last-child { color: var(--ink-3); font-size: 13px; }
.z-rate { margin: 14px 0 16px; padding: 0; border: 0; }
.z-rate legend { margin-bottom: 6px; padding: 0; color: var(--ink); font-size: 13px; font-weight: 500; }
.z-rate-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.z-rate input { position: absolute; opacity: 0; pointer-events: none; }
.z-rate label { color: rgba(0, 0, 0, .14); cursor: pointer; transition: color .12s, transform .12s var(--ease); }
.z-rate label svg { width: 30px; height: 30px; }
.z-rate label:hover, .z-rate label:hover ~ label, .z-rate input:checked ~ label { color: var(--brand); }
.z-rate label:active { transform: scale(.9); }
.z-rate input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* Responsive */
@media (max-width: 1180px) {
	.z-grid-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
	.z-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
	.z-auth { grid-template-columns: 1fr; }
	.z-auth-brand { display: none; }
	.z-auth-main { justify-content: flex-start; min-height: 100vh; padding: 28px 16px 56px; }
	.z-auth-mobile-brand { display: flex; align-self: flex-start; }
	.z-auth-card { margin: 0 auto; padding: 26px 22px; }
	.z-auth::before {
		background:
			radial-gradient(70% 34% at 20% 0%, rgba(239, 35, 60, .30), transparent 70%),
			radial-gradient(40% 20% at 90% 10%, rgba(17, 18, 23, .12), transparent 70%),
			var(--paper);
	}

	.z-app { display: block; height: auto; overflow: visible; }
	.z-main { height: auto; overflow: visible; }
	.z-side { height: auto; margin: 10px; padding: 14px 14px 12px; border-radius: 18px; }
	.z-side > .z-brand { margin-bottom: 12px; padding: 0; }
	.z-nav { display: flex; flex: none; gap: 4px; overflow-x: auto; overflow-y: visible; margin: 0 -14px; padding: 0 14px 4px; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
	.z-nav::-webkit-scrollbar { display: none; }
	.z-nav a { flex: none; height: 36px; gap: 8px; }
	.z-side-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; }
	.z-side-foot .z-switch, .z-side-foot .z-who { margin: 0; }
	.z-side-foot .z-btn-block { width: auto; height: 34px; margin-left: auto; font-size: 13px; }
	.z-side > .z-legal-links { margin: 8px 0 0; }

	.z-content { padding: 18px 16px 48px; }
	.z-head { align-items: flex-start; }
	.z-head h1 { font-size: 26px; }
	.z-grid-2 { grid-template-columns: 1fr; }
	.z-gen { grid-template-columns: 1fr 1fr; }
	.z-gen .z-field-wide, .z-gen .z-btn { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
	.z-grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.z-card { padding: 18px 16px; }
	.z-codes { gap: 6px; }
	.z-codes input { height: 50px; font-size: 20px; }
	.z-head { flex-direction: column; }
	.z-legal-fixed { position: static; padding: 0 16px 20px; text-align: center; }
}

/* Glass costs GPU time: lighter blur on small screens, none where unsupported. */
@media (max-width: 600px) {
	:root { --glass-blur: blur(16px) saturate(170%); }
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.z-side, .z-auth-card, .z-dialog, .z-toast { background: rgba(255, 255, 255, .96); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* Billing (Get ZLXWR) */
.z-plan-price { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 10px; }
.z-plan-price strong { font-size: 34px; font-weight: 650; letter-spacing: -.03em; color: var(--ink); }
.z-plan-price span { color: var(--ink-3); font-size: 15px; }
.z-plan-list { margin: 12px 0 16px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.z-plan-list li { position: relative; padding-left: 22px; }
.z-plan-list li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 9px; height: 5px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.z-plan-best { border-color: var(--brand-ring); box-shadow: 0 0 0 1px var(--brand-ring), var(--shadow-s); }
.z-banner-good::before { background: var(--good); }
.z-steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 12px; font-size: 14px; color: var(--ink-2); }
.z-steps strong { color: var(--ink); }
.z-copy { display: flex; gap: 8px; margin: 8px 0; }
.z-copy .z-input { flex: 1; min-width: 0; font-size: 13px; }
.z-row-btns { display: flex; gap: 6px; white-space: nowrap; }
.z-redeem { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; }
.z-redeem .z-field { flex: 1 1 260px; margin: 0; }

/* Consent checkboxes (sign-up, checkout) */
.z-consent .z-check { align-items: flex-start; font-size: 13px; line-height: 1.45; }
.z-consent .z-check input { flex: none; margin: 1px 0 0; }
.z-buy-consent { margin: 4px 0 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); }
.z-buy-consent .z-check { color: var(--ink); }

/* ---------- Obsidian glass sidebar (dark depth: active items get lighter, red marks the page) ---------- */
.z-side {
	color: #fff;
	background: linear-gradient(160deg, rgba(17, 18, 23, .90), rgba(17, 18, 23, .80));
	border-color: rgba(255, 255, 255, .08);
	box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, .14), inset 0 0 24px rgba(255, 255, 255, .03), 0 20px 50px rgba(17, 18, 23, .35);
}
.z-side::after { background: linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .05) 30%, rgba(239, 35, 60, .55) 70%, rgba(255, 255, 255, .25)); }
.z-side .z-brand, .z-side .z-brand:hover { color: #fff; }
.z-side .z-brand small { color: #a9afba; }
.z-side .z-nav a { color: #a9afba; }
.z-side .z-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.z-side .z-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .10); box-shadow: inset 3px 0 0 var(--brand); }
.z-count { background: var(--brand-fill); color: #fff; box-shadow: none; }
.z-side-foot { border-top-color: rgba(255, 255, 255, .10); }
.z-side-foot .z-switch { color: #ff5a6c; }
.z-side-foot .z-who { color: #a9afba; }
.z-side-foot .z-who strong { color: #fff; }
.z-side-foot .z-btn { color: #fff; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.z-side-foot .z-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .24); }
.z-side > .z-legal-links, .z-side > .z-legal-links a { color: #a9afba; }
.z-side > .z-legal-links a:hover { color: #fff; }
.z-nav, .z-side .z-nav { scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.z-side .z-nav::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .18); }

/* Headings: heavier, tighter, like the homepage. */
.z-head h1, .z-auth-card h1 { font-weight: 800; letter-spacing: -.04em; }
.z-mark { background: var(--brand); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 14px rgba(239, 35, 60, .45); }
.z-mark::after { font-weight: 900; }

/* GitHub (owner) */
.z-readme { max-height: 480px; margin: 0; padding: 14px 16px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.55 var(--mono); color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m, 12px); }
