/* The marketing site below the hero, and /pricing (src/front/marketing.ts). Dark, on the site's tokens; orange is
   abso's agent-2 colour and marks the one thing on a section that asks for action. One column on a phone. */

.mk {
	--mk-orange: var(--agent-2);
	--mk-orange-ink: #ff8a3d;
	--mk-width: 1120px;
	color: var(--ink);
	background: var(--paper);
	border-top: 1px solid var(--rule);
}
.mk-sec {
	box-sizing: content-box;
	max-width: var(--mk-width);
	margin: 0 auto;
	padding: 96px 24px;
	border-bottom: 1px solid var(--rule);
}
.mk-sec:last-of-type {
	border-bottom: 0;
}
.mk-eyebrow {
	margin: 0 0 14px;
	font: 600 12px/16px var(--font-mono);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}
.mk h1,
.mk h2 {
	margin: 0;
	font-family: var(--font-sans);
	font-weight: 780;
	letter-spacing: -0.03em;
	text-wrap: balance;
}
.mk h2 {
	max-width: 22ch;
	font-size: clamp(30px, 4.4vw, 52px);
	line-height: 1.05;
}
.mk h3 {
	margin: 0 0 8px;
	font: 650 18px/24px var(--font-sans);
	letter-spacing: -0.01em;
}
.mk p {
	margin: 0;
	font: 400 16px/26px var(--font-sans);
	color: var(--muted);
	max-width: 62ch;
}
.mk a {
	color: var(--ink);
}
.mk-lead {
	margin-top: 20px !important;
	font-size: 19px !important;
	line-height: 30px !important;
	color: var(--ink) !important;
	opacity: 0.86;
}
.mk-note {
	margin-top: 20px !important;
	font-size: 14px !important;
	line-height: 22px !important;
	color: var(--faint) !important;
}
.mk-orange {
	color: var(--mk-orange-ink);
}

/* A band: a section on the raised surface, full width, so the page changes ground between sections. */
.mk-sec.is-band {
	background: var(--surface);
	box-shadow: 0 0 0 100vmax var(--surface);
	clip-path: inset(0 -100vmax);
}
.mk-sec.is-band,
.mk-sec:has(+ .is-band) {
	border-bottom-color: transparent;
}
/* The hero leaves the top of the first section in view (controller.js reads --peek), with less padding above it,
   so the first screen shows that the page goes on. No arrow, no label. */
.ab-recorded-hero:has(+ script + .mk, + .mk) {
	--peek: 150px;
}
.mk > .mk-sec:first-child {
	padding-top: 44px;
}
@media (max-height: 640px) {
	.ab-recorded-hero {
		--peek: 0px;
	}
}

/* ---------- what abso is ---------- */
.mk-three {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
	margin-top: 56px;
}
.mk-three > div {
	padding-top: 20px;
	border-top: 1px solid var(--rule-strong);
}
.mk-quote {
	margin: 64px 0 0;
	padding: 0;
}
.mk-quote p {
	max-width: 30ch;
	font: 650 clamp(22px, 2.6vw, 30px) / 1.3 var(--font-sans) !important;
	letter-spacing: -0.015em;
	color: var(--ink) !important;
}

