.ha-body-container {
	background: #d8e6f4;
	min-height: 100vh;
	padding: 1rem;
	line-height: 1.5;
	padding-top: 36px;
	padding-bottom: 36px;
}

@media (max-width: 480px) {
	.ha-body-container {
		padding-top: 70px;
	}
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type="number"] {
	-moz-appearance: textfield;
}

.calculator-container {
	max-width: 1170px;
	margin: 0 auto;
}

.calculator-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.header-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.brand-icon {
	padding: 0.625rem;
	border-radius: 0.75rem;
	background: #3c82f6;
}

.brand-icon svg {
	width: 30px;
	height: 30px;
	stroke: white;
}

.brand-text h1 {
	font-size: clamp(1.8rem, 4vw, 2rem);
	font-weight: 700;
	line-height: 1;
}

.brand-text h1 .highlight {
	background: #3c82f6;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.brand-text p {
	font-size: 0.75rem;
	color: #94a3b8;
}

.header-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border-radius: 0.75rem;
	background: #1e293b;
	border: 1px solid #334155;
	color: white;
	font-size: 0.875rem;
	cursor: pointer;
	transition: all 0.2s;
}

.header-btn:hover {
	background: #334155;
}

.header-btn svg {
	width: 16px;
	height: 16px;
}

.header-btn .ha-blk-wht-frst,
.header-btn .ha-blk-wht-scnd {
	display: flex;
	align-items: center;
	gap: 8px;
}

.calculator-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 1024px) {
	.calculator-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.section {
	border-radius: 1.25rem;
	border: 1px solid;
	overflow: hidden;
	backdrop-filter: blur(8px);
	margin-bottom: 1rem;
}

.section.emerald {
	background: #fff;
	border-color: rgba(16, 185, 129, 0.25);
}

.section.blue {
	background: #fff;
	border-color: rgba(59, 130, 246, 0.25);
}

.section.purple {
	background: #fff;
	border-color: rgba(168, 85, 247, 0.25);
}

.section.amber {
	background: #fff;
	border-color: rgba(245, 158, 11, 0.25);
}

.section.slate {
	background: #fff;
	border-color: rgba(71, 85, 105, 0.5);
}

.section-header {
	width: 100%;
	padding: 1rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: transparent;
	border: none;
	cursor: pointer;
}

.section-header:hover {
	background: rgba(255, 255, 255, 0.03);
}

.section-header-left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.section-icon {
	padding: 0.5rem;
	border-radius: 0.5rem;
}

.section-icon svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
}

.section.emerald .section-icon {
	background: rgba(16, 185, 129, 0.2);
	color: #34d399;
}

.section.blue .section-icon {
	background: rgba(59, 130, 246, 0.2);
	color: #60a5fa;
}

.section.purple .section-icon {
	background: rgba(168, 85, 247, 0.2);
	color: #c084fc;
}

.section.amber .section-icon {
	background: rgba(245, 158, 11, 0.2);
	color: #fbbf24;
}

.section-title {
	font-weight: 600;
}

.section-chevron {
	color: #94a3b8;
	transition: transform 0.3s;
}

.section-chevron svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
}

.section.collapsed .section-chevron {
	transform: rotate(-90deg);
}

.section-content {
	padding: 0 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.section.collapsed .section-content {
	display: none;
}

.input-group {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.input-label {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
}

.tooltip-trigger {
	color: #94a3b8;
	cursor: help;
	position: relative;
	display: inline-flex;
}

.tooltip-trigger:hover {
	color: #60a5fa;
}

.tooltip-trigger svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
}

.tooltip-content {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-bottom: 0.5rem;
	padding: 0.75rem;
	background: #1e293b;
	border: 1px solid #334155;
	border-radius: 0.5rem;
	font-size: 0.75rem;
	font-weight: 400;
	color: white;
	width: 260px;
	line-height: 1.5;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
	z-index: 100;
	display: none;
}

.tooltip-trigger:hover .tooltip-content {
	display: block;
}

.tooltip-content::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #1e293b;
}

