.wrap.tools {
	padding: 10px 20px 28px;
}

.panel.rgx-panel {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
	box-shadow: var(--shadow);
}

.rgx-head {
	padding: 14px;
	border-bottom: 1px solid var(--border);
}

.rgx-title {
	margin: 0 0 6px;
	font-size: 16px;
}

.rgx-msg {
	margin: 0;
	color: var(--muted);
}

.rgx-body {
	padding: 14px;
	display: grid;
	gap: 16px;
}

.row {
	display: grid;
	gap: var(--gap);
	align-items: start;
}

.row.cols-2 {
	grid-template-columns: 1fr 1fr;
}

.row.cols-3 {
	grid-template-columns: 1.2fr 1.2fr 0.8fr;
}

@media (max-width: 1180px) {
	.row.cols-3 {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 980px) {
	.row.cols-2 {
		grid-template-columns: 1fr;
	}
}

.field {
	display: grid;
	gap: 6px;
}

.field input[type="text"],
.field select,
.field textarea {
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--panel);
	color: var(--text);
	font-size: 14px;
	width: 100%;
	max-width: 100%;
}

.seg {
	display: inline-flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.cb {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cb input {
	width: 16px;
	height: 16px;
	accent-color: var(--accent);
}

.pill-muted {
	color: var(--muted);
}

.token-box,
.json-box,
.code-box,
.info-box {
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--panel);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 13px;
	white-space: pre-wrap;
	word-break: break-word;
	min-height: 100px;
}

.legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	row-gap: 6px;
	align-items: center;
	font-size: 12px;
	line-height: 1.2;
}

.legend .swatch {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 6px;
	border: 1px solid var(--border);
	border-radius: 999px;
	white-space: nowrap;
}

.legend .swatch>.tok-group,
.legend .swatch>.tok-class,
.legend .swatch>.tok-quant,
.legend .swatch>.tok-esc,
.legend .swatch>.tok-assert,
.legend .swatch>.tok-anchor,
.legend .swatch>.tok-alt,
.legend .swatch>.tok-dot {
	font-size: 12px;
}

.tok-literal {
	color: #e8eef6;
}

.tok-dot {
	color: #7aa2ff;
}

.tok-esc {
	color: #7ce38b;
}

.tok-class {
	color: #f6d06f;
}

.tok-quant {
	color: #e78fb3;
}

.tok-group {
	color: #a1b3ff;
}

.tok-assert {
	color: #9ae6b4;
}

.tok-alt {
	color: #fca5a5;
}

.tok-anchor {
	color: #86efac;
}

.tok-name {
	color: #c7a7ff;
}

.highlight-wrap {
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: #0f1420;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 13px;
	overflow: auto;
	min-height: 120px;
	max-height: 420px;
}

mark.m0 {
	background: rgba(122, 162, 255, .28);
}

mark.m1 {
	background: rgba(124, 227, 139, .28);
}

mark.m2 {
	background: rgba(231, 143, 179, .28);
}

mark.m3 {
	background: rgba(246, 208, 111, .28);
}

mark.m4 {
	background: rgba(199, 167, 255, .28);
}

mark {
	color: inherit;
	padding: 0 0;
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	border: 1px solid var(--border);
	border-radius: 10px;
	overflow: hidden;
	table-layout: fixed;
}

.table th,
.table td {
	border-bottom: 1px solid var(--border);
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
	font-size: 12px;
}

.table thead th {
	background: rgba(255, 255, 255, .03);
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .4px;
	font-weight: 700;
	font-size: 12px;
}

.table th:nth-child(2),
.table td:nth-child(2) {
	word-break: break-word;
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
}

.ok {
	color: #86efac;
}

.warn {
	color: #fde68a;
}

.err {
	color: #fca5a5;
}

.info-sidebar {
	position: relative;
	display: grid;
	gap: 8px;
	align-content: start;
}

.info-sidebar .info-box {
	min-height: 0;
}

.info-sidebar h4 {
	margin: 0 0 6px;
	font-size: 12px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .4px;
}

.info-sidebar code {
	color: #e8eef6;
}

.hidden {
	display: none !important;
}

.token-box {
	max-height: 420px;
	overflow: auto;
}