/* ---------- two columns: words and a terminal ---------- */
.mk-split {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: 56px;
	align-items: start;
}
.mk-split.is-even {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
}
.mk-copy > p:not(.mk-eyebrow):not(.mk-note) {
	margin-top: 20px;
}
.mk-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 32px 0 0;
}
.mk-stats div {
	margin: 0;
}
.mk-stats dt {
	font: 500 12px/16px var(--font-sans);
	color: var(--faint);
}
.mk-stats dd {
	margin: 6px 0 0;
	font: 700 26px/32px var(--font-mono);
	letter-spacing: -0.02em;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.mk-term {
	margin: 0;
	min-width: 0;
	background: #0b0d10;
	border: 1px solid var(--rule);
	border-radius: var(--radius-card);
	overflow: hidden;
}
.mk-term-bar {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--rule);
	font: 600 12px/16px var(--font-mono);
	color: var(--muted);
}
.mk-term-where {
	color: var(--faint);
	font-weight: 500;
}
.mk-term pre {
	margin: 0;
	padding: 18px 16px 20px;
	overflow-x: auto;
	font: 400 13px/21px var(--font-mono);
	color: var(--syn-plain);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.mk-term .p {
	color: var(--faint);
}
.mk-term .held {
	color: var(--warn);
	font-weight: 600;
}
.mk-term .ok {
	color: var(--pass);
}
.mk-term .why {
	color: var(--syn-function);
}
.mk-term .dim {
	color: var(--faint);
}
.mk-term figcaption {
	padding: 12px 16px;
	border-top: 1px solid var(--rule);
	font: 500 12px/18px var(--font-sans);
	color: var(--faint);
}

/* ---------- the benchmark ---------- */
.mk-races {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 48px;
	margin-top: 48px;
}
.mk-race {
	margin: 0;
	min-width: 0;
}
.mk-race figcaption {
	margin-bottom: 18px;
	font: 500 14px/20px var(--font-sans);
	color: var(--muted);
}
.mk-race-n {
	font-weight: 700;
	color: var(--ink);
}
.mk-bars {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mk-bar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "name time" "track track";
	gap: 6px 12px;
	align-items: baseline;
}
.mk-bar-name {
	grid-area: name;
	font: 500 14px/20px var(--font-sans);
	color: var(--muted);
}
.mk-bar-time {
	grid-area: time;
	font: 700 15px/20px var(--font-mono);
	font-variant-numeric: tabular-nums;
}
.mk-bar-track {
	grid-area: track;
	height: 14px;
	background: var(--surface);
	border-radius: 3px;
	overflow: hidden;
}
.mk-bar-fill {
	display: block;
	height: 100%;
	min-width: 3px;
	border-radius: 3px;
	background: var(--rule-strong);
}
.mk-bar.is-queue .mk-bar-fill {
	background: var(--muted);
}
.mk-bar.is-abso .mk-bar-fill {
	background: var(--mk-orange);
}
.mk-bar.is-abso .mk-bar-name,
.mk-bar.is-abso .mk-bar-time {
	color: var(--mk-orange-ink);
}

.mk-details {
	margin-top: 28px;
	max-width: 72ch;
	border-top: 1px solid var(--rule);
	padding-top: 16px;
}
.mk-details summary,
.mk-qa summary {
	cursor: pointer;
	font: 600 15px/22px var(--font-sans);
	color: var(--ink);
}
.mk-details summary:focus-visible,
.mk-qa summary:focus-visible {
	outline: 2px solid var(--mk-orange);
	outline-offset: 3px;
}
.mk-details p,
.mk-details li {
	font-size: 14px;
	line-height: 22px;
}
.mk-details p {
	margin-top: 12px;
}
.mk-details ul {
	margin: 12px 0 0;
	padding-left: 18px;
	color: var(--muted);
	display: grid;
	gap: 8px;
}
.mk-details strong {
	color: var(--ink);
	font-weight: 600;
}

/* ---------- plans ---------- */
.mk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 22px;
	border-radius: 8px;
	border: 1px solid var(--rule-strong);
	font: 650 15px/20px var(--font-sans);
	color: var(--ink) !important;
	background: var(--raised);
	text-decoration: none !important;
}
.mk-btn:hover {
	border-color: var(--ink);
}
.mk-btn.is-orange {
	background: var(--mk-orange);
	border-color: var(--mk-orange);
	color: #140a03 !important;
}
.mk-btn.is-orange:hover {
	background: var(--mk-orange-ink);
	border-color: var(--mk-orange-ink);
}
.mk-btn:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}
.mk-more {
	margin-top: 24px !important;
	font-weight: 600 !important;
}

/* ---------- open source and the end ---------- */
.mk-links {
	margin-top: 24px !important;
	font-weight: 600 !important;
	color: var(--faint) !important;
}
.mk-term.is-small pre {
	font-size: 13px;
	white-space: pre;
	overflow-wrap: normal;
}
.mk-end {
	text-align: left;
}
.mk-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px !important;
	max-width: none !important;
}

.mk-foot {
	border-top: 1px solid var(--rule);
}
.mk-foot nav {
	box-sizing: content-box;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	max-width: var(--mk-width);
	margin: 0 auto;
	padding: 32px 24px 48px;
	font: 500 14px/20px var(--font-sans);
}
.mk-foot a {
	color: var(--muted);
}
.mk-foot a:first-child {
	color: var(--ink);
	font-weight: 750;
}

