/* /tech (tech.html, filled by tech/page.ts): how MUSEGOD works. The hero
   with the god and three muses, the live tally, the holder rewards, the muse
   agents, the weekly pot and the contracts. What only builders need folds
   away in a .deep details. The shell is site.css; this is the page's own.
   Gold is the god's (his picture, his token's address, the pot he fills)
   and each section's one main button; labels, steps and icons are the cool
   violet, and what runs live is the live green. */

main {
	max-width: 1120px;
	margin: 0 auto;
	padding: 20px var(--pad) calc(56px + env(safe-area-inset-bottom));
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 72px;
	overflow-x: clip;
}
main > section {
	display: grid;
	gap: 24px;
	min-width: 0;
	scroll-margin-top: calc(var(--bar-h, 64px) + 16px);
}
.go,
.more {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}
/* Section titles take turns: italic with the last words upright in the
   title's own color (the default), or upright with the last words in an
   italic soft tone (.up). Only the page's h1 has a gold em. */
section h2 {
	margin: 0;
	font: italic 600 clamp(30px, 7vw, 46px) / 1.06 var(--serif);
	letter-spacing: -0.02em;
	text-wrap: balance;
}
section h2 em {
	font-style: normal;
}
section h2.up {
	font-style: normal;
	letter-spacing: -0.03em;
}
section h2.up em {
	font-style: italic;
	color: var(--soft);
}
/* A head on the page's middle line, with no label (the weekly pot). */
.sec-head.center {
	justify-items: center;
	max-width: 44rem;
	margin-inline: auto;
	text-align: center;
}
.sec-head.center h2 {
	font-size: clamp(38px, 9vw, 60px);
}
main h3 {
	margin: 0;
	font: 700 var(--t-lead) / 1.3 var(--sans);
	color: var(--bone);
}
.sec-line {
	margin: 0;
	max-width: 60ch;
	font-size: var(--t-body);
	line-height: 1.55;
	color: var(--soft);
	text-wrap: pretty;
}
.sec-line b {
	--lh: 1.55;
	color: var(--bone);
}
main .i {
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
section a:not(.btn),
.fan a {
	color: var(--cool);
	text-decoration-color: rgba(var(--cool-rgb), 0.4);
	text-underline-offset: 3px;
}
main code {
	font: 400 0.9em var(--mono);
	color: var(--bone);
	overflow-wrap: anywhere;
}

/* The hero: the words beside the god, three muses fanned over his foot. */
.hero {
	display: grid;
	gap: 40px;
	align-items: center;
}
.hero-copy {
	display: grid;
	justify-items: start;
}
.hero .go {
	margin-top: 28px;
}
.hero-art {
	position: relative;
	margin: 0 auto;
	width: min(100%, 440px);
	padding-bottom: 96px;
}
.god {
	position: relative;
	border-radius: 36px;
	overflow: hidden;
	box-shadow: 0 0 0 1px var(--line);
}
.god::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(60% 40% at 50% 10%, rgba(var(--gold-hi-rgb), 0.18), transparent 70%),
		linear-gradient(180deg, transparent 55%, rgba(var(--void-rgb), 0.85));
	pointer-events: none;
}
.god img {
	display: block;
	width: 100%;
	height: auto;
}
.chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	padding: 0 14px 0 12px;
	border-radius: var(--r-pill);
	background: rgba(var(--void-rgb), 0.75);
	backdrop-filter: blur(8px);
	box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), 0.3);
	font: 600 var(--t-sm) var(--sans);
	color: var(--gold-hi);
}
.chip .i {
	width: 16px;
	height: 16px;
}
.god-chip {
	position: absolute;
	z-index: 1;
	top: 16px;
	left: 16px;
}
.fan {
	position: absolute;
	left: 50%;
	bottom: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	justify-content: center;
	width: 112%;
	transform: translateX(-50%);
}
.fan li {
	flex: 0 0 34%;
	margin: 0 -2%;
	transform: rotate(-7deg) translateY(10px);
	transition: transform 0.3s;
}
.fan li:nth-child(2) {
	z-index: 1;
	transform: translateY(-6px);
}
.fan li:nth-child(3) {
	transform: rotate(7deg) translateY(10px);
}
.fan a,
.fan li[aria-hidden] {
	display: grid;
	gap: 8px;
	padding: 8px 8px 10px;
	border-radius: var(--r-lg);
	background: var(--card-hi);
	box-shadow:
		0 18px 40px rgba(var(--void-rgb), 0.6),
		inset 0 0 0 1px var(--line-hi);
	text-decoration: none;
}
@media (hover: hover) {
	.fan li:hover {
		z-index: 2;
		transform: translateY(-14px) scale(1.04);
	}
}
.fan-art {
	display: block;
	aspect-ratio: 1;
	border-radius: var(--r-md);
	overflow: hidden;
	background: var(--card);
}
.fan-art img,
.fan-art .skel-art {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.fan-t {
	display: grid;
	gap: 2px;
	padding: 0 4px;
	min-width: 0;
}
.fan-t b {
	font: 700 var(--t-ui) / 1.25 var(--sans);
	color: var(--bone);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.fan-t small {
	font: 400 var(--t-xs) / 1.3 var(--mono);
	color: var(--cool);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* The tally: three live numbers as bare figures on the page, no card, each
   in its own color: what holders were paid in the god's gold, the burn in
   the fire's warm red, the collectors in the cool violet. A row each on a
   phone, three across on a wider screen. */
.tally {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}
.tally li {
	--c: var(--gold-hi);
	--c-rgb: var(--gold-hi-rgb);
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	align-items: center;
	gap: 4px 14px;
}
.tally li:nth-child(2) {
	--c: var(--warn);
	--c-rgb: var(--warn-rgb);
}
.tally li:nth-child(3) {
	--c: var(--cool);
	--c-rgb: var(--cool-rgb);
}
.tally b {
	--lh: 0.95;
	justify-self: start;
	font: 700 clamp(44px, 12vw, 72px) / 0.95 var(--sans);
	letter-spacing: -0.04em;
	color: var(--c);
	font-variant-numeric: tabular-nums;
}
.tally li > span:not(.t-i) {
	grid-column: 2;
	font-size: var(--t-ui);
	line-height: 1.4;
	color: var(--soft);
}
.t-i {
	grid-row: 1 / span 2;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--r-md);
	background: rgba(var(--c-rgb), 0.12);
	color: var(--c);
}
.t-i .i {
	width: 20px;
	height: 20px;
}
.proof {
	margin-top: -32px;
}

/* The rewards as a pipe: each step on a line with a live green pulse
   running along it, the way the rewards stream. */
.pipe {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 12px;
}
.pipe::before {
	content: "";
	position: absolute;
	top: 22px;
	bottom: 22px;
	left: 21px;
	width: 2px;
	background:
		linear-gradient(180deg, transparent, rgba(var(--live-rgb), 0.9) 50%, transparent) 0 -100% / 100%
		40% no-repeat,
		rgba(var(--bone-rgb), 0.12);
	animation: pipe-run 4s linear infinite;
}
.pipe > li {
	position: relative;
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	align-items: center;
	gap: 14px;
}
.pipe-i {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--card-hi);
	box-shadow: 0 0 0 4px var(--void);
	color: var(--cool);
}
.pipe-i .i {
	width: 20px;
	height: 20px;
}
.pipe-t {
	display: grid;
	gap: 4px;
	padding: 14px 16px;
	border-radius: var(--r-lg);
	background: var(--card);
	box-shadow: var(--e-1);
}
.pipe-t b {
	font: 700 var(--t-base) var(--sans);
	color: var(--bone);
}
.pipe-t span {
	font-size: var(--t-ui);
	line-height: 1.5;
	color: var(--soft);
}
@keyframes pipe-run {
	to {
		background-position:
			0 200%,
			0 0;
	}
}

/* For builders: folded away until opened. */
.deep {
	border-radius: var(--r-lg);
	background: var(--card);
	box-shadow:
		inset 0 0 0 1px var(--line),
		var(--e-1);
}
.deep summary {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 18px;
	font: 600 var(--t-note) var(--sans);
	color: var(--bone);
	cursor: pointer;
	list-style: none;
}
.deep summary::-webkit-details-marker {
	display: none;
}
.deep summary .i {
	width: 18px;
	height: 18px;
	color: var(--cool);
}
.deep summary .chev {
	margin-left: auto;
	color: var(--ash);
	transition: transform 0.2s;
}
.deep[open] summary .chev {
	transform: rotate(180deg);
}
.deep-body {
	display: grid;
	gap: 16px;
	padding: 0 18px 18px;
	min-width: 0;
}
.facts {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
}
.facts li {
	font-size: var(--t-note);
	line-height: 1.55;
	color: var(--soft);
}
.facts b {
	color: var(--bone);
}
.deep pre {
	margin: 0;
	padding: 16px;
	border-radius: var(--r-md);
	background: rgba(var(--void-rgb), 0.6);
	overflow-x: auto;
	font: 400 var(--t-sm) / 1.6 var(--mono);
}
.deep pre code {
	color: var(--bone);
	overflow-wrap: normal;
	font-size: inherit;
}
.deep .c {
	color: var(--dim);
}

/* One muse read live: its art, name, voice, agent and the line that
   makes any AI speak as it (a .ca copy button). The card is lit in the
   muse's house hue (data-house, set by page.ts) and raised. */
.meet {
	display: grid;
	gap: 20px;
	padding: 16px;
	background:
		radial-gradient(70% 90% at 0% 0%, rgba(var(--house-rgb), 0.16), transparent 70%), var(--card-hi);
	box-shadow: var(--e-2);
}
.meet-art {
	display: block;
	aspect-ratio: 1;
	border-radius: var(--r-lg);
	overflow: hidden;
	background: var(--card-hi);
}
.meet-art img,
.meet-art .skel-art {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.meet-t {
	display: grid;
	align-content: center;
	gap: 12px;
	min-width: 0;
	padding: 0 4px 4px;
}
.meet h3 {
	font: italic 600 clamp(34px, 8vw, 48px) / 1 var(--serif);
	letter-spacing: -0.02em;
}
.meet h3 a {
	color: var(--bone);
	text-decoration: none;
}
.meet-line,
.meet-agent {
	margin: 0;
	font-size: var(--t-ui);
	color: var(--ash);
}
.meet-agent {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
}
.meet-intro {
	display: grid;
	gap: 6px;
	margin: 0;
	font-size: var(--t-body);
	line-height: 1.5;
	color: var(--bone);
	text-wrap: pretty;
}
.ca.line {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 6px 12px;
	justify-self: stretch;
	background: rgba(var(--void-rgb), 0.45);
}
.ca.line > span {
	font-weight: 500;
}
.ca.line code {
	grid-column: 1 / -1;
	grid-row: 2;
	font-size: var(--t-sm);
	overflow-wrap: break-word;
}
.meet-go {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}
.meet-go .i {
	width: 16px;
	height: 16px;
}

/* Numbered steps. */
.steps {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 12px;
	counter-reset: step;
}
.steps li {
	position: relative;
	display: grid;
	align-content: start;
	gap: 6px;
	padding: 18px 18px 18px 64px;
	border-radius: var(--r-lg);
	background: var(--card);
	box-shadow: var(--e-1);
	counter-increment: step;
}
.steps li::before {
	content: counter(step);
	position: absolute;
	top: 16px;
	left: 16px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(var(--cool-rgb), 0.14);
	font: 700 var(--t-note) var(--sans);
	color: var(--cool);
}
.steps b {
	font: 700 var(--t-base) var(--sans);
	color: var(--bone);
}
.steps span {
	font-size: var(--t-note);
	line-height: 1.5;
	color: var(--soft);
}

/* The weekly pot: the pot in a lit vault beside how to enter. The pot is
   the god's to pay out, so the vault keeps its gold glow; its figure is
   Figtree in bone, as on /pot. */
.vault {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	gap: 24px;
	padding: 24px 20px;
	border-radius: var(--r-xl);
	background:
		radial-gradient(90% 70% at 50% 110%, rgba(var(--gold-rgb), 0.22), transparent 70%),
		linear-gradient(180deg, var(--card-hi), var(--card));
	box-shadow:
		inset 0 0 0 1px var(--line),
		var(--e-2);
}
.vault-n {
	display: grid;
	align-content: center;
	gap: 10px;
}
.big {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
}
.big b {
	--lh: 0.95;
	font: 700 clamp(64px, 18vw, 120px) / 0.95 var(--sans);
	letter-spacing: -0.045em;
	color: var(--bone);
	font-variant-numeric: tabular-nums;
	filter: drop-shadow(0 0 28px rgba(var(--gold-hi-rgb), 0.3));
}
.big > span {
	font-size: var(--t-body);
	color: var(--soft);
}
.vault-s {
	margin: 0;
	font-size: var(--t-note);
	color: var(--soft);
}
.vault-s b {
	--lh: 1.4;
	color: var(--bone);
}
.vault .steps li {
	background: rgba(var(--void-rgb), 0.5);
}
/* A tap to copy: the muse's line in the cool violet, and the token's
   address (#verify), the god's own, in gold. Every contract folds away
   under it. */
.ca {
	justify-self: start;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	max-width: 100%;
	padding: 14px 18px;
	border: 0;
	border-radius: var(--r-lg);
	background: var(--card);
	box-shadow: inset 0 0 0 1px rgba(var(--cool-rgb), 0.3);
	font: 600 var(--t-ui) var(--sans);
	color: var(--soft);
	text-align: left;
	cursor: pointer;
}
.ca code {
	font-size: var(--t-ui);
}
.ca .i {
	width: 18px;
	height: 18px;
	color: var(--cool);
}
#verify .ca {
	box-shadow:
		inset 0 0 0 1px rgba(var(--gold-rgb), 0.3),
		var(--e-1);
}
#verify .ca code,
#verify .ca .i {
	color: var(--gold-hi);
}
.addrs {
	display: grid;
	gap: 8px;
	margin: 0;
}
.addrs div {
	display: grid;
	gap: 4px;
	padding: 12px 14px;
	border-radius: var(--r-md);
	background: rgba(var(--void-rgb), 0.45);
}
.addrs dt {
	font-size: var(--t-ui);
	color: var(--soft);
}
.addrs dd {
	margin: 0;
}
.addrs a {
	text-decoration: none;
}
.addrs code {
	font-size: var(--t-sm);
}

