.aiaf {
	--aiaf-green: #16a34a;
	--aiaf-orange: #eab308;
	--aiaf-width: 2px;
	--aiaf-radius: 3.2px;
	--aiaf-track-go: color-mix(in srgb, var(--aiaf-green) 24%, #ffffff);
	--aiaf-track-back: color-mix(in srgb, var(--aiaf-orange) 32%, #ffffff);
	--aiaf-branch-h: 210px;
	width: 100%;
	max-width: 72rem;
	margin: 0 auto;
	color: #18181b;
}

.aiaf-mobile {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.aiaf-desktop {
	display: none;
}

.aiaf-node {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 0 0 auto;
}

.aiaf-card {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid #e4e4e7;
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(24, 24, 27, 0.06);
}

.aiaf-card--erp {
	display: grid;
	grid-template-columns: 1fr 1fr;
	place-items: center;
	gap: 6px;
	width: 128px;
	height: 72px;
	padding: 8px;
}

.aiaf-card--ai {
	width: 64px;
	height: 64px;
	padding: 4px;
	border-color: #d4d4d8;
	box-shadow: 0 4px 8px rgba(24, 24, 27, 0.08);
}

.aiaf-card--role {
	width: 48px;
	height: 48px;
	flex: 0 0 auto;
}

.aiaf-card--ai img,
.aiaf-card--ai svg,
.aiaf-card--role img,
.aiaf-card--role svg,
.aiaf-mark img,
.aiaf-mark svg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.aiaf-card--role svg {
	width: 22px;
	height: 22px;
}

.aiaf-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-width: 0;
}

.aiaf-mark svg {
	width: 24px;
	height: 24px;
}

.aiaf-mark-label {
	color: #18181b;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.05;
	text-align: center;
}

.aiaf-mark-label--oracle {
	color: #c74634;
	font-weight: 900;
	letter-spacing: 0.02em;
}

.aiaf-mark-label--sql {
	color: #0078d4;
	font-weight: 700;
}

.aiaf-title,
.aiaf-role-title,
.aiaf-subtitle {
	margin: 0;
	color: #18181b;
	font-weight: 600;
	line-height: 1.25;
}

.aiaf-title {
	margin-top: 8px;
	font-size: 14px;
	text-align: center;
}

.aiaf-subtitle {
	margin-top: 2px;
	color: #71717a;
	font-size: 12px;
	font-weight: 500;
	text-align: center;
}

.aiaf-role-title {
	font-size: 12px;
	text-align: center;
}

.aiaf-vflow {
	position: relative;
	width: 64px;
	height: 36px;
	margin: 4px 0;
	overflow: hidden;
}

.aiaf-hflow {
	position: relative;
	flex: 1 1 0%;
	min-width: 36px;
	height: 80px;
	margin: 0 8px;
	overflow: hidden;
}

.aiaf-hflow--long {
	flex: 1.65 1 0%;
}

.aiaf-track {
	position: absolute;
	border-radius: 999px;
}

.aiaf-vflow .aiaf-track {
	top: 0;
	bottom: 0;
	width: var(--aiaf-width);
}

.aiaf-vflow .aiaf-track--go {
	left: calc(50% - 6px);
	background: var(--aiaf-track-go);
}

.aiaf-vflow .aiaf-track--back {
	left: calc(50% + 6px);
	background: var(--aiaf-track-back);
}

.aiaf-hflow .aiaf-track {
	left: 0;
	right: 0;
	height: var(--aiaf-width);
}

.aiaf-hflow .aiaf-track--go {
	top: calc(50% - 6px);
	background: var(--aiaf-track-go);
}

.aiaf-hflow .aiaf-track--back {
	top: calc(50% + 6px);
	background: var(--aiaf-track-back);
}

.aiaf-dot {
	position: absolute;
	width: calc(var(--aiaf-radius) * 2);
	height: calc(var(--aiaf-radius) * 2);
	border-radius: 999px;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.aiaf-vflow .aiaf-dot--go {
	left: calc(50% - 6px);
	margin-left: calc(var(--aiaf-radius) * -1);
	background: var(--aiaf-green);
	animation-name: aiaf-down;
}

.aiaf-vflow .aiaf-dot--back {
	left: calc(50% + 6px);
	margin-left: calc(var(--aiaf-radius) * -1);
	background: var(--aiaf-orange);
	animation-name: aiaf-up;
}

.aiaf-hflow .aiaf-dot--go {
	top: calc(50% - 6px);
	margin-top: calc(var(--aiaf-radius) * -1);
	background: var(--aiaf-green);
	animation-name: aiaf-right;
}

.aiaf-hflow .aiaf-dot--back {
	top: calc(50% + 6px);
	margin-top: calc(var(--aiaf-radius) * -1);
	background: var(--aiaf-orange);
	animation-name: aiaf-left;
}

.aiaf-branch {
	display: block;
	flex: 0 0 auto;
	width: 180px;
	height: var(--aiaf-branch-h);
	overflow: visible;
}

.aiaf-line {
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: var(--aiaf-width);
}

.aiaf-line--go {
	stroke: var(--aiaf-track-go);
}

.aiaf-line--back {
	stroke: var(--aiaf-track-back);
}

.aiaf-particle--go {
	fill: var(--aiaf-green);
}

.aiaf-particle--back {
	fill: var(--aiaf-orange);
}

.aiaf-roles--stack {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	width: 100%;
	max-width: 20rem;
	margin-top: 4px;
}

.aiaf-roles--stack .aiaf-role {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.aiaf-roles--row {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 0 0 auto;
	height: var(--aiaf-branch-h);
}

.aiaf-roles--row .aiaf-role {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 160px;
}

.aiaf-roles--row .aiaf-role-title {
	font-size: 16px;
	text-align: left;
}

@keyframes aiaf-right {
	from { left: 0; }
	to { left: 100%; }
}

@keyframes aiaf-left {
	from { left: 100%; }
	to { left: 0; }
}

@keyframes aiaf-down {
	from { top: 0; }
	to { top: 100%; }
}

@keyframes aiaf-up {
	from { top: 100%; }
	to { top: 0; }
}

@media (min-width: 768px) {
	.aiaf-mobile {
		display: none;
	}

	.aiaf-desktop {
		display: flex;
		align-items: center;
		justify-content: center;
		padding-bottom: 36px;
	}

	.aiaf-node--erp {
		width: 208px;
	}

	.aiaf-node--ai {
		width: 112px;
	}

	.aiaf-card--erp {
		width: 176px;
		height: 99px;
		gap: 8px;
	}

	.aiaf-card--ai {
		width: 80px;
		height: 80px;
	}

	.aiaf-card--role {
		width: 64px;
		height: 64px;
	}

	.aiaf-card--role svg {
		width: 28px;
		height: 28px;
	}

	.aiaf-mark svg {
		width: 36px;
		height: 36px;
	}

	.aiaf-mark-label {
		font-size: 13px;
	}

	.aiaf-desktop .aiaf-title,
	.aiaf-desktop .aiaf-subtitle {
		position: absolute;
		top: 100%;
		left: 50%;
		margin-top: 12px;
		transform: translateX(-50%);
		white-space: nowrap;
	}

	.aiaf-desktop .aiaf-title {
		font-size: 16px;
	}

	.aiaf-desktop .aiaf-subtitle {
		margin-top: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aiaf-dot,
	.aiaf-particle {
		animation: none;
		display: none;
	}
}
