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

:root {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #0f172a;
	background-color: #e5e7eb;
}


body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	align-items: stretch;
	justify-content: center;
	padding: 1.5rem;
	background:
		linear-gradient(135deg, #eff6ff 0, #e5e7eb 45%, #f9fafb 100%);
	color: #0f172a;
}

.shell {
	width: 100%;
	max-width: 1080px;
	background: #f9fafb;
	border-radius: 1.25rem;
	box-shadow:
		0 18px 50px rgba(15, 23, 42, 0.25),
		0 0 0 1px rgba(148, 163, 184, 0.25);
	overflow: hidden;
	border: 1px solid rgba(148, 163, 184, 0.4);
	display: flex;
	flex-direction: column;
}

.hero {
	display: flex;
	gap: 1.25rem;
	align-items: center;
	padding: 1.75rem 2rem 1.5rem;
	background: radial-gradient(circle at top left, #2563eb 0, #1d4ed8 45%, #1e293b 100%);
	color: #e5e7eb;
}

.hero-icon {
	flex: 0 0 auto;
	width: 3.1rem;
	height: 3.1rem;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.5);
	border: 1px solid rgba(191, 219, 254, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.1rem;
	letter-spacing: 0.08em;
	color: #eff6ff;
	box-shadow: 0 10px 20px rgba(15, 23, 42, 0.55);
}

.hero-text h1 {
	margin: 0 0 0.45rem;
	font-size: 1.45rem;
	font-weight: 650;
	letter-spacing: 0.01em;
}

.hero-text p {
	margin: 0.2rem 0;
	font-size: 0.96rem;
	line-height: 1.7;
	color: #e2e8f0;
}

.hero-text strong {
	font-weight: 600;
}

.hero-tip {
	margin-top: 0.6rem;
	padding: 0.4rem 0.75rem;
	border-radius: 0.75rem;
	background: rgba(15, 118, 110, 0.2);
	border: 1px solid rgba(34, 211, 238, 0.55);
	font-size: 0.86rem;
	color: #ecfeff;
}

.content {
	padding: 1.75rem 2rem 1.5rem;
	background: radial-gradient(circle at top, #ffffff 0, #f9fafb 55%, #e5e7eb 100%);
}

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr);
	gap: 1.4rem;
	align-items: flex-start;
	margin: 0;
}

.panel {
	background: #ffffff;
	border-radius: 1rem;
	padding: 1.1rem 1.2rem 1.2rem;
	border: 1px solid rgba(203, 213, 225, 0.9);
	box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
	position: relative;
}

.panel::before {
	content: "";
	position: absolute;
	inset: 0.7rem auto 0.7rem -0.2rem;
	width: 0.22rem;
	border-radius: 999px;
	background: linear-gradient(180deg, #2563eb, #22c55e);
	opacity: 0.22;
}

.panel-full {
	grid-column: 1 / -1;
}

.panel-header {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 0.25rem;
}

.panel-header h2 {
	margin: 0;
	font-size: 1.06rem;
	font-weight: 600;
	color: #0f172a;
}

.pill {
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	padding: 0.25rem 0.55rem;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.08);
	border: 1px solid rgba(37, 99, 235, 0.5);
	color: #1d4ed8;
	font-weight: 600;
}

.pill-alt {
	background: rgba(16, 185, 129, 0.08);
	border-color: rgba(16, 185, 129, 0.45);
	color: #047857;
}

.pill-muted {
	background: rgba(148, 163, 184, 0.16);
	border-color: rgba(148, 163, 184, 0.7);
	color: #4b5563;
}

.panel-intro {
	margin: 0 0 0.85rem;
	font-size: 0.9rem;
	color: #64748b;
	line-height: 1.6;
}

.error-message {
	color: #b91c1c;
	font-weight: 600;
	margin: 0.25rem 0 0.75rem;
}

.input-error {
	border-color: #dc2626 !important;
	color: #b91c1c;
	font-weight: 700;
}

.input-error::placeholder {
	color: #b91c1c;
	font-weight: 700;
	opacity: 0.85;
}

.notice {
	margin: 0 0 0.9rem;
	padding: 0.75rem 0.9rem;
	border-radius: 0.9rem;
	background: rgba(250, 204, 21, 0.12);
	border: 1px solid rgba(217, 119, 6, 0.35);
	color: #92400e;
	font-size: 0.92rem;
	line-height: 1.55;
}

label {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
	color: #0f172a;
}

.label-head {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
}

label > span:not(.label-head) {
	font-weight: 500;
}

.info-tip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.3rem;
	height: 1.3rem;
	border-radius: 999px;
	border: 1px solid rgba(37, 99, 235, 0.4);
	color: #1d4ed8;
	background: rgba(59, 130, 246, 0.08);
	font-size: 0.75rem;
	cursor: default;
	position: relative;
}

.info-tip::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	top: 115%;
	transform: translateX(-50%);
	white-space: normal;
	width: 260px;
	max-width: 80vw;
	padding: 0.45rem 0.6rem;
	border-radius: 0.5rem;
	background: #0f172a;
	color: #e5e7eb;
	font-size: 0.78rem;
	line-height: 1.4;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.3);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.12s ease;
	z-index: 3;
}

.info-tip:hover::after,
.info-tip:focus-visible::after {
	opacity: 1;
}

.group {
	margin-top: 0.3rem;
}

.grid3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 0.25rem 0 0.6rem;
}

.grid2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 0.2rem 0 0.6rem;
}

.connection-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 0.75rem;
	margin: 0.35rem 0 0.6rem;
}

