/* Versions written for reading. Split from files.css so each sheet has one job. Tokens only. */
/* Versions written for reading (issue 52, the Written board): the first line of the message is the row, the rest opens under it. Behind version-rows. */
.ab-vrows {
	display: flex;
	flex-direction: column;
	border-radius: 8px;
	box-shadow: inset 0 0 0 1px var(--rule);
	overflow: hidden;
	margin: 4px 0 var(--space-4);
}
.ab-vrow {
	display: grid;
	grid-template-columns: 56px 120px minmax(0, 1fr) 120px 84px;
	column-gap: 16px;
	align-items: start;
	padding: 14px 16px;
	border-top: 1px solid var(--rule);
	font-size: 13px;
	line-height: 20px;
}
.ab-vrow:first-child {
	border-top: 0;
}
.ab-vrow.is-open {
	background: var(--surface);
}
.ab-vrow .num {
	font-family: var(--font-mono);
	font-weight: 600;
	padding-top: 1px;
	color: var(--ink);
	text-decoration: none;
}
.ab-vrow .num:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.ab-vrow .who {
	min-width: 0;
	font-weight: 600;
}
.ab-vrow .msg {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}
.ab-vrow .line {
	all: unset;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: var(--ink);
}
.ab-vrow .line:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	border-radius: 3px;
}
.ab-vrow .chev {
	flex: none;
	color: var(--muted);
	transform: rotate(-90deg);
}
.ab-vrow.is-open .chev {
	transform: rotate(0deg);
}
.ab-vrow .first {
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}
.ab-vrow .first code,
.ab-vrow .more code,
.ab-vrow .files code {
	font-family: var(--font-mono);
	font-size: 12px;
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--wash);
	box-shadow: inset 0 0 0 1px var(--rule);
}
.ab-vrow .files code {
	padding: 0;
	background: none;
	box-shadow: none;
}
.ab-vrow {
	row-gap: 8px;
}
.ab-vrow .first.is-whole {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	font-weight: 600;
}
.ab-vrow .line {
	align-items: flex-start;
}
.ab-vrow .line.is-plain {
	display: flex;
	padding-left: 20px;
}
.ab-vrow .line .chev {
	margin-top: 4px;
}
.ab-vrow .more {
	grid-column: 3;
	grid-row: 2;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 4px 0 4px 20px;
	min-width: 0;
}
.ab-vrow .more .ab-version-prose {
	font-size: 14px;
	line-height: 22px;
	max-width: 72ch;
}
.ab-vrow .more .ab-version-prose .ab-md-block + .ab-md-block {
	margin-top: 10px;
}
.ab-vrow .more .plain {
	margin: 0;
	max-width: 72ch;
	font-size: 14px;
	line-height: 22px;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.ab-vrow .more .sub,
.ab-vrow .more .files {
	margin: 0;
	color: var(--muted);
	font-size: 12px;
	line-height: 18px;
	overflow-wrap: anywhere;
}
.ab-vrow .check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--muted);
	font-size: 12px;
	white-space: nowrap;
}
.ab-vrow .check .dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}
.ab-vrow .check.is-pass {
	color: var(--pass);
}
.ab-vrow .check.is-fail {
	color: var(--fail);
}
.ab-vrow .when {
	color: var(--muted);
	font-size: 12px;
	text-align: right;
	white-space: nowrap;
}
@media (max-width: 720px) {
	.ab-vrow {
		grid-template-columns: 48px minmax(0, 1fr);
		grid-template-areas: "num msg" ". meta";
		row-gap: 6px;
		column-gap: 12px;
		padding: 12px;
	}
	.ab-vrow .num {
		grid-area: num;
	}
	.ab-vrow .msg {
		grid-area: msg;
	}
	.ab-vrow .who,
	.ab-vrow .check,
	.ab-vrow .when {
		grid-row: 2;
		font-size: 12px;
	}
	.ab-vrow {
		grid-template-areas: "num msg msg msg" ". who check when" ". more more more";
		grid-template-columns: 48px max-content max-content minmax(0, 1fr);
	}
	.ab-vrow .more {
		grid-area: more;
	}
	.ab-vrow .who {
		grid-area: who;
	}
	.ab-vrow .check {
		grid-area: check;
	}
	.ab-vrow .when {
		grid-area: when;
	}
	.ab-vrow .more {
		padding-left: 0;
	}
}

/* A version's own page and a named draft's versions, written for reading (issue 52; behind version-rows). */
.ab-vmsg {
	max-width: 72ch;
	margin: 4px 0 12px;
	font-size: 14px;
	line-height: 22px;
	color: var(--ink);
}
.ab-vmsg .ab-md-block + .ab-md-block {
	margin-top: 10px;
}
.ab-vmsg code {
	font-family: var(--font-mono);
	font-size: 12px;
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--wash);
	box-shadow: inset 0 0 0 1px var(--rule);
}
.ab-vmsg-plain {
	margin: 4px 0 12px;
	max-width: 72ch;
	font-size: 14px;
	line-height: 22px;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.ab-nd-msg {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}
.ab-nd-msg .line {
	all: unset;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: var(--ink);
}
.ab-nd-msg .line:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	border-radius: 3px;
}
.ab-nd-msg .chev {
	flex: none;
	color: var(--muted);
	transform: rotate(-90deg);
}
.ab-nd-msg.is-open .chev {
	transform: rotate(0deg);
}
.ab-nd-msg .first {
	font-size: 13px;
	line-height: 20px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}
