/* A line's story, as a side panel or a sheet. Split from files.css so each sheet has one job. Tokens only. */
/* ---------- A line's story (F17): the panel beside the code, a sheet from the bottom on a phone ---------- */
.ab-story {
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: var(--paper);
	color: var(--ink);
}
.ab-story-head {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--rule);
}
.ab-story-head h2 {
	margin: 0;
	font-size: 15px;
	line-height: 20px;
	font-weight: 650;
}
.ab-story-file {
	min-width: 0;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 12px;
}
.ab-story-close {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.ab-story-close:hover {
	color: var(--ink);
	background: var(--wash);
}
.ab-story-actions {
	display: flex;
	gap: var(--space-2);
	padding: var(--space-3) var(--space-4);
	border-top: 1px solid var(--rule);
}
.ab-story-close:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}
.ab-story-note {
	margin: 0;
	padding: 16px;
}
.ab-story-body {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}
.ab-story-body section {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.ab-story-body h3 {
	margin: 0;
	color: var(--muted);
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	letter-spacing: 0;
}
.ab-story-body p {
	margin: 0;
}
.ab-story-who {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
}
.ab-story-ci {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font-size: 12px;
	color: var(--muted);
}
.ab-story-message {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.ab-story-files {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.ab-story-pill {
	display: inline-flex;
	align-items: center;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--wash);
	color: var(--ink);
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 20px;
	text-decoration: none;
}
.ab-story-pill:hover {
	box-shadow: inset 0 0 0 1px var(--faint);
}
.ab-story-built {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ab-story-built li {
	display: grid;
	grid-template-columns: auto auto 1fr;
	column-gap: 8px;
	align-items: baseline;
}
.ab-story-built li > span:last-child {
	overflow-wrap: anywhere;
}

@media (max-width: 640px) {
	/* On a phone the side panel is one sheet from the bottom (see .ab-fileview-panel); what it holds, a line's story or an agent's changes, sits flat inside it. */
	.ab-story {
		background: transparent;
	}
	.ab-story-body {
		overflow: visible;
	}
}
