.sha-widget {
	--sha-bg: #0f172a;
	--sha-surface: #ffffff;
	--sha-surface-alt: #f5f7fb;
	--sha-text: #132238;
	--sha-muted: #607086;
	--sha-primary: #0d9488;
	--sha-primary-dark: #0f766e;
	--sha-header-text: #ffffff;
	--sha-heading-color: #ffffff;
	--sha-danger: #c2410c;
	--sha-danger-bg: #fff1eb;
	--sha-success: #0f766e;
	--sha-success-bg: #ecfdf5;
	--sha-border: rgba(19, 34, 56, 0.12);
	--sha-shadow: 0 16px 36px rgba(15, 23, 42, 0.09);
	font-family: "Avenir Next", "Trebuchet MS", sans-serif;
	color: var(--sha-text);
	max-width: 920px;
	margin: 32px auto;
	width: 100%;
	padding: 0 12px;
	box-sizing: border-box;
}

.sha-widget,
.sha-widget * {
	box-sizing: border-box;
}

.sha-widget [hidden] {
	display: none !important;
}

.sha-card {
	background: #ffffff;
	border-radius: 28px;
	box-shadow: var(--sha-shadow);
	overflow: hidden;
	border: 1px solid var(--sha-border);
	position: relative;
}

.sha-card__header {
	background: var(--sha-bg);
	color: var(--sha-header-text);
	padding: 24px 28px;
}

.sha-card__header h2 {
	color: var(--sha-heading-color);
	font-size: clamp(1.9rem, 3vw, 2.6rem);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0;
}

