.ahi-tool,
.ahi-result-page {
	color: #333;
}

.ahi-form {
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 560px;
	gap: 8px;
}

.ahi-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 1px solid #E0E0E0;
	border-radius: 6px;
	color: #333;
	background: #fff;
	padding: 12px 14px;
	line-height: 1.2;
	box-shadow: none;
	outline: none;
}

.ahi-input:focus {
	border-color: #f87523;
	box-shadow: 0 0 0 2px rgba(248, 117, 35, 0.18);
}

.ahi-submit,
.ahi-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #f87523;
	border-radius: 6px;
	background: #f87523;
	color: #fff;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.ahi-submit {
	flex: 0 0 48px;
	min-width: 48px;
	padding: 0;
	font-size: 24px;
}

.ahi-submit:hover,
.ahi-submit:focus,
.ahi-button:hover,
.ahi-button:focus {
	opacity: 0.88;
	color: #fff;
	text-decoration: none;
}

.ahi-submit:disabled {
	cursor: wait;
	opacity: 0.65;
}

.ahi-progress {
	max-width: 560px;
	margin-top: 12px;
}

.ahi-progress-track {
	width: 100%;
	height: 10px;
	overflow: hidden;
	border-radius: 999px;
	background: #E0E0E0;
}

.ahi-progress-bar {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: #f87523;
	transition: width 0.28s ease;
}

.ahi-progress-text {
	margin: 8px 0 0;
	color: #333;
}

.ahi-error {
	max-width: 560px;
	margin-top: 12px;
	border-left: 3px solid #f87523;
	background: #fff4e3;
	color: #333;
	padding: 10px 12px;
}

.ahi-result-page {
	width: 100%;
	margin: 0;
	background: #fff4e3;
	padding: clamp(28px, 5vw, 64px) max(16px, calc((100% - 1120px) / 2));
}

.ahi-result-empty,
.ahi-result-hero,
.ahi-steps,
.ahi-result-section,
.ahi-metrics-grid {
	width: 100%;
}

.ahi-result-hero {
	padding-bottom: 22px;
}

.ahi-result-kicker {
	display: inline-flex;
	align-items: center;
	margin: 0 0 10px;
	color: #f87523;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0;
}

.ahi-result-hero h1 {
	margin: 0;
	color: #333;
	font-size: clamp(34px, 5vw, 62px);
	line-height: 1.05;
	letter-spacing: 0;
}

.ahi-button {
	padding: 12px 16px;
	min-height: 44px;
}

.ahi-button-secondary {
	background: #fff;
	color: #f87523;
}

.ahi-button-secondary:hover,
.ahi-button-secondary:focus {
	color: #f87523;
}

.ahi-copy-source {
	position: fixed;
	top: 8px;
	left: 8px;
	width: 4px;
	height: 4px;
	border: 0;
	padding: 0;
	margin: 0;
	opacity: 0.01;
	overflow: hidden;
	background: transparent;
	color: transparent;
	resize: none;
	pointer-events: none;
	z-index: -1;
}

.ahi-steps {
	margin: 0 0 34px;
}

.ahi-steps-heading {
	margin-bottom: 14px;
}

.ahi-step-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.ahi-step {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	min-height: 245px;
	padding: 20px;
	border: 1px solid rgba(248, 117, 35, 0.26);
	border-radius: 8px;
	background: #fff;
	color: #333;
}

.ahi-step::after {
	content: "";
	position: absolute;
	top: 31px;
	right: -14px;
	width: 14px;
	height: 2px;
	background: #f87523;
}

.ahi-step:last-child::after {
	display: none;
}

.ahi-step-primary {
	background: #fffdf8;
	box-shadow: inset 0 0 0 2px rgba(248, 117, 35, 0.18);
}

.ahi-step-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 6px 10px;
	border-radius: 999px;
	background: #f87523;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0;
}

.ahi-step h3 {
	margin: 0;
	color: #333;
	font-size: 22px;
	line-height: 1.18;
	letter-spacing: 0;
}

.ahi-step p {
	margin: 0;
	color: #333;
	font-size: 15px;
	line-height: 1.5;
}

.ahi-step .ahi-button {
	margin-top: auto;
	width: 100%;
	justify-content: center;
	text-align: center;
}

.ahi-metrics-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 10px 0 34px;
}

.ahi-metric-tile {
	background: #E0E0E0;
	border-radius: 8px;
	padding: 14px;
	min-height: 112px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.ahi-metric-label,
.ahi-metric-note {
	display: block;
	color: #333;
	line-height: 1.25;
}

.ahi-metric-label {
	font-weight: 700;
}

.ahi-metric-tile strong {
	display: block;
	margin: 10px 0;
	color: #f87523;
	font-size: 28px;
	line-height: 1;
	letter-spacing: 0;
}

.ahi-metric-note {
	font-size: 13px;
}

.ahi-result-section {
	border-top: 2px solid rgba(51, 51, 51, 0.14);
	padding: 32px 0;
}

.ahi-section-heading {
	display: grid;
	grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.6fr);
	gap: 24px;
	margin-bottom: 20px;
}

