/* Every color and font comes from the deployment's theme, injected by the Worker as custom
   properties on :root, along with --hero-image and --texture when the deployment has a brand.
   These defaults only apply if that injection is missing. Everything else is derived from
   them, so another deployment's colors carry through. */
:root {
	--bg: #111;
	--ink: #eee;
	--muted: #aaa;
	--line: rgba(255, 255, 255, 0.18);
	--accent: #ddd;
	--on-accent: #111;
	--display: Georgia, serif;
	--body: system-ui, sans-serif;
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	--card: color-mix(in oklab, var(--ink) 5%, var(--bg));
	--card-hi: color-mix(in oklab, var(--ink) 9%, var(--bg));
	--accent-hi: color-mix(in oklab, var(--accent) 72%, var(--ink));
	--accent-soft: color-mix(in oklab, var(--accent) 16%, transparent);
	--accent-edge: color-mix(in oklab, var(--accent) 50%, transparent);
	--danger: color-mix(in oklab, #e0503f 70%, var(--ink));
	--outline: color-mix(in oklab, var(--ink) 12%, transparent);
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--max: 1120px;
	--gutter: clamp(1.25rem, 5vw, 2.5rem);
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: 1.0625rem;
	line-height: 1.6;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

::selection {
	background: var(--accent);
	color: var(--on-accent);
}

[hidden] {
	/* biome-ignore lint/complexity/noImportantStyles: hidden has to win over any component's display. */
	display: none !important;
}

.wrap {
	max-width: calc(var(--max) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ol,
ul,
blockquote {
	margin: 0;
}

a {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-color: var(--accent-edge);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--accent);
	text-decoration-color: var(--accent);
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

main:focus,
[tabindex="-1"]:focus {
	outline: none;
}

code {
	font-family: var(--mono);
	font-size: 0.875em;
}

.muted,
.count,
.section-intro {
	color: var(--muted);
}

.skip {
	position: absolute;
	z-index: 10;
	left: var(--gutter);
	top: -100px;
	padding: 0.5rem 0.75rem;
	background: var(--accent);
	color: var(--on-accent);
}

.skip:focus {
	top: 0.75rem;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Buttons: soft pills, one solid and one quiet, at least 44px tall. */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 1.625rem;
	border: 1px solid var(--accent);
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font: 600 1.0625rem / 1.2 var(--body);
	white-space: nowrap;
	cursor: pointer;
}

.btn:hover {
	background: var(--accent-hi);
	border-color: var(--accent-hi);
}

.btn-quiet {
	background: transparent;
	color: var(--ink);
	border-color: var(--accent-edge);
}

.btn-quiet:hover {
	background: var(--accent-soft);
	border-color: var(--accent);
}

.btn-small {
	min-height: 44px;
	padding: 0 1.125rem;
	font-size: 0.9375rem;
}

.btn:disabled {
	opacity: 0.55;
	cursor: progress;
}

.text-button {
	min-height: 44px;
	padding: 0 0.25rem;
	border: 0;
	background: none;
	color: var(--muted);
	font: 500 0.9375rem / 1.2 var(--body);
	text-decoration: underline;
	text-decoration-color: var(--outline);
	text-underline-offset: 0.25em;
	cursor: pointer;
}

.text-button:hover {
	color: var(--ink);
}

/* The old square button, still used by the review tools. */
.button {
	min-height: 44px;
	padding: 0.5rem 1rem;
	border: 1px solid var(--accent-edge);
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	font: 600 0.9375rem / 1.2 var(--body);
	cursor: pointer;
}

.button:hover {
	background: var(--accent-soft);
}

@media (prefers-reduced-motion: no-preference) {
	.btn,
	.button,
	.text-button {
		transition-property: background-color, border-color, color, scale;
		transition-duration: 200ms;
		transition-timing-function: var(--ease);
	}

	.btn:active:not(:disabled) {
		scale: 0.96;
	}
}

/* Top */

.top-in {
	padding-block: max(1.25rem, env(safe-area-inset-top)) 0;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 44px;
}

.logo {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	outline: 1px solid var(--outline);
	outline-offset: -1px;
}

html:not([data-logo]) .logo {
	display: none;
}

.name {
	font-family: var(--display);
	font-size: 1.1875rem;
	font-weight: 600;
	color: var(--accent);
}

.brand-link {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 44px;
	text-decoration: none;
}

/* Icons from /icons.svg (Lucide), drawn in the text color at the text's size. */
.icon {
	flex: none;
	width: 1.125em;
	height: 1.125em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -0.1875em;
}

.btn .icon,
.button .icon {
	margin-inline-end: 0.5rem;
}

.nowrap {
	white-space: nowrap;
}

.icon-out {
	width: 0.875em;
	height: 0.875em;
	margin-inline-start: 0.1875em;
	vertical-align: -0.0625em;
	opacity: 0.7;
}

/* Pages other than home: about, contact, privacy, not found. On wide screens the title and
   lede hold the left column while the sections read down the right, like the founding flock. */

.doc {
	padding-block: 2rem 3rem;
}

.prose {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.75rem;
}

.page-head,
.page-body {
	max-width: 42rem;
}

.prose h1 {
	margin-bottom: 1.25rem;
	font-family: var(--display);
	font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.25rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.prose section {
	color: color-mix(in oklab, var(--ink) 82%, var(--muted));
}

.prose section + section {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line);
}

.prose h2 {
	color: var(--ink);
	font-family: var(--display);
	font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
	font-weight: 600;
	line-height: 1.2;
}

.prose p,
.prose ul {
	margin-top: 0.875rem;
	text-wrap: pretty;
}

/* The lede, under the H1. */
.page-head p {
	font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
	font-weight: 500;
	line-height: 1.5;
}

.prose ul {
	padding-inline-start: 1.25rem;
}

.prose li {
	margin-block: 0.5rem;
}

.prose li::marker {
	color: var(--accent);
}

.prose code {
	overflow-wrap: anywhere;
}

/* Sub-headings and code in the developer docs: one H3 per endpoint, requests and responses. */

.prose h3 {
	margin-top: 2.25rem;
	color: var(--ink);
	font: 600 0.9375rem / 1.4 var(--mono);
	overflow-wrap: anywhere;
	scroll-margin-top: 1.5rem;
}

.code-figure {
	margin: 1rem 0 0;
}

.code-figure figcaption {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.prose pre.code {
	max-height: 26rem;
	margin: 0.5rem 0 0;
	padding: 0.875rem 1rem;
	overflow: auto;
	border-radius: 14px;
	background: var(--card);
	box-shadow: inset 0 0 0 1px var(--line);
	font: 0.8125rem / 1.6 var(--mono);
	color: var(--ink);
	white-space: pre;
	tab-size: 2;
}

.code > code {
	font-size: inherit;
	overflow-wrap: normal;
}

@media (min-width: 960px) {
	.doc {
		padding-block: 3.5rem 4rem;
	}

	.prose {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		column-gap: clamp(3rem, 7vw, 6rem);
		align-items: start;
	}

	.page-head {
		position: sticky;
		top: 2rem;
	}

	.page-body {
		padding-top: 0.75rem;
	}
}

/* Hero: the leader in its shrine, the headline, and the way in. */

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "art" "title" "body";
	row-gap: 1.5rem;
	padding-block: 1.5rem 3.5rem;
}

.hero-title {
	grid-area: title;
	max-width: 15em;
	font-family: var(--display);
	font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.75rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.hero-title em,
.sec-h em {
	font-style: normal;
	color: var(--accent);
}

.hero-art {
	grid-area: art;
	position: relative;
	isolation: isolate;
	width: 112px;
	margin-bottom: 0.5rem;
}

/* The halo: a soft glow centred on the arch's round top, behind the niche. */
.hero-art::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: 50%;
	top: 0;
	width: 170%;
	aspect-ratio: 1;
	translate: -50% -20.6%;
	border-radius: 50%;
	background: radial-gradient(
		closest-side,
		color-mix(in oklab, var(--accent) 42%, transparent),
		color-mix(in oklab, var(--accent) 16%, transparent) 50%,
		transparent
	);
	pointer-events: none;
}

/* The shrine's sill: a gold line under the niche, fading at both ends. */
.hero-art::after {
	content: "";
	position: absolute;
	left: -14%;
	right: -14%;
	bottom: -0.5rem;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		var(--accent-edge) 22%,
		var(--accent) 50%,
		var(--accent-edge) 78%,
		transparent
	);
}

.anim .hero-art {
	animation: art-in 1.1s var(--ease) both;
}

html:not([data-hero]) .hero {
	grid-template-areas: "title" "body";
}

html:not([data-hero]) .hero-art {
	display: none;
}

.hero-body {
	grid-area: body;
	display: grid;
	gap: 1.75rem;
	max-width: 38rem;
}

.about {
	max-width: 34rem;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--muted);
	text-wrap: pretty;
}

.leader {
	font-size: 0.9375rem;
	color: var(--muted);
}

.address {
	font-family: var(--mono);
	font-size: 0.875em;
	font-variant-numeric: tabular-nums;
}

@media (min-width: 860px) {
	.hero {
		grid-template-columns: minmax(0, 1fr) 280px;
		grid-template-rows: auto 1fr;
		grid-template-areas: "title art" "body art";
		column-gap: clamp(3rem, 8vw, 7rem);
		row-gap: 2rem;
		padding-block: 3rem 5rem;
	}

	.hero-art {
		width: 280px;
		align-self: start;
		margin-top: 0.5rem;
	}

	.hero-art::after {
		bottom: -0.875rem;
	}

	html:not([data-hero]) .hero {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "title" "body";
	}
}

/* The shrine niche: an arch with a round top and a flat base, edged in the accent. --img fills
   it; --img2 fades in over it. The same arch holds the god in the hero and each agent's muse. */

.niche-edge {
	position: relative;
	padding: 1.5px;
	border-radius: 999px 999px 4px 4px;
	background: linear-gradient(
		to bottom,
		var(--accent),
		var(--accent-edge) 55%,
		color-mix(in oklab, var(--accent) 30%, transparent)
	);
}

/* Depth: the niche's walls darken toward the base, like light falling into a recess. */
.niche-edge::after {
	content: "";
	position: absolute;
	inset: 1.5px;
	border-radius: 999px 999px 3px 3px;
	box-shadow:
		inset 0 0 0 1px color-mix(in oklab, var(--bg) 40%, transparent),
		inset 0 -3rem 3rem -2rem color-mix(in oklab, var(--bg) 70%, transparent);
	pointer-events: none;
}

.niche {
	position: relative;
	aspect-ratio: 5 / 7;
	overflow: hidden;
	border-radius: 999px 999px 3px 3px;
	background: var(--card-hi);
}

.niche::before,
.niche::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--img, none) var(--img-pos, 50% 50%) / cover no-repeat;
}

