/* Download page of Z-ERGO Studio (z-ergo.com/studio/, nine languages).
   No inline code at all, neither <style> nor style="": the page runs under a
   strict CSP (style-src 'self', script-src 'self'), see DEPLOY.md §14.
   Scale reduced on 2026-11-27 (owner: "everything looks too big"). Logical
   properties (inline-start/end) so the Arabic page mirrors by itself. */
:root {
	--bg: #0a0a0c;
	--panel: #141417;
	--line: #26262b;
	--line-hi: #3a3a40;
	--text: #f5f5f7;
	--muted: #a1a1a8;
	--soft: #6e6e76;
	--red: #cc141c;
	--red-hi: #e3262e;
	--red-glow: rgba(204, 20, 28, 0.32);
	--ok: #4cc38a;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html {
	background: var(--bg);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(760px 440px at 78% 6%, rgba(204, 20, 28, 0.16), transparent 62%),
		radial-gradient(600px 360px at 8% 0%, rgba(255, 255, 255, 0.035), transparent 60%),
		var(--bg);
	color: var(--text);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

/* Brand names never break across two lines. */
.nb {
	white-space: nowrap;
}

/* In the name Z-ERGO Studio™: "Studio" and the dash of Z-ERGO. */
.red {
	color: var(--red-hi);
}

/* --- Top bar ------------------------------------------------------------ */
.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	max-width: 1040px;
	margin: 0 auto;
	padding: 14px 20px;
}

.top-logo img {
	display: block;
	width: 88px;
}

.top-nav {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.top-link {
	color: var(--muted);
	font-size: 13px;
	text-decoration: none;
	white-space: nowrap;
}

.top-link:hover,
.top-link:focus-visible {
	color: var(--text);
}

/* Language switcher: a plain <details>, it works without the script too. */
.lang {
	position: relative;
}

.lang summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--text);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.lang summary::-webkit-details-marker {
	display: none;
}

.lang summary:hover {
	border-color: rgba(255, 255, 255, 0.32);
	background: rgba(255, 255, 255, 0.1);
}

.lang-globe {
	width: 14px;
	height: 14px;
	flex: none;
}

.lang-caret {
	width: 9px;
	height: 9px;
	flex: none;
	opacity: 0.7;
	transition: transform 0.2s;
}

.lang[open] .lang-caret {
	transform: rotate(180deg);
}

.lang-menu {
	position: absolute;
	top: calc(100% + 6px);
	inset-inline-end: 0;
	z-index: 10;
	min-width: 160px;
	margin: 0;
	padding: 5px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	background: #101012;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
	list-style: none;
}

.lang-menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 7px 10px;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.82);
	font-size: 13.5px;
	text-decoration: none;
	white-space: nowrap;
}

.lang-menu a:hover,
.lang-menu a:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.lang-menu a[aria-current="page"] {
	color: #fff;
	font-weight: 700;
}

.lang-menu a[aria-current="page"]::after {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--red-hi);
}

/* --- Hero --------------------------------------------------------------- */
.dl {
	max-width: 1040px;
	margin: 0 auto;
	padding: 4px 20px 32px;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	align-items: center;
	gap: 32px;
	padding: 20px 0 8px;
}

.hero-logo {
	margin: 0;
	line-height: 0;
}

.hero-logo img {
	width: min(300px, 100%);
}

.lead {
	margin: 14px 0 18px;
	max-width: 440px;
	color: var(--muted);
	font-size: 15.5px;
	line-height: 1.55;
}

.hero-art {
	position: relative;
	display: grid;
	place-items: center;
}

/* A soft red halo and a floor shadow behind the mouse. */
.hero-art::before {
	content: "";
	position: absolute;
	inset: 14% 14%;
	border-radius: 50%;
	background: radial-gradient(closest-side, var(--red-glow), transparent 72%);
	filter: blur(24px);
}

.hero-art::after {
	content: "";
	position: absolute;
	bottom: 10%;
	width: 52%;
	height: 18px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent);
}

.hero-art img {
	position: relative;
	z-index: 1;
	width: min(310px, 100%);
	filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.55));
}

