#smApp {
	--sm-ink: #0f172a;
	--sm-muted: #475569;
	--sm-line: #e2e8f0;
	--sm-primary: #3b82f6;
	--sm-primary-hover: #2563eb;
	--sm-soft: #eff6ff;
	--sm-accent: #1d4ed8;
	--sm-slate: #1e293b;
	--sm-ok: #15803d;
	--sm-ok-bg: #f0fdf4;
	--sm-bad: #b91c1c;
	--sm-bad-bg: #fef2f2;
	--sm-radius: 0.375rem;
	--sm-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
	--sm-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--sm-ink);
}

#smApp .sm-shell {
	background:
		radial-gradient(1100px 400px at 8% -12%, rgba(59, 130, 246, 0.14), transparent 55%),
		radial-gradient(900px 360px at 100% 0%, rgba(37, 99, 235, 0.06), transparent 50%),
		linear-gradient(180deg, #f8fafc 0%, #ffffff 48%);
	border: 1px solid var(--sm-line);
	border-radius: var(--sm-radius);
	box-shadow: var(--sm-shadow);
	overflow: hidden;
}

#smApp .sm-shell-form {
	height: auto;
	align-self: start;
}

#smApp .sm-panel {
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(6px);
}

#smApp .sm-label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #334155;
}

#smApp .sm-input {
	display: block;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.55rem 0.85rem;
	border: 1px solid var(--sm-line);
	border-radius: 0.5rem;
	background: #fff;
	color: var(--sm-ink);
	font-size: 0.9375rem;
	font-weight: 500;
	font-family: var(--sm-font-mono);
	line-height: 1.4;
	transition: border-color 150ms ease;
}

#smApp .sm-input:hover {
	border-color: #93c5fd;
}

#smApp .sm-input:focus {
	outline: none;
	border-color: #93c5fd;
	box-shadow: none;
}

#smApp .sm-input.is-invalid {
	border-color: #fca5a5;
	box-shadow: none;
}

#smApp .sm-field-hint {
	margin: 0.4rem 0 0;
	min-height: 1.1rem;
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--sm-bad);
}

#smApp .sm-cidr-value {
	min-width: 2.75rem;
	text-align: right;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--sm-primary);
	font-variant-numeric: tabular-nums;
	font-family: "Poppins", system-ui, sans-serif;
}

#smApp .sm-range {
	accent-color: var(--sm-primary);
	height: 1.5rem;
	cursor: pointer;
}

#smApp .sm-cidr-meta {
	display: flex;
	justify-content: space-between;
	margin-top: 0.35rem;
	font-size: 0.6875rem;
	color: #94a3b8;
}

#smApp .sm-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

#smApp .sm-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2rem;
	padding: 0 0.65rem;
	border: 1px solid var(--sm-line);
	border-radius: 0.375rem;
	background: #fff;
	color: #334155;
	font-size: 0.8125rem;
	font-weight: 600;
	font-family: var(--sm-font-mono);
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#smApp .sm-chip:hover {
	border-color: #93c5fd;
	background: var(--sm-soft);
	color: var(--sm-accent);
}

#smApp .sm-chip:focus-visible {
	outline: 2px solid var(--sm-primary);
	outline-offset: 2px;
}

#smApp .sm-chip.is-active {
	border-color: #93c5fd;
	background: var(--sm-soft);
	color: var(--sm-accent);
	box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}

#smApp .sm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 2.75rem;
	padding: 0 1.15rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#smApp .sm-btn:focus-visible {
	outline: 2px solid var(--sm-primary);
	outline-offset: 2px;
}

#smApp .sm-btn-primary {
	background: var(--sm-primary);
	color: #fff;
}

#smApp .sm-btn-primary:hover {
	background: var(--sm-primary-hover);
}

#smApp .sm-btn-muted {
	background: #f8fafc;
	color: #1e293b;
	border-color: #e2e8f0;
}

#smApp .sm-btn-muted:hover {
	background: #f1f5f9;
}

#smApp .sm-btn.is-done {
	background: var(--sm-soft);
	border-color: #93c5fd;
	color: var(--sm-accent);
}