.input-wrapper {
	position: relative;
}

.input-prefix,
.input-suffix {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	font-size: 0.875rem;
	pointer-events: none;
}

.input-prefix {
	left: 0.75rem;
}

.input-suffix {
	right: 0.75rem;
}

.input-field {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(71, 85, 105, 0.5);
	border-radius: 0.75rem;
	font-size: 1rem;
	font-family: inherit;
	transition: all 0.2s;
}

.input-field:focus {
	outline: none;
	border-color: #60a5fa;
	box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.input-field.has-prefix {
	padding-left: 2rem;
}

.input-field.has-suffix {
	padding-right: 3rem;
}

.input-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

.input-row-3 {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 0.75rem;
}

@media (max-width: 480px) {
	.input-row-3 {
		grid-template-columns: 1fr 1fr;
	}
}

.summary-box {
	background: #3b82f61a;
	border: 1px solid rgba(71, 85, 105, 0.5);
	border-radius: 0.75rem;
	padding: 0.75rem;
}

.summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.875rem;
}

.summary-row+.summary-row {
	margin-top: 0.5rem;
}

.summary-label {
	color: #94a3b8;
}

.summary-value {
	font-weight: 500;
}

.summary-value.emerald {
	color: #3c82f6;
	font-weight: 600;
}

.summary-value.positive {
	color: #3c82f6;
	font-weight: 600;
}

.summary-value.negative {
	color: #fb7185;
	font-weight: 600;
}

/* Deal Score Hero */
.score-hero {
	border-radius: 1.5rem;
	padding: 1.5rem;
	text-align: center;
	position: relative;
	overflow: hidden;
	background: #fff;
}

.score-hero.excellent {
	background: #fff;
	border: 2px solid rgba(16, 185, 129, 0.5);
}

.score-hero.good {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.1) 100%);
	border: 2px solid rgba(59, 130, 246, 0.5);
}

.score-hero.fair {
	background: #fff;
	border: 2px solid rgba(245, 158, 11, 0.5);
}

.score-hero.poor {
	background: linear-gradient(135deg, rgba(244, 63, 94, 0.2) 0%, rgba(225, 29, 72, 0.1) 100%);
	border: 2px solid rgba(244, 63, 94, 0.5);
}

.score-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.375rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
}

.score-hero.excellent .score-badge {
	background: rgba(16, 185, 129, 0.2);
	color: #60a5fa;
}

.score-hero.good .score-badge {
	background: rgba(59, 130, 246, 0.2);
	color: #60a5fa;
}

.score-hero.fair .score-badge {
	background: rgba(245, 158, 11, 0.2);
	color: #fbbf24;
}

.score-hero.poor .score-badge {
	background: rgba(244, 63, 94, 0.2);
	color: #fb7185;
}

.score-label {
	font-size: 0.875rem;
	color: #94a3b8;
	margin-bottom: 0.5rem;
}

.score-value {
	font-size: 4rem;
	font-weight: 800;
	line-height: 1;
	margin-bottom: 0.25rem;
}

.score-hero.excellent .score-value {
	color: #34d399;
}

.score-hero.good .score-value {
	color: #60a5fa;
}

.score-hero.fair .score-value {
	color: #fbbf24;
}

.score-hero.poor .score-value {
	color: #fb7185;
}

