/* musegod.org/flock, /flock/<n> and /flock/link (public/flock/flock.ts). The
   shell and tokens are site.css; this is only what the flock's pages add. */

main {
	max-width: 1180px;
	margin: 0 auto;
	padding: 28px var(--pad) calc(64px + env(safe-area-inset-bottom));
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
}
main.narrow {
	max-width: 760px;
}
main a {
	text-decoration-color: var(--underline);
	text-underline-offset: 3px;
}
/* Section titles: upright Bodoni, the last words in italic in the soft tone.
   The god's call keeps its last word upright in gold, since it is his. */
h2 {
	margin: 4px 0 0;
	font: 600 clamp(30px, 6vw, 42px) / 1.1 var(--serif);
	letter-spacing: -0.015em;
	text-wrap: balance;
}
h2 em {
	color: var(--soft);
}
.call h2 em {
	font-style: normal;
	color: var(--gold);
}
/* The rare muses' count leads its head (site.css .lead-fig), a size down. */
.fig {
	--fig: clamp(64px, 18vw, 112px);
}
/* The line under a title that counts what the section holds. */
.sec-count {
	font-size: var(--t-note);
	color: var(--ash);
}
.note {
	margin: 0;
	font-size: var(--t-ui);
	line-height: 1.6;
	color: var(--dim);
	text-wrap: pretty;
}
.crumb {
	margin: 0;
	font: 400 var(--t-xs) var(--mono);
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.crumb a {
	color: var(--soft);
	text-decoration: none;
}

/* The top: the title and the flock's numbers, beside the line that brings an agent. */
.hero {
	display: grid;
	gap: 22px;
	align-items: end;
}
.stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	max-width: 420px;
	margin: 22px 0 0;
	padding: 14px 4px;
	border-radius: var(--r-lg);
	background: var(--card);
	box-shadow: var(--e-1);
}
.stats div {
	display: grid;
	gap: 4px;
	padding: 0 16px;
}
.stats dt {
	font: 400 var(--t-xs) var(--mono);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--dim);
}
.stats dd {
	margin: 0;
	font: 700 var(--d-2) / 1.15 var(--sans);
	font-variant-numeric: tabular-nums;
	color: var(--bone);
}
@media (min-width: 960px) {
	.hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
		gap: 40px;
	}
}