#smApp .sm-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

#smApp .sm-hint {
	margin: 0;
	font-size: 0.75rem;
	line-height: 1.55;
	color: #94a3b8;
}

#smApp .sm-badge {
	display: inline-flex;
	align-items: center;
	min-height: 1.5rem;
	padding: 0 0.55rem;
	border-radius: 0.375rem;
	background: var(--sm-soft);
	color: var(--sm-accent);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

#smApp .sm-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-height: 12rem;
	padding: 1.5rem;
	text-align: center;
	font-size: 0.875rem;
	color: #94a3b8;
	border: 1px dashed var(--sm-line);
	border-radius: 0.5rem;
	background: #f8fafc;
}

#smApp .sm-empty.hidden,
#smApp .sm-result.hidden,
#smApp #smResult.hidden {
	display: none !important;
}

#smApp .sm-highlight {
	position: relative;
	padding: 1rem 1.1rem;
	border-radius: 0.5rem;
	border: 1px solid #bfdbfe;
	background: linear-gradient(135deg, var(--sm-soft), #fff 60%);
	margin-bottom: 1rem;
}

#smApp .sm-highlight-label {
	margin: 0 0 0.35rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
}

#smApp .sm-highlight-value {
	margin: 0;
	padding-right: 3rem;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	word-break: break-all;
	color: var(--sm-accent);
	font-family: var(--sm-font-mono);
	line-height: 1.4;
}

#smApp .sm-metrics {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
}

#smApp .sm-metric {
	position: relative;
	padding: 0.75rem 0.85rem;
	border: 1px solid var(--sm-line);
	border-radius: 0.5rem;
	background: #fff;
	min-height: 4.25rem;
}

#smApp .sm-metric-label {
	margin: 0 0 0.3rem;
	font-size: 0.6875rem;
	font-weight: 600;
	color: #64748b;
}

#smApp .sm-metric-value {
	margin: 0;
	padding-right: 2.4rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--sm-slate);
	font-family: var(--sm-font-mono);
	word-break: break-all;
	line-height: 1.4;
}

#smApp .sm-copy-mini {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	padding: 0.15rem 0.45rem;
	border: 1px solid var(--sm-line);
	border-radius: 0.25rem;
	background: #f8fafc;
	color: #64748b;
	font-size: 0.6875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#smApp .sm-copy-mini:hover {
	background: var(--sm-soft);
	border-color: #93c5fd;
	color: var(--sm-accent);
}

#smApp .sm-copy-mini:focus-visible {
	outline: 2px solid var(--sm-primary);
	outline-offset: 1px;
}

#smApp .sm-binary {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px dashed var(--sm-line);
}

#smApp .sm-binary-row {
	display: grid;
	grid-template-columns: 2.75rem 1fr;
	gap: 0.5rem;
	align-items: start;
	margin-bottom: 0.45rem;
}

#smApp .sm-binary-key {
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
	padding-top: 0.15rem;
}

#smApp .sm-binary-val {
	display: block;
	margin: 0;
	padding: 0.35rem 0.5rem;
	border-radius: 0.375rem;
	background: #0f172a;
	color: #93c5fd;
	font-size: 0.6875rem;
	line-height: 1.55;
	word-break: break-all;
	font-family: var(--sm-font-mono);
}

#smApp .sm-notes {
	background: #fff;
	border-radius: var(--sm-radius);
	box-shadow: var(--sm-shadow);
	border: 1px solid var(--sm-line);
}

#smApp .sm-notes a {
	color: #2563eb;
}

#smApp .sm-notes code {
	font-size: 0.85em;
	background: #f1f5f9;
	padding: 0.05em 0.3em;
	border-radius: 0.25rem;
}

@media (max-width: 640px) {
	#smApp .sm-metrics {
		grid-template-columns: 1fr;
	}

	#smApp .sm-binary-row {
		grid-template-columns: 1fr;
		gap: 0.2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	#smApp .sm-input,
	#smApp .sm-chip,
	#smApp .sm-btn,
	#smApp .sm-copy-mini {
		transition: none !important;
	}
}