/* ---------- /pricing ---------- */
.mk-pricing {
	border-top: 0;
}
.mk-pricing-hero {
	padding-top: 72px;
}
.mk-pricing-hero h1 {
	max-width: none;
	font-size: clamp(36px, 5.2vw, 68px);
	line-height: 1.02;
}
.mk-pricing-hero h1 span {
	display: block;
}
.mk-h-small {
	font-size: clamp(24px, 3vw, 34px) !important;
	max-width: none !important;
}
.mk-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
	margin: 36px 0 0;
	padding: 0;
	list-style: none;
}
.mk-steps li {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}
.mk-step-n {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--rule-strong);
	border-radius: 50%;
	font: 700 16px/1 var(--font-mono);
}
.mk-qa {
	display: grid;
	margin-top: 24px;
	max-width: 760px;
	border-top: 1px solid var(--rule);
}
.mk-qa details {
	padding: 18px 0;
	border-bottom: 1px solid var(--rule);
}
.mk-qa details p {
	margin-top: 10px;
}

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
	.mk-sec {
		padding: 64px 20px;
	}
	.mk-three,
	.mk-split,
	.mk-split.is-even,
	.mk-races,
	.mk-steps {
		grid-template-columns: minmax(0, 1fr);
	}
	.mk-three {
		gap: 28px;
		margin-top: 40px;
	}
	.mk-split {
		gap: 36px;
	}
	.mk-stats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.mk-stats dd {
		font-size: 22px;
		line-height: 28px;
	}
	.mk-lead {
		font-size: 17px !important;
		line-height: 27px !important;
	}
}
@media (max-width: 420px) {
	.mk-stats {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (prefers-reduced-motion: reduce) {
	.mk * {
		transition: none !important;
	}
}

/* ---------- motion (issue 309; motion.js plays these, the HTML is the finished state) ---------- */
.mk-took {
	margin-left: 12px;
	color: var(--faint);
	font-variant-numeric: tabular-nums;
}
.mk-run.is-playing .mk-ln.is-waiting {
	visibility: hidden;
}
.mk-run .mk-ln.is-running .mk-took {
	color: var(--warn);
}
.mk-run .mk-ln.is-running .mk-took::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 6px;
	border-radius: 50%;
	background: currentColor;
	vertical-align: 1px;
	animation: mk-blink 0.8s steps(2, start) infinite;
}
@keyframes mk-blink {
	to {
		visibility: hidden;
	}
}
.mk-again {
	white-space: nowrap;
	padding: 0;
	border: 0;
	background: none;
	font: 600 12px/16px var(--font-mono);
	color: var(--muted);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.mk-again:hover {
	color: var(--ink);
}
.mk-again:focus-visible {
	outline: 2px solid var(--mk-orange);
	outline-offset: 3px;
}
.mk-term-bar .mk-again {
	margin-left: 16px;
}
.mk-race-speed {
	margin-left: 6px;
	color: var(--faint);
	visibility: hidden;
}
.mk-race-speed.is-on,
.mk-race-speed:has(.mk-again) {
	visibility: visible;
}
.mk-bar-time {
	min-width: 9ch;
	text-align: right;
}
.mk-bar.is-done.is-abso .mk-bar-time {
	animation: mk-land 0.6s ease-out;
}
@keyframes mk-land {
	from {
		color: var(--ink);
	}
}

/* Scroll: each section's content rises in as it enters (browsers with scroll timelines; elsewhere nothing moves). */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.mk-sec > :not(.mk-split),
		.mk-split > * {
			animation: mk-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 40%;
		}
	}
}
@keyframes mk-rise {
	from {
		opacity: 0.4;
		transform: translateY(28px);
	}
}
.mk-term-bar:has(.mk-again) {
	justify-content: flex-start;
}
.mk-term-bar:has(.mk-again) .mk-term-where {
	margin-left: auto;
}