/* --- Download card ------------------------------------------------------ */
.card {
	position: relative;
	max-width: 460px;
	padding: 18px 18px 16px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)), var(--panel);
	box-shadow: 0 30px 70px -45px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card::before {
	content: "";
	position: absolute;
	inset-inline-start: 18px;
	top: -1px;
	width: 48px;
	height: 3px;
	border-radius: 0 0 3px 3px;
	background: var(--red);
}

.card-badge,
.os-state {
	display: inline-block;
	margin: 0 0 10px;
	padding: 3px 8px;
	border: 1px solid rgba(204, 20, 28, 0.5);
	border-radius: 999px;
	background: rgba(204, 20, 28, 0.12);
	color: #ff6b70;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* "In development": quieter than "Coming soon". */
.card-badge.dev,
.os-state.dev {
	border-color: var(--line-hi);
	background: rgba(255, 255, 255, 0.05);
	color: var(--muted);
}

.card-badge[hidden],
.os-state[hidden] {
	display: none;
}

.card-system {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
}

.card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.card-actions:empty {
	display: none;
}

.dl-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--red);
	border-radius: 11px;
	background: linear-gradient(180deg, var(--red-hi), var(--red));
	color: #fff;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 10px 26px -12px rgba(204, 20, 28, 0.9);
	transition: filter 0.2s, transform 0.2s;
}

.dl-btn:hover,
.dl-btn:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.dl-btn:focus-visible,
.os-dl:focus-visible,
.top-link:focus-visible,
.lang summary:focus-visible,
.lang-menu a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.dl-btn.ghost {
	border-color: var(--line-hi);
	background: transparent;
	box-shadow: none;
}

.dl-btn.ghost:hover,
.dl-btn.ghost:focus-visible {
	border-color: var(--muted);
	background: rgba(255, 255, 255, 0.04);
}

.dl-btn svg {
	width: 17px;
	height: 17px;
	flex: none;
}

.card-meta {
	margin: 10px 0 0;
	color: var(--muted);
	font-size: 12.5px;
	line-height: 1.55;
}

.card-meta:empty {
	display: none;
}

/* --- Sections below the hero -------------------------------------------- */
.block {
	margin-top: 44px;
}

.block h2 {
	margin: 0 0 14px;
	font-size: clamp(18px, 2.1vw, 21px);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.notes h2 {
	color: var(--muted);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.notes p {
	margin: 0;
	max-width: 720px;
	line-height: 1.6;
}

/* --- Systems ------------------------------------------------------------ */
.os-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.os {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--panel);
}

.os.is-yours {
	border-color: rgba(204, 20, 28, 0.55);
}

.os h3 {
	margin: 10px 0 2px;
	font-size: 15px;
	font-weight: 700;
}

.os-req {
	margin: 0 0 10px;
	color: var(--muted);
	font-size: 12.5px;
}

.os-state {
	margin: 4px 0 0;
}

.os h3 + .os-state {
	margin-top: 6px;
}

.os-files {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.os-files:empty {
	display: none;
}

.os-dl {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border: 1px solid var(--red);
	border-radius: 9px;
	background: rgba(204, 20, 28, 0.14);
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: none;
}

.os-dl:hover {
	background: rgba(204, 20, 28, 0.28);
}

.os-dl svg {
	width: 14px;
	height: 14px;
	flex: none;
}

.os-dl {
	flex-wrap: wrap;
	row-gap: 0;
}

.os-dl .lbl {
	white-space: nowrap;
}

.os-dl .size {
	color: var(--muted);
	font-weight: 500;
	white-space: nowrap;
}

/* Logos of the systems: the same picture the home page shows
   (/img/compatible-os-z-ergo.webp, 1505x276, white background), cut per logo:
   a square of 276 px around each one. background-size = 1505/276;
   position-x = left edge of the square / (1505 - 276). */
.os-ico {
	display: block;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 9px;
	background: #fff url("/img/compatible-os-z-ergo.webp?v=3") no-repeat;
	background-size: 545.29% auto;
}

.os-ico.os-windows {
	background-position: -1.912% 0;
}

.os-ico.os-android {
	background-position: 22.132% 0;
}

.os-ico.os-apple {
	background-position: 46.542% 0;
}

.os-ico.os-linux {
	background-position: 71.4% 0;
}

.os-ico.os-meta {
	background-position: 100.285% 0;
}

.mouse-line {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 14px 0 0;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
}

.os-row {
	display: flex;
	flex: none;
	gap: 4px;
}

.os-row .os-ico {
	width: 22px;
	height: 22px;
	border-radius: 6px;
}

/* --- Features ----------------------------------------------------------- */
.feat-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.feat {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 16px 15px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 60%), var(--panel);
}

.feat-icon {
	width: 32px;
	height: 32px;
	margin-bottom: 12px;
	padding: 6px;
	border-radius: 9px;
	background: rgba(204, 20, 28, 0.14);
	color: #ff5a60;
}

.feat h3 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
}

