/**
 * The Contacts page as a direct uplink console (page-contacts.php). Loaded
 * on that page only; a page transition that brings the page in loads it
 * first (page-transitions.js). Behaviour: assets/js/uplink.js.
 *
 *   1. Frame: tokens, the telemetry bar
 *   2. Console mode: one screen (1024 × 760 and up, with JS)
 *   3. Title and documents
 *   4. Channels: the contact details as frequency cards
 *   5. Console window: the form as a transmission manifest
 *   6. Deck, lock-on, launch, receipt
 *   7. Reader: the Privacy Policy and the Terms
 *   8. Entrances
 *   9. Small screens
 *
 * Where the other pages are read, this one is operated: one screen, a
 * console over the globe in close-up on Kyiv. Mono telemetry frames it;
 * the form is a manifest of numbered rows, and the row in focus is locked
 * on as Kyiv is; cyan carries the signal, gold the moment a message is
 * sent. Without JS, on phones and on short screens, it is an ordinary
 * page: the same blocks, top to bottom, the documents in the flow and the
 * footer at its foot.
 */

/* ==========================================================================
   1. Frame
   ========================================================================== */

.dru-uplink {
	--up-frame: min(100% - 2 * var(--gutter), 1640px);
	--up-inset: max(var(--gutter), (100% - 1640px) / 2);
	--up-left: clamp(19rem, 25vw, 27rem);
	--up-console: clamp(31rem, 39vw, 41rem);
	--up-top: calc(var(--header-h) + 3rem);
	--up-bottom: 5.5rem;
	--up-deck: 2.5rem;
	--up-label: 500 0.6875rem/1.3 var(--mono);
	--up-line: rgba(255, 255, 255, 0.09);
	--up-gold: #FFD000;
	--up-red: #FF7A7A;
	--up-glass: rgba(4, 7, 13, 0.86);
	/* The form (5): how far a row reaches past its words, a row's padding,
	   what is written, a channel, the message and the gaps between parts. */
	--up-bleed: 0.75rem;
	--up-row: clamp(0.5rem, 1.3vh - 0.15rem, 0.9rem);
	--up-type: clamp(1rem, 0.55rem + 0.6vw, 1.25rem);
	--up-chan: 2rem;
	--up-area: clamp(4.5rem, 100vh - 52rem, 6.5rem);
	--up-gap: clamp(0.75rem, 1.6vh, 1.25rem);
	/* The rows' entrance waits for the window's, until a step has changed
	   (8; uplink.js sets .is-settled). */
	--up-in: 1.05s;
	position: relative;
	counter-reset: freq;
}

.dru-uplink.is-settled {
	--up-in: 0s;
}

/* The telemetry bar under the HUD: link state, round trip, UTC, the node. */
.dru-uplink__bar {
	position: absolute;
	top: calc(var(--header-h) + 0.5rem);
	left: var(--up-inset);
	right: var(--up-inset);
	z-index: 3;
	display: flex;
	align-items: center;
	gap: clamp(0.75rem, 1.4vw, 1.5rem);
	color: var(--muted);
	font: var(--up-label);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
}

.dru-uplink__bar b {
	color: var(--on-dark);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.dru-uplink__led {
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cyan);
	box-shadow: 0 0 10px var(--cyan);
}

.dru-uplink[data-link="sending"] .dru-uplink__led {
	background: var(--up-gold);
	box-shadow: 0 0 12px var(--up-gold);
}

.dru-uplink[data-link="failed"] .dru-uplink__led,
.dru-uplink[data-link="offline"] .dru-uplink__led {
	background: var(--up-red);
	box-shadow: 0 0 10px var(--up-red);
}

.dru-uplink__link {
	color: var(--cyan);
}

.dru-uplink[data-link="sending"] .dru-uplink__link {
	color: var(--up-gold);
}

.dru-uplink[data-link="failed"] .dru-uplink__link,
.dru-uplink[data-link="offline"] .dru-uplink__link {
	color: var(--up-red);
}

.dru-uplink__rule {
	flex: 1 1 auto;
	min-width: 1.5rem;
	height: 1px;
	background: linear-gradient(90deg, rgba(0, 240, 255, 0.45), rgba(255, 255, 255, 0.06) 70%, rgba(255, 208, 0, 0.35));
	transform-origin: left center;
}

.dru-uplink__node {
	color: var(--on-dark);
}

/* The deck, the lock-on and the launch belong to the console mode. */
.dru-uplink__deck,
.dru-uplink__lock {
	display: none;
}

/* ==========================================================================
   2. Console mode
   One screen: the title and channels on the left, the console window on
   the right, the globe between them; nothing scrolls. The page's footer
   is in the menu (footer.php), the documents in the reader (7).
   ========================================================================== */

