/* Interactive blog widgets — loaded on posts with [interactive] shortcodes */

.prose .blog-widget {
	margin: 1.6rem 0;
	padding: 1rem 1.1rem 1.15rem;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	border-radius: 14px;
	background: var(--post-surface, #fff);
	color: var(--post-fg, #0f172a);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.bw-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0 0 0.85rem;
	flex-wrap: wrap;
}

.bw-view-toggle {
	display: inline-flex;
	padding: 3px;
	border-radius: 9px;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	background: color-mix(in srgb, var(--post-fg, #0f172a) 4%, transparent);
	flex-shrink: 0;
}

.bw-view-btn {
	padding: 0.35rem 0.7rem;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 650;
	border: none;
	border-radius: 7px;
	background: transparent;
	color: var(--post-muted, #64748b);
	cursor: pointer;
}

.bw-view-btn.is-active {
	background: var(--post-surface, #fff);
	color: var(--post-fg, #0f172a);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.bw-canvas-wrap.is-3d {
	background: radial-gradient(
		ellipse at 50% 42%,
		color-mix(in srgb, var(--post-accent, #1d4ed8) 10%, transparent),
		transparent 68%
	);
}

.bw-axis-label--z {
	right: 0.65rem;
	top: 0.45rem;
}

.bw-title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 650;
	letter-spacing: -0.01em;
}

.bw-hint {
	margin: 0.2rem 0 0;
	font-size: 0.82rem;
	color: var(--post-muted, #64748b);
	line-height: 1.45;
}

.bw-tokens {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	min-height: 2.2rem;
	margin: 0 0 0.85rem;
}

.bw-token {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.28rem 0.55rem;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 600;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	background: color-mix(in srgb, currentColor 10%, transparent);
}

.bw-token-id {
	font-size: 0.72rem;
	font-weight: 500;
	opacity: 0.75;
}

.bw-canvas-wrap {
	position: relative;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.1));
	border-radius: 10px;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 2%, var(--post-surface, #fff));
	overflow: hidden;
	min-height: 360px;
}

.bw-canvas {
	display: block;
	width: 100%;
	height: auto;
}

.bw-axis-label {
	position: absolute;
	font-size: 0.72rem;
	color: var(--post-muted, #64748b);
	pointer-events: none;
}

.bw-axis-label--x {
	right: 0.65rem;
	bottom: 0.45rem;
}

.bw-axis-label--y {
	left: 0.55rem;
	top: 0.45rem;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
}

.bw-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
	margin: 0.85rem 0;
}

.bw-stat {
	padding: 0.55rem 0.7rem;
	border-radius: 9px;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 4%, transparent);
}

.bw-stat-label {
	display: block;
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--post-muted, #64748b);
	margin-bottom: 0.15rem;
}

.bw-stat-value {
	font-size: 1.05rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.bw-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	align-items: stretch;
}

.bw-field {
	flex: 1 1 220px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.bw-field label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--post-muted, #64748b);
}

.bw-input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55rem 0.7rem;
	font: inherit;
	font-size: 0.92rem;
	color: var(--post-fg, #0f172a);
	background: var(--post-surface, #fff);
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.14));
	border-radius: 9px;
}

.bw-input:focus {
	outline: none;
	border-color: var(--post-accent, #1d4ed8);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--post-accent, #1d4ed8) 18%, transparent);
}

.bw-btn {
	flex: 0 0 auto;
	align-self: flex-end;
	padding: 0.58rem 1rem;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 650;
	color: #fff;
	background: var(--post-accent, #1d4ed8);
	border: none;
	border-radius: 9px;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.1s ease;
}

.bw-btn:hover {
	filter: brightness(1.05);
}

.bw-btn:active {
	transform: translateY(1px);
}

.bw-btn--ghost {
	color: var(--post-fg, #0f172a);
	background: transparent;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.14));
}

.bw-btn--ghost:hover {
	filter: none;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 5%, transparent);
}

.bw-pipeline-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: 1rem;
	align-items: start;
}

.bw-pipeline-flow {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.bw-pipeline-node {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	width: 100%;
	margin: 0;
	padding: 0.65rem 0.75rem;
	text-align: left;
	font: inherit;
	color: var(--post-fg, #0f172a);
	background: color-mix(in srgb, var(--post-fg, #0f172a) 3%, var(--post-surface, #fff));
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.bw-pipeline-node:hover {
	border-color: color-mix(in srgb, var(--post-accent, #1d4ed8) 35%, var(--post-line, #ccc));
}

.bw-pipeline-node.is-done {
	border-color: color-mix(in srgb, var(--post-accent, #1d4ed8) 45%, var(--post-line, #ccc));
}

.bw-pipeline-node.is-current {
	border-color: var(--post-accent, #1d4ed8);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--post-accent, #1d4ed8) 16%, transparent);
	background: color-mix(in srgb, var(--post-accent, #1d4ed8) 7%, var(--post-surface, #fff));
}

.bw-pipeline-node:focus-visible {
	outline: 2px solid var(--post-accent, #1d4ed8);
	outline-offset: 2px;
}

.bw-pipeline-node-num {
	flex: 0 0 auto;
	width: 1.6rem;
	height: 1.6rem;
	display: grid;
	place-items: center;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 8%, transparent);
}

.bw-pipeline-node.is-current .bw-pipeline-node-num {
	background: var(--post-accent, #1d4ed8);
	color: #fff;
}

.bw-pipeline-node-body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.bw-pipeline-node-title {
	font-size: 0.92rem;
	font-weight: 650;
	line-height: 1.3;
}

.bw-pipeline-node-file {
	font-size: 0.78rem;
	color: var(--post-muted, #64748b);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.bw-pipeline-arrow {
	text-align: center;
	line-height: 1;
	padding: 0.2rem 0;
	font-size: 1rem;
	color: var(--post-muted, #94a3b8);
	opacity: 0.55;
	transition: opacity 0.2s ease, color 0.2s ease;
}

.bw-pipeline-arrow.is-done {
	opacity: 1;
	color: var(--post-accent, #1d4ed8);
}

.bw-pipeline-detail {
	padding: 0.85rem 0.95rem;
	border-radius: 10px;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	background: color-mix(in srgb, var(--post-fg, #0f172a) 3%, transparent);
	min-height: 8rem;
}

.bw-pipeline-detail-label {
	margin: 0 0 0.4rem;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--post-muted, #64748b);
	font-weight: 650;
}

.bw-pipeline-detail-text {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.55;
}

.bw-pipeline-detail-file {
	margin: 0.65rem 0 0;
	font-size: 0.8rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--post-accent, #1d4ed8);
}

.bw-pipeline-progress {
	height: 4px;
	margin: 0.75rem 0 0.85rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 8%, transparent);
	overflow: hidden;
}

.bw-pipeline-progress span {
	display: block;
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: var(--post-accent, #1d4ed8);
	transition: width 0.35s ease;
}

.bw-pipeline-controls {
	margin-top: 0;
}

@media (max-width: 720px) {
	.bw-pipeline-layout {
		grid-template-columns: 1fr;
	}
}

.bw-table-wrap {
	overflow-x: auto;
	margin: 0.5rem 0 0.75rem;
}

.bw-embedding-controls {
	margin-bottom: 0.9rem;
}

.bw-embed-meta {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin-bottom: 0.9rem;
}

.bw-embed-card {
	padding: 0.75rem 0.85rem;
	border-radius: 10px;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	background: color-mix(in srgb, var(--post-fg, #0f172a) 3%, var(--post-surface, #fff));
}

.bw-embed-card-label {
	display: block;
	margin-bottom: 0.2rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--post-muted, #64748b);
}

.bw-embed-card-value {
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--post-fg, #0f172a);
}

.bw-embed-stage {
	margin-bottom: 0.9rem;
}

.bw-embed-bottom {
	display: grid;
	grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
}

.bw-embed-list-wrap {
	padding: 0.75rem 0.8rem;
	border-radius: 10px;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	background: color-mix(in srgb, var(--post-fg, #0f172a) 3%, var(--post-surface, #fff));
}

.bw-embed-list-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.65rem;
	font-size: 0.84rem;
}

.bw-embed-list-head span {
	color: var(--post-muted, #64748b);
	font-size: 0.78rem;
}

.bw-embed-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.bw-embed-word {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.38rem 0.65rem;
	border-radius: 999px;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.14));
	background: var(--post-surface, #fff);
	color: var(--post-fg, #0f172a);
	font: inherit;
	font-size: 0.82rem;
	cursor: pointer;
}

.bw-embed-word:hover,
.bw-embed-word:focus-visible {
	outline: none;
	border-color: var(--post-accent, #1d4ed8);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--post-accent, #1d4ed8) 16%, transparent);
}

.bw-embed-word.is-selected {
	background: color-mix(in srgb, var(--post-accent, #1d4ed8) 10%, transparent);
	border-color: color-mix(in srgb, var(--post-accent, #1d4ed8) 38%, transparent);
}

.bw-embed-word-dot {
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	flex: 0 0 auto;
}

.bw-embed-canvas,
.bw-three-stage {
	min-height: 360px;
}

.bw-three-stage,
.bw-three-labels {
	position: absolute;
	inset: 0;
}

.bw-three-stage[hidden],
.bw-three-labels[hidden] {
	display: none;
}

.bw-three-stage {
	background:
		radial-gradient(circle at top, color-mix(in srgb, var(--post-accent, #1d4ed8) 12%, transparent), transparent 55%),
		color-mix(in srgb, var(--post-fg, #0f172a) 2%, var(--post-surface, #fff));
	overflow: hidden;
}

.bw-three-stage canvas {
	width: 100%;
	height: 100%;
	display: block;
}

.bw-embed-canvas {
	cursor: grab;
}

.bw-embed-canvas:active {
	cursor: grabbing;
}

.bw-three-labels {
	pointer-events: none;
}

.bw-embed-label {
	position: absolute;
	left: 0;
	top: 0;
	padding: 0.18rem 0.45rem;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 600;
	color: var(--post-fg, #0f172a);
	background: color-mix(in srgb, var(--post-surface, #fff) 88%, transparent);
	border: 1px solid color-mix(in srgb, var(--bw-label-color, #1d4ed8) 45%, transparent);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
	transform: translate(-50%, -120%);
	white-space: nowrap;
}

.bw-embed-loading {
	display: grid;
	place-items: center;
	height: 100%;
	min-height: 360px;
	padding: 1rem;
	font-size: 0.9rem;
	color: var(--post-muted, #64748b);
}

.bw-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.bw-table th,
.bw-table td {
	padding: 0.45rem 0.55rem;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	text-align: center;
}

.bw-table th {
	background: color-mix(in srgb, var(--post-fg, #0f172a) 5%, transparent);
	font-size: 0.78rem;
}

.bw-table td:first-child,
.bw-table th:first-child {
	text-align: left;
	font-weight: 600;
}

.bw-cell-input {
	width: 3.2rem;
	padding: 0.25rem 0.35rem;
	font: inherit;
	font-size: 0.85rem;
	text-align: center;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.14));
	border-radius: 6px;
	background: var(--post-surface, #fff);
	color: var(--post-fg, #0f172a);
}

.bw-cell-input:focus {
	outline: none;
	border-color: var(--post-accent, #1d4ed8);
}

.bw-similarity {
	margin: 0.65rem 0 0;
	padding: 0.65rem 0.75rem;
	border-radius: 9px;
	background: color-mix(in srgb, var(--post-accent, #1d4ed8) 8%, transparent);
	font-size: 0.86rem;
	line-height: 1.45;
}

.bw-similarity strong {
	font-weight: 700;
}

:global(html[data-theme="dark"]) .blog-widget {
	background: var(--post-surface, #111827);
	border-color: rgba(148, 163, 184, 0.2);
}

@media (max-width: 640px) {
	.bw-controls {
		flex-direction: column;
	}
	.bw-btn {
		width: 100%;
		align-self: stretch;
	}
	.bw-embed-canvas,
	.bw-three-stage {
		min-height: 300px;
	}
}

@media (max-width: 900px) {
	.bw-embed-bottom,
	.bw-embed-meta {
		grid-template-columns: 1fr;
	}
}

/* AI Lab widgets */
.bw-playground-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
}

.bw-panel {
	padding: 0.75rem 0.85rem;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	border-radius: 10px;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 2%, var(--post-surface, #fff));
}

.bw-panel-title {
	margin: 0 0 0.65rem;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--post-muted, #64748b);
}

.bw-textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55rem 0.65rem;
	font: inherit;
	font-size: 0.9rem;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.14));
	border-radius: 8px;
	resize: vertical;
	min-height: 4.5rem;
	color: var(--post-fg, #0f172a);
	background: var(--post-surface, #fff);
}

.bw-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 0.5rem;
}

.bw-tab {
	padding: 0.28rem 0.55rem;
	font: inherit;
	font-size: 0.75rem;
	font-weight: 650;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	border-radius: 7px;
	background: transparent;
	color: var(--post-muted, #64748b);
	cursor: pointer;
}

.bw-tab.is-active {
	background: var(--post-accent, #1d4ed8);
	border-color: var(--post-accent, #1d4ed8);
	color: #fff;
}

.bw-code {
	margin: 0;
	padding: 0.65rem 0.75rem;
	font-size: 0.78rem;
	line-height: 1.45;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	background: #0b1220;
	color: #e2e8f0;
	border-radius: 8px;
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-word;
}

.bw-code--out {
	margin-top: 0.45rem;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 6%, transparent);
	color: var(--post-fg, #0f172a);
}

.bw-output-label {
	margin: 0.65rem 0 0.25rem;
	font-size: 0.72rem;
	font-weight: 650;
	text-transform: uppercase;
	color: var(--post-muted, #64748b);
}

.bw-embed-flow {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	gap: 1rem;
}

.bw-embed-step {
	padding: 0.4rem 0;
	font-size: 0.88rem;
	font-weight: 600;
	opacity: 0.45;
	transition: opacity 0.2s ease;
}

.bw-embed-step.is-done,
.bw-embed-step.is-current {
	opacity: 1;
	color: var(--post-accent, #1d4ed8);
}

.bw-embed-vec {
	font-family: ui-monospace, monospace;
	font-size: 0.88rem;
}

.bw-attn-sentence {
	line-height: 2;
	margin: 0 0 0.75rem;
}

.bw-attn-word {
	display: inline;
	margin: 0 0.1rem;
	padding: 0.15rem 0.35rem;
	font: inherit;
	font-size: inherit;
	border: 1px solid transparent;
	border-radius: 6px;
	background: color-mix(in srgb, var(--post-accent, #1d4ed8) 8%, transparent);
	cursor: pointer;
}

.bw-attn-word:hover,
.bw-attn-word:focus-visible {
	border-color: var(--post-accent, #1d4ed8);
	outline: none;
}

.bw-attn-row {
	display: grid;
	grid-template-columns: 5rem 1fr 2.5rem;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 0.35rem;
	font-size: 0.82rem;
}

.bw-attn-bar {
	height: 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 8%, transparent);
	overflow: hidden;
}

.bw-attn-bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--post-accent, #1d4ed8);
}

.bw-sliders label {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: 0.55rem;
	font-size: 0.82rem;
	font-weight: 600;
}

.bw-gpu-bars {
	display: grid;
	gap: 0.65rem;
	margin-bottom: 0.75rem;
}

.bw-gpu-track {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	min-height: 1.5rem;
}

.bw-gpu-track--wide {
	max-width: 100%;
}

.bw-gpu-cell {
	width: 14px;
	height: 14px;
	border-radius: 3px;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 12%, transparent);
}

.bw-gpu-cell.is-on {
	background: var(--post-accent, #1d4ed8);
}

.bw-quant-slider {
	width: 100%;
	margin: 0.5rem 0 0.75rem;
}

.bw-quant-display {
	display: flex;
	justify-content: space-between;
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
}

.bw-quant-chain {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
}

.bw-quant-node {
	padding: 0.35rem 0.75rem;
	border-radius: 8px;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	font-weight: 650;
	font-size: 0.85rem;
	opacity: 0.45;
}

.bw-quant-node.is-active {
	opacity: 1;
	border-color: var(--post-accent, #1d4ed8);
	background: color-mix(in srgb, var(--post-accent, #1d4ed8) 10%, transparent);
}

.bw-quant-arrow {
	color: var(--post-muted, #64748b);
	font-size: 0.9rem;
}

.bw-analogy-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem;
	margin-bottom: 0.75rem;
}

.bw-analogy-grid label {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--post-muted, #64748b);
}

.bw-analogy-equation {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	margin: 0 0 1rem;
	padding: 0.9rem;
	border-radius: 12px;
	background: color-mix(in srgb, var(--post-accent, #1d4ed8) 7%, transparent);
	border: 1px solid color-mix(in srgb, var(--post-accent, #1d4ed8) 18%, transparent);
}

.bw-analogy-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 5.5rem;
	padding: 0.6rem 0.8rem;
	border-radius: 999px;
	background: var(--post-surface, #fff);
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.14));
	color: var(--post-fg, #0f172a);
	font-weight: 700;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.bw-analogy-chip--primary {
	border-color: color-mix(in srgb, #3b82f6 40%, transparent);
}

.bw-analogy-chip--result {
	border-color: color-mix(in srgb, #f59e0b 40%, transparent);
}

.bw-analogy-operator {
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--post-muted, #64748b);
}

.bw-analogy-vector-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 0.75rem;
	margin-top: 0.85rem;
}

.bw-analogy-vector-card {
	padding: 0.75rem;
	border-radius: 12px;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	background: color-mix(in srgb, var(--post-fg, #0f172a) 2%, var(--post-surface, #fff));
}

.bw-analogy-vector-title {
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--post-fg, #0f172a);
	margin-bottom: 0.55rem;
	word-break: break-word;
}

.bw-analogy-bars {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.4rem;
	align-items: end;
	height: 110px;
}

.bw-analogy-bar-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	height: 100%;
}

.bw-analogy-bar-label {
	font-size: 0.68rem;
	color: var(--post-muted, #64748b);
}

.bw-analogy-bar-track {
	display: flex;
	align-items: end;
	justify-content: center;
	width: 100%;
	flex: 1 1 auto;
	border-radius: 999px;
	background: color-mix(in srgb, var(--post-fg, #0f172a) 7%, transparent);
	padding: 0.2rem;
}

.bw-analogy-bar-fill {
	display: block;
	width: 100%;
	min-height: 8px;
	border-radius: 999px;
}

.bw-analogy-vector-code {
	margin-top: 0.6rem;
	font-size: 0.73rem;
	font-family: var(--font-mono, monospace);
	color: var(--post-muted, #64748b);
}

.bw-attn-controls {
	display: grid;
	grid-template-columns: 1fr minmax(7rem, 9rem) auto;
	gap: 0.55rem;
	align-items: end;
	margin-bottom: 0.75rem;
}

.bw-attn-controls .bw-btn {
	align-self: end;
	white-space: nowrap;
}

@media (max-width: 720px) {
	.bw-analogy-grid {
		grid-template-columns: 1fr;
	}
	.bw-attn-controls {
		grid-template-columns: 1fr;
	}
	.bw-attn-controls .bw-btn {
		width: 100%;
	}
}

.bw-analogy-result {
	margin: 0.65rem 0 0;
	font-size: 0.92rem;
	line-height: 1.55;
}

@media (max-width: 800px) {
	.bw-playground-split,
	.bw-embed-flow {
		grid-template-columns: 1fr;
	}
}

/* Token IDs widget */
.bw-char-count {
	font-size: 0.75rem;
	color: var(--post-muted, #64748b);
	margin-top: 0.25rem;
	display: block;
	text-align: right;
}

.bw-token-ids-table {
	margin: 1rem 0 0.5rem;
}

.bw-ids-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.bw-ids-table thead th {
	text-align: left;
	padding: 0.5rem 0.75rem;
	font-weight: 600;
	border-bottom: 2px solid var(--post-border, #e2e8f0);
	color: var(--post-text, #1e293b);
}

.bw-ids-table tbody td {
	padding: 0.45rem 0.75rem;
	border-bottom: 1px solid var(--post-border, #e2e8f0);
}

.bw-ids-table tbody tr:hover {
	background: var(--post-hover, rgba(59, 130, 246, 0.04));
}

.bw-id-token {
	font-family: var(--font-mono, monospace);
	border-left: 3px solid;
	padding-left: 0.5rem;
}

.bw-id-num {
	font-family: var(--font-mono, monospace);
	font-weight: 600;
	text-align: right;
	color: var(--post-accent, #3b82f6);
}

.bw-token-ids-note {
	font-size: 0.85rem;
	color: var(--post-muted, #64748b);
	margin-top: 0.5rem;
}

.bw-empty {
	color: var(--post-muted, #64748b);
	font-style: italic;
}

.bw-pipeline-stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 1rem;
	padding: 0.85rem;
	border-radius: 12px;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.12));
	background: color-mix(in srgb, var(--post-fg, #0f172a) 2%, var(--post-surface, #fff));
}

.bw-pipeline-stack-step {
	width: 100%;
	max-width: 34rem;
	padding: 0.65rem 0.85rem;
	border-radius: 10px;
	border: 1px solid var(--post-line, rgba(15, 23, 42, 0.1));
	background: var(--post-surface, #fff);
	opacity: 0.55;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.bw-pipeline-stack-step.is-active {
	opacity: 1;
	border-color: color-mix(in srgb, var(--post-accent, #1d4ed8) 35%, transparent);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.bw-pipeline-stack-label {
	display: block;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--post-muted, #64748b);
	margin-bottom: 0.25rem;
}

.bw-pipeline-stack-value {
	display: block;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--post-fg, #0f172a);
	word-break: break-word;
}

.bw-pipeline-stack-arrow {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--post-muted, #64748b);
	line-height: 1;
}
