:root {
	--bg: #eef4ef;
	--panel: rgba(255, 255, 255, 0.82);
	--panel-strong: #f7fbf7;
	--line: #d6e1d8;
	--line-strong: #29483a;
	--text: #16251d;
	--muted: #61756a;
	--accent: #2f6a4f;
	--accent-strong: #214c39;
	--accent-soft: #e3f0e7;
	--accent-soft-2: #d7eadc;
	--accent-inverse: #f7fbf7;
	--chip: #edf5ef;
	--success: #2f6a4f;
	--danger: #a33b3b;
	--shadow: 0 10px 30px rgba(28, 52, 37, 0.04);
	--radius-sm: 6px;
	--radius-md: 10px;
	font-family:
		"Iosevka Aile", "IBM Plex Sans", "Segoe UI", sans-serif;
	color: var(--text);
	background:
		radial-gradient(circle at top left, rgba(117, 167, 128, 0.2), transparent 30%),
		radial-gradient(circle at top right, rgba(77, 134, 95, 0.08), transparent 26%),
		linear-gradient(180deg, #f7faf7 0%, var(--bg) 100%);
}

* {
	box-sizing: border-box;
}

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

body {
	min-width: 320px;
}

body.drawer-open {
	overflow: hidden;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
textarea {
	font: inherit;
}

.app-shell {
	width: min(1760px, calc(100% - 16px));
	margin: 0 auto;
	padding: 20px 0 32px;
}

.site-header {
	padding: 8px 0 20px;
}

.nav-left {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.nav-drawer-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 4px;
	width: 38px;
	height: 38px;
	padding: 0;
	background: rgba(255, 255, 255, 0.62);
	border: 0;
	border-radius: var(--radius-sm);
	box-shadow: inset 0 0 0 1px rgba(41, 72, 58, 0.06);
	cursor: pointer;
}

.nav-drawer-trigger span {
	display: block;
	width: 16px;
	height: 1.5px;
	background: var(--line-strong);
}

.site-nav,
.panel,
.tool-item,
.chip,
.search-box,
.output-panel,
textarea,
.button {
	box-shadow: var(--shadow);
	border-radius: var(--radius-md);
}

.site-nav {
	display: flex;
	align-items: center;
	padding: 12px 14px;
	background: rgba(248, 251, 255, 0.76);
	backdrop-filter: blur(12px);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.45),
		0 10px 30px rgba(28, 52, 37, 0.04);
}

.nav-mark {
	color: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
	text-decoration: none;
	white-space: nowrap;
}

.nav-mark[aria-current="page"] {
	color: var(--text);
}

.breadcrumb {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
}

.breadcrumb a,
.breadcrumb-current {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.breadcrumb-current {
	color: var(--text);
}

.breadcrumb-separator {
	flex: 0 0 auto;
	color: rgba(97, 117, 106, 0.7);
}

.site-main {
	display: grid;
	gap: 16px;
}

.drawer-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(22, 37, 29, 0.24);
	backdrop-filter: blur(4px);
	z-index: 40;
}

.site-drawer {
	position: fixed;
	top: 0;
	left: 0;
	width: min(320px, calc(100% - 32px));
	height: 100dvh;
	padding: 16px;
	display: grid;
	align-content: start;
	gap: 18px;
	background:
		linear-gradient(180deg, rgba(247, 251, 247, 0.98), rgba(236, 244, 238, 0.98));
	box-shadow:
		inset -1px 0 0 rgba(255, 255, 255, 0.45),
		20px 0 40px rgba(22, 37, 29, 0.12);
	transform: translateX(calc(-100% - 12px));
	transition: transform 180ms ease;
	z-index: 50;
}

.site-drawer.is-open {
	transform: translateX(0);
}

.drawer-head,
.drawer-section,
.drawer-links {
	display: grid;
	gap: 12px;
}

.drawer-head {
	grid-template-columns: 1fr auto;
	align-items: start;
}

.drawer-label {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.drawer-links a {
	display: block;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.62);
	border-radius: var(--radius-sm);
	box-shadow: inset 0 0 0 1px rgba(41, 72, 58, 0.05);
}

.drawer-links a[aria-current="page"] {
	background: rgba(227, 240, 231, 0.92);
	color: var(--accent-strong);
}

.hero,
.panel,
.tool-shell,
.section-block,
.panel-search {
	background: var(--panel);
}

.hero,
.panel-search {
	display: grid;
	gap: 16px;
	padding: 24px;
	background:
		linear-gradient(180deg, rgba(249, 253, 249, 0.92), rgba(242, 248, 243, 0.96));
}

.hero {
	grid-template-columns: 1fr auto;
	align-items: end;
	position: relative;
	overflow: hidden;
}

.hero::after {
	content: "";
	position: absolute;
	inset: auto -8% -28% auto;
	width: 240px;
	height: 240px;
	border-radius: 999px;
	background:
		radial-gradient(circle, rgba(87, 145, 103, 0.18) 0%, rgba(87, 145, 103, 0) 72%);
	pointer-events: none;
}

.eyebrow,
.hint {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
}

.eyebrow {
	color: var(--accent);
	font-weight: 700;
}

h1,
h2,
p {
	margin: 0;
}

h1 {
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1;
	letter-spacing: -0.04em;
}

h2 {
	font-size: 16px;
}

.hero-tip {
	margin-top: 8px;
	color: var(--muted);
	font-size: 14px;
	max-width: 48ch;
}

.hero-actions,
.panel-actions,
.chip-row,
.tip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.button {
	padding: 10px 14px;
	background: rgba(255, 255, 255, 0.72);
	color: var(--text);
	cursor: pointer;
	border-radius: var(--radius-sm);
	border: 0;
	transition:
		background-color 120ms ease,
		box-shadow 120ms ease,
		transform 120ms ease;
}

.button-primary {
	background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
	color: var(--accent-inverse);
	box-shadow: 0 8px 18px rgba(47, 106, 79, 0.14);
}

.button-secondary {
	background: var(--panel-strong);
}

.button:hover {
	box-shadow: 0 0 0 1px rgba(41, 72, 58, 0.08);
	transform: translateY(-1px);
}

.icon-button {
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: rgba(255, 255, 255, 0.72);
	color: var(--text);
	cursor: pointer;
	border: 0;
	border-radius: var(--radius-sm);
	box-shadow: 0 0 0 1px rgba(41, 72, 58, 0.05);
	transition:
		background-color 120ms ease,
		box-shadow 120ms ease,
		transform 120ms ease;
}

.icon-button svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.icon-button-primary {
	background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
	color: var(--accent-inverse);
	box-shadow: 0 8px 18px rgba(47, 106, 79, 0.14);
}

.icon-button:hover {
	box-shadow: 0 0 0 1px rgba(41, 72, 58, 0.08);
	transform: translateY(-1px);
}

.section-grid,
.tool-layout {
	display: grid;
	gap: 16px;
}

.section-grid {
	grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
}

.section-block,
.panel,
.tool-panel {
	padding: 18px;
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.56),
		0 10px 30px rgba(28, 52, 37, 0.04);
}

