/* AK 动画专区 · 选择结构演示
   配色沿用动画专区自己的青色系（#0f766e / #14b8a6 / #0ea5e9），不另开一套 */

.anb-board {
	margin-top: 0;
	scroll-margin-top: 90px;
}

/* 多分支的流程树比较长，右边代码跟着滚，别让它孤零零挂在顶上 */
@media (min-width: 901px) {
	.anb-board .an-side {
		position: sticky;
		top: 90px;
	}
}

/* ---------- 三个演示的切换胶囊 ---------- */
.anb-picks {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 9px 0 3px;
}

.anb-pick {
	font-family: inherit;
	font-size: 12.5px;
	line-height: 1.4;
	padding: 5px 14px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #64748b;
	cursor: pointer;
	transition: .15s;
}

.anb-pick:hover {
	border-color: #99f6e4;
	color: #0f766e;
	background: #f8fdfc;
}

.anb-pick.is-on {
	background: #0f766e;
	border-color: #0f766e;
	color: #fff;
	font-weight: 600;
}

/* ---------- 流程树 ---------- */
.anb-flow {
	margin: 4px 0 12px;
	padding-left: 12px;
	margin-left: 5px;
	border-left: 2px solid #eef2f7;
}

.anb-node {
	position: relative;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
	font-size: 12.5px;
	color: #334155;
	transition: .18s;
}

.anb-node + .anb-node,
.anb-body + .anb-node,
.anb-node + .anb-body {
	margin-top: 6px;
}

.anb-node code,
.anb-body code {
	font-family: Consolas, "SFMono-Regular", Menlo, monospace;
	font-size: 12.5px;
	line-height: 1.5;
	color: #0f172a;
	white-space: pre-wrap;
	word-break: break-word;
	min-width: 0;
}

.anb-tag {
	flex: none;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .03em;
	color: #0f766e;
	background: #f0fdfa;
	border: 1px solid #ccfbf1;
	border-radius: 6px;
	padding: 2px 7px;
}

.anb-tag-plain {
	color: #64748b;
	background: #f8fafc;
	border-color: #eef2f7;
}

.anb-else .anb-tag {
	color: #b45309;
	background: #fffbeb;
	border-color: #fde68a;
}

.anb-flag {
	margin-left: auto;
	flex: none;
	font-size: 11px;
	font-weight: 700;
	color: #b6c2d4;
	font-variant-numeric: tabular-nums;
}

/* 缩进块 */
.anb-body {
	position: relative;
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 6px 0 6px 28px;
	padding: 7px 12px;
	border: 1px dashed #e2e8f0;
	border-radius: 10px;
	background: #fcfdff;
	font-size: 12.5px;
	color: #475569;
	transition: .18s;
}

.anb-body::before {
	content: "";
	position: absolute;
	left: -14px;
	top: 50%;
	width: 14px;
	height: 1px;
	background: #e2e8f0;
}

/* ---------- 状态 ---------- */
.anb-read.is-on {
	border-color: #0f766e;
	background: #f0fdfa;
	box-shadow: 0 0 0 2px rgba(15, 118, 110, .12);
}

.anb-cond.is-pass {
	border-color: #5eead4;
	background: #ecfdf5;
}

.anb-cond.is-pass code {
	color: #0f766e;
	font-weight: 600;
}

.anb-cond.is-pass .anb-flag,
.anb-body.is-hit .anb-flag {
	color: #0f766e;
}

.anb-cond.is-fail {
	border-color: #e8edf5;
	background: #f8fafc;
}

.anb-cond.is-fail code {
	color: #a8b3c4;
	text-decoration: line-through;
	text-decoration-color: #cbd5e1;
}

.anb-cond.is-fail .anb-flag {
	color: #cbd5e1;
}

.anb-cond.is-skip,
.anb-body.is-dim {
	opacity: .42;
}

.anb-node.is-cur {
	box-shadow: 0 0 0 2px rgba(15, 118, 110, .16);
}

.anb-body.is-hit {
	border-style: solid;
	border-color: #0f766e;
	background: #ecfdf5;
	color: #0f766e;
	box-shadow: 0 0 0 2px rgba(15, 118, 110, .14);
}

.anb-body.is-hit code {
	color: #0f766e;
	font-weight: 600;
}

/* ---------- 输出 ---------- */
#anb-out {
	margin-bottom: 4px;
}

.anb-ov-empty {
	font-size: 12px;
	color: #64748b;
}

.anb-dot-skip {
	background: #cbd5e1;
}

/* ---------- 控件 ---------- */
.anb-quick {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
}

.anb-qv {
	font-family: inherit;
	font-size: 12px;
	line-height: 1.4;
	padding: 4px 11px;
	border-radius: 999px;
	border: 1px dashed #d1d5db;
	background: #fff;
	color: #475569;
	cursor: pointer;
	transition: .15s;
}

.anb-qv:hover {
	border-color: #0f766e;
	color: #0f766e;
	background: #f0fdfa;
}

.an-custom input#anb-val {
	width: 78px;
	font-variant-numeric: tabular-nums;
}

/* ---------- 学习卡 ---------- */
.anb-learn[hidden] {
	display: none !important;
}

.anb-learn p {
	line-height: 1.85;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
	.anb-flow {
		padding-left: 8px;
		margin-left: 2px;
	}

	.anb-body {
		margin-left: 16px;
	}

	.anb-body::before {
		left: -9px;
		width: 9px;
	}

	.anb-flag {
		font-size: 10.5px;
	}

	.an-custom input#anb-val {
		width: 64px;
	}
}