.sha-kicker {
	display: inline-flex;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sha-progress {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	padding: 24px 32px 0;
}

.sha-progress__step {
	background: var(--sha-surface-alt);
	border: 1px solid transparent;
	border-radius: 18px;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sha-progress__step.is-active,
.sha-progress__step.is-complete {
	border-color: rgba(13, 148, 136, 0.2);
	transform: translateY(-2px);
}

.sha-progress__step.is-active {
	background: #e9fffc;
}

.sha-progress__step.is-complete {
	background: #effcf8;
}

.sha-progress__number {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #dbeafe;
	color: #0f172a;
	font-weight: 700;
}

.sha-progress__step.is-active .sha-progress__number,
.sha-progress__step.is-complete .sha-progress__number {
	background: var(--sha-primary);
	color: #fff;
}

.sha-progress__label {
	font-weight: 700;
}

.sha-stage {
	padding: 32px;
}

.sha-feedback {
	margin: 24px 32px 0;
	min-height: 1px;
}

.sha-feedback.is-visible {
	border-radius: 14px;
	padding: 14px 16px;
}

.sha-feedback--success {
	background: var(--sha-success-bg);
	color: var(--sha-success);
}

.sha-feedback--error {
	background: var(--sha-danger-bg);
	color: var(--sha-danger);
}

.sha-intro {
	background: #fff;
	border-radius: 24px;
	padding: 24px;
	border: 1px solid var(--sha-border);
	text-align: center;
}

.sha-intro__text {
	margin: 0 0 16px;
	color: var(--sha-muted);
}

.sha-intro__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 22px;
	color: var(--sha-muted);
}

.sha-intro__meta span,
.sha-chip,
.sha-badge {
	display: inline-flex;
	align-items: center;
	line-height: 1.2;
	white-space: nowrap;
	background: rgba(13, 148, 136, 0.08);
	border-radius: 999px;
	padding: 8px 12px;
	font-size: 0.9rem;
}

.sha-chip--outline {
	background: #fff;
	border: 1px solid rgba(13, 148, 136, 0.22);
}

.sha-badge--muted {
	background: rgba(19, 34, 56, 0.08);
}

.sha-form,
.sha-result,
.sha-test-stage {
	background: #fff;
	border: 1px solid var(--sha-border);
	border-radius: 24px;
	padding: 24px;
}

.sha-test-stage {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
}

.sha-section-title {
	margin: 0 0 18px;
	font-size: 1.2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.sha-result__links {
	margin-top: 22px;
}

.sha-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.sha-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sha-field label {
	font-weight: 700;
}

.sha-field input,
.sha-field select,
.sha-field textarea {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	border: 1px solid rgba(19, 34, 56, 0.16);
	border-radius: 14px;
	padding: 12px 14px;
	font: inherit;
	background: #fff;
}

.sha-field small {
	color: var(--sha-muted);
}

.sha-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.sha-button {
	border: 0;
	border-radius: 999px;
	padding: 13px 22px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.sha-button:hover {
	transform: translateY(-1px);
}

.sha-button:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.sha-button--primary {
	background: linear-gradient(135deg, var(--sha-primary) 0%, var(--sha-primary-dark) 100%);
	color: #fff;
	box-shadow: 0 16px 30px rgba(13, 148, 136, 0.25);
}

.sha-button--secondary {
	background: #e2e8f0;
	color: #132238;
}

.sha-button--danger {
	background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
	color: #fff;
	box-shadow: 0 16px 30px rgba(185, 28, 28, 0.22);
}

.sha-button,
.sha-option,
.sha-progress__step,
.sha-question-card,
.sha-form,
.sha-result,
.sha-test-stage,
.sha-intro {
	max-width: 100%;
}

.sha-test-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
	background: #ffffff;
	border: 1px solid var(--sha-border);
	border-radius: 20px;
	padding: 18px 20px;
}

.sha-test-topbar__summary {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.sha-test-topbar__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}

.sha-timer-box {
	min-width: 128px;
	background: var(--sha-surface-alt);
	border: 1px solid var(--sha-border);
	border-radius: 16px;
	padding: 12px 14px;
}

.sha-timer-box span {
	display: block;
	font-size: 0.8rem;
	color: var(--sha-muted);
	margin-bottom: 4px;
}

.sha-timer-box strong,
.sha-question-timebox strong {
	font-size: 1rem;
}

.sha-question-card {
	background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
	border-radius: 20px;
	border: 1px solid var(--sha-border);
	padding: 22px;
}

.sha-question-card__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.sha-question-timebox {
	min-width: 120px;
	background: var(--sha-surface-alt);
	border: 1px solid var(--sha-border);
	border-radius: 14px;
	padding: 10px 12px;
	text-align: right;
	flex-shrink: 0;
}

.sha-question-timebox span {
	display: block;
	font-size: 0.78rem;
	color: var(--sha-muted);
	margin-bottom: 2px;
}

.sha-question-card h3 {
	margin-top: 0;
	margin-bottom: 18px;
	font-size: 1.24rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.sha-options {
	display: grid;
	gap: 12px;
}

.sha-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--sha-border);
	border-radius: 16px;
	cursor: pointer;
	background: #fff;
}

.sha-option input {
	margin-top: 3px;
}

.sha-option.is-selected {
	border-color: rgba(13, 148, 136, 0.45);
	background: rgba(13, 148, 136, 0.06);
	box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.06);
}

.sha-test-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 20px;
	background: #ffffff;
	border: 1px solid var(--sha-border);
	border-radius: 18px;
	padding: 14px 18px;
}

.sha-result__hero h3 {
	margin: 10px 0 12px;
	font-size: 1.8rem;
}

.sha-result--success {
	background: linear-gradient(180deg, #f0fdf9 0%, #ffffff 100%);
}

.sha-result--fail {
	background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.sha-confirmation-card {
	margin-top: 18px;
	padding: 18px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.74);
	border: 1px solid rgba(15, 118, 110, 0.2);
}

.sha-confirmation-card h4 {
	margin-top: 0;
	margin-bottom: 8px;
}

.sha-confirmation-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
}

.sha-confirmation-meta span {
	background: #fff;
	border: 1px solid var(--sha-border);
	border-radius: 999px;
	padding: 8px 12px;
}

.sha-inline-alert {
	padding: 12px 14px;
	border-radius: 14px;
}

.sha-inline-alert--error {
	background: var(--sha-danger-bg);
	color: var(--sha-danger);
}

