:root {
	color-scheme: light;
	--ink: #171b1f;
	--muted: #626d78;
	--soft: #f5f7f9;
	--canvas: #e8edf2;
	--panel: #ffffff;
	--line: #d8dfe6;
	--line-strong: #bac5cf;
	--shell: #1e252b;
	--shell-2: #11171c;
	--blue: #0b6fb3;
	--blue-dark: #084f80;
	--green: #12805c;
	--green-soft: #e5f6ee;
	--amber: #966800;
	--amber-soft: #fff5cf;
	--red: #b42318;
	--red-soft: #fff1ef;
	--purple: #5f4bb6;
	--radius: 8px;
	--shadow: 0 20px 80px rgba(17, 23, 28, 0.18);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	min-width: 320px;
	margin: 0;
	color: var(--ink);
	background: var(--shell-2);
	overflow-x: hidden;
}

button,
input,
select {
	font: inherit;
}

button {
	cursor: pointer;
}

.app-shell {
	min-height: 100vh;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	background: var(--canvas);
}

.shell-bar {
	display: grid;
	grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	color: #f4f7f9;
	background: var(--shell);
	border-bottom: 1px solid #303a43;
}

.brand-block,
.path-strip,
.shell-actions,
.preview-actions,
.button-row,
.tool-row,
.toolbar-actions,
.row-actions,
.transfer-strip,
.activity-header,
.panel-title-row,
.ops-header {
	display: flex;
	align-items: center;
}

.brand-block {
	gap: 10px;
	min-width: 0;
}

.brand-block div,
.panel-title-row div,
.preview-header div {
	min-width: 0;
}

.brand-block strong,
.brand-block span,
.panel-title-row h2,
.preview-header h2,
.ops-header h1 {
	overflow-wrap: anywhere;
}

.brand-block div > span {
	display: block;
	max-width: 100%;
	margin-top: 2px;
	color: #b9c4cf;
	font-size: 12px;
	line-height: 1.3;
}

.wp-mark,
.mini-w {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	color: var(--shell);
	font-weight: 800;
	box-shadow: inset 0 0 0 2px #0b0f12;
}

.path-strip {
	gap: 8px;
	min-width: 0;
	border: 1px solid #3b4751;
	border-radius: var(--radius);
	background: #28323b;
	padding: 5px;
}

.path-strip label {
	color: #b9c4cf;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.path-strip input {
	width: 100%;
	min-width: 90px;
	height: 32px;
	border: 0;
	outline: 0;
	color: #f7fbff;
	background: #35414b;
	border-radius: 6px;
	padding: 0 10px;
}

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

button,
.storage-badge,
.state-pill,
.run-state {
	min-height: 34px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #fff;
	color: var(--ink);
	padding: 0 11px;
	font-weight: 650;
	white-space: nowrap;
}

.shell-bar button,
.icon-button {
	border-color: #3d4954;
	background: #28323b;
	color: #f4f7f9;
}

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

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

button.primary:hover,
.primary:hover {
	background: var(--blue-dark);
}

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

button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.storage-badge,
.state-pill,
.run-state {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
}

.storage-badge.warning,
.state-pill.attention {
	border-color: #e0bb42;
	background: var(--amber-soft);
	color: #654600;
}

.storage-badge.success,
.state-pill.success {
	border-color: #85cfac;
	background: var(--green-soft);
	color: #09583d;
}

.storage-badge.local {
	border-color: #95c0e4;
	background: #eaf5ff;
	color: #084f80;
}

.workbench {
	display: grid;
	grid-template-columns: minmax(560px, 1.07fr) minmax(430px, 0.93fr);
	gap: 14px;
	min-height: 0;
	padding: 14px;
}

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

.ops-pane {
	display: grid;
	grid-template-rows: auto auto minmax(0, 1fr);
}

.ops-header {
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--line);
	background: #fbfcfd;
}

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

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

.ops-header h1,
.panel-title-row h2,
.preview-header h2 {
	margin: 0;
	line-height: 1.15;
}

.run-state {
	background: #eef7ff;
	border-color: #b7d8f1;
	color: var(--blue-dark);
}

