:root {
	--paper: #f1f4f2;
	--paper-2: #e6ebe8;
	--ink: #14201c;
	--slate: #56675f;
	--chem: #17a86a;
	--gold: #b4901f;
	--rule: #ccd5d0;

	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
		sans-serif;
	--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.62;
	-webkit-font-smoothing: antialiased;
}

.wrap {
	max-width: 68rem;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* ---------- masthead ---------- */

.masthead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.75rem 0 0;
	flex-wrap: wrap;
}

.wordmark {
	font-family: var(--mono);
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--ink);
	text-decoration: none;
}

.wordmark span {
	color: var(--chem);
}

.navlinks {
	display: flex;
	gap: 1.4rem;
	font-size: 0.86rem;
}

.navlinks a {
	color: var(--slate);
	text-decoration: none;
	padding-bottom: 2px;
	border-bottom: 1px solid transparent;
}

.navlinks a:hover,
.navlinks a:focus-visible {
	color: var(--ink);
	border-bottom-color: var(--chem);
}

.navlinks a[aria-current="page"] {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

/* ---------- shared type ---------- */

.eyebrow {
	font-family: var(--mono);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--slate);
	margin: 0 0 1.1rem;
}

.display {
	font-size: clamp(2.5rem, 6.4vw, 4.15rem);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 0.97;
	margin: 0 0 1.25rem;
	text-wrap: balance;
}

.deck {
	font-size: 1.1rem;
	color: var(--slate);
	max-width: 34rem;
	margin: 0 0 2rem;
}

.deck strong {
	color: var(--ink);
	font-weight: 600;
}

.sect-title {
	font-size: clamp(1.35rem, 2.6vw, 1.85rem);
	font-weight: 750;
	letter-spacing: -0.022em;
	line-height: 1.15;
	margin: 0 0 0.6rem;
}

.sect-lede {
	color: var(--slate);
	max-width: 40rem;
	margin: 0 0 2.25rem;
}

/* ---------- hero ---------- */

.hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3.5rem;
	align-items: center;
	padding: 4.5rem 0 5rem;
}

.cta-row {
	display: flex;
	align-items: center;
	gap: 1.4rem;
	flex-wrap: wrap;
}

.cta {
	display: inline-block;
	background: var(--ink);
	color: var(--paper);
	font-size: 0.94rem;
	font-weight: 600;
	letter-spacing: -0.005em;
	text-decoration: none;
	padding: 0.72rem 1.35rem;
	border-radius: 2px;
}

.cta:hover,
.cta:focus-visible {
	background: var(--chem);
}

.cta-alt {
	font-family: var(--mono);
	font-size: 0.82rem;
	color: var(--slate);
	text-decoration: none;
	border-bottom: 1px solid var(--rule);
	padding-bottom: 1px;
}

.cta-alt:hover,
.cta-alt:focus-visible {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

/* ---------- signature: the pitch ---------- */

.pitch {
	width: 100%;
	height: auto;
	display: block;
}

.pitch-line {
	fill: none;
	stroke: var(--rule);
	stroke-width: 1;
}

.chem-link {
	fill: none;
	stroke: var(--chem);
	stroke-linecap: round;
}

.slot-disc {
	fill: var(--paper);
	stroke: var(--ink);
	stroke-width: 1.4;
}

.slot-disc-key {
	fill: var(--ink);
}

.slot-pos {
	font-family: var(--mono);
	font-size: 10px;
	font-weight: 600;
	fill: var(--ink);
	text-anchor: middle;
	letter-spacing: 0.04em;
}

.slot-pos-key {
	fill: var(--paper);
}

.slot-rating {
	font-family: var(--mono);
	font-size: 9px;
	fill: var(--slate);
	text-anchor: middle;
}

.pitch-caption {
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--slate);
	text-align: center;
	margin: 0.9rem 0 0;
}