@media (min-width: 1024px) and (min-height: 760px) {
	.dru-js .dru-uplink {
		height: 100vh;
		height: 100dvh;
		min-height: 0;
		overflow: clip;
	}

	.dru-js .dru-page:has(> .dru-uplink) > :is(.dru-next, .dru-site-footer) {
		display: none;
	}

	/* The title, top left. */
	.dru-js .dru-uplink .dru-trust {
		position: absolute;
		top: var(--up-top);
		left: var(--up-inset);
		z-index: 2;
		width: var(--up-left);
		min-height: 0;
		margin: 0;
		padding: 0;
		border: 0;
		background: none;
	}

	.dru-js .dru-uplink .dru-trust > .dru-wrap {
		display: block;
		max-width: none;
		padding: 0;
	}

	/* The form's section fills the rest: a grid of three columns, the
	   channels at the foot of the first, the window in the third. */
	.dru-js .dru-uplink .dru-join {
		position: absolute;
		top: var(--up-top);
		bottom: calc(var(--up-bottom) + var(--up-deck));
		left: var(--up-inset);
		right: var(--up-inset);
		margin: 0;
		padding: 0;
		background: none;
	}

	.dru-js .dru-uplink .dru-join > .dru-wrap {
		display: block;
		height: 100%;
		max-width: none;
		padding: 0;
	}

	.dru-js .dru-uplink .dru-join__form {
		position: relative;
		display: grid;
		grid-template-columns: var(--up-left) minmax(0, 1fr) var(--up-console);
		grid-template-rows: auto auto minmax(0, 1fr);
		height: 100%;
		margin: 0;
		column-gap: 0;
		row-gap: 0;
	}

	.dru-js .dru-uplink .dru-join__aside {
		display: contents;
	}

	.dru-js .dru-uplink .dru-join__aside > :is(h2, p) {
		grid-column: 3;
		position: relative;
		z-index: 1;
		margin: 0;
		padding-inline: clamp(1.25rem, 1.8vw, 1.75rem);
	}

	.dru-js .dru-uplink .dru-join__aside > h2 {
		grid-row: 1;
		padding-top: 1.1rem;
	}

	.dru-js .dru-uplink .dru-join__aside > p {
		grid-row: 2;
		padding-top: 0.4rem;
	}

	.dru-js .dru-uplink .dru-join__aside > .dru-facts {
		grid-column: 1;
		grid-row: 1 / -1;
		align-self: end;
		z-index: 1;
	}

	/* Every step fits (measured, DESIGN.md); should errors ever crowd one
	   past the window's foot, the window scrolls rather than cut it off. */
	.dru-js .dru-uplink .dru-join__panel {
		grid-column: 3;
		grid-row: 3;
		position: relative;
		z-index: 1;
		min-height: 0;
		padding: 0.85rem clamp(1.25rem, 1.8vw, 1.75rem) 1rem;
		overflow: hidden auto;
		overscroll-behavior: contain;
		scrollbar-width: none;
	}

	/* The window: one slab behind its heading, its note and the form. */
	.dru-js .dru-uplink .dru-join__form::before {
		content: "";
		grid-column: 3;
		grid-row: 1 / -1;
		border: 1px solid rgba(0, 240, 255, 0.22);
		border-bottom-color: var(--up-line);
		border-radius: 4px 4px 0 0;
		background:
			linear-gradient(var(--cyan), var(--cyan)) left top / 12px 1px no-repeat,
			linear-gradient(var(--cyan), var(--cyan)) left top / 1px 12px no-repeat,
			linear-gradient(var(--cyan), var(--cyan)) right top / 12px 1px no-repeat,
			linear-gradient(var(--cyan), var(--cyan)) right top / 1px 12px no-repeat,
			var(--up-glass);
		box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.95);
		transform-origin: center top;
	}

	/* The step is named by the progress line: the legend is for screen
	   readers. So is the form's notice, which the deck reads out (6). */
	.dru-js .dru-uplink .dru-form legend,
	.dru-js .dru-uplink.is-managed .dru-form__notice--error {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: 0;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	/* A field's error is its row's status, read on the label's line where
	   the count stands: the row keeps its height. */
	.dru-js .dru-uplink .dru-field:not(.dru-form__consent) {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.dru-js .dru-uplink .dru-field:not(.dru-form__consent) > .dru-field__error {
		grid-area: meta;
		justify-self: end;
		margin: 0 0 0.3rem;
		line-height: 1.15;
		text-align: right;
	}

	.dru-js .dru-uplink .dru-field > .dru-field__error:not(:empty) ~ .dru-uplink__io {
		display: none;
	}

	/* The deck: the window's foot. */
	.dru-js .dru-uplink .dru-uplink__deck {
		position: absolute;
		bottom: var(--up-bottom);
		right: var(--up-inset);
		z-index: 2;
		display: flex;
		align-items: center;
		gap: 0.85rem;
		width: var(--up-console);
		height: var(--up-deck);
		padding: 0 clamp(1.25rem, 1.8vw, 1.75rem);
		border: 1px solid rgba(0, 240, 255, 0.22);
		border-top: 0;
		border-radius: 0 0 4px 4px;
		background: rgba(2, 4, 9, 0.92);
		color: var(--muted);
		font: var(--up-label);
		letter-spacing: 0.05em;
		white-space: nowrap;
	}

	.dru-js .dru-uplink .dru-uplink__lock {
		display: block;
	}

	/* The documents: a reader over the left of the screen (7). */
	.dru-js .dru-uplink .dru-prose {
		position: fixed;
		top: var(--up-top);
		bottom: var(--up-bottom);
		left: var(--up-inset);
		z-index: 40;
		width: min(50rem, calc(100% - var(--up-console) - 2 * var(--up-inset) - 2rem));
		margin: 0;
		padding: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		border: 1px solid rgba(0, 240, 255, 0.28);
		border-radius: 4px;
		background: rgba(3, 5, 10, 0.96);
		box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95);
		visibility: hidden;
		opacity: 0;
		transform: translate3d(-1.5rem, 0, 0);
		transition: opacity 0.35s var(--ease), transform 0.5s var(--ease), visibility 0s linear 0.5s;
		scrollbar-width: thin;
		scrollbar-color: rgba(0, 240, 255, 0.35) transparent;
	}

	/* Opened by its address until uplink.js takes the reader over. */
	.dru-js .dru-uplink:not(.is-managed) .dru-prose:target,
	.dru-js .dru-uplink .dru-prose.is-open {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition: opacity 0.35s var(--ease), transform 0.5s var(--ease), visibility 0s;
	}

	/* A document read over the console: the rest steps back. */
	.dru-js .dru-uplink.is-reading :is(.dru-trust, .dru-facts) {
		opacity: 0.12;
		transition: opacity 0.35s var(--ease);
	}
}

/* Short screens: the window keeps to its essentials' height. */
@media (min-width: 1024px) and (min-height: 760px) and (max-height: 880px) {
	.dru-js .dru-uplink {
		--up-top: calc(var(--header-h) + 2.5rem);
		--up-chan: 1.5625rem;
		--up-area: 3.75rem;
		--up-gap: 0.6rem;
	}

	.dru-js .dru-uplink .dru-join__aside > h2 {
		padding-top: 0.8rem;
		font-size: 1.1875rem;
	}

	/* The path over the heading goes: the bar already names the link. */
	.dru-js .dru-uplink .dru-join__aside > h2::before {
		display: none;
	}

	.dru-js .dru-uplink .dru-join__aside > p {
		font-size: 0.8125rem;
	}

	.dru-js .dru-uplink .dru-join__panel {
		padding-top: 0.6rem;
	}

	.dru-js .dru-uplink .dru-uplink__channel {
		font-size: 0.75rem;
	}

	.dru-js .dru-uplink .dru-consent {
		font-size: 0.6875rem;
		line-height: 1.45;
	}

	.dru-js .dru-uplink .dru-form .dru-btn {
		min-height: 2.5rem;
	}

	.dru-js .dru-uplink .dru-trust h1 {
		font-size: clamp(3rem, 5vw, 4.5rem);
	}
}