.connection-card {
	border: 1px dashed rgba(148, 163, 184, 0.6);
	border-radius: 0.8rem;
	padding: 0.75rem 0.85rem;
	background: #f8fafc;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.row {
	display: flex;
	gap: 0.55rem;
	align-items: center;
}

.row input {
	flex: 1 1 auto;
}

input,
textarea,
select {
	font-family: inherit;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #0f172a;
	border-radius: 0.55rem;
	border: 1px solid #cbd5e1;
	padding: 0.5rem 0.7rem;
	background: #f9fafb;
	transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

input::placeholder,
textarea::placeholder,
select::placeholder {
	color: #9ca3af;
	font-size: 0.86rem;
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: #2563eb;
	background-color: #ffffff;
	box-shadow:
		0 0 0 1px rgba(37, 99, 235, 0.9),
		0 0 0 4px rgba(191, 219, 254, 0.9);
}

textarea {
	resize: vertical;
	min-height: 5rem;
}

.hint-small {
	margin: 0;
	font-size: 0.8rem;
	color: #6b7280;
}

.panel-actions {
	margin: 0.35rem 0 0.75rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.btn-primary,
.btn-ghost {
	appearance: none;
	border-radius: 999px;
	border: 1px solid transparent;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 550;
	padding: 0.5rem 1.1rem;
	cursor: pointer;
	transition: background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, transform 0.05s ease, border-color 0.12s ease;
	white-space: nowrap;
}

.btn-primary {
	background: linear-gradient(135deg, #2563eb, #0ea5e9);
	color: #f9fafb;
	box-shadow:
		0 9px 20px rgba(37, 99, 235, 0.4),
		0 0 0 1px rgba(15, 23, 42, 0.02);
	border-color: rgba(37, 99, 235, 0.85);
}

.btn-primary:hover {
	background: linear-gradient(135deg, #1d4ed8, #0284c7);
	transform: translateY(-0.5px);
	box-shadow:
		0 14px 25px rgba(37, 99, 235, 0.5),
		0 0 0 1px rgba(15, 23, 42, 0.02);
}

.btn-primary:active {
	transform: translateY(0.4px);
	box-shadow:
		0 5px 12px rgba(15, 23, 42, 0.35),
		0 0 0 1px rgba(15, 23, 42, 0.02);
}

.btn-ghost {
	background: #eef2ff;
	color: #1d4ed8;
	border-color: #c7d2fe;
	box-shadow: 0 1px 0 rgba(148, 163, 184, 0.5);
}

.btn-ghost:hover {
	background: #e0e7ff;
	border-color: #a5b4fc;
}

.btn-ghost:active {
	background: #e0f2fe;
	box-shadow: 0 0 0 rgba(15, 23, 42, 0.3);
}

#summaryOutput {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	white-space: pre-wrap;
	background-color: #f9fafb;
}

.summary-display {
	margin-top: 0.5rem;
	padding: 0.9rem 1rem 1rem;
	border-radius: 1rem;
	border: 1px solid rgba(148, 163, 184, 0.6);
	background: #f8fafc;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.summary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 0.9rem;
	align-items: start;
}

.summary-card {
	padding: 0.75rem 0.85rem;
	border-radius: 0.9rem;
	border: 1px solid rgba(203, 213, 225, 0.9);
	background: #ffffff;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.summary-card h3 {
	margin: 0 0 0.45rem;
	font-size: 1rem;
	font-weight: 600;
	color: #0f172a;
}

.summary-card dl {
	margin: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.45rem;
}

.summary-card dl div {
	display: grid;
	grid-template-columns: 1.3fr 1.6fr;
	gap: 0.25rem;
	align-items: baseline;
}

.summary-card dt {
	font-weight: 600;
	color: #334155;
}

.summary-card dd {
	margin: 0;
	color: #0f172a;
	word-break: break-word;
}

.summary-card pre {
	margin: 0;
	padding: 0.85rem 0.9rem;
	border-radius: 0.75rem;
	background: #0b1120;
	color: #e2e8f0;
	font-size: 0.88rem;
	line-height: 1.5;
	white-space: pre-wrap;
	border: 1px solid rgba(148, 163, 184, 0.4);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.footer {
	padding: 1rem 2rem 1.2rem;
	border-top: 1px solid rgba(148, 163, 184, 0.7);
	background: #0b1120;
	color: #cbd5f5;
	font-size: 0.84rem;
	line-height: 1.6;
}

.footer p {
	margin: 0;
	max-width: 860px;
}

/* Responsive adjustments */
@media (max-width: 880px) {
	.content {
		padding: 1.5rem 1.35rem 1.4rem;
	}

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

@media (max-width: 640px) {
	body {
		padding: 1rem;
	}

	.hero {
		padding: 1.4rem 1.35rem 1.2rem;
		flex-direction: column;
		align-items: flex-start;
	}

	.content {
		padding: 1.35rem 1.25rem 1.25rem;
	}

	.panel {
		padding: 1.05rem 1.1rem 1.1rem;
	}

	.footer {
		padding: 0.9rem 1.25rem 1.05rem;
	}
}

/* Print-friendly adjustments */
@media print {
	body {
		background: #ffffff;
		padding: 0;
	}

	.shell {
		max-width: none;
		box-shadow: none;
		border: none;
	}

	.hero,
	.footer {
		background: #ffffff;
		color: #0f172a;
		border: none;
	}

	.btn-primary,
	.btn-ghost,
	.panel-actions {
		display: none !important;
	}
}
