.sfb-text-diagram {
	margin: 1.4rem 0;
	padding: 1rem 1.15rem;
	overflow-x: auto;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: .5rem;
	background: rgba(0, 0, 0, .018);
	-webkit-overflow-scrolling: touch;
}

.sfb-text-diagram pre {
	width: max-content;
	min-width: max-content;
	max-width: none;
	margin: 0;
	padding: 0;
	overflow: visible;
	border: 0;
	background: transparent;
	white-space: pre;
	tab-size: 4;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: .9em;
	font-weight: 400;
	line-height: 1.42;
	color: inherit;
}

.sfb-text-diagram--center pre {
	margin-right: auto;
	margin-left: auto;
}

/* Term components inside semantic text diagrams keep the DA/FA switch and tooltip. */
.sfb-text-diagram .sfb-term {
	font-family: inherit;
}

/* Diagram links should look like diagram text, while remaining keyboard/focus accessible. */
.sfb-text-diagram .sfb-term--linked {
	text-decoration-thickness: .06em;
	text-underline-offset: .12em;
}

@media (prefers-color-scheme: dark) {
	.sfb-text-diagram {
		border-color: rgba(255, 255, 255, .16);
		background: rgba(255, 255, 255, .025);
	}
}

@media (max-width: 680px) {
	.sfb-text-diagram {
		margin-right: -.25rem;
		margin-left: -.25rem;
		padding: .9rem;
	}

	.sfb-text-diagram pre {
		font-size: .84em;
	}
}


/* Preserve source line breaks and spacing in linguistic blockquote examples. */
.sfb-multiline-quote p {
	white-space: pre-wrap;
}


/* Legacy analysis blockquotes promoted to text diagrams keep emphasis stable. */
.sfb-text-diagram strong {
	font-weight: 700;
}


/* Two-line linguistic analyses are laid out by columns, not by hand-entered
   spaces. This keeps ×/○/⊗ directly under the matching sentence part. */
.sfb-analysis-grid {
	display: inline-grid;
	grid-auto-flow: column;
	grid-auto-columns: max-content;
	align-items: start;
	margin: 1.35rem 0;
	padding: 1rem 1.15rem;
	overflow-x: auto;
	max-width: 100%;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: .5rem;
	background: rgba(0, 0, 0, .018);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: .9em;
	line-height: 1.42;
}

.sfb-analysis-grid__cell {
	position: relative;
	display: grid;
	grid-template-rows: auto auto;
	justify-items: center;
	row-gap: .4rem;
	padding: 0 .9rem;
}

.sfb-analysis-grid__cell:first-child {
	padding-left: .1rem;
}

.sfb-analysis-grid__cell:last-child {
	padding-right: .1rem;
}

.sfb-analysis-grid__cell--separated {
	border-left: 1px solid currentColor;
}

.sfb-analysis-grid__label {
	white-space: nowrap;
}

.sfb-analysis-grid__symbol {
	font-size: 1.05em;
	line-height: 1;
}

/* In text-al, **bold** is also the semantic alignment target. Prefix/suffix
   text remains visible, but the marker is centred below the bold phrase. */
.sfb-analysis-grid__cell--targeted {
	grid-template-columns: max-content max-content max-content;
	grid-template-rows: auto auto;
	justify-items: stretch;
}

.sfb-analysis-grid__cell--targeted .sfb-analysis-grid__label {
	display: contents;
}

.sfb-analysis-grid__prefix {
	grid-column: 1;
	grid-row: 1;
	white-space: pre;
}

.sfb-analysis-grid__target {
	grid-column: 2;
	grid-row: 1;
	white-space: pre;
	text-align: center;
}

.sfb-analysis-grid__suffix {
	grid-column: 3;
	grid-row: 1;
	white-space: pre;
}

.sfb-analysis-grid__cell--targeted .sfb-analysis-grid__prefix:not(:empty)::after {
	content: " ";
}

.sfb-analysis-grid__cell--targeted .sfb-analysis-grid__suffix:not(:empty)::before {
	content: " ";
}

.sfb-analysis-grid__cell--targeted .sfb-analysis-grid__symbol {
	grid-column: 2;
	grid-row: 2;
	text-align: center;
	justify-self: stretch;
}

.sfb-analysis-grid strong {
	font-weight: 700;
}

@media (max-width: 680px) {
	.sfb-analysis-grid {
		font-size: .84em;
	}
}


.sfb-analysis-grid--text-al .sfb-analysis-grid__symbol {
	min-height: 1.1em;
	text-align: center;
}

.sfb-analysis-grid--text-al .sfb-analysis-grid__cell {
	min-width: 2.5ch;
}

/* Feedback 1.0 */
.sfb-feedback-form{max-width:48rem}.sfb-feedback-form fieldset{border:0;padding:0;margin:0 0 1.25rem}.sfb-feedback-choice{display:block;margin:.45rem 0}.sfb-feedback-form textarea{box-sizing:border-box;width:100%;margin-top:.4rem}.sfb-feedback-privacy{font-size:.92em;opacity:.8}.sfb-feedback-hp{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}.sfb-feedback-success,.sfb-feedback-error{padding:.8rem 1rem;border:1px solid currentColor;margin:1rem 0}.sfb-feedback-cta{margin-top:2rem;padding-top:1rem;border-top:1px solid currentColor}