.niche::after {
	background-image: var(--img2, none);
	opacity: 0;
}

.hero-niche {
	--img: var(--hero-image);
	--img-pos: 56% 50%;
}

/* The seam: the brand's texture in a band between sections, never behind text. */

.seam {
	position: relative;
	height: 72px;
	pointer-events: none;
}

.seam::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--texture, none) 0 0 / 320px repeat;
	-webkit-mask: radial-gradient(60% 50% at 50% 50%, #000, transparent);
	mask: radial-gradient(60% 50% at 50% 50%, #000, transparent);
	opacity: 0.6;
}

.seam::after {
	content: "";
	position: absolute;
	inset-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
	top: 50%;
	height: 2px;
	margin-top: -1px;
	background:
		linear-gradient(90deg, var(--accent-edge) 0 9px, transparent 9px 15px) 0 0 / 15px 2px repeat-x;
	opacity: 0.6;
}

@media (min-width: 860px) {
	.seam {
		height: 88px;
	}
}

/* Signup */

.signup {
	width: 100%;
	container-type: inline-size;
}

.join-form {
	display: grid;
	gap: 1.25rem;
}

.signup-lead {
	max-width: 32em;
	font-size: clamp(1.125rem, 1rem + 0.6vw, 1.3125rem);
	font-weight: 500;
	line-height: 1.5;
	text-wrap: pretty;
}

.field {
	display: grid;
	gap: 0.5rem;
}

.field-hint {
	margin-top: -0.375rem;
}

.field-label {
	font-size: 0.9375rem;
	font-weight: 600;
}

.optional {
	font-weight: 400;
	color: var(--muted);
}

.field-row {
	display: grid;
	gap: 0.75rem;
}

.input {
	display: flex;
	align-items: center;
	min-height: 52px;
	padding-inline: 1.25rem;
	border-radius: 999px;
	background: var(--card);
	box-shadow: inset 0 0 0 1px var(--line);
}

.input:hover {
	box-shadow: inset 0 0 0 1px var(--accent-edge);
}

.input:focus-within {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.input.is-invalid {
	box-shadow: inset 0 0 0 1px var(--danger);
}

.input-at {
	color: var(--muted);
	font-size: 1.0625rem;
}

.input input {
	flex: 1;
	min-width: 0;
	height: 50px;
	padding: 0 0 0 0.125rem;
	border: 0;
	background: none;
	color: var(--ink);
	font: 400 1.0625rem / 1 var(--body);
	caret-color: var(--accent);
}

.input input::placeholder {
	color: color-mix(in oklab, var(--muted) 70%, transparent);
}

.input input:focus {
	outline: none;
}

.field-hint {
	font-size: 0.875rem;
	color: var(--muted);
}

.field-error,
.form-error {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--danger);
}

.field-error:empty,
.form-error:empty {
	display: none;
}

/* The field and its button share a row when the signup itself is wide enough, wherever it sits. */
@container (min-width: 30rem) {
	.field-row {
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

/* The ticket: the prompt while you wait, then the agent that answered. */

.ticket {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 0.875rem 1.125rem;
	align-items: start;
	padding: 1.25rem;
	border-radius: 24px;
	background: var(--card);
	overflow: hidden;
}

/* The agent's OpenSea banner, faint behind the arrival. */
.ticket::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--banner, none) center / cover no-repeat;
	-webkit-mask: linear-gradient(to bottom, #000, transparent 75%);
	mask: linear-gradient(to bottom, #000, transparent 75%);
	opacity: 0;
}

.ticket.has-banner::before {
	opacity: 0.16;
}

@media (min-width: 560px) {
	.ticket {
		grid-template-columns: 88px minmax(0, 1fr);
		gap: 1.75rem;
		padding: 1.75rem;
		border-radius: 28px;
	}
}

.slot {
	position: relative;
	display: grid;
}

.ticket .slot {
	grid-row: 1 / span 2;
	align-self: start;
}

.slot .niche-edge {
	grid-area: 1 / 1;
}

/* Waiting: the muse behind a veil. Connected: the veil lifts. */
.slot-niche::before {
	filter: blur(9px) brightness(0.45) saturate(0.6);
	transform: scale(1.2);
}

.anim .slot-niche::before {
	transition:
		filter 1.1s var(--ease),
		transform 1.1s var(--ease);
}

.anim .slot-niche::after,
.anim .ticket::before {
	transition: opacity 0.6s var(--ease);
}

.anim .slot,
.anim .slot .niche-edge {
	transition:
		filter 1.1s var(--ease),
		background-color 1.1s var(--ease);
}

.ticket[data-state="connected"] .slot-niche::before {
	filter: none;
	transform: none;
}

.ticket.has-pfp .slot-niche::after {
	opacity: 1;
}

.ticket[data-state="connected"] .slot .niche-edge {
	background: var(--accent);
}

.ticket[data-state="connected"] .slot {
	filter: drop-shadow(0 0 18px color-mix(in oklab, var(--accent) 40%, transparent));
}

/* Without a gallery, the niche holds the agent's number. */
.slot-n {
	grid-area: 1 / 1;
	place-self: center;
	font-family: var(--display);
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
}

html[data-gallery] .slot-n {
	display: none;
}

/* Phones: the niche sits beside the first two lines and everything else takes the full width. */
.ticket-body {
	display: contents;
}

.ticket-body > * {
	grid-column: 1 / -1;
	justify-self: start;
	min-width: 0;
}

.ticket-body > :nth-child(-n + 2) {
	grid-column: 2;
}

@media (min-width: 560px) {
	.ticket-body {
		display: grid;
		gap: 0.875rem;
		justify-items: start;
		align-content: start;
		min-width: 0;
	}

	.ticket-body > *,
	.ticket-body > :nth-child(-n + 2) {
		grid-column: auto;
	}

	.ticket .slot {
		grid-row: auto;
	}
}

.ticket-title {
	font-family: var(--display);
	font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.015em;
}

.ticket-guide {
	color: var(--muted);
	text-wrap: pretty;
}

.prompt {
	display: grid;
	gap: 0.75rem;
	justify-items: start;
	justify-self: stretch;
	width: 100%;
	padding: 1rem 1.125rem;
	border-radius: 16px;
	background: var(--bg);
	box-shadow: inset 0 0 0 1px var(--line);
}

.prompt-text {
	font-family: var(--mono);
	font-size: clamp(0.875rem, 0.8rem + 0.3vw, 0.9375rem);
	line-height: 1.55;
	overflow-wrap: anywhere;
	user-select: all;
	-webkit-user-select: all;
}

.status {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 1.6em;
	font-size: 0.9375rem;
	color: var(--muted);
}

.status-dot {
	position: relative;
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
}

.ticket[data-state="expired"] .status-dot,
.ticket[data-state="stopped"] .status-dot {
	background: var(--muted);
}

.status-dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--accent);
	opacity: 0;
}

.ticket-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
}