.workspace-tabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	padding: 8px 10px 0;
	border-bottom: 1px solid var(--line);
	background: #f8fafb;
}

.workspace-tabs button {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	border-bottom-color: transparent;
	background: transparent;
	color: #37414b;
}

.workspace-tabs button.active {
	background: #fff;
	color: var(--ink);
	border-color: var(--line);
	border-bottom-color: #fff;
}

.tab-panels {
	min-height: 0;
	overflow: auto;
	padding: 16px;
}

.tab-panel {
	display: none;
}

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

.panel-title-row {
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.state-pill {
	background: #f7f9fb;
	color: #3c4650;
}

.file-workspace,
.blueprint-grid {
	display: grid;
	grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr);
	gap: 12px;
	min-width: 0;
}

.file-tree,
.editor-card,
.blueprint-editor,
.catalog-card,
.data-card,
.progress-card,
.log-columns article,
.warning-box,
.replace-flow,
.destination-card,
.flow-step,
.confirm-box,
.activity-card,
.route-card {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
}

.file-tree {
	padding: 10px;
	background: #f8fafb;
}

.tool-row {
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.tool-row button,
.toolbar-actions button,
.row-actions button,
.transfer-strip button,
.chip-row button {
	min-height: 30px;
	padding: 0 9px;
	font-size: 12px;
}

.tree-item,
.link-button {
	display: block;
	width: 100%;
	min-height: 34px;
	margin-bottom: 5px;
	white-space: normal;
	text-align: left;
	background: #fff;
}

.tree-item.active {
	border-color: var(--blue);
	background: #eef7ff;
	color: var(--blue-dark);
}

.link-button {
	border-style: dashed;
	color: var(--blue-dark);
}

.editor-card,
.blueprint-editor {
	min-width: 0;
	overflow: hidden;
}

.editor-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px;
	border-bottom: 1px solid var(--line);
	background: #fbfcfd;
}

.editor-toolbar strong,
.editor-toolbar span {
	display: block;
	overflow-wrap: anywhere;
}

.editor-toolbar span {
	margin-top: 2px;
	color: var(--muted);
	font-size: 12px;
}

.toolbar-actions {
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
}

pre {
	margin: 0;
	min-height: 270px;
	max-height: 430px;
	overflow: auto;
	padding: 14px;
	background: #111820;
	color: #d8e8f1;
	font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.result-line {
	padding: 10px 12px;
	border-top: 1px solid var(--line);
	color: #33404a;
	background: #f8fafb;
	font-size: 13px;
}

.blueprint-grid {
	grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
}

.catalog-card {
	padding: 12px;
	background: #f8fafb;
}

.catalog-heading strong,
.catalog-heading span {
	display: block;
}

.catalog-heading span {
	margin-top: 3px;
	color: var(--muted);
	font-size: 12px;
}

.search-row input,
.wide-field input,
.route-card input,
label select {
	width: 100%;
	min-height: 36px;
	border: 1px solid var(--line-strong);
	border-radius: 6px;
	background: #fff;
	padding: 0 10px;
}

.search-row {
	margin: 10px 0;
}

.chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

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

.blueprint-list {
	display: grid;
	gap: 8px;
}

.blueprint-item {
	width: 100%;
	min-height: 0;
	display: grid;
	gap: 4px;
	white-space: normal;
	text-align: left;
	padding: 10px;
}

.blueprint-item.active {
	border-color: var(--blue);
	background: #eef7ff;
}

.blueprint-item span,
.route-card span,
.destination-card span,
.saved-row span,
.flow-step span,
.confirm-box span,
.replace-flow span,
.data-card span {
	color: var(--muted);
	line-height: 1.35;
}

.database-grid,
.settings-grid,
.save-destination-grid,
.route-grid,
.log-columns {
	display: grid;
	gap: 12px;
}

.database-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.data-card,
.progress-card {
	padding: 14px;
}

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

.data-card span {
	margin-top: 8px;
	overflow-wrap: anywhere;
}

.button-row {
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0;
}

.progress-card {
	display: grid;
	gap: 10px;
	background: #fbfcfd;
}

.progress-copy strong,
.progress-copy span {
	display: block;
}

.progress-copy span {
	margin-top: 4px;
	color: var(--muted);
}

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

.meter span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--blue);
	transition: width 0.22s ease;
}

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