/* ---------- one record (issue 315) ---------- */
.mk-record {
	margin-top: 56px;
	max-width: 880px;
}
.mk-record-lines {
	margin: 0;
	padding: 10px 0;
	list-style: none;
}
.mk-record-line {
	display: grid;
	grid-template-columns: 4ch 12ch minmax(0, 1fr);
	gap: 12px;
	width: 100%;
	padding: 3px 16px 3px 13px;
	border: 0;
	border-left: 3px solid transparent;
	background: none;
	color: var(--syn-plain);
	font: 400 13px/21px var(--font-mono);
	text-align: left;
	cursor: pointer;
}
.mk-record-line code {
	font: inherit;
	overflow-wrap: anywhere;
}
.mk-record-line template {
	display: none;
}
.mk-record-n {
	color: var(--faint);
	text-align: right;
}
.mk-record-who {
	color: var(--c);
	filter: brightness(1.35);
}
.mk-record-line:hover,
.mk-record-line.is-on {
	background: var(--raised);
	border-left-color: var(--c);
}
.mk-record-line:focus-visible {
	outline: 2px solid var(--mk-orange);
	outline-offset: -2px;
}
.mk .mk-record-why {
	box-sizing: border-box;
	min-height: 86px;
	max-width: none;
	margin: 0;
	padding: 14px 16px;
	border-top: 1px solid var(--rule);
	font: 400 13px/22px var(--font-mono);
	color: var(--muted);
}
.mk-record-at {
	color: var(--faint);
}
.mk-why-who {
	color: var(--c);
	filter: brightness(1.35);
	font-weight: 600;
}
.mk-why-msg {
	color: var(--syn-function);
}
@media (max-width: 560px) {
	.mk-record-line {
		grid-template-columns: 3ch minmax(0, 1fr);
		gap: 2px 10px;
	}
	.mk-record-line code {
		grid-column: 2;
	}
	.mk .mk-record-why {
		min-height: 132px;
	}
}
@media (max-width: 560px) {
	.mk-record-lines li:nth-child(-n + 4) {
		display: none;
	}
}

/* The replay's loading words show only if loading is slow (issue 301); a quick load goes straight to the picture. */
.ab-replay227 .scene-loading:not([hidden]) {
	animation: mk-late 0.4s ease-out 1.2s both;
}
@keyframes mk-late {
	from {
		opacity: 0;
	}
}

/* ---------- the merge queue (issue 314) ---------- */
/* The front page's merge queue (abso issue 314), under the pipeline file in Checks. queue.js replays it; the markup is
   one frame of it, with its pills in the rows. Every box has a fixed size, and the replay moves things only by transform and opacity. */

.mk-q-stack {
	display: grid;
	gap: 16px;
	min-width: 0;
}
.mk-q {
	--q-row: 34px;
	--q-pill: 22px;
}
.mk-q .mk-term-where {
	display: inline-block;
	width: 11ch;
	text-align: right;
	font-variant-numeric: tabular-nums;
}
.mk-q-body {
	position: relative;
	padding: 6px 16px 14px;
}

/* ---------- the two rows: queued, then checking ---------- */
.mk-q-row {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	height: 36px;
	border-bottom: 1px solid var(--rule);
}
.mk-q-label {
	font: 500 12px/16px var(--font-sans);
	color: var(--faint);
}
.mk-q-pills {
	display: flex;
	gap: 6px;
	height: var(--q-pill);
	min-width: 0;
	overflow: hidden;
}
/* The pills are the count; a row too full for them ends with +N (queue.js). */
.mk-q-n {
	display: none;
}

/* ---------- an agent's push: the moving pill, and the same chip in the list ---------- */
.mk-q-pill,
.mk-q-who {
	--c: var(--agent-3);
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: var(--q-pill);
	padding: 0 9px 0 7px;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-pill);
	background: var(--raised);
	font: 500 12px/1 var(--font-mono);
	color: var(--ink);
	white-space: nowrap;
}
.mk-q-pill::before,
.mk-q-who::before {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--c);
}
/* Agent 01 to 04, kept clear of orange (action) and of the olive that reads as held. */
.is-a0 { --c: var(--agent-3); }
.is-a1 { --c: var(--agent-5); }
.is-a2 { --c: var(--agent-6); }
.is-a3 { --c: var(--agent-8); }

.mk-q-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.mk-q-pill {
	flex: none;
}
.mk-q-layer .mk-q-pill,
.mk-q-more {
	position: absolute;
	top: 0;
	left: 0;
	transition:
		transform 650ms cubic-bezier(0.3, 0, 0.2, 1),
		opacity 300ms ease;
	will-change: transform;
}
.mk-q-more {
	display: inline-flex;
	align-items: center;
	height: var(--q-pill);
	padding: 0 4px;
	font: 600 12px/1 var(--font-mono);
	color: var(--muted);
	white-space: nowrap;
	opacity: 0;
}
.mk-q-pill.is-checking {
	animation: mk-q-check 1.6s ease-in-out infinite;
}
@keyframes mk-q-check {
	50% {
		border-color: var(--rule);
		background: var(--surface);
	}
}