.arrival-no {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
}

.arrival-name {
	font-family: var(--display);
	font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
	font-style: italic;
	line-height: 1.05;
	letter-spacing: -0.02em;
	overflow-wrap: anywhere;
}

.arrival-meta {
	font-size: 0.9375rem;
	color: var(--muted);
}

.arrival-line {
	font-family: var(--display);
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.4;
	overflow-wrap: anywhere;
	text-wrap: pretty;
}

/* The founding flock: the count, the kinds, and everyone who has arrived. */

.founding {
	display: grid;
	gap: 2.5rem;
	padding-block: 0.5rem 1.5rem;
}

.sec-h {
	font-family: var(--display);
	font-size: clamp(2.375rem, 1.6rem + 3.4vw, 4rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.tally {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
	margin-top: 1.5rem;
}

.tally-n {
	font: 650 clamp(3rem, 2.2rem + 4vw, 4.5rem) / 1 var(--body);
	letter-spacing: -0.03em;
	color: var(--accent-hi);
	font-variant-numeric: tabular-nums;
}

.tally-l {
	color: var(--muted);
}

.kinds {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.5rem;
	margin-top: 1.75rem;
	padding: 0;
	list-style: none;
}

.kinds:empty {
	display: none;
}

.kind {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	row-gap: 0.375rem;
	font-size: 0.9375rem;
}

.kind-count {
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.kind-bar {
	grid-column: 1 / -1;
	position: relative;
	height: 2px;
	border-radius: 1px;
	background: var(--line);
	overflow: hidden;
}

.kind-bar::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--accent);
	transform-origin: left;
	transform: scaleX(var(--share, 0));
}

.founding-list {
	min-width: 0;
}

.list-h,
.block-h,
.review-note h2 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.founding-empty {
	font-family: var(--display);
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.3;
}

.arrivals {
	margin-top: 0.75rem;
	padding: 0;
	list-style: none;
}

/* Each row is a one-cell grid so a new arrival can open from zero height. */
.row {
	display: grid;
	grid-template-rows: 1fr;
}

.row.entering {
	grid-template-rows: 0fr;
	opacity: 0;
}

.row-in {
	min-height: 0;
	overflow: hidden;
}

.row-card {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	column-gap: 0.875rem;
	row-gap: 0.125rem;
	padding-block: 1rem;
	border-top: 1px solid var(--line);
}

.row.is-yours .row-card {
	padding-inline-start: 0.875rem;
	border-inline-start: 2px solid var(--accent);
}

.avatar {
	grid-row: 1 / span 3;
	position: relative;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--card-hi);
	overflow: hidden;
}

