#bpApp {
	--bp-ink: #0f172a;
	--bp-muted: #64748b;
	--bp-line: #e2e8f0;
	--bp-blue: #2563eb;
	--bp-blue-soft: #eff6ff;
	--bp-blue-mid: #dbeafe;
	--bp-radius: 0.375rem;
	--bp-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

#bpApp .bp-shell {
	background:
		radial-gradient(1200px 420px at 10% -10%, rgba(59, 130, 246, 0.16), transparent 55%),
		radial-gradient(900px 360px at 100% 0%, rgba(37, 99, 235, 0.08), transparent 50%);
	border: 1px solid var(--bp-line);
	border-radius: var(--bp-radius);
	box-shadow: var(--bp-shadow);
	overflow: hidden;
	height: 100%;
}

@media (min-width: 1024px) {
	#bpApp .bp-shell-form {
		align-self: start;
		height: auto;
	}

	#bpApp .bp-shell-form .bp-panel {
		height: auto;
	}
}

#bpApp .bp-panel {
	background: rgba(255, 255, 255, 0.92);
	height: 100%;
}

#bpApp .bp-mode {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	padding: 0.35rem;
	border-radius: 999px;
	background: var(--bp-blue-soft);
	border: 1px solid var(--bp-blue-mid);
}

#bpApp .bp-mode-btn {
	height: 2.5rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #475569;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

#bpApp .bp-mode-btn:hover {
	background: rgba(255, 255, 255, 0.7);
}

#bpApp .bp-mode-btn.is-active {
	background: #fff;
	color: var(--bp-blue);
	box-shadow: 0 1px 3px rgba(37, 99, 235, 0.18);
}

#bpApp .bp-mode-btn:focus-visible {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

#bpApp .bp-hint {
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #475569;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: var(--bp-radius);
	padding: 0.65rem 0.85rem;
}

#bpApp .bp-input {
	font-variant-numeric: tabular-nums;
}

#bpApp .bp-input:focus {
	border-color: #3b82f6 !important;
	box-shadow: 0 0 0 1px #3b82f6;
}

#bpApp .bp-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #334155;
	margin-bottom: 0.375rem;
}

#bpApp .bp-submit {
	height: 3rem;
	padding: 0 1.5rem;
	border: 0;
	border-radius: 0.5rem;
	background: #3b82f6;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
	transition: background-color 200ms ease;
}

#bpApp .bp-submit:hover {
	background: #2563eb;
}

#bpApp .bp-submit:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 2px;
}

#bpApp .bp-clear {
	height: 3rem;
	padding: 0 1.5rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	background: #fff;
	color: #374151;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 200ms ease, border-color 200ms ease;
}

#bpApp .bp-clear:hover {
	background: #f9fafb;
	border-color: #9ca3af;
}

#bpApp .bp-clear:focus-visible {
	outline: 2px solid #9ca3af;
	outline-offset: 2px;
}

#bpApp .bp-empty {
	border: 1px dashed #e5e7eb;
	background: #f9fafb;
	border-radius: var(--bp-radius);
	color: #9ca3af;
}

#bpApp .bp-category {
	border: 1px solid #bfdbfe;
	border-radius: var(--bp-radius);
	background: #eff6ff;
	padding: 1.1rem 1.15rem;
	margin-bottom: 0.75rem;
	transition: border-color 200ms ease, background 200ms ease;
}

#bpApp .bp-category[data-tone="normal"] {
	border-color: #86efac;
	background: #f0fdf4;
}

#bpApp .bp-category[data-tone="elevated"] {
	border-color: #fcd34d;
	background: #fffbeb;
}

#bpApp .bp-category[data-tone="stage1"] {
	border-color: #fdba74;
	background: #fff7ed;
}

#bpApp .bp-category[data-tone="stage2"],
#bpApp .bp-category[data-tone="high"] {
	border-color: #fca5a5;
	background: #fef2f2;
}

#bpApp .bp-category[data-tone="crisis"] {
	border-color: #f87171;
	background: #fee2e2;
}

#bpApp .bp-category[data-tone="low"] {
	border-color: #7dd3fc;
	background: #f0f9ff;
}

#bpApp .bp-category-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #475569;
}

#bpApp .bp-category-value {
	margin-top: 0.4rem;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.15;
	color: var(--bp-ink);
}

#bpApp .bp-category[data-tone="normal"] .bp-category-value { color: #15803d; }
#bpApp .bp-category[data-tone="elevated"] .bp-category-value { color: #b45309; }
#bpApp .bp-category[data-tone="stage1"] .bp-category-value { color: #c2410c; }
#bpApp .bp-category[data-tone="stage2"] .bp-category-value,
#bpApp .bp-category[data-tone="high"] .bp-category-value { color: #b91c1c; }
#bpApp .bp-category[data-tone="crisis"] .bp-category-value { color: #991b1b; }
#bpApp .bp-category[data-tone="low"] .bp-category-value { color: #0369a1; }

#bpApp .bp-zone {
	display: inline-flex;
	align-items: center;
	margin-top: 0.5rem;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background: rgba(15, 23, 42, 0.06);
	color: #334155;
}

#bpApp .bp-metrics {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

#bpApp .bp-metric {
	border: 1px solid #e2e8f0;
	border-radius: var(--bp-radius);
	background: #fff;
	padding: 1rem 1.1rem;
}

#bpApp .bp-metric-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #475569;
}

#bpApp .bp-metric-value {
	margin-top: 0.4rem;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.1;
	color: #0f172a;
	font-variant-numeric: tabular-nums;
}

#bpApp .bp-unit {
	margin-left: 0.3rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #64748b;
}

#bpApp .bp-note {
	margin-top: 0.85rem;
	font-size: 0.75rem;
	line-height: 1.5;
	color: #64748b;
}





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

#bpApp .bp-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 2rem;
}

#bpApp .bp-table {
	width: 100%;
	min-width: 28rem;
	border-collapse: collapse;
	font-size: 0.875rem;
}

#bpApp .bp-table th,
#bpApp .bp-table td {
	border: 1px solid #e2e8f0;
	padding: 0.65rem 0.75rem;
	text-align: left;
	color: #475569;
}

#bpApp .bp-table th {
	background: #f8fafc;
	color: #334155;
	font-weight: 600;
}

@media (min-width: 640px) {
	#bpApp .bp-metrics {
		grid-template-columns: 1fr 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	#bpApp .bp-mode-btn,
	#bpApp .bp-submit,
	#bpApp .bp-clear,
	#bpApp .bp-category {
		transition: none;
	}
}

#bpApp .bp-select {
	appearance: none;
	width: 100%;
	height: 3rem;
	padding: 0 2.5rem 0 1rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") right 0.75rem center / 1.1rem no-repeat;
	color: var(--bp-ink);
	outline: none;
	cursor: pointer;
	transition: border-color 200ms ease, box-shadow 200ms ease;
}

#bpApp .bp-select:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 1px #3b82f6;
}