/* The log stands aside where a step needs its room (uplink.js). */
.dru-uplink__log.is-cramped {
	visibility: hidden;
}

/* ==========================================================================
   3. Title and documents
   ========================================================================== */

.dru-uplink .dru-trust h1 {
	color: #FFFFFF;
	font-size: clamp(3rem, 5.6vw, 6rem);
	font-weight: 600;
	line-height: 0.92;
	letter-spacing: -0.055em;
}

.dru-uplink .dru-trust h1::before {
	content: "CH.00 // DIRECT UPLINK";
	content: "CH.00 // DIRECT UPLINK" / "";
	display: block;
	margin-bottom: 1.1rem;
	color: var(--cyan);
	font: var(--up-label);
	letter-spacing: 0.18em;
}

.dru-uplink .dru-trust .dru-trust__standfirst {
	max-width: 30rem;
	margin-top: 1.1rem;
	color: var(--ink);
	font-size: clamp(1rem, 1.15vw, 1.125rem);
	line-height: 1.5;
}

/* The documents: two files to open. */
.dru-uplink .dru-trust .dru-trust__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-top: 1.25rem;
	counter-reset: doc;
}

.dru-uplink .dru-trust__actions .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 0;
	padding: 0.55rem 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.02);
	box-shadow: none;
	color: var(--on-dark);
	font-size: 0.875rem;
	font-weight: 500;
	counter-increment: doc;
}

.dru-uplink .dru-trust__actions .wp-block-button__link::before {
	content: "DOC." counter(doc, decimal-leading-zero);
	content: "DOC." counter(doc, decimal-leading-zero) / "";
	color: var(--cyan);
	font: var(--up-label);
	letter-spacing: 0.12em;
}

.dru-uplink .dru-trust__actions .wp-block-button__link:hover,
.dru-uplink .dru-trust__actions .wp-block-button__link:focus-visible,
.dru-uplink .dru-trust__actions .wp-block-button__link[aria-expanded="true"] {
	border-color: var(--cyan);
	background: rgba(0, 240, 255, 0.08);
	color: #FFFFFF;
}

/* ==========================================================================
   4. Channels
   The contact details as frequency cards: a label and its value; a real
   address gets [ COPY ] and [ MAIL ] (uplink.js), a detail not yet
   published says so.
   ========================================================================== */

.dru-uplink .dru-facts,
.dru-uplink .dru-facts.dru-facts--stack {
	display: grid;
	gap: 0;
	margin: 0;
	border-top: 1px solid var(--up-line);
}

.dru-uplink .dru-facts > * {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"label act"
		"value act";
	align-items: center;
	gap: 0.2rem 0.75rem;
	margin: 0;
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid var(--up-line);
	counter-increment: freq;
	transition: background-color 0.3s var(--ease);
}

.dru-uplink .dru-facts > *:hover {
	background: rgba(0, 240, 255, 0.04);
}