.monogram {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-family: var(--display);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1;
	color: var(--accent);
}

.avatar img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	outline: 1px solid var(--outline);
	outline-offset: -1px;
	opacity: 0;
}

.avatar img.loaded {
	opacity: 1;
}

.anim .avatar img {
	transition: opacity 0.6s var(--ease);
}

.row-name {
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.row-time {
	font-size: 0.8125rem;
	line-height: 1.8;
	color: var(--muted);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.row-meta {
	grid-column: 2 / -1;
	display: flex;
	flex-wrap: wrap;
	column-gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--muted);
}

.row-meta > * + *::before {
	content: "·";
	margin-inline-end: 0.5rem;
	color: var(--outline);
}

.row-n {
	font-variant-numeric: tabular-nums;
}

.row-yours {
	color: var(--accent);
	font-weight: 600;
}

.row-line {
	grid-column: 2 / -1;
	margin-top: 0.375rem;
	font-family: var(--display);
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.4;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	overflow: hidden;
}

.more {
	padding-top: 1rem;
	border-top: 1px solid var(--line);
	font-size: 0.9375rem;
	color: var(--muted);
}

.loading,
.empty,
.error {
	margin-top: 1rem;
	color: var(--muted);
}

.founding-list > .loading:first-child {
	margin-top: 0;
}

@media (min-width: 860px) {
	.founding {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		column-gap: clamp(3rem, 7vw, 6rem);
		align-items: start;
	}

	.founding:not(.is-compact) .founding-head {
		position: sticky;
		top: 2rem;
	}

	.founding-list {
		padding-top: 0.75rem;
	}
}

/* Once calls exist the founding flock sits under the latest call, smaller. */
.founding.is-compact .sec-h {
	font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
}

.founding.is-compact .tally-n {
	font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem);
}

