/* d2-style cancellation. One line at a time; on a narrow screen the 47
   items wrap onto several rows, still read left to right. A mark is a
   diagonal stroke, as with a pencil on the paper form. */

.d2-examples { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 4px 0 12px; }
.d2-examples figure { margin: 0; }
.d2-examples figcaption { font-size: 13.5px; color: var(--text-soft); margin-top: 4px; }
.d2-sample { display: flex; gap: 6px; }
.d2-sample .d2-item { cursor: default; }
.d2-affiliation { font-size: 13.5px; color: var(--text-soft); }

.d2-stage { cursor: default; justify-content: flex-start; }
.d2-status { margin: 0; min-height: 1.4em; font-size: 14.5px; color: var(--text-soft); text-align: center; max-width: 40em; }
.d2-line {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
	gap: 6px 4px;
	width: 100%;
}
.d2-line[hidden] { display: none; }

.d2-item {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-width: 32px;
	height: 60px;
	padding: 0;
	font: inherit;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	cursor: pointer;
	touch-action: manipulation;
}
.d2-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.d2-dashes { display: flex; gap: 3px; height: 11px; align-items: center; }
.d2-dash { display: block; width: 2px; height: 10px; border-radius: 1px; background: currentColor; }
.d2-letter { font-size: 22px; line-height: 1; font-weight: 600; font-family: ui-sans-serif, system-ui, sans-serif; }

.d2-item[aria-pressed="true"]::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 6px;
	bottom: 6px;
	width: 3px;
	border-radius: 2px;
	background: var(--accent-strong);
	transform: translateX(-50%) rotate(28deg);
}
.d2-item:disabled { cursor: default; opacity: 1; }
/* Practice feedback only: two frame styles, explained in the status line. */
.d2-item.is-missed { outline: 2px dashed var(--text); outline-offset: 2px; }
.d2-item.is-wrong { outline: 2px solid var(--text); outline-offset: 2px; }

.d2-lines { margin: 18px 0 0; font-size: 14px; }
.d2-lines summary { cursor: pointer; font-weight: 600; }
.d2-lines table { border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.d2-lines th, .d2-lines td { padding: 3px 14px 3px 0; text-align: right; border-bottom: 1px solid var(--border); }
.d2-lines th:first-child, .d2-lines td:first-child { text-align: left; }