.ab-nd-msg .first code,
.ab-nd-msg .more code {
	font-family: var(--font-mono);
	font-size: 12px;
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--wash);
	box-shadow: inset 0 0 0 1px var(--rule);
}
.ab-nd-msg .more {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 2px 0 4px 20px;
	min-width: 0;
}
.ab-nd-msg .more .ab-version-prose,
.ab-nd-msg .more .plain {
	max-width: 72ch;
	font-size: 14px;
	line-height: 22px;
	margin: 0;
}
.ab-nd-msg .more .plain {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.ab-nd-msg .more .ab-md-block + .ab-md-block {
	margin-top: 10px;
}
.ab-nd-msg .more .files {
	margin: 0;
	color: var(--muted);
	font-size: 12px;
	line-height: 18px;
	overflow-wrap: anywhere;
}
.ab-nd-msg .more .files code {
	padding: 0;
	background: none;
	box-shadow: none;
}
@media (max-width: 720px) {
	/* A version in a draft's activity has room to open on a phone: who and when on the first line, the version and its message under them at the full width. */
	.ab-nd-event:has(.ab-nd-msg) {
		grid-template-columns: minmax(0, 1fr) auto;
	}
	.ab-nd-event:has(.ab-nd-msg) .who {
		grid-column: 1;
		grid-row: 1;
	}
	.ab-nd-event:has(.ab-nd-msg) .when {
		grid-column: 2;
		grid-row: 1;
	}
	.ab-nd-event:has(.ab-nd-msg) .what {
		grid-column: 1 / -1;
		grid-row: 2;
		margin-top: 2px;
	}
	.ab-nd-msg .more {
		padding-left: 20px;
	}
}

/* Recent versions beside the issues, in the Written board's words (issue 52): the first line of the message, then the issues it was for. Behind version-rows. */
.ab-side-list ul.is-versions .what.is-written {
	display: flex;
	align-items: baseline;
	gap: 6px;
	min-width: 0;
	color: var(--ink);
}
.ab-side-list ul.is-versions .what.is-written .first {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
}
.ab-side-list ul.is-versions .what.is-written .first code {
	font-family: var(--font-mono);
	font-size: 12px;
}
.ab-side-list ul.is-versions .what.is-written .refs {
	flex: none;
	color: var(--muted);
	font-size: 12px;
	font-family: var(--font-mono);
}

/* A version's own page: its first line is the heading, the facts under it (issue 52). */
.ab-version {
	max-width: var(--measure);
	margin: 0 auto;
	padding: 24px 32px 64px;
}
.ab-version-title {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 30px;
	font-weight: 700;
	letter-spacing: -0.02em;
	max-width: 72ch;
	overflow-wrap: anywhere;
}
.ab-version-title code {
	font-family: var(--font-mono);
	font-size: 0.8em;
	font-weight: 600;
}
.ab-version-facts {
	margin: 0 0 16px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	color: var(--muted);
	font-size: 13px;
	line-height: 20px;
}
.ab-version-facts .sep {
	color: var(--faint);
}
.ab-nd-desc-title {
	margin: 0 0 6px;
	font-size: 15px;
	line-height: 23px;
	font-weight: 600;
	max-width: 72ch;
	overflow-wrap: anywhere;
}
.ab-nd-desc-title code {
	font-family: var(--font-mono);
	font-size: 13px;
}
.ab-nd-msg.is-open .first {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
}
.ab-nd-msg .first.plain {
	cursor: default;
}

/* A version's message in an older-kit row, first line with a chevron that opens the rest (issue 52). */
.ab-oline {
	display: inline-block;
	max-width: 100%;
	vertical-align: top;
	margin-left: 6px;
}
.ab-oline code {
	font-family: var(--font-mono);
	font-size: 12px;
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--wash);
	box-shadow: inset 0 0 0 1px var(--rule);
}
.ab-oline.has-more > summary {
	cursor: pointer;
	list-style: none;
	display: block;
	max-width: 100%;
	padding-left: 18px;
	position: relative;
	font-weight: 600;
}
.ab-oline.has-more > summary::-webkit-details-marker {
	display: none;
}
.ab-oline.has-more > summary::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.55em;
	width: 5px;
	height: 5px;
	border-right: 1.5px solid var(--muted);
	border-bottom: 1.5px solid var(--muted);
	transform: rotate(-45deg);
}
.ab-oline.has-more[open] > summary::before {
	transform: rotate(45deg);
	top: 0.45em;
}
.ab-oline.has-more:not([open]) > summary {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ab-oline.has-more > summary:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	border-radius: 3px;
}
.ab-oline .ab-vmsg {
	margin-left: 18px;
}