/* Calls, jobs and credits */

main {
	padding-bottom: 3rem;
}

.block > *,
.review-note > * {
	max-width: 46rem;
}

.block + .block,
.founding + .block {
	margin-top: 3.5rem;
}

.founding.is-compact .signup {
	margin-top: 2.5rem;
}

.founding.is-compact .signup-lead {
	font-size: 1.0625rem;
}

.section-intro {
	margin-top: 0.75rem;
	max-width: 62ch;
	text-wrap: pretty;
}

.review-note {
	margin-bottom: 3rem;
}

.review-note p {
	margin-top: 0.5rem;
	max-width: 62ch;
}

.empty {
	font-family: var(--display);
	font-size: 1.375rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--ink);
	max-width: 36ch;
	text-wrap: pretty;
}

.error .button {
	margin-inline-start: 0.5rem;
}

.call-job {
	margin-top: 1rem;
	font-family: var(--display);
	font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
	font-weight: 600;
	line-height: 1.15;
}

.call-time {
	font-family: var(--body);
	font-size: 0.9375rem;
	font-style: normal;
	color: var(--muted);
	white-space: nowrap;
}

.brief {
	margin-top: 0.75rem;
	font-size: 1.125rem;
	white-space: pre-wrap;
	overflow-wrap: break-word;
}