.dru-uplink .dru-facts .dru-fact__label {
	grid-area: label;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
	color: var(--muted);
	font: var(--up-label);
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.dru-uplink .dru-facts .dru-fact__label::before {
	content: "FREQ " counter(freq, decimal-leading-zero) " //";
	content: "FREQ " counter(freq, decimal-leading-zero) " //" / "";
	color: var(--cyan);
}

/* LIVE or PENDING, from the detail itself (functions.php, data-legal-state). */
.dru-uplink .dru-facts > * > .dru-fact__label::after {
	content: "PENDING";
	content: "PENDING" / "";
	padding: 0.05rem 0.3rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: var(--muted);
	font-size: 0.5625rem;
	letter-spacing: 0.12em;
}

.dru-uplink .dru-facts > *:has(> [data-legal-state="set"]) > .dru-fact__label::after {
	content: "LIVE";
	content: "LIVE" / "";
	border-color: rgba(0, 240, 255, 0.5);
	color: var(--cyan);
}

.dru-uplink .dru-facts .dru-fact__value {
	grid-area: value;
	margin: 0;
	color: var(--on-dark);
	font-size: 0.9375rem;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.dru-uplink .dru-facts .dru-fact__value[data-legal-state="pending"] {
	color: var(--on-dark-muted);
	font-size: 0.8125rem;
}

/* A real address's actions (uplink.js): their room is the card's own. */
.dru-uplink__act {
	grid-area: act;
	display: flex;
	gap: 0.35rem;
}

.dru-uplink__act button,
.dru-uplink__act a {
	display: inline-flex;
	align-items: center;
	min-height: 1.9rem;
	padding: 0 0.5rem;
	border: 1px solid rgba(0, 240, 255, 0.35);
	border-radius: 2px;
	background: transparent;
	color: var(--cyan);
	font: var(--up-label);
	letter-spacing: 0.12em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.dru-uplink__act :is(button, a):hover,
.dru-uplink__act :is(button, a):focus-visible {
	background: rgba(0, 240, 255, 0.14);
	color: #FFFFFF;
}

.dru-uplink__act :is(button, a):focus-visible {
	outline: 2px solid var(--cyan);
	outline-offset: 2px;
}

.dru-uplink .dru-facts > .is-copied {
	background: rgba(0, 240, 255, 0.1);
}

/* ==========================================================================
   5. Console window: the form as a transmission manifest
   One numbered row per field. The number is the row's lamp: dim while
   empty, gold while an address is still being written, cyan once the
   field is right, red when it is not; the count stands at the row's right.
   The row in focus is locked on, as Kyiv is on the globe: brackets close
   round it and a laser runs along its line. The topic is a list of
   channels. A step's button arms (fills) once the step is complete
   (uplink.js).
   ========================================================================== */

.dru-uplink .dru-join__aside > h2 {
	color: #FFFFFF;
	font-size: clamp(1.25rem, 1.6vw, 1.625rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.025em;
}

.dru-uplink .dru-join__aside > h2::before {
	content: "uplink://kyiv.node/contact";
	content: "uplink://kyiv.node/contact" / "";
	display: block;
	margin-bottom: 0.75rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--up-line);
	color: var(--muted);
	font: var(--up-label);
	letter-spacing: 0.08em;
}

.dru-uplink .dru-join__aside > p {
	color: var(--on-dark-muted);
	font-size: 0.875rem;
	line-height: 1.45;
}

.dru-uplink .dru-form {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

/* The sequence: two segments that fill as the steps are reached, the
   step's own words under them and its number. */
.dru-uplink .dru-form .dru-form__progress {
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem 4px;
	margin-bottom: 0.3rem;
}

.dru-uplink .dru-form .dru-form__progress-bar {
	position: relative;
	height: 2px;
	border-radius: 0;
	background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 6px) left center / 100% 1px no-repeat;
	box-shadow: none;
}

.dru-uplink .dru-form__progress-bar::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--cyan);
	box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.8s var(--ease), opacity 0.4s var(--ease);
}

.dru-uplink .dru-form__progress-bar:is(.is-active, .is-done)::after {
	transform: none;
}

.dru-uplink .dru-form__progress-bar.is-done::after {
	opacity: 0.4;
}

.dru-uplink .dru-form .dru-form__progress-label {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	color: var(--on-dark-muted);
	font: var(--up-label);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.dru-uplink .dru-form__progress-label::after {
	content: "01 / 02";
	content: "01 / 02" / "";
	flex: none;
	color: var(--muted);
}

.dru-uplink .dru-form__progress:has(> [data-progress="2"].is-active) > .dru-form__progress-label::after {
	content: "02 / 02";
	content: "02 / 02" / "";
}

.dru-uplink .dru-form legend {
	margin-bottom: 0.75rem;
	color: var(--on-dark);
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0;
}

/* The manifest. Its rows reach a little into the window's margin: a row
   locked on has room round its words, which keep the heading's line. */
.dru-uplink .dru-form__step {
	counter-reset: field;
}

.dru-uplink .dru-form .dru-form__grid {
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
	margin-inline: calc(-1 * var(--up-bleed));
}

.dru-uplink .dru-field {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"label meta"
		"input input"
		"error error";
	align-items: baseline;
	gap: 0 1rem;
	padding: var(--up-row) var(--up-bleed);
	background: linear-gradient(var(--up-line), var(--up-line)) var(--up-bleed) 100% / calc(100% - 2 * var(--up-bleed)) 1px no-repeat;
	counter-increment: field;
	cursor: text;
}

/* Locked on: the brackets (and a trace of cyan inside them)… */
.dru-uplink .dru-field::before {
	--lock: rgba(0, 240, 255, 0.9);
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(var(--lock), var(--lock)) left top / 10px 1px no-repeat,
		linear-gradient(var(--lock), var(--lock)) left top / 1px 10px no-repeat,
		linear-gradient(var(--lock), var(--lock)) right top / 10px 1px no-repeat,
		linear-gradient(var(--lock), var(--lock)) right top / 1px 10px no-repeat,
		linear-gradient(var(--lock), var(--lock)) left bottom / 10px 1px no-repeat,
		linear-gradient(var(--lock), var(--lock)) left bottom / 1px 10px no-repeat,
		linear-gradient(var(--lock), var(--lock)) right bottom / 10px 1px no-repeat,
		linear-gradient(var(--lock), var(--lock)) right bottom / 1px 10px no-repeat,
		rgba(0, 240, 255, 0.035);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s var(--ease), transform 0.5s var(--ease);
}

/* …and the laser along the row's line. */
.dru-uplink .dru-field::after {
	content: "";
	position: absolute;
	left: var(--up-bleed);
	right: var(--up-bleed);
	bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, var(--cyan), var(--cyan) 70%, var(--up-gold));
	box-shadow: 0 0 8px rgba(0, 240, 255, 0.45);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.6s var(--ease);
	pointer-events: none;
}

.dru-uplink .dru-field:focus-within::before {
	opacity: 1;
	transform: none;
}

.dru-uplink .dru-field:focus-within::after,
.dru-uplink .dru-field[data-state="bad"]::after {
	transform: none;
}

.dru-uplink .dru-field[data-state="bad"]::after {
	background: var(--up-red);
	box-shadow: 0 0 8px rgba(255, 122, 122, 0.45);
}

.dru-uplink .dru-field > label:not(.dru-consent) {
	grid-area: label;
	min-width: 0;
	margin-bottom: 0.3rem;
	color: var(--muted);
	font: var(--up-label);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: inherit;
	transition: color 0.3s var(--ease);
}

.dru-uplink .dru-field:hover > label:not(.dru-consent) {
	color: var(--on-dark-muted);
}

.dru-uplink .dru-field:focus-within > label:not(.dru-consent) {
	color: var(--on-dark);
}

/* The row's number, its lamp. */
.dru-uplink .dru-field > label:not(.dru-consent)::before {
	content: counter(field, decimal-leading-zero);
	content: counter(field, decimal-leading-zero) / "";
	display: inline-block;
	min-width: 1.6em;
	margin-right: 0.85em;
	color: rgba(0, 240, 255, 0.4);
	letter-spacing: 0.06em;
	transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}

.dru-uplink .dru-field[data-state="typing"] > label::before {
	color: var(--up-gold);
	text-shadow: 0 0 8px rgba(255, 208, 0, 0.6);
}

.dru-uplink .dru-field[data-state="ok"] > label::before {
	color: var(--cyan);
	text-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
}

.dru-uplink .dru-field[data-state="bad"] > label::before {
	color: var(--up-red);
	text-shadow: 0 0 8px rgba(255, 122, 122, 0.6);
}

.dru-uplink .dru-field__optional {
	margin-left: 0.4em;
	color: rgba(141, 151, 170, 0.6);
	letter-spacing: 0.06em;
	text-transform: none;
}

.dru-uplink .dru-field > :is(input, select, textarea) {
	grid-area: input;
}

/* What is written: large, on no box at all. */
.dru-uplink .dru-field input[type="text"],
.dru-uplink .dru-field input[type="email"],
.dru-uplink .dru-field input[type="url"],
.dru-uplink .dru-field select,
.dru-uplink .dru-field textarea {
	width: 100%;
	min-height: 0;
	padding: 0.1rem 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	outline: none;
	color: #FFFFFF;
	font-size: var(--up-type);
	line-height: 1.35;
	letter-spacing: -0.01em;
	caret-color: var(--cyan);
}

/* Without JS the topic is still its select. */
.dru-uplink .dru-field select {
	padding-right: 1.75rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2300F0FF' stroke-width='1.6'/%3E%3C/svg%3E") right 0.2rem center no-repeat;
	cursor: pointer;
}

/* The message: ruled, a line to each line of text, scrolling with it. */
.dru-uplink .dru-field textarea {
	height: var(--up-area);
	font-size: 1rem;
	line-height: 1.5;
	resize: none;
	background-image: repeating-linear-gradient(transparent 0 calc(1.5em - 1px), rgba(255, 255, 255, 0.055) calc(1.5em - 1px) 1.5em);
	background-origin: content-box;
	background-attachment: local;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 240, 255, 0.35) transparent;
}

