:root {
	--bg: #eef1f5;
	--panel: #ffffff;
	--panel-soft: #f7f9fc;
	--ink: #17202a;
	--muted: #687486;
	--line: #d7dee8;
	--line-strong: #bac5d3;
	--blue: #1f6feb;
	--blue-strong: #0b56cf;
	--green: #138a4d;
	--green-soft: #e7f6ee;
	--amber: #a86500;
	--amber-soft: #fff5d7;
	--red: #b42318;
	--red-soft: #fdecec;
	--shadow: 0 16px 36px rgba(23, 32, 42, 0.11);
	--radius: 8px;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--ink);
	background: var(--bg);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	background:
		linear-gradient(180deg, rgba(31, 111, 235, 0.06), transparent 260px),
		var(--bg);
}

button,
input,
select {
	font: inherit;
}

button {
	border: 1px solid var(--line-strong);
	background: #fff;
	color: var(--ink);
	border-radius: 6px;
	padding: 8px 10px;
	font-weight: 650;
	cursor: pointer;
	min-height: 36px;
}

button:hover {
	border-color: var(--blue);
	color: var(--blue-strong);
}

button.primary {
	background: var(--blue);
	border-color: var(--blue);
	color: #fff;
}

button.primary:hover {
	background: var(--blue-strong);
	color: #fff;
}

button.danger {
	background: var(--red-soft);
	border-color: #f1aaa5;
	color: var(--red);
}

button.link-button {
	border: 0;
	padding-left: 0;
	background: transparent;
	color: var(--blue);
	justify-content: flex-start;
}

input,
select {
	width: 100%;
	border: 1px solid var(--line-strong);
	border-radius: 6px;
	padding: 9px 10px;
	background: #fff;
	color: var(--ink);
}

.app-shell {
	min-height: 100vh;
	display: grid;
	grid-template-rows: auto 1fr auto;
}

.browser-bar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: grid;
	grid-template-columns: minmax(240px, 0.95fr) minmax(320px, 1.15fr) minmax(380px, auto);
	gap: 12px;
	align-items: center;
	padding: 10px 14px;
	background: #1c232b;
	color: #f8fafc;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-cluster {
	display: flex;
	gap: 10px;
	align-items: center;
	min-width: 0;
}

.brand-cluster strong,
.brand-cluster span {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.brand-cluster span {
	color: #b8c2ce;
	font-size: 12px;
	margin-top: 2px;
}

.wp-mark {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 2px solid #f8fafc;
	font: 800 24px Georgia, serif;
	flex: 0 0 auto;
}

.path-control {
	display: grid;
	grid-template-columns: auto auto minmax(160px, 1fr) auto;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.path-control label {
	color: #cfd7e2;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.path-control input {
	background: #343d48;
	border-color: #46515e;
	color: #f8fafc;
}

.path-control button,
.shell-actions button,
.icon-button {
	background: #27313b;
	border-color: #46515e;
	color: #f8fafc;
}

.path-control button.primary,
.shell-actions button.primary {
	background: #ffd84d;
	border-color: #ffd84d;
	color: #17202a;
}

.shell-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
	min-width: 0;
}

.status-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	border-radius: 999px;
	border: 1px solid var(--line-strong);
	background: #eef2f7;
	color: #405064;
	font-size: 12px;
	font-weight: 750;
	line-height: 1;
	padding: 6px 9px;
	white-space: nowrap;
}

.status-badge.warning,
.status-badge.amber {
	background: var(--amber-soft);
	border-color: #f0cf7f;
	color: var(--amber);
}

.status-badge.success {
	background: var(--green-soft);
	border-color: #a8dec1;
	color: var(--green);
}

.status-badge.error {
	background: var(--red-soft);
	border-color: #f1aaa5;
	color: var(--red);
}

.workbench {
	display: grid;
	grid-template-columns: minmax(480px, 1.36fr) minmax(320px, 0.78fr) minmax(340px, 0.86fr);
	gap: 12px;
	padding: 12px;
	min-height: 0;
}

.table-pane,
.detail-pane,
.preview-pane {
	min-width: 0;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.table-pane {
	display: grid;
	grid-template-rows: auto auto minmax(300px, auto) auto;
	gap: 0;
}

.pane-heading,
.detail-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px 12px;
	border-bottom: 1px solid var(--line);
}