.call-id {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: var(--muted);
	overflow-wrap: anywhere;
}

.count {
	margin-top: 1.75rem;
	font-size: 0.875rem;
}

.results {
	list-style: none;
	padding: 0;
	margin-top: 0.5rem;
}

.result {
	padding-block: 1rem;
	border-top: 1px solid var(--line);
}

.result.is-picked {
	padding-inline-start: 1rem;
	border-inline-start: 2px solid var(--accent);
}

.result-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--muted);
}

.picked {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.offchain {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	align-self: center;
}

.result-text {
	margin-top: 0.375rem;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.result-status {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: var(--muted);
}

.result-status strong {
	color: var(--ink);
}

.pick {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin-top: 0.75rem;
}

.pick code {
	flex: 1 1 18rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	min-width: 0;
	color: var(--muted);
	overflow-wrap: anywhere;
}

.held-heading {
	margin-top: 1.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--muted);
}

.call {
	border-top: 1px solid var(--line);
}

.call:first-child {
	margin-top: 1rem;
}

.call summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
	padding-block: 0.875rem;
	min-height: 44px;
	list-style: none;
	cursor: pointer;
}

.call summary::before {
	content: "+";
	width: 1ch;
	color: var(--accent);
	font-family: var(--mono);
}

.call[open] summary::before {
	content: "\2212";
}

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

