:root {
	--editor-brand: #6f8f79;
	--editor-brand-dark: #24362a;
	--editor-brand-readable: #4f6b57;
	--editor-canvas: #e8edea;
	--editor-ink: #1f2823;
	--editor-line: #dfe6e1;
	--editor-muted: #657068;
	--editor-panel-width: 26.25rem;
	--editor-surface: #ffffff;
	--editor-topbar-height: 4.25rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

.editor-body {
	min-width: 0;
	margin: 0;
	overflow: hidden;
	background: #f6f8f7;
	color: var(--editor-ink);
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.editor-app {
	height: 100vh;
	height: 100svh;
	display: grid;
	grid-template-rows: var(--editor-topbar-height) minmax(0, 1fr);
}

.editor-topbar {
	position: relative;
	z-index: 10;
	border-bottom: 1px solid #e5ebe7;
	background: rgba(255, 255, 255, 0.96);
}

.editor-topbar__content {
	height: 100%;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 1.5rem;
	padding-inline: 1.5rem;
}

.editor-brand {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 0.7rem;
}

.editor-brand__logo {
	display: block;
	width: auto;
	max-width: 10.5rem;
	height: 3.1rem;
	object-fit: contain;
}

.editor-brand__section {
	padding: 0.22rem 0.48rem;
	border-radius: 999px;
	background: #eef4f0;
	color: var(--editor-brand-readable);
	font-size: 0.62rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.editor-document {
	grid-column: 2;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: #68736d;
	font-size: 0.75rem;
}

.editor-document__type {
	font-weight: 600;
	white-space: nowrap;
}

.editor-document__state {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-left: 0.25rem;
	padding-left: 1.15rem;
	border-left: 1px solid var(--editor-line);
	color: #657068;
	white-space: nowrap;
}

.editor-document__indicator {
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 50%;
	background: #a8b0ab;
	box-shadow: 0 0 0 0.25rem rgba(116, 128, 121, 0.1);
}

.editor-topbar__actions {
	position: relative;
	grid-column: 3;
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.editor-download-status {
	width: max-content;
	max-width: min(24rem, calc(100vw - 2rem));
	position: absolute;
	top: calc(100% + 0.55rem);
	right: 0;
	z-index: 20;
	padding: 0.55rem 0.7rem;
	border: 1px solid #cbd9d0;
	border-radius: 0.55rem;
	background: #f4f8f5;
	box-shadow: 0 0.5rem 1.25rem rgba(31, 40, 35, 0.14);
	color: #294f35;
	font-size: 0.72rem;
	line-height: 1.4;
}

.editor-download-status.is-error {
	border-color: #d9aaa4;
	background: #fff4f2;
	color: #7d2e26;
}

.editor-download-status:empty {
	display: none;
}

.editor-action {
	height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0 0.95rem;
	border-radius: 0.65rem;
	font-size: 0.82rem;
	font-weight: 650;
}

.editor-action svg {
	width: 1rem;
	height: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.editor-action--secondary {
	border-color: #e1e6e3;
	background: #fff;
	color: #56625b;
}

.editor-action--primary {
	border-color: var(--editor-brand-dark);
	background: var(--editor-brand-dark);
	box-shadow: 0 0.4rem 1rem rgba(36, 54, 42, 0.17);
	color: #fff;
}

.editor-action:focus-visible {
	outline: 0.2rem solid #fff;
	box-shadow: 0 0 0 0.4rem rgba(36, 54, 42, 0.55);
}

.editor-action:disabled {
	cursor: not-allowed;
	opacity: 1;
}

.editor-action--secondary:disabled {
	border-color: #e5e9e6;
	background: #f7f8f7;
	color: #9aa39d;
}

.editor-action--primary:disabled {
	border-color: #9da9a1;
	background: #9da9a1;
	box-shadow: none;
	color: #f7f9f8;
}

.editor-shell {
	min-width: 0;
	min-height: 0;
	display: grid;
	grid-template-columns: minmax(20rem, var(--editor-panel-width)) minmax(0, 1fr);
}