.log-columns article {
	padding: 14px;
	background: #fbfcfd;
}

.log-columns ul,
.activity-card ul {
	margin: 10px 0 0;
	padding-left: 18px;
	color: #34404a;
}

.log-columns li,
.activity-card li {
	margin: 7px 0;
	line-height: 1.35;
}

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

.settings-grid label,
.wide-field,
.route-card label {
	display: grid;
	gap: 6px;
	color: #38434d;
	font-weight: 650;
}

.check-line {
	display: flex !important;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.warning-box,
.replace-flow,
.confirm-box {
	display: grid;
	gap: 6px;
	margin-top: 12px;
	padding: 12px;
	border-color: #efc8c3;
	background: var(--red-soft);
}

.route-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-card {
	display: grid;
	gap: 10px;
	align-content: start;
	padding: 12px;
}

.danger-route {
	border-color: #efc8c3;
	background: #fffafa;
}

.wide-field {
	margin-bottom: 12px;
}

.save-destination-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.destination-card {
	display: grid;
	gap: 10px;
	align-content: start;
	padding: 14px;
}

.destination-card.selected {
	border-color: var(--blue);
	background: #f4faff;
}

.local-flow {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-top: 12px;
}

.flow-step {
	display: grid;
	gap: 8px;
	padding: 12px;
	background: #fbfcfd;
}

.flow-step.active {
	border-color: var(--blue);
	box-shadow: inset 4px 0 0 var(--blue);
}

.flow-step.complete {
	border-color: #96d1b2;
	background: var(--green-soft);
}

.saved-list {
	display: grid;
	gap: 8px;
}

.saved-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
}

.saved-row.active {
	border-color: var(--blue);
	background: #eef7ff;
}

.saved-row.deleted {
	opacity: 0.55;
	border-style: dashed;
}

.preview-pane {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.preview-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px;
	border-bottom: 1px solid var(--line);
	background: #fbfcfd;
}

.preview-actions {
	gap: 8px;
}

.preview-actions span {
	color: var(--green);
	font-size: 13px;
	font-weight: 750;
	white-space: nowrap;
}

.browser-frame {
	min-height: 420px;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	background: #fff;
	overflow: hidden;
}

.wp-adminbar {
	display: flex;
	align-items: center;
	gap: 13px;
	min-width: 0;
	min-height: 32px;
	padding: 6px 9px;
	background: #20272d;
	color: #e9eef2;
	font-size: 12px;
}

.wp-adminbar span {
	white-space: nowrap;
}

.admin-name {
	margin-left: auto;
}

.mini-w {
	width: 22px;
	height: 22px;
	font-size: 12px;
}

.wp-page {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	min-width: 0;
}

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

.wp-nav span,
.wp-nav strong {
	overflow-wrap: anywhere;
}

.wp-content {
	display: grid;
	grid-template-columns: minmax(240px, 0.88fr) minmax(220px, 0.72fr);
	align-items: center;
	gap: 20px;
	padding: 28px 22px 36px;
	overflow: hidden;
}

.path-pill {
	display: inline-flex;
	max-width: 100%;
	margin-bottom: 14px;
	border: 1px solid #cbd5df;
	border-radius: 999px;
	padding: 5px 9px;
	color: #4a5661;
	background: #f7f9fb;
	font-size: 12px;
	font-weight: 750;
	overflow-wrap: anywhere;
}

.wp-content h3 {
	margin: 0 0 14px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 40px;
	line-height: 1.18;
	font-weight: 500;
}

.wp-content h3 span {
	color: #3658ec;
}

.wp-content p {
	max-width: 520px;
	font-size: 17px;
	line-height: 1.48;
}

.highlight {
	display: inline;
	background: #ffed92;
}