.sha-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.sha-modal.is-hidden {
	display: none !important;
}

.sha-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.62);
	backdrop-filter: blur(3px);
}

.sha-modal__dialog {
	position: relative;
	width: min(560px, 100%);
	background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	border-radius: 28px;
	padding: 28px;
	box-shadow: 0 30px 70px rgba(15, 23, 42, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.7);
}

.sha-modal.is-pass .sha-modal__dialog {
	background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
}

.sha-modal.is-fail .sha-modal__dialog {
	background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.sha-modal__close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(19, 34, 56, 0.08);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.sha-modal__dialog h3 {
	margin: 12px 0 16px;
	font-size: 2rem;
	line-height: 1.1;
}

.sha-modal__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 18px;
}

.sha-modal.is-score-only .sha-modal__stats {
	grid-template-columns: 1fr;
}

.sha-modal__stat {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid var(--sha-border);
	border-radius: 18px;
	padding: 14px;
}

.sha-modal__stat span {
	display: block;
	font-size: 0.82rem;
	color: var(--sha-muted);
	margin-bottom: 6px;
}

.sha-modal__summary {
	margin-bottom: 0;
	color: var(--sha-text);
}

.sha-modal__actions {
	margin-top: 22px;
}

.sha-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(255, 255, 255, 0.76);
	backdrop-filter: blur(2px);
	z-index: 30;
}

.sha-loading__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	min-width: min(260px, 100%);
	padding: 18px 20px;
	border: 1px solid var(--sha-border);
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
	text-align: center;
}

.sha-loading__spinner {
	width: 28px;
	height: 28px;
	border: 3px solid rgba(13, 148, 136, 0.16);
	border-top-color: var(--sha-primary);
	border-radius: 50%;
	animation: sha-spin 0.8s linear infinite;
}

.sha-loading__text {
	margin: 0;
	font-weight: 700;
	color: var(--sha-text);
}