.eyebrow {
	margin: 0 0 4px;
	color: var(--blue);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

h1,
h2,
h3,
p {
	margin-top: 0;
}

h1 {
	font-size: 21px;
	line-height: 1.2;
	margin-bottom: 0;
}

h2 {
	font-size: 18px;
	line-height: 1.25;
	margin-bottom: 0;
}

h3 {
	font-size: 15px;
	margin-bottom: 8px;
}

.run-state {
	border: 1px solid var(--line);
	background: var(--panel-soft);
	border-radius: 999px;
	padding: 7px 10px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 750;
	white-space: nowrap;
}

.mode-tabs,
.manager-tabs {
	display: flex;
	gap: 4px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--line);
	background: #fbfcfe;
	overflow-x: auto;
}

.mode-tabs button,
.manager-tabs button {
	border: 0;
	background: transparent;
	color: #4e5f72;
	padding: 8px 10px;
	border-radius: 6px;
	white-space: nowrap;
}

.mode-tabs button.active,
.manager-tabs button.active {
	background: #e9f1ff;
	color: var(--blue-strong);
}

.manager-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--line);
	background: #fff;
}

.manager-actions span {
	color: var(--muted);
	font-size: 12px;
	line-height: 1.35;
}

.manager-surface {
	padding: 0;
	min-height: 320px;
}

.manager-panel {
	display: none;
	padding: 14px;
}

.manager-panel.active {
	display: block;
}

.file-grid,
.blueprint-split {
	display: grid;
	grid-template-columns: minmax(180px, 0.72fr) minmax(280px, 1.4fr);
	gap: 12px;
	min-height: 0;
}

.blueprint-split {
	grid-template-columns: minmax(330px, 1.15fr) minmax(250px, 0.85fr);
}

.tree-card,
.editor-card,
.gallery-card,
.table-card,
.result-card,
.warning-card,
.detail-card {
	border: 1px solid var(--line);
	background: var(--panel-soft);
	border-radius: var(--radius);
}

.tree-card,
.gallery-card {
	padding: 10px;
}

.mini-toolbar,
.button-strip,
.editor-actions,
.detail-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.mini-toolbar {
	margin-bottom: 10px;
}

.mini-toolbar button {
	min-height: 32px;
	padding: 6px 8px;
	font-size: 12px;
}

.tree-row {
	display: block;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	border-radius: 6px;
	padding: 8px;
	min-height: 34px;
	font-weight: 600;
	color: #334155;
	overflow-wrap: anywhere;
}

.tree-row.active {
	background: #e9f1ff;
	color: var(--blue-strong);
}

.editor-card {
	overflow: hidden;
	background: #fff;
}

.editor-head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 12px;
	border-bottom: 1px solid var(--line);
}

.editor-head span:not(.status-badge) {
	display: block;
	color: var(--muted);
	font-size: 12px;
	margin-top: 3px;
}

pre {
	margin: 0;
	padding: 14px;
	background: #111827;
	color: #dbeafe;
	overflow: auto;
	font-size: 12px;
	line-height: 1.55;
	tab-size: 2;
	max-height: 260px;
}

.editor-actions {
	padding: 10px 12px;
	border-top: 1px solid var(--line);
}

.editor-actions span {
	color: var(--muted);
	font-size: 13px;
}

.editor-actions.wrap {
	align-items: flex-start;
}

.gallery-head,
.table-head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: baseline;
	margin-bottom: 10px;
}

.gallery-head span,
.table-head span {
	color: var(--muted);
	font-size: 12px;
}

.chip-row {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding: 8px 0;
}

.chip-row button {
	min-height: 30px;
	padding: 6px 9px;
	border-radius: 999px;
	background: #fff;
	color: #526173;
	white-space: nowrap;
}

.chip-row button.active {
	background: var(--blue);
	border-color: var(--blue);
	color: #fff;
}

.blueprint-list {
	display: grid;
	gap: 8px;
	max-height: 212px;
	overflow: auto;
}

.blueprint-item {
	border: 1px solid var(--line);
	background: #fff;
	border-radius: 6px;
	padding: 9px;
	text-align: left;
}