.section-block:first-child {
	background:
		linear-gradient(180deg, rgba(240, 248, 242, 0.98), rgba(250, 252, 250, 0.92));
}

.section-head,
.panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.tool-list {
	display: grid;
	gap: 10px;
}

.tool-item {
	display: grid;
	gap: 8px;
	padding: 12px;
	background: rgba(255, 255, 255, 0.78);
	border-radius: var(--radius-sm);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.65),
		0 1px 0 rgba(41, 72, 58, 0.05);
}

.tool-item-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.tool-item-head span,
.chip,
.tip {
	font-size: 12px;
	color: var(--muted);
}

.tool-item p {
	font-size: 14px;
	color: var(--muted);
}

.chip {
	display: inline-flex;
	align-items: center;
	padding: 6px 10px;
	background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
	color: var(--accent-strong);
	border-radius: 999px;
	box-shadow: none;
}

.tool-shell {
	display: grid;
	gap: 16px;
}

.tool-layout {
	grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

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

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

textarea,
.output-panel {
	width: 100%;
	min-height: 360px;
	padding: 12px;
	background: rgba(255, 255, 255, 0.78);
	color: var(--text);
	overflow: auto;
	border-radius: var(--radius-sm);
	border: 0;
	box-shadow:
		inset 0 0 0 1px rgba(41, 72, 58, 0.06),
		inset 0 1px 2px rgba(22, 37, 29, 0.03);
}

.editor-shell {
	position: relative;
	min-height: 360px;
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, 0.78);
	box-shadow:
		inset 0 0 0 1px rgba(41, 72, 58, 0.06),
		inset 0 1px 2px rgba(22, 37, 29, 0.03);
	overflow: hidden;
}