.wp-content button {
	margin-top: 16px;
	min-height: 44px;
	border-color: #3858e9;
	background: #3858e9;
	color: #fff;
}

.wp-art {
	position: relative;
	min-height: 330px;
}

.ring {
	position: absolute;
	inset: 24px -90px -70px 0;
	border: 46px solid #30e879;
	border-radius: 50%;
}

.glyph {
	position: absolute;
	top: 20px;
	left: 50px;
	width: 190px;
	height: 190px;
	display: grid;
	place-items: center;
	border: 16px solid #171717;
	border-radius: 50%;
	color: #171717;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 138px;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.75);
}

.transfer-strip {
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--line);
	background: #f8fafb;
}

.activity-card {
	border-width: 1px 0 0;
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
	border-radius: 0;
	padding: 12px 16px 16px;
	max-height: 190px;
	overflow: auto;
	background: #fff;
}

.activity-header {
	justify-content: space-between;
	gap: 10px;
}

.activity-header span {
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
}

.mobile-nav {
	display: none;
}

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

	.shell-actions {
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.workbench {
		grid-template-columns: 1fr;
	}

	.preview-pane {
		min-height: 620px;
	}
}

@media (max-width: 760px) {
	body {
		padding-bottom: 60px;
	}

	.app-shell {
		min-height: calc(100vh - 60px);
	}

	.shell-bar {
		position: sticky;
		top: 0;
		z-index: 10;
		padding: 8px;
		gap: 8px;
	}

	.brand-block {
		align-items: flex-start;
	}

	.brand-block div > span {
		font-size: 11px;
	}

	.path-strip {
		display: grid;
		grid-template-columns: auto auto minmax(0, 1fr) auto;
		gap: 6px;
	}

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

	.shell-actions button,
	.shell-actions span,
	.path-strip button {
		width: 100%;
		justify-content: center;
		font-size: 12px;
		padding: 0 7px;
	}

	.workbench {
		padding: 8px;
		gap: 8px;
	}

	.ops-header,
	.preview-header,
	.panel-title-row,
	.editor-toolbar,
	.activity-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.workspace-tabs {
		display: none;
	}

	.tab-panels {
		padding: 10px;
	}

	.file-workspace,
	.blueprint-grid,
	.database-grid,
	.settings-grid,
	.save-destination-grid,
	.route-grid,
	.local-flow,
	.log-columns,
	.wp-content {
		grid-template-columns: 1fr;
	}

	pre {
		min-height: 220px;
		font-size: 12px;
	}

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

	.row-actions,
	.toolbar-actions,
	.button-row,
	.transfer-strip {
		width: 100%;
	}

	.row-actions button,
	.toolbar-actions button,
	.button-row button,
	.transfer-strip button {
		flex: 1 1 140px;
	}

	.preview-pane {
		min-height: 0;
	}

	.browser-frame {
		min-height: 520px;
	}

	.wp-adminbar {
		overflow: auto;
	}

	.wp-nav {
		align-items: flex-start;
		flex-direction: column;
		padding: 14px;
	}

	.wp-content {
		padding: 18px 14px 24px;
	}

	.wp-content h3 {
		font-size: 34px;
	}

	.wp-art {
		min-height: 210px;
	}

	.ring {
		inset: 26px -40px -50px 30px;
		border-width: 32px;
	}

	.glyph {
		top: 14px;
		left: 74px;
		width: 128px;
		height: 128px;
		border-width: 11px;
		font-size: 90px;
	}

	.mobile-nav {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 20;
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		gap: 4px;
		padding: 7px;
		border-top: 1px solid #2e3740;
		background: var(--shell);
	}

	.mobile-nav button {
		min-width: 0;
		min-height: 42px;
		border-color: #3d4954;
		background: #28323b;
		color: #f4f7f9;
		font-size: 12px;
		padding: 0 5px;
	}

	.mobile-nav button.active {
		border-color: #8ec5f0;
		background: #11344e;
	}
}

@media (max-width: 430px) {
	.shell-actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

	.path-strip label {
		display: none;
	}

	.wp-content h3 {
		font-size: 30px;
	}
}