.blueprint-item.active {
	border-color: var(--blue);
	box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.14);
}

.blueprint-item strong,
.blueprint-item span {
	display: block;
}

.blueprint-item span {
	margin-top: 4px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 500;
}

.metric-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 12px;
}

.metric-grid article {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 12px;
	background: #fff;
}

.metric-grid strong,
.metric-grid span {
	display: block;
}

.metric-grid span {
	margin-top: 6px;
	color: var(--muted);
	font-size: 13px;
	overflow-wrap: anywhere;
}

.result-card,
.warning-card {
	margin-top: 12px;
	padding: 12px;
	color: #344256;
}

.warning-card {
	background: var(--amber-soft);
	border-color: #f0cf7f;
	display: grid;
	gap: 4px;
}

.log-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.log-grid article {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	padding: 12px;
	min-height: 150px;
}

.log-grid ul,
.history-bar ol {
	padding-left: 18px;
	margin: 8px 0 0;
}

.log-grid li,
.history-bar li {
	color: var(--muted);
	font-size: 13px;
	margin: 5px 0;
}

.settings-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.settings-grid label {
	display: grid;
	gap: 6px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 750;
}

.settings-grid .check {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ink);
}

.settings-grid input[type="checkbox"] {
	width: auto;
}

.data-tables {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 14px;
	border-top: 1px solid var(--line);
	background: #fbfcfe;
}

.table-card {
	overflow: hidden;
	background: #fff;
}

.table-head {
	padding: 11px 12px;
	border-bottom: 1px solid var(--line);
	margin: 0;
	background: var(--panel-soft);
}

.object-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

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

.object-table th {
	color: var(--muted);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: #fff;
}

.object-table tr {
	cursor: pointer;
}

.object-table tr:hover td {
	background: #f8fbff;
}

.object-table tr.selected td {
	background: #edf4ff;
	box-shadow: inset 3px 0 0 var(--blue);
}

.object-table td strong,
.object-table td span:not(.status-badge) {
	display: block;
}

.object-table td span:not(.status-badge) {
	color: var(--muted);
	font-size: 12px;
	margin-top: 2px;
}

.object-table.compact th:nth-child(2),
.object-table.compact td:nth-child(2) {
	display: none;
}

.detail-pane {
	display: grid;
	grid-template-rows: auto 1fr;
	min-height: 520px;
}

.detail-head {
	background: #fbfcfe;
}

#detailBody {
	padding: 14px;
	overflow: auto;
}

.detail-card {
	padding: 12px;
	margin-bottom: 12px;
}

.detail-card p {
	color: var(--muted);
	line-height: 1.45;
	margin-bottom: 10px;
}

.detail-list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.detail-list li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 1px solid var(--line);
	padding-bottom: 8px;
	color: var(--muted);
}

.detail-list li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.detail-list strong {
	color: var(--ink);
}

.progress-block {
	display: grid;
	gap: 8px;
	margin: 12px 0;
}

.meter {
	height: 8px;
	background: #dce3ec;
	border-radius: 999px;
	overflow: hidden;
}

.meter span {
	display: block;
	width: 0;
	height: 100%;
	background: linear-gradient(90deg, var(--blue), var(--green));
	transition: width 160ms ease;
}

.form-grid {
	display: grid;
	gap: 10px;
}

.form-grid label {
	display: grid;
	gap: 6px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 750;
}

.route-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.route-card {
	border: 1px solid var(--line);
	background: #fff;
	border-radius: var(--radius);
	padding: 10px;
	display: grid;
	gap: 8px;
}

.route-card strong,
.route-card span {
	display: block;
}

.route-card span {
	color: var(--muted);
	font-size: 12px;
	line-height: 1.35;
}

.preview-pane {
	position: sticky;
	top: 70px;
	align-self: start;
	height: calc(100vh - 92px);
	display: grid;
	grid-template-rows: auto auto 1fr;
	background: #fff;
}

.preview-topbar {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	background: #1c232b;
	color: #e6ebf1;
	font-size: 13px;
}

.preview-topbar span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wp-admin-bar {
	display: flex;
	gap: 14px;
	padding: 8px 12px;
	background: #242c34;
	color: #f5f7fa;
	font-size: 12px;
	overflow: hidden;
	white-space: nowrap;
}