.editor-highlight,
.editor-input,
.output-panel {
	font-family:
		"Iosevka Fixed", "Iosevka", "SFMono-Regular", "IBM Plex Mono", monospace;
	font-size: 13px;
	line-height: 1.7;
	tab-size: 2;
}

.editor-highlight,
.editor-input {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 12px;
	overflow: auto;
	white-space: pre;
	word-break: normal;
}

.editor-highlight {
	color: var(--text);
	pointer-events: none;
}

.editor-input {
	resize: none;
	min-height: 100%;
	color: rgba(22, 37, 29, 0.22);
	background: transparent;
	caret-color: var(--text);
	box-shadow: none;
	border-radius: 0;
}

.editor-input::placeholder {
	color: var(--muted);
}

.output-panel {
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
}

.tool-status {
	min-height: 20px;
	margin-bottom: 10px;
	font-size: 13px;
	color: var(--muted);
}

.tool-status.is-error {
	color: var(--danger);
}

.tool-status.is-success {
	color: var(--success);
}

.tip {
	display: inline-flex;
	align-items: center;
	padding: 5px 9px;
	background: rgba(227, 240, 231, 0.92);
	color: var(--accent-strong);
	border-radius: 999px;
}

.token-key {
	color: #0f6b46;
	font-weight: 700;
}

.token-string {
	color: #2457a6;
}

.token-number {
	color: #b15a00;
	font-weight: 600;
}

.token-boolean,
.token-null {
	color: #8a2f6b;
	font-weight: 600;
}

.token-punctuation {
	color: #32463c;
}

.install-trigger[hidden] {
	display: none;
}

.search-box {
	display: grid;
	gap: 8px;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.78);
	border-radius: var(--radius-sm);
	box-shadow:
		inset 0 0 0 1px rgba(41, 72, 58, 0.05),
		0 1px 0 rgba(41, 72, 58, 0.03);
}

.search-box input {
	border: 0;
	outline: 0;
	background: transparent;
	padding: 0;
}

.search-box:focus-within,
textarea:focus,
.button:focus-visible,
.icon-button:focus-visible,
.nav-drawer-trigger:focus-visible {
	outline: none;
	box-shadow:
		inset 0 0 0 1px rgba(41, 72, 58, 0.1),
		0 0 0 3px rgba(77, 134, 95, 0.14);
}

.not-found {
	display: grid;
	gap: 12px;
}

@media (max-width: 860px) {
	.app-shell {
		width: min(100% - 12px, 1760px);
		padding-top: 12px;
	}

	.hero,
	.section-grid,
	.tool-layout {
		grid-template-columns: 1fr;
	}

	.site-nav,
	.section-head,
	.panel-head {
		align-items: flex-start;
		flex-direction: column;
	}

	.nav-left {
		width: 100%;
		flex-wrap: wrap;
	}

	.breadcrumb {
		width: 100%;
	}

	h1 {
		font-size: 28px;
	}

	.button,
	.chip,
	.search-box {
		width: 100%;
	}

	.hero-actions .button,
	.panel-actions .button {
		width: auto;
		flex: 1 1 calc(50% - 4px);
	}

	textarea,
	.editor-shell,
	.output-panel {
		min-height: 240px;
	}
}