.feat p {
	margin: 0;
	color: var(--muted);
	font-size: 13.5px;
	line-height: 1.55;
}

/* The two product logos sit where the icon and the title of the others are. */
.feat-logo {
	display: block;
	margin-bottom: 12px;
}

.feat-logo.wide {
	width: 132px;
	margin-top: 8px;
	margin-bottom: 18px;
}

.feat-logo.tall {
	width: 50px;
}

/* --- Trust -------------------------------------------------------------- */
.trust-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 24px;
	margin: 0;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--panel);
	list-style: none;
}

.trust-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--muted);
	font-size: 13.5px;
	line-height: 1.5;
}

.trust-list svg {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	color: var(--ok);
}

.foot {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	max-width: 1040px;
	margin: 16px auto 0;
	padding: 18px 20px 28px;
	border-top: 1px solid var(--line);
	color: var(--soft);
	font-size: 12.5px;
	flex-wrap: wrap;
}

/* Owner, 2026-11-29: trademark note required by the Bluetooth® brand guide. */
.foot-tm {
	flex-basis: 100%;
	margin: 0;
	font-size: 11px;
	line-height: 1.5;
	opacity: 0.8;
}

.foot a {
	color: var(--soft);
	text-decoration: none;
}

.foot a:hover {
	color: var(--text);
}

#msgs {
	display: none;
}

/* --- Tablet ------------------------------------------------------------- */
@media (max-width: 900px) {
	.hero {
		grid-template-columns: 1fr;
		gap: 4px;
		padding-top: 8px;
	}

	.hero-art {
		grid-row: 1;
	}

	.hero-art img {
		width: min(220px, 55%);
	}

	.card {
		max-width: none;
	}

	.lead {
		max-width: 560px;
	}

	.os-grid,
	.feat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* --- Phone -------------------------------------------------------------- */
@media (max-width: 560px) {
	.top,
	.dl,
	.foot {
		padding-inline: 16px;
	}

	.top {
		padding-block: 12px;
	}

	.top-logo img {
		width: 78px;
	}

	/* The logo already goes home, and so does the footer. */
	.top-link {
		display: none;
	}

	.hero-art img {
		width: min(140px, 40%);
	}

	.hero-logo img {
		width: min(230px, 78%);
	}

	.lead {
		margin: 12px 0 16px;
		font-size: 15px;
	}

	.card {
		padding: 16px 14px 14px;
	}

	.dl-btn {
		width: 100%;
		justify-content: center;
	}

	.block {
		margin-top: 36px;
	}

	.os {
		padding: 12px;
	}

	.mouse-line {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.feat-grid,
	.trust-list {
		grid-template-columns: 1fr;
	}

	.trust-list {
		padding: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dl-btn,
	.lang-caret {
		transition: none;
	}
}

/* What a beta does and does not do yet (owner, 2026-11-28). */
.card-note {
	max-width: 62ch;
	margin: 10px auto 0;
	color: var(--muted, #a1a1aa);
	font-size: 13px;
	line-height: 1.5;
	text-wrap: pretty;
}

.card-note[hidden] {
	display: none;
}