.preview-page {
	overflow: hidden;
	background: #fff;
	display: grid;
	grid-template-rows: auto 1fr;
}

.preview-nav {
	display: flex;
	gap: 14px;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	font-size: 14px;
}

.preview-nav strong {
	font-size: 17px;
	margin-right: auto;
}

.preview-nav span {
	color: #2d3643;
}

.preview-content {
	position: relative;
	display: grid;
	grid-template-columns: minmax(210px, 0.9fr) minmax(150px, 0.8fr);
	gap: 12px;
	align-items: center;
	padding: 28px 22px;
	min-height: 0;
}

.preview-content section {
	position: relative;
	z-index: 2;
}

.preview-content h2 {
	font: 500 34px/1.18 Georgia, serif;
	margin-bottom: 20px;
}

.preview-content h2 span {
	color: #3158ff;
}

.preview-content p {
	font-size: 16px;
	line-height: 1.45;
}

.preview-content .highlight {
	display: inline;
	background: #fff19d;
}

.preview-content button {
	margin-top: 18px;
	background: #4058ee;
	color: #fff;
	border-color: #4058ee;
	width: 100%;
}

.preview-art {
	position: relative;
	height: 360px;
	min-width: 0;
}

.ring {
	position: absolute;
	inset: 64px -90px 22px 0;
	border: 38px solid #33df75;
	border-radius: 50%;
}

.ring::after {
	content: "";
	position: absolute;
	left: 48px;
	right: 48px;
	top: 112px;
	height: 70px;
	border: 32px solid #33df75;
	border-left-color: transparent;
	border-right-color: transparent;
	border-bottom-color: transparent;
	border-radius: 50% 50% 0 0;
}

.letter {
	position: absolute;
	top: 28px;
	left: 60px;
	width: 180px;
	height: 180px;
	display: grid;
	place-items: center;
	border: 12px solid #1f1f1f;
	border-radius: 50%;
	font: 800 108px Georgia, serif;
	color: #1f1f1f;
	background: rgba(255, 255, 255, 0.72);
}

.history-bar {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 12px;
	align-items: start;
	padding: 10px 14px;
	border-top: 1px solid var(--line);
	background: #fff;
}

.history-bar ol {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	margin: 0;
	padding-bottom: 4px;
}

.history-bar li {
	white-space: nowrap;
}

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

@media (max-width: 1260px) {
	.browser-bar {
		grid-template-columns: 1fr;
	}

	.shell-actions {
		justify-content: flex-start;
		overflow-x: auto;
	}

	.workbench {
		grid-template-columns: minmax(520px, 1fr) minmax(340px, 0.76fr);
	}

	.preview-pane {
		grid-column: 1 / -1;
		position: static;
		height: 540px;
	}
}

@media (max-width: 900px) {
	.workbench {
		grid-template-columns: 1fr;
		padding: 8px;
	}

	.path-control {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}

	.path-control label {
		display: none;
	}

	.file-grid,
	.blueprint-split,
	.data-tables,
	.metric-grid,
	.log-grid,
	.settings-grid,
	.route-grid {
		grid-template-columns: 1fr;
	}

	.detail-pane {
		min-height: auto;
	}

	.preview-pane {
		height: auto;
		min-height: 520px;
	}

	.preview-content {
		grid-template-columns: 1fr;
	}

	.preview-art {
		height: 220px;
		overflow: hidden;
	}

	.ring {
		inset: 28px -32px -58px 28px;
		border-width: 28px;
	}

	.letter {
		top: 10px;
		left: 86px;
		width: 140px;
		height: 140px;
		font-size: 82px;
	}

	.object-table {
		display: block;
		overflow-x: auto;
		min-width: 100%;
	}
}

@media (max-width: 560px) {
	button {
		width: 100%;
	}

	.browser-bar {
		padding: 8px;
	}

	.shell-actions,
	.manager-actions,
	.mini-toolbar,
	.button-strip,
	.editor-actions,
	.detail-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.status-badge {
		width: fit-content;
	}

	.preview-nav {
		display: grid;
		gap: 6px;
		align-items: start;
	}

	.preview-content h2 {
		font-size: 28px;
	}

	.history-bar {
		grid-template-columns: 1fr;
	}
}