.score-rating {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.score-hero.excellent .score-rating {
	color: #60a5fa;
}

.score-hero.good .score-rating {
	color: #60a5fa;
}

.score-hero.fair .score-rating {
	color: #fbbf24;
}

.score-hero.poor .score-rating {
	color: #fb7185;
}

.score-subtitle {
	font-size: 0.875rem;
	color: #8d9aa8;
}

/* Score Ring */
.score-ring-container {
	position: relative;
	width: 180px;
	height: 180px;
	margin: 0 auto 1rem;
}

.score-ring {
	transform: rotate(-90deg);
}

.score-ring-bg {
	fill: none;
	stroke: rgba(71, 85, 105, 0.3);
	stroke-width: 12;
}

.score-ring-progress {
	fill: none;
	stroke-width: 12;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.5s ease;
}

.score-hero.excellent .score-ring-progress {
	stroke: #60a5fa;
}

.score-hero.good .score-ring-progress {
	stroke: #60a5fa;
}

.score-hero.fair .score-ring-progress {
	stroke: #fbbf24;
}

.score-hero.poor .score-ring-progress {
	stroke: #fb7185;
}

.score-ring-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
}

.score-ring-value {
	font-size: 2.5rem;
	font-weight: 800;
	line-height: 1;
}

.score-ring-max {
	font-size: 0.875rem;
	color: #64748b;
}

/* Metric Cards */
.metrics-section {
	margin-top: 1rem;
}

.metrics-title {
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.metric-card {
	background: #c6d0e080;
	border: 1px solid rgba(71, 85, 105, 0.3);
	border-radius: 0.75rem;
	padding: 1rem;
	margin-bottom: 0.75rem;
}

.metric-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
}