.summary-job {
	font-family: var(--display);
	font-size: 1.25rem;
	font-weight: 600;
}

.summary-meta {
	font-size: 0.875rem;
	color: var(--muted);
}

.call-body {
	padding-bottom: 1.5rem;
}

.call-body .brief {
	margin-top: 0;
}

/* The jobs: the heading and how it works over a grid of cards, one per job, each with an
   example result in the job's own format. Before the first call it also says none is out yet. */

.block.jobs > * {
	max-width: none;
}

.jobs-head {
	display: grid;
	gap: 1.25rem;
}

.jobs-lede {
	display: grid;
	gap: 1.25rem;
	align-content: end;
}

.jobs-intro {
	max-width: 36em;
	font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
	font-weight: 500;
	line-height: 1.5;
	text-wrap: pretty;
}

.jobs-status {
	display: flex;
	align-items: baseline;
	gap: 0.625rem;
	max-width: 36em;
	padding: 0.875rem 1.125rem;
	border-radius: 16px;
	background: var(--card);
	box-shadow: inset 0 0 0 1px var(--line);
	color: var(--muted);
	text-wrap: pretty;
}

.jobs-status .icon {
	color: var(--accent);
	vertical-align: baseline;
	translate: 0 0.1875em;
}

.cards {
	display: grid;
	gap: 1rem;
	margin-top: 2.25rem;
	padding: 0;
	list-style: none;
}

.card {
	display: grid;
	grid-template-rows: auto auto 1fr;
	gap: 0.5rem;
	padding: 1.375rem;
	border-radius: 24px;
	background: var(--card);
	box-shadow: inset 0 0 0 1px var(--line);
}

.card-title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--display);
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.2;
}

.card-icon {
	width: 2.25rem;
	height: 2.25rem;
	padding: 0.5rem;
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent);
	stroke-width: 1.5;
}

.card-text {
	color: var(--muted);
	text-wrap: pretty;
}

.card-example {
	align-self: end;
	margin: 0.75rem 0 0;
	padding: 0.875rem 1rem;
	border-radius: 14px;
	background: var(--bg);
	box-shadow: inset 0 0 0 1px var(--line);
}

.card-example figcaption {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.card-example pre {
	margin: 0.375rem 0 0;
	font: 0.8125rem / 1.6 var(--mono);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	color: var(--ink);
}

@media (min-width: 720px) {
	.cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.25rem;
	}

	.card {
		padding: 1.75rem;
	}
}