/* The close: one line and the three ways in, under the night violet. */
.close {
	justify-items: center;
	gap: 20px;
	padding: 48px 20px;
	border-radius: var(--r-xl);
	text-align: center;
	background:
		radial-gradient(70% 90% at 50% 100%, rgba(var(--cool-rgb), 0.18), transparent 70%),
		linear-gradient(180deg, var(--card-hi), var(--card));
	box-shadow: var(--e-1);
}
.close h2 {
	font-size: clamp(34px, 8vw, 56px);
}
.close h2 em {
	color: var(--soft);
}
.close .go {
	justify-content: center;
}

@media (min-width: 640px) {
	.tally {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
	}
	.tally li {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
		gap: 10px;
	}
	.t-i {
		grid-row: auto;
	}
	.tally li > span:not(.t-i) {
		grid-column: auto;
	}
	.meet {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		gap: 28px;
		padding: 20px;
	}
	.addrs div {
		grid-template-columns: 240px minmax(0, 1fr);
		align-items: baseline;
		gap: 16px;
	}
}
@media (min-width: 900px) {
	.hero {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		gap: 48px;
	}
	.hero-art {
		width: 100%;
	}
	.pipe {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.pipe::before {
		top: 21px;
		bottom: auto;
		left: 22px;
		right: 22px;
		width: auto;
		height: 2px;
		background:
			linear-gradient(90deg, transparent, rgba(var(--live-rgb), 0.9) 50%, transparent) -100% 0 / 40%
			100% no-repeat,
			rgba(var(--bone-rgb), 0.12);
		animation-name: pipe-run-x;
	}
	.pipe > li {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: 44px 1fr;
		align-items: start;
	}
	.pipe-t {
		height: 100%;
		align-content: start;
	}
	.vault {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 32px;
		padding: 36px;
	}
}
/* Two beats set their head beside their body on a wide screen, held in
   view while the body scrolls by: the muse agents and the contracts. Each
   has three blocks after its head. */
@media (min-width: 1000px) {
	.side {
		grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
		column-gap: 56px;
		align-items: start;
	}
	.side > .sec-head {
		grid-row: 1 / span 3;
		position: sticky;
		top: calc(var(--bar-h, 64px) + 32px);
	}
	.side > :not(.sec-head) {
		grid-column: 2;
	}
	.side h2 {
		font-size: clamp(34px, 3.6vw, 46px);
	}
	.side .addrs div {
		grid-template-columns: 170px minmax(0, 1fr);
	}

	.close {
		padding: 64px 32px;
	}
}
@keyframes pipe-run-x {
	to {
		background-position:
			200% 0,
			0 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	.pipe::before {
		animation: none;
	}
	.fan li {
		transition: none;
	}
}
