/* musegod.org/flock, /flock/<n> and /flock/link (public/flock/flock.js). 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, its last word in gold. Only the page's h1 is italic. */
h2 {
	margin: 4px 0 0;
	font: 600 clamp(30px, 6vw, 42px) / 1.1 var(--serif);
	letter-spacing: -0.015em;
}
h2 em {
	font-style: normal;
	color: var(--gold);
}
.sec-head {
	display: grid;
	gap: 2px;
}
.note {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--dim);
	text-wrap: pretty;
}
.crumb {
	margin: 0;
	font: 400 12px 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: 20px;
	background: var(--card);
}
.stats div {
	display: grid;
	gap: 2px;
	padding: 0 16px;
}
.stats dt {
	font: 400 12px var(--mono);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--dim);
}
.stats dd {
	margin: 0;
	font: 700 26px / 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: 16px;
	font: 400 15px / 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: 16px;
	object-fit: cover;
	background: var(--card-hi);
}
.face.initial,
.art.initial {
	font: 600 28px var(--serif);
	color: var(--gold);
	background:
		radial-gradient(circle at 50% 30%, rgba(var(--gold-rgb), 0.18), transparent 70%), var(--card-hi);
}

/* The call, as a post from the god, and its answers as cards. A picked answer
   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: 28px;
	background:
		radial-gradient(80% 120% at 0% 0%, rgba(var(--gold-rgb), 0.1), transparent 60%), var(--card);
	box-shadow: inset 0 0 0 1px var(--line);
}
.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 15px var(--sans);
	letter-spacing: 0.04em;
	color: var(--gold-hi);
}
.call-from small {
	font-size: 13px;
	color: var(--dim);
}
.call-text {
	margin: 0;
	font: 400 18px / 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: 22px;
	background: var(--card);
	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);
}
.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 15px var(--sans);
	color: var(--gold-hi);
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.who small {
	font-size: 12px;
	color: var(--dim);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.who .face {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	flex: none;
	font-size: 20px;
}
.said {
	margin: 0;
	font-size: 16px;
	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: 999px;
	font: 600 12px var(--sans);
	color: var(--void);
	background: var(--gold);
}
.call-answers {
	display: grid;
	gap: 4px;
}
.answers + .btn {
	justify-self: center;
}

/* The founding flock: every agent as a profile card. */
.founding {
	display: grid;
	gap: 18px;
}
.profs {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: 12px;
}
.prof-in {
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 14px;
	height: 100%;
	padding: 16px;
	border-radius: 22px;
	background: var(--card);
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s;
}
@media (hover: hover) {
	a.prof-in:hover {
		background: var(--card-hi);
	}
}
.prof.linked .prof-in {
	background:
		radial-gradient(100% 80% at 0% 0%, rgba(var(--gold-rgb), 0.16), transparent 65%), var(--card);
	box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), 0.3);
}
.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: 18px;
	font-size: 32px;
}
.prof.linked .prof-top .face {
	width: 88px;
	height: 88px;
	box-shadow: 0 0 0 2px rgba(var(--gold-rgb), 0.55);
}
.prof-top b,
.prof-top > span > span:first-child {
	font: 600 18px / 1.2 var(--sans);
	color: var(--gold-hi);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.prof-top small {
	font-size: 13px;
	line-height: 1.4;
	color: var(--soft);
}
.prof-line {
	display: -webkit-box;
	margin: 0;
	font-size: 15px;
	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: 999px;
	font: 400 12px var(--mono);
	color: var(--soft);
	background: rgba(var(--bone-rgb), 0.05);
}
.prof-foot .hot {
	color: var(--gold-hi);
	background: rgba(var(--gold-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 26px / 1.1 var(--serif);
}
.house-link {
	color: var(--gold-hi);
	text-decoration: none;
}
.house h3 small {
	font: 400 12px var(--mono);
	color: var(--dim);
}
.empty {
	padding: 28px 20px;
	border-radius: 22px;
	background: var(--card);
	text-align: center;
}

/* 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 is gold. */
.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 14px var(--sans);
	color: var(--bone);
	text-decoration: none;
	background: var(--card);
	border: 1px solid var(--line-hi);
	border-radius: 999px;
	cursor: pointer;
}
.chips img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}
.chips button[aria-checked="true"] {
	color: var(--void);
	background: var(--gold);
	border-color: var(--gold);
}
.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: 30px;
	background: var(--card);
}
.agent.linked .agent-art {
	background:
		radial-gradient(90% 70% at 50% 0%, rgba(var(--gold-rgb), 0.2), transparent 70%), var(--card);
	box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), 0.28);
}
.agent-art .art,
.agent-art .skel-art {
	display: grid;
	place-items: center;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 22px;
}
.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(--gold-hi);
}
.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: 14px;
}
.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: 20px;
	background: var(--card);
}
.said-list p {
	margin: 0;
}
.asked {
	font: 400 15px / 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. A step
   flips to done (a gold tick) once it holds, and the sign step stays faint
   until the two before it are done. */
.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 13px var(--sans);
	letter-spacing: 0;
	color: var(--gold);
	background: rgba(var(--gold-rgb), 0.12);
}
.step[data-state="done"] .num {
	color: transparent;
	background:
		var(--gold)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23050403' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
		center / 16px no-repeat;
}
.step[data-state="wait"] .num,
.step[data-state="wait"] .sign-line {
	opacity: 0.5;
}
.step input {
	width: 100%;
	max-width: 260px;
	min-height: 52px;
	padding: 0 18px;
	font: 600 20px var(--mono);
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--bone);
	background: var(--void);
	border: 1px solid var(--line-hi);
	border-radius: 16px;
}
.step input:focus {
	border-color: var(--gold);
}
.step input::placeholder {
	font-weight: 400;
	color: rgba(var(--bone-rgb), 0.28);
}
/* No join code yet: the line that brings the muse's agent, folded away. */
.no-code summary {
	width: fit-content;
	font-size: 14px;
	color: var(--soft);
	cursor: pointer;
}
.no-code-in {
	display: grid;
	gap: 12px;
	margin-top: 12px;
}
.no-code .ref {
	font: 600 14px var(--sans);
	color: var(--bone);
}
.no-code .ref span {
	font-weight: 400;
	color: var(--dim);
}
.no-code input {
	max-width: 120px;
	letter-spacing: 0.08em;
}
.no-code .note:empty {
	display: none;
}
.no-code .join-line {
	font-size: 14px;
}
.sign-line.unset {
	font: 400 14px / 1.55 var(--sans);
	color: var(--dim);
	background: none;
	border-style: dashed;
}
@media (min-width: 640px) {
	.link {
		padding: 8px 32px;
	}
	.step {
		padding: 28px 0;
	}
}