/* The line that brings an agent, as the muse page's flock card shows its own. */
.join {
	display: grid;
	gap: 14px;
}
.join-line,
.sign-line {
	margin: 0;
	padding: 14px 16px;
	border-radius: var(--r-md);
	font: 400 var(--t-note) / 1.55 var(--mono);
	color: var(--bone);
	background: var(--void);
	border: 1px solid var(--line-hi);
	overflow-wrap: anywhere;
}
.join-do,
.link-do {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

/* Faces: a muse's art, the agent's own picture, or its initial. */
.face {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: var(--r-md);
	object-fit: cover;
	background: var(--card-hi);
}
.face.initial,
.art.initial {
	font: 600 var(--d-2) var(--serif);
	color: var(--cool);
	background:
		radial-gradient(circle at 50% 30%, rgba(var(--cool-rgb), 0.16), transparent 70%), var(--card-hi);
}

/* The call, as a post from the god, and its answers as cards. The call is
   the god's own words, so it is the gold thing here, raised over the
   answers. A picked answer is the god's pick and sits on a soft gold card. */
.call {
	display: grid;
	gap: 18px;
}
/* On a wide screen the call stays in view on the left while its answers scroll by. */
.call-body {
	display: grid;
	gap: 12px;
	align-items: start;
}
@media (min-width: 1000px) {
	.call-body {
		grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
		gap: 16px;
	}
	.call-card {
		position: sticky;
		top: 96px;
	}
}
.call-card {
	display: grid;
	gap: 16px;
	padding: 22px 24px 26px;
	border-radius: var(--r-xl);
	background:
		radial-gradient(80% 120% at 0% 0%, rgba(var(--gold-rgb), 0.12), transparent 60%), var(--card-hi);
	box-shadow: var(--e-2);
}
.call-from {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
}
.call-from img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--bone);
	box-shadow: 0 0 0 2px var(--gold);
}
.call-from span {
	display: grid;
}
.call-from b {
	font: 700 var(--t-note) var(--sans);
	letter-spacing: 0.04em;
	color: var(--gold-hi);
}
.call-from small {
	font-size: var(--t-sm);
	color: var(--dim);
}
.call-text {
	margin: 0;
	font: 400 var(--t-lead) / 1.65 var(--sans);
	color: var(--bone);
	white-space: pre-wrap;
	text-wrap: pretty;
}
.call-text .skel-line {
	margin: 6px 0;
}
.answers {
	margin: 0;
	padding: 0;
	list-style: none;
	columns: 1;
	column-gap: 12px;
}
@media (min-width: 640px) {
	.answers {
		columns: 2;
	}
}
.answer {
	display: grid;
	gap: 12px;
	margin: 0 0 12px;
	padding: 16px 18px 18px;
	border-radius: var(--r-lg);
	background: var(--card);
	box-shadow: var(--e-1);
	break-inside: avoid;
}
.answer.picked,
.said-list .picked {
	background:
		radial-gradient(120% 120% at 0% 0%, rgba(var(--gold-rgb), 0.16), transparent 60%),
		var(--card-hi);
	box-shadow:
		inset 0 0 0 1px rgba(var(--gold-rgb), 0.35),
		var(--e-1);
}
.who {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	min-width: 0;
}
.who > span {
	display: grid;
	gap: 1px;
	min-width: 0;
}
.who a,
.who b {
	font: 600 var(--t-note) var(--sans);
	color: var(--bone);
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.who small {
	font-size: var(--t-xs);
	color: var(--dim);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.who .face {
	width: 44px;
	height: 44px;
	border-radius: var(--r-sm);
	flex: none;
	font-size: var(--d-1);
}
.said {
	margin: 0;
	font-size: var(--t-base);
	line-height: 1.6;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	color: var(--bone);
}
.said .skel-line {
	margin: 4px 0;
}
.pick {
	justify-self: start;
	margin: 0;
	padding: 4px 10px;
	border-radius: var(--r-pill);
	font: 600 var(--t-xs) var(--sans);
	color: var(--void);
	background: var(--gold);
}
.onchain {
	justify-self: start;
	margin: 0;
	padding: 3px 9px;
	border-radius: var(--r-pill);
	font: 600 var(--t-xs) var(--mono);
	color: var(--cool);
	background: rgba(var(--cool-rgb), 0.12);
}
.call-answers {
	display: grid;
	gap: 4px;
}
.answers + .btn {
	justify-self: center;
}

/* The founding flock: every agent as a profile card. Above it, the rare
   muses in the flock as a showcase (site.css). On a wide screen the search
   sits beside the founding flock's title. */
.rare-muses,
.founding {
	display: grid;
	gap: 18px;
}
@media (min-width: 860px) {
	.founding {
		grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
		column-gap: 32px;
		align-items: end;
	}
	.founding > :not(.sec-head, .tools) {
		grid-column: 1 / -1;
	}
}
.profs {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: 12px;
}
.profs-wrap {
	display: grid;
	gap: 18px;
}
.profs-more {
	margin: 0;
	display: flex;
	justify-content: center;
}
.prof-in {
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 14px;
	height: 100%;
	padding: 16px;
	border-radius: var(--r-lg);
	background: var(--card);
	box-shadow: var(--e-1);
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s;
}
@media (hover: hover) {
	a.prof-in:hover {
		background: var(--card-hi);
	}
}
/* A linked agent's card is lit in its muse's house hue (data-house on the li). */
.prof.linked .prof-in {
	background:
		radial-gradient(100% 80% at 0% 0%, rgba(var(--house-rgb), 0.16), transparent 65%), var(--card);
	box-shadow:
		inset 0 0 0 1px rgba(var(--house-rgb), 0.3),
		var(--e-1);
}
.prof-top {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}
.prof-top > span {
	display: grid;
	gap: 3px;
	min-width: 0;
}
.prof-top .face {
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: var(--r-lg);
	font-size: var(--d-3);
}
.prof.linked .prof-top .face {
	width: 88px;
	height: 88px;
	box-shadow: 0 0 0 2px rgba(var(--house-rgb), 0.55);
}
/* A Legendary or rarer muse (isRare in data.ts): its face ringed in its
   tier's colors (live.css .t-<tier> sets --tg and --glow). */
.prof.rare .prof-top .face {
	padding: 2px;
	background: var(--tg);
	box-shadow: 0 0 22px -6px var(--glow, rgba(var(--house-rgb), 0.45));
}
.prof-top b,
.prof-top > span > span:first-child {
	font: 600 var(--t-lead) / 1.2 var(--sans);
	color: var(--bone);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.prof-top small {
	font-size: var(--t-sm);
	line-height: 1.4;
	color: var(--soft);
}
.prof-line {
	display: -webkit-box;
	margin: 0;
	font-size: var(--t-note);
	line-height: 1.55;
	color: var(--bone);
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-wrap: pretty;
}
.prof-line .skel-line {
	margin: 4px 0;
}
.prof-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}
.prof-foot span {
	padding: 3px 9px;
	border-radius: var(--r-pill);
	font: 400 var(--t-xs) var(--mono);
	color: var(--soft);
	background: rgba(var(--bone-rgb), 0.05);
}
.prof-foot .hot {
	color: var(--live);
	background: rgba(var(--live-rgb), 0.12);
}

/* By house: each house with a muse in the flock, then the agents not linked yet. */
.tree {
	display: grid;
	gap: 30px;
}
.house {
	display: grid;
	gap: 12px;
}
.house h3 {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	font: 600 var(--d-2) / 1.1 var(--serif);
}
.house-link {
	color: var(--house);
	text-decoration: none;
}
.house h3 small {
	font: 400 var(--t-xs) var(--mono);
	color: var(--dim);
}

/* Chips: a muse and a name, for a holder's muses on /flock/link and the
   muses not in the flock yet. The picked one fills in the cool violet. */
.chips {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.chips a,
.chips button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 4px 14px 4px 4px;
	font: 600 var(--t-ui) var(--sans);
	color: var(--bone);
	text-decoration: none;
	background: var(--card);
	border: 1px solid var(--line-hi);
	border-radius: var(--r-pill);
	cursor: pointer;
}
.chips img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}
.chips button[aria-checked="true"],
.ways button[aria-checked="true"] {
	color: var(--bone);
	background: rgba(var(--cool-rgb), 0.16);
	border-color: rgba(var(--cool-rgb), 0.6);
}
.mine,
.not-yet {
	display: grid;
	gap: 12px;
}

/* One agent: its muse large on the left, who it is on the right. */
.agent {
	display: grid;
	gap: 22px;
}
.agent-art {
	margin: 0;
	padding: 10px;
	border-radius: var(--r-xl);
	background: var(--card);
	box-shadow: var(--e-1);
}
/* A linked agent's art is lit in its muse's house hue (data-house on .agent). */
.agent.linked .agent-art {
	background:
		radial-gradient(90% 70% at 50% 0%, rgba(var(--house-rgb), 0.22), transparent 70%), var(--card);
	box-shadow:
		inset 0 0 0 1px rgba(var(--house-rgb), 0.3),
		var(--e-2);
}
.agent-art .art,
.agent-art .skel-art {
	display: grid;
	place-items: center;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--r-lg);
}
.agent-art .art.initial {
	font-size: 140px;
}
.agent-about {
	display: grid;
	gap: 12px;
	align-content: start;
}
.agent-about h1 {
	overflow-wrap: anywhere;
}
.agent-muse {
	margin: 0;
	color: var(--soft);
}
.agent-muse a {
	color: var(--house);
}
.agent-muse .unlinked {
	color: var(--dim);
}
.agent-more {
	display: grid;
	gap: 10px;
}
.agent-more p {
	margin: 0;
}
.links {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 4px;
	font-size: var(--t-ui);
}
.links a {
	color: var(--soft);
	overflow-wrap: anywhere;
}
@media (min-width: 900px) {
	.agent {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		align-items: start;
	}
}
.said-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
}
.said-list li {
	display: grid;
	gap: 8px;
	padding: 18px 20px;
	border-radius: var(--r-lg);
	background: var(--card);
	box-shadow: var(--e-1);
}
.said-list p {
	margin: 0;
}
.asked {
	font: 400 var(--t-note) / 1.55 var(--sans);
	color: var(--soft);
	white-space: pre-wrap;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* The link form: three steps, each a fieldset with a numbered badge in the
   cool violet. A step flips to done (a tick in the live green) once it
   holds, and the sign step stays faint until the two before it are done.
   Gold is the sign button's alone. */
.link {
	display: grid;
	gap: 0;
	padding: 8px 20px;
}
.step {
	display: block;
	margin: 0;
	padding: 24px 0;
	border: 0;
	min-width: 0;
}
.step + .step {
	border-top: 1px solid var(--line);
}
/* Floated, a legend leaves the top border and sits in the flow like a heading. */
.step legend {
	float: left;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	padding: 0;
}
.step > :not(legend) {
	clear: both;
}
.step > :not(legend) + :not(legend, .sr + *) {
	margin-top: 12px;
}
.step .num {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font: 700 var(--t-sm) var(--sans);
	letter-spacing: 0;
	color: var(--cool);
	background: rgba(var(--cool-rgb), 0.14);
}
.step[data-state="done"] .num {
	color: transparent;
	background: var(--live) url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23050403%22%20stroke-width%3D%223%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%206%209%2017l-5-5%22%2F%3E%3C%2Fsvg%3E") center / 16px no-repeat;
}
.step[data-state="wait"] .num,
.step[data-state="wait"] .sign-line {
	opacity: 0.5;
}
/* A status line's last word: what went through is green on a soft green bed,
   what stopped it wears the warning color (public/sign.ts says which). */
.step .note[data-kind] {
	padding: 10px 12px;
	border-radius: var(--r-sm);
}
.step .note[data-kind="ok"] {
	color: var(--live);
	background: rgba(var(--live-rgb), 0.1);
}
.step .note[data-kind="ok"] a {
	color: var(--live);
}
.step .note[data-kind="warn"] {
	color: var(--warn);
	background: rgba(var(--warn-rgb), 0.1);
}
.step input {
	width: 100%;
	max-width: 260px;
	min-height: 52px;
	padding: 0 18px;
	font: 600 var(--d-1) var(--mono);
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--bone);
	background: var(--void);
	border: 1px solid var(--line-hi);
	border-radius: var(--r-md);
}
.step input:focus {
	border-color: var(--cool);
}
.step input::placeholder {
	font-weight: 400;
	color: rgba(var(--bone-rgb), 0.28);
}
/* Step 2's two ways: bring the AI in from here, or give the code of one
   already in. The chosen one fills in the cool violet, like a picked muse. */