.dru-uplink .dru-field :is(input, textarea)::placeholder {
	color: rgba(141, 151, 170, 0.45);
}

/* A browser's autofill keeps the console's ink, not its own yellow. */
.dru-uplink .dru-field input:-webkit-autofill,
.dru-uplink .dru-field input:-webkit-autofill:hover,
.dru-uplink .dru-field input:-webkit-autofill:focus {
	-webkit-text-fill-color: #FFFFFF;
	caret-color: var(--cyan);
	transition: background-color 600000s 0s, color 600000s 0s;
}

.dru-uplink .dru-field > .dru-field__error {
	grid-area: error;
	margin-top: 0.3rem;
	color: var(--up-red);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.35;
}

.dru-uplink .dru-field > .dru-field__error:not(:empty)::before {
	content: "ERR //";
	content: "ERR //" / "";
	margin-right: 0.6em;
	font: var(--up-label);
	letter-spacing: 0.12em;
}

/* The count: how much is in the field, of how much it takes (uplink.js). */
.dru-uplink__io {
	grid-area: meta;
	justify-self: end;
	color: var(--muted);
	font: 500 0.625rem/1 var(--mono);
	letter-spacing: 0.08em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.3s var(--ease);
}

.dru-uplink__io:empty {
	display: none;
}

.dru-field:focus-within > .dru-uplink__io,
.dru-field[data-state]:not([data-state=""]) > .dru-uplink__io {
	opacity: 1;
}

.dru-uplink__io b {
	color: var(--on-dark-muted);
	font-weight: 500;
}

/* The topic as channels (uplink.js): the select stays the form's field. */
.dru-uplink .dru-field.has-channels {
	cursor: default;
}

.dru-uplink__channels {
	grid-area: input;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin-top: 0.1rem;
}

.dru-uplink__channel {
	position: relative;
	display: grid;
	grid-template-columns: auto auto minmax(0, 1fr);
	align-items: center;
	gap: 0.75rem;
	min-height: var(--up-chan);
	margin: 0;
	padding: 0.2rem 0.6rem;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 0;
	background: transparent;
	color: var(--on-dark-muted);
	font: inherit;
	font-size: 0.8125rem;
	line-height: 1.3;
	letter-spacing: 0;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.dru-uplink__channel:first-child {
	border-top: 0;
}

/* Its lamp… */
.dru-uplink__channel::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
	transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* …and the bar that marks the one tuned in. */
.dru-uplink__channel::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--cyan);
	box-shadow: 0 0 10px var(--cyan);
	transform: scaleY(0);
	transition: transform 0.35s var(--ease);
}

.dru-uplink__channel b {
	color: rgba(0, 240, 255, 0.55);
	font: 500 0.5625rem/1 var(--mono);
	letter-spacing: 0.12em;
	transition: color 0.25s var(--ease);
}

.dru-uplink__channel:hover {
	background: rgba(255, 255, 255, 0.03);
	color: #FFFFFF;
}

.dru-uplink__channel[aria-checked="true"] {
	background: rgba(0, 240, 255, 0.07);
	color: #FFFFFF;
}

.dru-uplink__channel[aria-checked="true"]::before {
	background: var(--cyan);
	box-shadow: 0 0 0 1px var(--cyan), 0 0 8px var(--cyan);
}

.dru-uplink__channel[aria-checked="true"]::after {
	transform: none;
}

.dru-uplink__channel[aria-checked="true"] b {
	color: var(--cyan);
}

.dru-uplink__channel:focus-visible {
	outline: 1px solid var(--cyan);
	outline-offset: -1px;
}