@keyframes sha-spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 767px) {
	.sha-widget {
		margin: 0 auto;
		padding: 0;
	}

	.sha-card {
		border-radius: 0;
		border: 0;
		box-shadow: none;
	}

	.sha-card__header {
		padding: 12px 0 10px;
		text-align: center;
	}

	.sha-card__header h2 {
		font-size: 1.45rem;
		line-height: 1.25;
		text-align: center;
	}

	.sha-progress {
		display: flex;
		flex-direction: column;
		gap: 8px;
		padding: 12px 0 0;
	}

	.sha-progress__step {
		padding: 10px 12px;
		border: 1px solid rgba(19, 34, 56, 0.1);
		border-radius: 12px;
		background: #ffffff;
		gap: 8px;
		transform: none;
	}

	.sha-progress__step.is-active,
	.sha-progress__step.is-complete,
	.sha-chip--outline,
	.sha-badge--muted {
		transform: none;
	}

	.sha-progress__step.is-active {
		background: #f0fdfa;
		border-color: rgba(13, 148, 136, 0.3);
	}

	.sha-progress__step.is-complete {
		background: #f8fafc;
		border-color: rgba(13, 148, 136, 0.22);
	}

	.sha-progress__label {
		font-size: 0.95rem;
		line-height: 1.2;
	}

	.sha-progress__number {
		width: 28px;
		height: 28px;
		font-size: 0.86rem;
	}

	.sha-stage {
		padding: 12px 0 14px;
	}

	.sha-feedback {
		margin: 0 0 10px;
	}

	.sha-feedback.is-visible {
		padding: 10px 12px;
		border-radius: 10px;
		border: 1px solid rgba(194, 65, 12, 0.14);
	}

	.sha-form-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.sha-intro,
	.sha-form,
	.sha-result,
	.sha-question-card {
		padding: 14px;
		border: 1px solid rgba(19, 34, 56, 0.1);
		border-radius: 12px;
		background: #ffffff;
		box-shadow: none;
	}

	.sha-test-stage {
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
	}

	.sha-section-title,
	.sha-question-card h3,
	.sha-result__hero h3 {
		font-size: 1.12rem;
		line-height: 1.35;
	}

	.sha-intro__text {
		font-size: 0.9rem;
		margin-bottom: 10px;
	}

	.sha-test-footer,
	.sha-test-topbar {
		align-items: stretch;
	}

	.sha-test-topbar,
	.sha-test-topbar__summary,
	.sha-test-topbar__actions,
	.sha-question-card__header,
	.sha-confirmation-meta {
		gap: 8px;
	}

	.sha-test-topbar,
	.sha-test-topbar__summary,
	.sha-test-topbar__actions {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}

	.sha-test-topbar {
		padding: 12px;
		border-radius: 12px;
	}

	.sha-timer-box,
	.sha-question-timebox {
		min-width: 0;
		padding: 8px 10px;
		border: 1px solid rgba(19, 34, 56, 0.1);
		border-radius: 10px;
		background: #f8fafc;
	}

	.sha-question-timebox {
		text-align: left;
	}

	.sha-chip,
	.sha-badge {
		padding: 4px 9px;
		border: 1px solid rgba(13, 148, 136, 0.12);
		border-radius: 999px;
		background: #f8fafc;
		font-size: 0.82rem;
	}

	.sha-option {
		padding: 10px 12px;
		gap: 8px;
		border: 1px solid rgba(19, 34, 56, 0.08);
		border-radius: 10px;
		background: #ffffff;
	}

	.sha-option span {
		font-size: 0.93rem;
		line-height: 1.4;
	}

	.sha-option.is-selected {
		background: #ecfdf5;
		border-color: rgba(13, 148, 136, 0.35);
		box-shadow: none;
	}

	.sha-test-footer {
		margin-top: 14px;
		padding-top: 10px;
		border-top: 1px solid var(--sha-border);
	}

	.sha-modal__stats {
		grid-template-columns: 1fr;
	}

	.sha-modal {
		padding: 10px;
	}

	.sha-modal__dialog {
		padding: 18px;
		border-radius: 16px;
	}

	.sha-modal__dialog h3 {
		font-size: 1.4rem;
	}

	.sha-actions {
		width: auto;
		gap: 8px;
		margin-top: 12px;
	}

	.sha-button {
		width: auto;
		padding: 10px 14px;
		border-radius: 10px;
		justify-content: center;
		text-align: center;
		box-shadow: none;
	}

	.sha-button--danger {
		background: #dc2626;
	}

	.sha-question-card {
		padding: 14px;
		border: 1px solid rgba(19, 34, 56, 0.12);
		border-radius: 12px;
		background: #fcfdff;
	}

	.sha-question-card__header {
		padding-bottom: 8px;
		margin-bottom: 12px;
		border-bottom: 1px solid rgba(19, 34, 56, 0.08);
		align-items: flex-start;
	}

	.sha-question-card .sha-badge {
		background: #eef6ff;
	}

	.sha-test-topbar__actions .sha-timer-box,
	.sha-question-timebox {
		padding: 8px 10px;
		border-radius: 10px;
		background: #f8fafc;
	}

	.sha-question-card h3 {
		margin-bottom: 12px;
		font-size: 1.12rem;
		line-height: 1.45;
	}

	.sha-field label {
		font-size: 0.92rem;
	}

	.sha-field input,
	.sha-field select,
	.sha-field textarea {
		padding: 10px 12px;
		border: 1px solid rgba(19, 34, 56, 0.12);
		border-radius: 10px;
		background: #ffffff;
	}

	.sha-result--success,
	.sha-result--fail,
	.sha-confirmation-card {
		background: #ffffff;
		border: 1px solid rgba(19, 34, 56, 0.1);
		padding: 14px;
		border-radius: 12px;
	}

	.sha-test-footer {
		padding: 12px;
		border-radius: 12px;
	}

	.sha-loading {
		padding: 12px;
	}

	.sha-loading__box {
		width: 100%;
		padding: 16px 14px;
		border-radius: 12px;
	}
}
