:root {
	color-scheme: light;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: #f6f7f9;
	color: #18202a;
	--border: #d9dee7;
	--muted: #5d6b7c;
	--surface: #fff;
	--accent: #176b87;
	--accent-strong: #12546a;
	--ok: #256a4f;
	--warn: #8a611b;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
}

.topbar {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 28px;
	border-bottom: 1px solid var(--border);
	background: #fbfcfd;
}

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

h1 {
	font-size: 24px;
	line-height: 1.25;
}

h2 {
	font-size: 17px;
	line-height: 1.3;
}

h3 {
	margin-bottom: 8px;
	font-size: 14px;
	color: #2f3b49;
}

p {
	margin-top: 6px;
	color: var(--muted);
	font-size: 14px;
}

.layout {
	display: grid;
	gap: 16px;
	width: min(1440px, 100%);
	margin: 0 auto;
	padding: 16px;
}

.grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
	gap: 16px;
}

.panel {
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface);
	padding: 16px;
	box-shadow: 0 1px 2px rgb(31 41 55 / 6%);
}

.panel-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.button-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

button,
input,
select,
textarea {
	font: inherit;
}

button {
	min-height: 36px;
	border: 1px solid var(--accent);
	border-radius: 6px;
	padding: 0 13px;
	background: var(--accent);
	color: #fff;
	font-weight: 650;
	cursor: pointer;
}

button:hover {
	background: var(--accent-strong);
}

button.secondary {
	border-color: #aab6c5;
	background: #fff;
	color: #253142;
}

button.secondary:hover {
	background: #eef2f6;
}

label {
	display: grid;
	gap: 6px;
	color: #344255;
	font-size: 13px;
	font-weight: 650;
}

input,
select,
textarea {
	width: 100%;
	border: 1px solid #b8c3d1;
	border-radius: 6px;
	background: #fff;
	color: #17202b;
}

input,
select {
	height: 38px;
	padding: 0 10px;
}

textarea {
	min-height: 96px;
	resize: vertical;
	padding: 10px;
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
	font-size: 13px;
}

.form-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
}

.api-grid {
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr) 220px;
	align-items: end;
	gap: 12px;
	margin-bottom: 12px;
}

.checkbox-line {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 38px;
}

.checkbox-line input {
	width: 16px;
	height: 16px;
}

.status-pill {
	min-width: 150px;
	border: 1px solid #9ecab7;
	border-radius: 999px;
	padding: 7px 11px;
	background: #edf7f2;
	color: var(--ok);
	text-align: center;
	font-size: 13px;
	font-weight: 700;
}

.message {
	margin-top: 12px;
	border-left: 3px solid #76b798;
	padding: 10px 12px;
	background: #edf7f2;
	color: #1f513f;
	font-size: 14px;
	line-height: 1.5;
}

.mono-block,
pre,
code {
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.mono-block {
	margin-top: 10px;
	overflow: auto;
	border: 1px solid #dce2ea;
	border-radius: 6px;
	padding: 10px;
	background: #f9fafb;
	font-size: 12px;
	white-space: nowrap;
}

pre {
	min-height: 118px;
	max-height: 420px;
	overflow: auto;
	margin: 0;
	border: 1px solid #dce2ea;
	border-radius: 6px;
	padding: 10px;
	background: #111827;
	color: #e5e7eb;
	font-size: 12px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
}

.split,
.result-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
	margin-top: 12px;
}

.table-wrap {
	overflow: auto;
	border: 1px solid var(--border);
	border-radius: 6px;
}

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

th,
td {
	border-bottom: 1px solid #e6eaf0;
	padding: 9px 10px;
	text-align: left;
	vertical-align: top;
}

th {
	background: #f3f6f9;
	color: #2f3b49;
	font-weight: 700;
}

tr:last-child td {
	border-bottom: 0;
}

td code {
	display: block;
	max-width: 520px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #273447;
}

.ok-text {
	color: var(--ok);
	font-weight: 700;
}

.warn-text {
	color: var(--warn);
	font-weight: 700;
}

iframe {
	width: 100%;
	min-height: 420px;
	border: 1px solid #dce2ea;
	border-radius: 6px;
	background: #fff;
}

@media (max-width: 960px) {
	.topbar,
	.panel-heading {
		align-items: flex-start;
		flex-direction: column;
	}

	.grid,
	.form-grid,
	.api-grid,
	.split,
	.result-grid {
		grid-template-columns: 1fr;
	}
}