/* ---------- what left the queue, newest first ---------- */
.mk-q-outs {
	position: relative;
	height: calc(3 * var(--q-row));
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	overflow: hidden;
}
.mk-q-out {
	box-sizing: border-box;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	column-gap: 10px;
	align-items: center;
	height: var(--q-row);
	transform: translateY(calc(var(--i, 0) * var(--q-row)));
	transition:
		transform 650ms cubic-bezier(0.3, 0, 0.2, 1),
		opacity 250ms ease;
}
.mk-q-end {
	justify-self: end;
	font: 600 12px/16px var(--font-mono);
	color: var(--pass);
	white-space: nowrap;
}
.mk-q-end.is-back {
	color: var(--warn);
}
.mk-q-push {
	overflow: hidden;
	font: 500 12px/16px var(--font-mono);
	font-variant-numeric: tabular-nums;
	color: var(--faint);
	white-space: nowrap;
}

/* ---------- every push in the stretch, and the count ---------- */
.mk-q-tally {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 16px;
	padding-top: 12px;
	border-top: 1px solid var(--rule);
	font: 500 12px/16px var(--font-sans);
	color: var(--faint);
}
.mk-q-cells {
	display: flex;
	gap: 3px;
}
.mk-q-cells i {
	box-sizing: border-box;
	width: 9px;
	height: 9px;
	border: 1px solid var(--rule);
	border-radius: 2px;
	transition: background-color 300ms ease, border-color 300ms ease;
}
.mk-q-cells i.is-landed {
	background: var(--pass);
	border-color: var(--pass);
}
.mk-q-cells i.is-back {
	background: var(--warn);
	border-color: var(--warn);
}
.mk-q-tally b {
	display: inline-block;
	min-width: 2ch;
	text-align: right;
	font: 600 12px/16px var(--font-mono);
	font-variant-numeric: tabular-nums;
	color: var(--muted);
}
.mk-q-outs,
.mk-q-cells,
.mk-q-pills,
.mk-q-layer,
.mk-q-tally > span:last-child {
	transition: opacity 300ms ease;
}
.mk-q-body.is-still * {
	transition: none !important;
}
.mk-q-body.is-fading :is(.mk-q-outs, .mk-q-cells, .mk-q-pills, .mk-q-layer, .mk-q-tally > span:last-child) {
	opacity: 0;
}

@media (max-width: 420px) {
	.mk-q-body {
		padding: 4px 12px 12px;
	}
	.mk-q-row {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 8px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.mk-q-pill {
		animation: none;
	}
}
.mk p code {
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--raised);
	font: 500 0.88em/1 var(--font-mono);
	color: var(--ink);
	white-space: nowrap;
}

/* Review fixes: the terminal's bar never wraps (Play again would grow it), and on phones the held run scrolls sideways
   instead of wrapping its indented lines to the left edge. */
.mk-run .mk-term-bar {
	flex-wrap: nowrap;
	align-items: center;
}
.mk-run .mk-term-bar > span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mk-nowrap {
	white-space: nowrap;
}
@media (max-width: 560px) {
	.mk-run pre {
		white-space: pre;
		overflow-wrap: normal;
		overflow-x: auto;
		font-size: 12px;
		line-height: 19px;
	}
	.mk .mk-record-why {
		min-height: 150px;
	}
}

/* The replay's scene gets close to its final height from CSS (issue 301), measured with scripts off: where the scene
   starts plus the dock, 12 px and --peek. controller.js's fitScene then sets the exact height without moving the page. */
.ab-recorded-hero .ab-replay227 .scene {
	height: max(150px, calc(100svh - 306px));
}
@media (max-width: 1100px) {
	.ab-recorded-hero .ab-replay227 .scene {
		height: max(150px, calc(100svh - 299px));
	}
}
@media (max-width: 700px) {
	.ab-recorded-hero .ab-replay227 .scene {
		height: max(300px, calc(100svh - 460px));
	}
}
@media (max-height: 640px) {
	.ab-recorded-hero .ab-replay227 .scene {
		height: max(100px, calc(100svh - 156px));
	}
}
.mk-run .mk-term-bar > span:first-child,
.mk-run .mk-term-bar > .mk-again {
	flex: none;
}
