/*
 * Story Builder boxes (SIG-781). SignalForge sends them as plain HTML in the post body:
 * <aside class="sf-box sf-box-{format}"><h3>Title</h3><p>Optional intro</p><ul><li><strong>Label</strong> words</li></ul></aside>
 * Formats: how-to-watch, whos-who, timeline, where-now, episode-guide, at-a-glance, own. All share one layout.
 * Colours come from the theme's text colour, so a box suits light and dark themes alike.
 * `aside.sf-box` (not `.sf-box`) so these win over theme rules like `.entry-content h3` without !important.
 */
aside.sf-box {
	box-sizing: border-box;
	margin: 1.5em 0;
	padding: 1em 1.25em;
	border: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 20%, transparent);
	border-top: 3px solid currentColor;
	border-radius: 4px;
	background: color-mix(in srgb, currentColor 4%, transparent);
	color: inherit;
	font: inherit;
	overflow-wrap: anywhere;
}

aside.sf-box h3 {
	margin: 0 0 0.5em;
	padding: 0;
	font-size: 1.2em;
	line-height: 1.3;
}

aside.sf-box p {
	margin: 0 0 0.75em;
}

aside.sf-box ul {
	display: grid;
	gap: 0.5em;
	margin: 0;
	padding: 0;
	list-style: none;
}

aside.sf-box li {
	margin: 0;
	padding: 0;
}

aside.sf-box li + li {
	padding-top: 0.5em;
	border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

/* The label sits above its words on a phone, and in its own column when there is room. */
aside.sf-box li > strong {
	display: block;
}

/* A float, not a grid: the words may hold <br>s, and every line must stay in the right-hand column. */
@media (min-width: 36em) {
	aside.sf-box li:has(> strong:first-child) {
		display: flow-root;
		padding-left: 10em;
	}

	aside.sf-box li > strong:first-child {
		float: left;
		width: 9em;
		margin-left: -10em;
	}
}