.metric-card-title {
	font-size: 0.875rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.metric-card-score {
	font-size: 1rem;
	font-weight: 700;
}

.metric-card-score.excellent {
	color: #60a5fa;
}

.metric-card-score.good {
	color: #60a5fa;
}

.metric-card-score.fair {
	color: #fbbf24;
}

.metric-card-score.poor {
	color: #fb7185;
}

.metric-card-bar {
	height: 6px;
	background: rgba(71, 85, 105, 0.3);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 0.5rem;
}

.metric-card-bar-fill {
	height: 100%;
	border-radius: 3px;
	transition: width 0.3s;
}

.metric-card-bar-fill.excellent {
	background: #60a5fa;
}

.metric-card-bar-fill.good {
	background: #60a5fa;
}

.metric-card-bar-fill.fair {
	background: #fbbf24;
}

.metric-card-bar-fill.poor {
	background: #fb7185;
}

.metric-card-details {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.metric-card-value {
	font-size: 0.8125rem;
	color: #838a91;
}

.metric-card-benchmark {
	font-size: 0.75rem;
	color: #64748b;
}

.metric-card-status {
	font-size: 0.6875rem;
	padding: 0.125rem 0.375rem;
	border-radius: 9999px;
	font-weight: 600;
}

.metric-card-status.pass {
	background: rgba(16, 185, 129, 0.2);
	color: #60a5fa;
}

.metric-card-status.fail {
	background: rgba(244, 63, 94, 0.2);
	color: #fb7185;
}

.metric-card-status.warn {
	background: rgba(245, 158, 11, 0.2);
	color: #fbbf24;
}

/* Weight indicator */
.metric-weight {
	font-size: 0.625rem;
	color: #64748b;
	font-weight: 500;
}

/* Summary Cards */
.summary-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
	margin-top: 1rem;
	margin-bottom: 1rem;
}

@media (min-width: 480px) {
	.summary-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.summary-card {
	background: #fff;
	border: 1px solid rgba(71, 85, 105, 0.3);
	border-radius: 0.75rem;
	padding: 0.75rem;
	text-align: center;
}

.summary-card-label {
	font-size: 0.6875rem;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.25rem;
}

.summary-card-value {
	font-size: 1.125rem;
	font-weight: 700;
}

.summary-card-value.positive {
	color: #3c82f6;
}

.summary-card-value.negative {
	color: #fb7185;
}

/* Breakdown */
.breakdown-card {
	border: 1px solid rgba(71, 85, 105, 0.3);
	border-radius: 0.75rem;
	overflow: hidden;
	margin-top: 1rem;
}

.breakdown-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 1rem;
	background: rgba(16, 185, 129, 0.1);
	border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.breakdown-header-label {
	font-size: 0.8125rem;
	font-weight: 600;
}

.breakdown-header-value {
	font-size: 0.9375rem;
	font-weight: 700;
	color: #60a5fa;
}

.breakdown-items {
	padding: 0.5rem 1rem;
}

.breakdown-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.375rem 0;
	font-size: 0.8125rem;
}

.breakdown-item-label {
	color: #94a3b8;
}

.breakdown-item-value.positive {
	color: #60a5fa;
}

.breakdown-item-value.negative {
	color: #fb7185;
}

.breakdown-divider {
	border-top: 1px solid rgba(71, 85, 105, 0.3);
	margin: 0.25rem 0;
}

/* Verdict */
.verdict-section {
	margin-top: 1rem;
}

.verdict-card {
	border-radius: 0.75rem;
	padding: 1rem;
}

.verdict-card.excellent {
	background: rgba(16, 185, 129, 0.1);
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.verdict-card.good {
	background: rgba(59, 130, 246, 0.1);
	border: 1px solid rgba(59, 130, 246, 0.3);
}

.verdict-card.fair {
	background: rgba(245, 158, 11, 0.1);
	border: 1px solid rgba(245, 158, 11, 0.3);
}

.verdict-card.poor {
	background: rgba(244, 63, 94, 0.1);
	border: 1px solid rgba(244, 63, 94, 0.3);
}

.verdict-title {
	font-size: 0.875rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.verdict-card.excellent .verdict-title {
	color: #34d399;
}

.verdict-card.good .verdict-title {
	color: #60a5fa;
}

.verdict-card.fair .verdict-title {
	color: #fbbf24;
}

.verdict-card.poor .verdict-title {
	color: #fb7185;
}

.verdict-text {
	font-size: 0.8125rem;
	color: #828b96;
	line-height: 1.6;
}

/* Modal */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.modal-overlay.open {
	display: flex;
}

.modal-content {
	background: #fff;
	border: 1px solid #334155;
	border-radius: 1.5rem;
	max-width: 600px;
	width: 100%;
	max-height: 85vh;
	overflow: hidden;
}

.modal-header {
	position: sticky;
	top: 0;
	background: #fff;
	border-bottom: 1px solid #334155;
	padding: 1rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.modal-header h2 {
	font-size: 1.25rem;
	font-weight: 700;
}

.modal-close {
	padding: 0.5rem;
	border-radius: 0.75rem;
	background: transparent;
	border: none;
	color: #94a3b8;
	cursor: pointer;
}

.modal-close:hover {
	background: #1e293b;
	color: white;
}

.modal-close svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
}

.modal-body {
	overflow-y: auto;
	max-height: calc(85vh - 70px);
	padding: 1.5rem;
}

.glossary-term {
	background: #d8e6f4;
	border: 1px solid rgba(71, 85, 105, 0.5);
	border-radius: 0.75rem;
	padding: 1rem;
	margin-bottom: 1rem;
}

.glossary-term h3 {
	font-weight: 600;
	color: #000;
	margin-bottom: 0.5rem;
}

.glossary-term p {
	font-size: 0.875rem;
	color: #72767a;
	line-height: 1.6;
}

.glossary-formula {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding-top: 0.5rem;
}

.glossary-formula span {
	font-size: 0.75rem;
	color: #64748b;
	flex-shrink: 0;
}

.glossary-formula code {
	font-size: 0.75rem;
	background: #3c82f6;
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
	color: #fff;
	font-family: monospace;
}

.glossary-scoring {
	margin-top: 0.5rem;
	padding: 0.5rem;
	background: #fff;
	border-radius: 0.5rem;
}

.glossary-scoring-title {
	font-size: 0.75rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.glossary-scoring-text {
	font-size: 0.6875rem;
	color: #94a3b8;
}