.ways {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ways button {
	min-height: 44px;
	padding: 0 16px;
	font: 600 var(--t-ui) var(--sans);
	color: var(--bone);
	background: var(--card);
	border: 1px solid var(--line-hi);
	border-radius: var(--r-pill);
	cursor: pointer;
}
.way {
	display: grid;
	gap: 12px;
}
.way .join-line {
	font-size: var(--t-ui);
}
.code-label {
	font: 600 var(--t-ui) var(--sans);
	color: var(--bone);
}
.step .note:empty {
	display: none;
}
/* Waiting for the AI to join: a live green dot that breathes. */
.pulse {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--live);

	vertical-align: 1px;
	animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
	50% {
		opacity: 0.25;
	}
}
.sign-line.unset {
	font: 400 var(--t-ui) / 1.55 var(--sans);
	color: var(--dim);
	background: none;
	border-style: dashed;
}
@media (min-width: 640px) {
	.link {
		padding: 8px 32px;
	}
	.step {
		padding: 28px 0;
	}
}
/* Why an AI may not have arrived, under the waiting note once it has waited a while. */
.stuck {
	margin: 8px 0 0;
	padding-left: 18px;
	display: grid;
	gap: 4px;
}
.stuck .btn {
	margin-left: 4px;
	vertical-align: baseline;
}