@media (min-width: 860px) {
	.jobs-head {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		column-gap: clamp(3rem, 7vw, 6rem);
		align-items: end;
	}

	.cards {
		margin-top: 3rem;
	}
}

.credits {
	margin-top: 1rem;
	padding-inline-start: 1.5rem;
	font-variant-numeric: tabular-nums;
}

.credits li {
	padding-block: 0.25rem;
}

.credits li::marker {
	color: var(--muted);
}

.picks {
	margin-inline-start: 0.75rem;
	color: var(--muted);
	font-size: 0.9375rem;
}

/* The skill line, once calls exist. */

.join {
	display: grid;
	gap: 0.5rem;
	justify-items: start;
	padding-inline-start: 1.25rem;
	border-inline-start: 2px solid var(--accent);
}

.join-label {
	font-size: 0.875rem;
	color: var(--muted);
}

.join-text {
	font-family: var(--display);
	font-weight: 500;
	font-size: clamp(1.25rem, 1.05rem + 1vw, 1.625rem);
	line-height: 1.35;
	overflow-wrap: break-word;
	text-wrap: pretty;
}

.join .btn {
	margin-top: 0.5rem;
}

/* Footer: the join line to close on, three groups of links, and a quiet base row. */

.footer {
	margin-top: 2rem;
	padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
}

.footer-in {
	display: grid;
	gap: 3rem;
	padding-top: 1.5rem;
}

.footer-join {
	display: grid;
	gap: 0.75rem;
	justify-items: start;
}

.footer-kicker,
.footer-h {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.footer-line {
	max-width: 24em;
	overflow-wrap: break-word;
	font-family: var(--display);
	font-size: clamp(1.3125rem, 1.05rem + 1.4vw, 2.125rem);
	font-weight: 500;
	line-height: 1.25;
	text-wrap: balance;
}

.footer-join .btn {
	margin-top: 0.5rem;
}

.footer-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2rem 1.5rem;
}

.footer-h {
	color: var(--muted);
}

.footer-h .icon {
	color: var(--accent);
}

.footer-col:last-child {
	grid-column: 1 / -1;
}

.footer-col ul {
	margin-top: 0.5rem;
	padding: 0;
	list-style: none;
}

.footer-col a {
	display: inline-block;
	padding-block: 0.4375rem;
	text-decoration: none;
}

.footer-col a:hover {
	text-decoration: underline;
	text-decoration-color: var(--accent);
}

.footer-base {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
	font-size: 0.875rem;
	color: var(--muted);
}

@media (min-width: 860px) {
	.footer-in {
		grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
		column-gap: clamp(3rem, 7vw, 6rem);
		align-items: start;
	}

	.footer-nav {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		padding-top: 0.25rem;
	}

	.footer-col:last-child {
		grid-column: auto;
	}

	.footer-base {
		grid-column: 1 / -1;
	}
}

/* Motion, only when the reader has not asked for less. */

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
}

@keyframes art-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
}

@keyframes ping {
	0% {
		opacity: 0.8;
		transform: scale(1);
	}
	100% {
		opacity: 0;
		transform: scale(3);
	}
}

.anim .ticket[data-state="waiting"] .status-dot::after {
	animation: ping 1.8s ease-out infinite;
}

.anim .ticket.just-arrived .arrival > * {
	animation: rise 0.7s var(--ease) both;
	animation-delay: calc(var(--i, 4) * 90ms + 350ms);
}

.anim .row {
	transition:
		grid-template-rows 0.55s var(--ease),
		opacity 0.55s var(--ease);
}

.anim .kind-bar::after {
	transition: transform 0.6s var(--ease);
}

@media (forced-colors: active) {
	.result.is-picked,
	.join,
	.row.is-yours .row-card {
		border-color: CanvasText;
	}

	.input:focus-within {
		outline-color: Highlight;
	}
}