@media (prefers-reduced-motion: no-preference) {
	.chem-link {
		stroke-dasharray: 240;
		stroke-dashoffset: 240;
		animation: draw 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
	}

	.pitch-node {
		opacity: 0;
		animation: pop 0.4s ease-out forwards;
	}
}

@keyframes draw {
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes pop {
	to {
		opacity: 1;
	}
}

/* ---------- constraint chips ---------- */

.band {
	border-top: 1px solid var(--rule);
	padding: 4rem 0;
}

.chip-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 1px;
	background: var(--rule);
	border: 1px solid var(--rule);
}

.chip {
	background: var(--paper);
	padding: 1.35rem 1.4rem;
}

.chip-syntax {
	font-family: var(--mono);
	font-size: 0.86rem;
	font-weight: 600;
	margin: 0 0 0.4rem;
	color: var(--ink);
}

.chip-syntax em {
	font-style: normal;
	color: var(--chem);
}

.chip-note {
	font-size: 0.88rem;
	color: var(--slate);
	margin: 0;
}

/* ---------- solver split ---------- */

.split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: var(--rule);
	border: 1px solid var(--rule);
}

.split-cell {
	background: var(--paper);
	padding: 2rem 1.9rem;
}

.split-kicker {
	font-family: var(--mono);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0 0 0.85rem;
	color: var(--gold);
}

.split-cell h3 {
	font-size: 1.08rem;
	font-weight: 700;
	letter-spacing: -0.012em;
	margin: 0 0 0.6rem;
}

.split-cell p {
	font-size: 0.94rem;
	color: var(--slate);
	margin: 0;
}

/* ---------- prose pages ---------- */

.page-head {
	padding: 4rem 0 2.5rem;
	border-bottom: 1px solid var(--rule);
}

.prose {
	max-width: 42rem;
	padding: 3rem 0 4rem;
}

.prose h2 {
	font-size: 1.3rem;
	font-weight: 700;
	letter-spacing: -0.018em;
	margin: 2.75rem 0 0.8rem;
}

.prose h2:first-child {
	margin-top: 0;
}

.prose p {
	margin: 0 0 1.15rem;
}

.prose ul {
	margin: 0 0 1.4rem;
	padding-left: 1.1rem;
}

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

.prose code {
	font-family: var(--mono);
	font-size: 0.87em;
	background: var(--paper-2);
	padding: 0.12em 0.36em;
	border-radius: 2px;
}

.prose a {
	color: var(--ink);
	text-decoration-color: var(--chem);
	text-underline-offset: 3px;
}

/* ---------- changelog ---------- */

.log-entry {
	display: grid;
	grid-template-columns: 7rem 1fr;
	gap: 2rem;
	padding: 1.75rem 0;
	border-bottom: 1px solid var(--rule);
}

.log-date {
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--slate);
	padding-top: 0.28rem;
}

.log-body h3 {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.4rem;
	letter-spacing: -0.01em;
}

.log-body p {
	margin: 0;
	font-size: 0.94rem;
	color: var(--slate);
}

.log-body code {
	font-family: var(--mono);
	font-size: 0.86em;
	background: var(--paper-2);
	padding: 0.1em 0.34em;
	border-radius: 2px;
}

/* ---------- footer ---------- */

.foot {
	border-top: 1px solid var(--rule);
	padding: 2.25rem 0 3rem;
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--slate);
}

.foot a {
	color: var(--slate);
	text-decoration: none;
	border-bottom: 1px solid var(--rule);
}

.foot a:hover,
.foot a:focus-visible {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

.foot p {
	margin: 0;
}

/* ---------- focus + responsive ---------- */

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

@media (max-width: 860px) {
	.hero {
		grid-template-columns: 1fr;
		gap: 2.75rem;
		padding: 3rem 0 3.5rem;
	}

	.hero-art {
		order: -1;
		max-width: 24rem;
	}

	.split {
		grid-template-columns: 1fr;
	}

	.log-entry {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}
}