.ahi-section-heading h2 {
	margin: 0;
	color: #333;
	font-size: clamp(25px, 3vw, 38px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0;
}

.ahi-section-heading p {
	margin: 0;
	color: #333;
	font-size: 16px;
	line-height: 1.6;
}

.ahi-visual-grid,
.ahi-columns {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

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

.ahi-meter {
	background: rgba(255, 255, 255, 0.72);
	border-radius: 8px;
	padding: 16px;
}

.ahi-meter-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.ahi-meter-top strong,
.ahi-meter-top span {
	color: #333;
	line-height: 1.25;
}

.ahi-meter-top span {
	color: #f87523;
	font-weight: 800;
}

.ahi-meter-track {
	height: 12px;
	overflow: hidden;
	border-radius: 999px;
	background: #E0E0E0;
}

.ahi-meter-track span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: #f87523;
}

.ahi-meter p {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.45;
}

.ahi-kv-list {
	display: grid;
	gap: 8px;
	margin: 0;
}

.ahi-kv-row {
	display: grid;
	grid-template-columns: minmax(160px, 0.42fr) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
	background: rgba(255, 255, 255, 0.72);
	border-radius: 8px;
	padding: 12px 14px;
}

.ahi-kv-row dt {
	font-weight: 800;
	color: #333;
}

.ahi-kv-row dd {
	margin: 0;
	color: #333;
	word-break: break-word;
}

.ahi-inline-list {
	margin-top: 22px;
}

.ahi-inline-list h3,
.ahi-columns h3 {
	margin: 0 0 12px;
	color: #333;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0;
}

.ahi-inline-list p {
	margin: 0 0 8px;
	line-height: 1.5;
	word-break: break-word;
}

.ahi-heading-list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ahi-heading-list li {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 10px;
	align-items: start;
	background: rgba(255, 255, 255, 0.72);
	border-radius: 8px;
	padding: 10px 12px;
	word-break: break-word;
}

.ahi-heading-list .ahi-heading-level-h3 {
	margin-left: 20px;
}

.ahi-heading-list .ahi-heading-level-h4 {
	margin-left: 40px;
}

.ahi-heading-list span {
	color: #f87523;
	font-weight: 800;
}

.ahi-table-wrap {
	overflow-x: auto;
}

.ahi-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 8px;
}

.ahi-table caption {
	text-align: left;
	margin-bottom: 8px;
	color: #333;
	font-weight: 700;
}

.ahi-table th {
	text-align: left;
	color: #333;
	font-weight: 800;
	padding: 0 12px 4px;
}

.ahi-table td {
	background: rgba(255, 255, 255, 0.72);
	color: #333;
	padding: 12px;
	vertical-align: top;
	word-break: break-word;
}

.ahi-table td:first-child {
	border-radius: 8px 0 0 8px;
}

.ahi-table td:last-child {
	border-radius: 0 8px 8px 0;
}

.ahi-table a,
.ahi-link-list a {
	color: #f87523;
	text-decoration: none;
}

.ahi-table a:hover,
.ahi-link-list a:hover {
	text-decoration: underline;
}

.ahi-link-list {
	display: grid;
	gap: 8px;
}

.ahi-link-list p {
	display: grid;
	gap: 4px;
	margin: 0;
	background: rgba(255, 255, 255, 0.72);
	border-radius: 8px;
	padding: 10px 12px;
	word-break: break-word;
}

.ahi-link-list span {
	font-weight: 800;
	color: #333;
}

.ahi-link-list small {
	color: #333;
	font-weight: 700;
}

.ahi-score-list {
	display: grid;
	gap: 8px;
	margin-top: 12px;
}

.ahi-score-list p {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	margin: 0;
	background: rgba(255, 255, 255, 0.72);
	border-radius: 8px;
	padding: 10px 12px;
	word-break: break-word;
}

.ahi-score-list strong {
	color: #f87523;
	font-size: 22px;
	line-height: 1;
}

.ahi-score-list a {
	color: #f87523;
	text-decoration: none;
}

.ahi-score-list a:hover {
	text-decoration: underline;
}

.ahi-score-list span {
	color: #333;
	font-size: 13px;
	font-weight: 700;
}

@media (max-width: 520px) {
	.ahi-form {
		gap: 6px;
	}

	.ahi-input {
		padding: 11px 12px;
	}

	.ahi-submit {
		flex-basis: 44px;
		min-width: 44px;
	}

	.ahi-result-page {
		padding: 24px 10px;
	}

	.ahi-result-hero h1 {
		font-size: 34px;
	}

	.ahi-metrics-grid,
	.ahi-step-grid,
	.ahi-visual-grid,
	.ahi-columns,
	.ahi-section-heading,
	.ahi-kv-row {
		grid-template-columns: 1fr;
	}

	.ahi-metrics-grid {
		gap: 8px;
	}

	.ahi-metric-tile {
		min-height: 96px;
	}

	.ahi-step-grid {
		gap: 12px;
	}

	.ahi-step {
		min-height: auto;
		padding: 16px;
	}

	.ahi-step::after {
		top: auto;
		right: auto;
		bottom: -12px;
		left: 26px;
		width: 2px;
		height: 12px;
	}

	.ahi-step h3 {
		font-size: 19px;
	}

	.ahi-table th,
	.ahi-table td {
		min-width: 140px;
	}

	.ahi-heading-list .ahi-heading-level-h3 {
		margin-left: 12px;
	}

	.ahi-heading-list .ahi-heading-level-h4 {
		margin-left: 24px;
	}

	.ahi-score-list p {
		grid-template-columns: 1fr;
		gap: 6px;
	}
}

@media (min-width: 521px) and (max-width: 880px) {
	.ahi-metrics-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ahi-step-grid,
	.ahi-visual-grid,
	.ahi-columns,
	.ahi-section-heading {
		grid-template-columns: 1fr;
	}

	.ahi-step {
		min-height: auto;
	}

	.ahi-step::after {
		top: auto;
		right: auto;
		bottom: -14px;
		left: 30px;
		width: 2px;
		height: 14px;
	}
}