/* With channels, the select is the form's alone: out of sight. */
.dru-uplink .dru-field.has-channels > select {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* The consent: no number, no line; its own box. */
.dru-uplink .dru-field.dru-form__consent {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas:
		"label"
		"error";
	margin: 0;
	padding: var(--up-gap) 0 0;
	background: none;
	counter-increment: none;
	cursor: default;
}

.dru-uplink .dru-form__consent::before,
.dru-uplink .dru-form__consent::after {
	content: none;
}

.dru-uplink .dru-consent {
	grid-area: label;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.75rem;
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
}

.dru-uplink .dru-consent input {
	appearance: none;
	display: block;
	width: 1rem;
	height: 1rem;
	margin: 0.05rem 0 0;
	border: 0;
	border-radius: 2px;
	background: transparent;
	box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.55);
	cursor: pointer;
	transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.dru-uplink .dru-consent input:hover {
	box-shadow: inset 0 0 0 1px var(--cyan);
}

.dru-uplink .dru-consent input:checked {
	background: var(--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4.2 3.7 7 9 1' fill='none' stroke='%2305060B' stroke-width='1.8'/%3E%3C/svg%3E") center / 10px 8px no-repeat;
	box-shadow: inset 0 0 0 1px var(--cyan), 0 0 10px rgba(0, 240, 255, 0.55);
}

.dru-uplink .dru-consent input[aria-invalid="true"] {
	box-shadow: inset 0 0 0 1px var(--up-red);
}

.dru-uplink .dru-consent input:focus-visible {
	outline: 2px solid var(--cyan);
	outline-offset: 2px;
}

.dru-uplink .dru-consent a {
	color: var(--cyan);
	text-underline-offset: 2px;
}

.dru-uplink .dru-form__consent > .dru-field__error {
	margin-left: 1.75rem;
}

/* The controls: mono words, square corners. */
.dru-uplink .dru-form .dru-form__nav {
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: var(--up-gap);
}

.dru-uplink .dru-form .dru-btn {
	min-height: 2.75rem;
	padding: 0 1.1rem;
	gap: 0.75rem;
	border: 0;
	border-radius: 2px;
	font: 500 0.75rem/1 var(--mono);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.45s var(--ease);
}

/* The step's own button: an outline until the step is complete, then
   armed, filled with the signal (uplink.js adds .is-armed). */
.dru-uplink .dru-form .dru-btn:not(.dru-btn--secondary) {
	background: rgba(0, 240, 255, 0.07);
	color: var(--cyan);
	box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.5);
}

.dru-uplink .dru-form .dru-btn:not(.dru-btn--secondary):hover,
.dru-uplink .dru-form .dru-btn.is-armed {
	background: var(--cyan);
	color: var(--void);
	box-shadow: inset 0 0 0 1px var(--cyan), 0 0 32px -8px var(--cyan);
}

.dru-uplink .dru-form .dru-btn.is-armed:hover {
	background: #FFFFFF;
	box-shadow: inset 0 0 0 1px #FFFFFF, 0 0 40px -6px var(--cyan);
}

.dru-uplink .dru-form .dru-btn--secondary {
	background: transparent;
	color: var(--on-dark-muted);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.dru-uplink .dru-form .dru-btn--secondary:hover {
	background: rgba(255, 255, 255, 0.04);
	color: #FFFFFF;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.dru-uplink .dru-form .dru-btn:focus-visible {
	outline: 2px solid var(--cyan);
	outline-offset: 2px;
}

.dru-uplink .dru-form [data-next] {
	min-width: 10rem;
	margin-left: auto;
	justify-content: space-between;
}

.dru-uplink .dru-form :is([data-next], [type="submit"])::after {
	content: "→";
	content: "→" / "";
	transition: transform 0.45s var(--ease);
}

.dru-uplink .dru-form [data-prev]::before {
	content: "←";
	content: "←" / "";
	transition: transform 0.45s var(--ease);
}

.dru-uplink .dru-form :is([data-next], [type="submit"]):hover::after {
	transform: translateX(3px);
}

.dru-uplink .dru-form [data-prev]:hover::before {
	transform: translateX(-3px);
}

/* The send button: TX before its own words, the arrow at its end. */
.dru-uplink .dru-form [type="submit"] {
	flex: 1 1 auto;
	justify-content: flex-start;
}

.dru-uplink .dru-form [type="submit"]::before {
	content: "TX //";
	content: "TX //" / "";
	opacity: 0.6;
}

.dru-uplink .dru-form [type="submit"]::after {
	margin-left: auto;
}

/* Sending: the button runs while the request is out. */
.dru-uplink .dru-form.is-loading .dru-btn[type="submit"] {
	opacity: 1;
	background: repeating-linear-gradient(-45deg, rgba(0, 240, 255, 0.26) 0 8px, rgba(0, 240, 255, 0.1) 8px 16px) 0 0 / 22.63px 22.63px;
	color: var(--cyan);
	box-shadow: inset 0 0 0 1px var(--cyan);
}

.dru-uplink .dru-form__notice {
	margin-top: 0.75rem;
	padding: 0.6rem 0.8rem;
	border-radius: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
}

.dru-uplink .dru-form__notice--error {
	border-left: 2px solid var(--up-red);
	background: rgba(255, 122, 122, 0.07);
	color: #FFB3B3;
}

.dru-uplink .dru-form__notice--success {
	margin: 0;
	padding: 1rem 1.1rem;
	border-left: 2px solid var(--cyan);
	background: rgba(0, 240, 255, 0.06);
	color: var(--on-dark);
	font-size: 0.9375rem;
	line-height: 1.5;
}

/* Wide screens, a key to hand: Enter goes on as the button does. */
@media (min-width: 1024px) and (min-height: 760px) and (hover: hover) {
	.dru-js .dru-uplink [data-step="1"] > .dru-form__nav::before {
		content: "ENTER ↵";
		content: "ENTER ↵" / "";
		color: var(--muted);
		font: var(--up-label);
		letter-spacing: 0.14em;
		opacity: 0.75;
	}
}

/* ==========================================================================
   6. Deck, lock-on, launch, receipt
   ========================================================================== */

.dru-uplink__deck b {
	color: var(--on-dark);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

/* The form's error, read out across the deck (uplink.js): the notice
   itself stays in the form, for screen readers (2). */
.dru-uplink__alert {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0 clamp(1.25rem, 1.8vw, 1.75rem);
	border-radius: inherit;
	background: rgba(12, 4, 7, 0.96);
	color: #FFB3B3;
	font: 500 0.75rem/1.3 var(--font);
	letter-spacing: 0;
	white-space: normal;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

.dru-uplink__alert::before {
	content: "ERR //";
	flex: none;
	color: var(--up-red);
	font: var(--up-label);
	letter-spacing: 0.14em;
}

.dru-uplink__deck.is-alert {
	border-color: rgba(255, 122, 122, 0.45);
}

.dru-uplink__deck.is-alert > :not(.dru-uplink__alert) {
	visibility: hidden;
}

.dru-uplink__deck.is-alert .dru-uplink__alert {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.3s var(--ease), visibility 0s;
}

/* The signal's trace: a bar per recent keystroke (uplink.js scales them). */
.dru-uplink__wave {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	gap: 2px;
	height: 1rem;
	min-width: 0;
	overflow: hidden;
}

.dru-uplink__wave > i {
	flex: 1 1 0;
	height: 100%;
	background: linear-gradient(var(--cyan), rgba(0, 240, 255, 0.25));
	transform: scaleY(0.08);
	transform-origin: center;
	will-change: transform;
}

/* The session's log, at the window's foot where there is room for it. */
.dru-uplink__log {
	display: none;
}

@media (min-width: 1024px) and (min-height: 820px) {
	.dru-js .dru-uplink .dru-uplink__log {
		position: absolute;
		right: var(--up-inset);
		bottom: calc(var(--up-bottom) + var(--up-deck));
		z-index: 2;
		display: grid;
		grid-template-rows: auto minmax(0, 1fr);
		gap: 0.3rem;
		width: var(--up-console);
		height: clamp(4.5rem, 100vh - 50rem, 8.5rem);
		padding: 0.6rem clamp(1.25rem, 1.8vw, 1.75rem) 0.45rem;
		border-top: 1px solid var(--up-line);
		color: var(--muted);
		font: var(--up-label);
		letter-spacing: 0.08em;
		pointer-events: none;
	}
}

.dru-uplink__log-head {
	margin: 0;
	color: var(--cyan);
	letter-spacing: 0.16em;
}

.dru-uplink__log-rows {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 0;
	overflow: hidden;
}

.dru-uplink__log-rows > p {
	flex: none;
	height: 1.2rem;
	margin: 0;
	line-height: 1.2rem;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.dru-uplink__log-rows > p:last-child {
	color: #FFFFFF;
}

/* The lock-on: brackets round Kyiv, wherever the globe holds it. */
.dru-uplink__lock {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	width: 0;
	height: 0;
	opacity: 0;
	pointer-events: none;
	will-change: transform, opacity;
}

.dru-uplink__lock-ring {
	position: absolute;
	left: -2.25rem;
	top: -2.25rem;
	width: 4.5rem;
	height: 4.5rem;
	background:
		linear-gradient(var(--up-gold), var(--up-gold)) left top / 12px 1px no-repeat,
		linear-gradient(var(--up-gold), var(--up-gold)) left top / 1px 12px no-repeat,
		linear-gradient(var(--up-gold), var(--up-gold)) right top / 12px 1px no-repeat,
		linear-gradient(var(--up-gold), var(--up-gold)) right top / 1px 12px no-repeat,
		linear-gradient(var(--up-gold), var(--up-gold)) left bottom / 12px 1px no-repeat,
		linear-gradient(var(--up-gold), var(--up-gold)) left bottom / 1px 12px no-repeat,
		linear-gradient(var(--up-gold), var(--up-gold)) right bottom / 12px 1px no-repeat,
		linear-gradient(var(--up-gold), var(--up-gold)) right bottom / 1px 12px no-repeat;
	filter: drop-shadow(0 0 4px rgba(255, 208, 0, 0.6));
}

.dru-uplink__lock-label {
	position: absolute;
	right: -2.25rem;
	top: -3.5rem;
	color: var(--up-gold);
	font: var(--up-label);
	letter-spacing: 0.12em;
	white-space: nowrap;
}

/* Narrow consoles: the brackets alone (the label would cross the title). */
@media (max-width: 1199px) {
	.dru-uplink__lock-label {
		display: none;
	}
}

/* The light packet a message rides into Kyiv (uplink.js). */
.dru-uplink__packet {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 60;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border-radius: 50%;
	background: radial-gradient(circle, #FFFFFF 0 25%, var(--up-gold) 45%, rgba(0, 240, 255, 0.6) 70%, transparent 72%);
	box-shadow: 0 0 22px 6px rgba(0, 240, 255, 0.55), 0 0 60px 14px rgba(255, 208, 0, 0.3);
	pointer-events: none;
	will-change: transform, opacity;
}

.dru-uplink__trail {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 59;
	width: 6px;
	height: 6px;
	margin: -3px 0 0 -3px;
	border-radius: 50%;
	background: var(--cyan);
	box-shadow: 0 0 10px var(--cyan);
	pointer-events: none;
	will-change: transform, opacity;
}

/* The receipt: what was sent, as the console saw it (uplink.js), under
   the form's own confirmation. */
.dru-uplink__receipt {
	display: grid;
	gap: 0.45rem;
	padding: 0.9rem 1rem;
	border: 1px solid rgba(0, 240, 255, 0.3);
	border-left: 2px solid var(--up-gold);
	background: rgba(0, 240, 255, 0.04);
	color: var(--muted);
	font: var(--up-label);
	letter-spacing: 0.1em;
}

.dru-uplink .dru-join__panel > .dru-uplink__receipt {
	margin: 0.75rem 0 0;
}

.dru-uplink__receipt p {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
}

.dru-uplink__receipt b {
	color: #FFFFFF;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	text-align: right;
	overflow-wrap: anywhere;
}

.dru-uplink__receipt .is-head {
	color: var(--up-gold);
	letter-spacing: 0.16em;
}

/* ==========================================================================
   7. Reader: the Privacy Policy and the Terms
   ========================================================================== */

.dru-uplink__doc-bar {
	display: none;
}

@media (min-width: 1024px) and (min-height: 760px) {
	.dru-js .dru-uplink .dru-prose > .dru-wrap {
		display: block;
		max-width: none;
		padding: 0 clamp(1.5rem, 2.5vw, 2.5rem) 2.5rem;
	}

	.dru-js .dru-uplink .dru-prose .dru-prose__aside {
		position: static;
		margin: 1.5rem 0 1.25rem;
	}

	.dru-js .dru-uplink .dru-prose .dru-prose__body {
		max-width: 44rem;
	}

	/* Its head: the file open, the other file, and the way out. */
	.dru-js .dru-uplink .dru-uplink__doc-bar {
		position: sticky;
		top: 0;
		z-index: 2;
		display: flex;
		align-items: center;
		gap: 0.75rem;
		padding: 0.75rem clamp(1.5rem, 2.5vw, 2.5rem);
		border-bottom: 1px solid var(--up-line);
		background: rgba(3, 5, 10, 0.97);
		color: var(--muted);
		font: var(--up-label);
		letter-spacing: 0.12em;
	}

	.dru-uplink__doc-bar b {
		color: var(--cyan);
		font-weight: 500;
	}

	.dru-uplink__doc-bar a,
	.dru-uplink__doc-bar button {
		padding: 0.35rem 0.55rem;
		border: 1px solid rgba(255, 255, 255, 0.16);
		border-radius: 2px;
		background: transparent;
		color: var(--on-dark);
		font: inherit;
		letter-spacing: inherit;
		text-decoration: none;
		cursor: pointer;
	}

	.dru-uplink__doc-bar button {
		margin-left: auto;
		border-color: rgba(0, 240, 255, 0.4);
		color: var(--cyan);
	}

	.dru-uplink__doc-bar :is(a, button):hover,
	.dru-uplink__doc-bar :is(a, button):focus-visible {
		background: rgba(0, 240, 255, 0.1);
		color: #FFFFFF;
	}
}

/* ==========================================================================
   8. Entrances
   From first paint, without JS: the bar, the title opened behind a shutter,
   the window drawn down from its top edge and its contents after it, the
   channels one by one, the deck. A page that arrived by a page transition
   holds all of it until the router's entrance starts (uplink.js adds
   .is-arriving).
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
	.dru-uplink__bar {
		animation: up-fade 0.8s var(--ease) 0.1s backwards;
	}

	.dru-uplink__rule {
		animation: up-draw 1.4s var(--ease) 0.3s backwards;
	}

	.dru-uplink .dru-trust h1,
	.dru-page[data-dru-entered] .dru-uplink.is-arriving .dru-trust h1 {
		animation: up-shutter 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.25s backwards;
	}

	.dru-uplink .dru-trust .dru-trust__standfirst,
	.dru-page[data-dru-entered] .dru-uplink.is-arriving .dru-trust .dru-trust__standfirst {
		animation: up-shutter 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.65s backwards;
	}

	.dru-uplink .dru-trust .dru-trust__actions {
		animation: up-fade 0.8s var(--ease) 0.9s backwards;
	}

	.dru-uplink .dru-facts > * {
		animation: up-shutter 0.8s cubic-bezier(0.65, 0, 0.35, 1) backwards;
	}

	.dru-uplink .dru-facts > :nth-child(1) { animation-delay: 0.95s; }
	.dru-uplink .dru-facts > :nth-child(2) { animation-delay: 1.05s; }
	.dru-uplink .dru-facts > :nth-child(3) { animation-delay: 1.15s; }
	.dru-uplink .dru-facts > :nth-child(4) { animation-delay: 1.25s; }

	.dru-uplink .dru-join__form::before {
		animation: up-drop 1s cubic-bezier(0.65, 0, 0.35, 1) 0.35s backwards;
	}

	.dru-uplink .dru-join__aside > :is(h2, p),
	.dru-uplink .dru-form__progress {
		animation: up-fade 0.7s var(--ease) 1s backwards;
	}

	/* The form's rows come in one after another: after the window as the
	   page arrives, at once whenever a step changes. */
	.dru-uplink .dru-form__step:not([hidden]) :is(.dru-field, .dru-form__nav) {
		animation: up-row 0.6s var(--ease) calc(var(--up-in) + var(--up-n, 0) * 0.06s) backwards;
	}

	.dru-uplink .dru-form__grid > :nth-child(2) { --up-n: 1; }
	.dru-uplink .dru-form__grid > :nth-child(3) { --up-n: 2; }
	.dru-uplink .dru-form__grid > :nth-child(4) { --up-n: 3; }
	.dru-uplink .dru-form__consent { --up-n: 2; }
	.dru-uplink .dru-form__nav { --up-n: 4; }

	/* A row locked on: the brackets close in from a little further out. */
	.dru-uplink .dru-field::before {
		transform: scale(1.03, 1.2);
	}

	.dru-uplink .dru-uplink__deck,
	.dru-uplink .dru-uplink__log {
		animation: up-fade 0.7s var(--ease) 1.2s backwards;
	}

	/* An armed button: one sweep of light across it. */
	.dru-uplink .dru-form .dru-btn.is-armed {
		background-image: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.7) 50%, transparent 62%);
		background-size: 250% 100%;
		background-repeat: no-repeat;
		animation: up-charge 0.9s var(--ease) both;
	}

	.dru-uplink .dru-form.is-loading .dru-btn[type="submit"] {
		animation: up-run 0.6s linear infinite;
	}

	.dru-page[data-dru-entered] .dru-uplink:not(.is-arriving) :is(.dru-uplink__bar, .dru-uplink__rule, .dru-trust__actions, .dru-facts > *, .dru-join__aside > h2, .dru-join__aside > p, .dru-form__progress, .dru-field, .dru-form__nav, .dru-uplink__deck, .dru-uplink__log),
	.dru-page[data-dru-entered] .dru-uplink:not(.is-arriving) .dru-join__form::before {
		animation: none;
	}

	/* The lock-on's brackets breathe (a scale: composited). */
	.dru-uplink__lock-ring {
		animation: up-breathe 2.4s ease-in-out infinite;
	}
}

@keyframes up-fade {
	from { opacity: 0; }
}

@keyframes up-draw {
	from { transform: scaleX(0); }
}

@keyframes up-shutter {
	from { clip-path: inset(-0.3em 100% -0.3em 0); }
	to { clip-path: inset(-0.3em 0 -0.3em 0); }
}

@keyframes up-drop {
	from { transform: scaleY(0); opacity: 0.4; }
}

@keyframes up-breathe {
	50% { transform: scale(0.86); }
}

@keyframes up-row {
	from { opacity: 0; transform: translate3d(0, 0.6rem, 0); }
}

@keyframes up-charge {
	from { background-position: 100% 0; }
	to { background-position: 0 0; }
}

@keyframes up-run {
	to { background-position: 22.63px 0; }
}

/* A message landing: the brackets snap shut and open again. */
.dru-uplink__lock.is-hit .dru-uplink__lock-ring {
	animation: up-hit 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes up-hit {
	0% { transform: scale(1); }
	25% { transform: scale(0.45); }
	100% { transform: scale(1); }
}

/* ==========================================================================
   9. Small screens (and short ones): an ordinary page
   ========================================================================== */

@media (max-width: 1023px), (max-height: 759px) {
	.dru-uplink .dru-trust {
		padding-top: calc(var(--header-h) + 3.5rem);
	}

	.dru-uplink .dru-join__form {
		margin-top: 0;
	}

	.dru-uplink .dru-join__panel .dru-form {
		padding: 1.25rem;
		border: 1px solid rgba(0, 240, 255, 0.22);
		border-radius: 4px;
		background: var(--up-glass);
	}

	.dru-uplink .dru-facts {
		margin-top: 1rem;
	}
}

@media (max-width: 639px) {
	.dru-uplink__bar .dru-uplink__node,
	.dru-uplink__bar .dru-uplink__tag:nth-child(3) {
		display: none;
	}

	/* The controls, one to a line; their words may wrap. */
	.dru-uplink .dru-form .dru-form__nav {
		flex-wrap: wrap;
	}

	.dru-uplink .dru-form .dru-form__nav .dru-btn {
		flex: 1 1 100%;
		padding-block: 0.6rem;
		line-height: 1.3;
		letter-spacing: 0.1em;
		white-space: normal;
	}
}
