/* Transcript Q&A — visitor styles */

.tqa-app,
.tqa-standalone {
	--tqa-primary: #0A1F44;
	--tqa-accent: #D62839;
	--tqa-text: #0A1F44;
	--tqa-body: #3B4660;
	--tqa-muted: #667085;
	--tqa-border: #E3E7EE;
	--tqa-soft: #F5F8FC;
	--tqa-bg: #FFFFFF;
	--tqa-radius: 18px;
	--tqa-font: "TQA Roboto", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	--tqa-shadow: 0 1px 2px rgba(10, 31, 68, 0.04), 0 12px 32px -18px rgba(10, 31, 68, 0.22);
}

.tqa-app {
	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	margin: 40px auto;
	color: var(--tqa-body);
	font-family: var(--tqa-font);
	font-size: 16px;
	line-height: 1.6;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.tqa-app *,
.tqa-app *::before,
.tqa-app *::after {
	box-sizing: border-box;
}

.tqa-app p {
	margin: 0 0 12px;
}

.tqa-app a {
	color: var(--tqa-primary);
}

.tqa-app.is-busy {
	cursor: progress;
}

/* Cards */
.tqa-card {
	position: relative;
	margin: 0 0 16px;
	padding: 32px;
	border: 1px solid var(--tqa-border);
	border-radius: var(--tqa-radius);
	background: var(--tqa-bg);
	box-shadow: var(--tqa-shadow);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tqa-head + .tqa-banner,
.tqa-head + .tqa-alert {
	margin-top: 20px;
}

.tqa-form > .tqa-card:first-child {
	border-top: 6px solid var(--tqa-primary);
}

.tqa-eyebrow {
	margin: 0 0 8px !important;
	color: var(--tqa-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.tqa-app .tqa-title {
	margin: 0 0 12px;
	padding: 0;
	color: var(--tqa-text);
	font-family: var(--tqa-font);
	font-size: clamp(26px, 4vw, 36px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-transform: none;
}

.tqa-title:focus {
	outline: none;
}

.tqa-intro {
	color: var(--tqa-body);
	font-size: 17px;
}

.tqa-intro > :last-child {
	margin-bottom: 0;
}

.tqa-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.tqa-chip {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--tqa-soft);
	color: var(--tqa-primary);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none !important;
}

.tqa-chip--link:hover {
	background: var(--tqa-primary);
	color: #fff !important;
}

.tqa-muted {
	color: var(--tqa-muted);
}

.tqa-small {
	font-size: 13px;
}

/* Compact (collapsed) widget */
.tqa-card--compact {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
	border-left: 6px solid var(--tqa-accent);
}

.tqa-card--compact .tqa-head {
	flex: 1 1 320px;
}

.tqa-card--compact .tqa-title {
	font-size: 24px;
}

/* Loading */
.tqa-card--loading {
	min-height: 160px;
}

.tqa-skeleton {
	height: 14px;
	margin-bottom: 14px;
	border-radius: 8px;
	background: linear-gradient(90deg, #EEF2F7 0%, #F7F9FC 50%, #EEF2F7 100%);
	background-size: 200% 100%;
	animation: tqa-shimmer 1.4s ease-in-out infinite;
}

.tqa-skeleton--sm {
	width: 30%;
}

.tqa-skeleton--lg {
	width: 75%;
	height: 26px;
}

@keyframes tqa-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Progress */
.tqa-progress {
	margin: 0 4px 16px;
}

.tqa-progress__label {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
	color: var(--tqa-primary);
	font-size: 14px;
	font-weight: 500;
}

.tqa-progress__track {
	overflow: hidden;
	height: 6px;
	border-radius: 999px;
	background: #E7ECF3;
}

.tqa-progress__bar {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--tqa-primary), var(--tqa-accent));
	transition: width 0.35s ease;
}

/* Questions */
.tqa-q {
	min-width: 0;
	margin: 0 0 16px;
	padding: 28px 32px;
	animation: tqa-in 0.25s ease;
}

.tqa-q.has-error,
.tqa-field.has-error .tqa-input {
	border-color: var(--tqa-accent);
}

.tqa-q.has-error {
	box-shadow: 0 0 0 1px var(--tqa-accent), var(--tqa-shadow);
}

@keyframes tqa-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

.tqa-q__legend {
	display: flex;
	gap: 14px;
	float: left;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	color: var(--tqa-text);
	font-size: 19px;
	font-weight: 500;
	line-height: 1.45;
}

.tqa-q__legend:focus {
	outline: none;
}

.tqa-q__legend + * {
	clear: both;
}

.tqa-q__num {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-top: -1px;
	border-radius: 50%;
	background: var(--tqa-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

.tqa-q__prompt > :last-child {
	margin-bottom: 0;
}

.tqa-q__prompt p {
	margin: 0 0 8px;
}

.tqa-q__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px 44px;
}

.tqa-tag {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--tqa-soft);
	color: var(--tqa-muted);
	font-size: 12px;
	font-weight: 500;
}

.tqa-tag--req {
	background: rgba(214, 40, 57, 0.08);
	color: var(--tqa-accent);
}

.tqa-tag--ref {
	background: rgba(10, 31, 68, 0.06);
	color: var(--tqa-primary);
}

.tqa-excerpt {
	margin: 0 0 16px 44px;
	color: var(--tqa-body);
	font-size: 15px;
}

.tqa-excerpt summary {
	color: var(--tqa-primary);
	font-weight: 500;
	cursor: pointer;
}

.tqa-excerpt blockquote {
	margin: 10px 0 0;
	padding: 12px 16px;
	border-left: 3px solid var(--tqa-accent);
	border-radius: 0 10px 10px 0;
	background: var(--tqa-soft);
	font-style: italic;
}

.tqa-q__body {
	margin-left: 44px;
}

.tqa-q__error {
	margin: 12px 0 0 44px !important;
	color: var(--tqa-accent);
	font-size: 14px;
	font-weight: 500;
}

.tqa-details .tqa-q__error {
	margin-left: 0 !important;
}

/* Choices */
.tqa-choices {
	display: grid;
	gap: 10px;
}

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

.tqa-choice {
	position: relative;
	display: flex;
	gap: 14px;
	align-items: center;
	min-height: 54px;
	margin: 0;
	padding: 14px 18px;
	border: 1.5px solid var(--tqa-border);
	border-radius: 14px;
	background: #fff;
	color: var(--tqa-text);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.tqa-choice:hover {
	border-color: #B9C3D3;
	background: #FBFCFE;
}

.tqa-choice input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.tqa-choice__mark {
	position: relative;
	flex: none;
	width: 22px;
	height: 22px;
	border: 2px solid #A8B3C4;
	background: #fff;
	transition: all 0.15s ease;
}

.tqa-choice__mark.is-dot {
	border-radius: 50%;
}

.tqa-choice__mark.is-box {
	border-radius: 6px;
}

.tqa-choice.is-checked {
	border-color: var(--tqa-primary);
	background: var(--tqa-soft);
	box-shadow: 0 0 0 1px var(--tqa-primary);
}

.tqa-choice.is-checked .tqa-choice__mark {
	border-color: var(--tqa-primary);
	background: var(--tqa-primary);
}

.tqa-choice.is-checked .tqa-choice__mark.is-dot::after {
	content: "";
	position: absolute;
	top: 5px;
	left: 5px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
}

.tqa-choice.is-checked .tqa-choice__mark.is-box::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 6px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.tqa-choice:focus-within {
	outline: 3px solid rgba(10, 31, 68, 0.25);
	outline-offset: 2px;
}

/* Text inputs */
.tqa-app .tqa-input {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 14px 16px;
	border: 1.5px solid var(--tqa-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: none;
	color: var(--tqa-text);
	font-family: var(--tqa-font);
	font-size: 16px;
	line-height: 1.5;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tqa-app .tqa-input--area {
	min-height: 120px;
	resize: vertical;
}

.tqa-app .tqa-input:focus {
	border-color: var(--tqa-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.15);
}

.tqa-details .tqa-q__legend {
	margin-bottom: 18px;
}

.tqa-field {
	margin: 0 0 16px;
}

.tqa-field label {
	display: block;
	margin: 0 0 6px;
	color: var(--tqa-text);
	font-size: 15px;
	font-weight: 500;
}

.tqa-privacy {
	margin: 4px 0 0 !important;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--tqa-soft);
	color: var(--tqa-muted);
	font-size: 13px;
	line-height: 1.55;
}

.tqa-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Buttons */
.tqa-app .tqa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 50px;
	margin: 0;
	padding: 0 26px;
	border: 2px solid transparent;
	border-radius: 999px;
	box-shadow: none;
	font-family: var(--tqa-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.tqa-app .tqa-btn:hover {
	transform: translateY(-1px);
}

.tqa-app .tqa-btn:focus-visible {
	outline: 3px solid rgba(10, 31, 68, 0.35);
	outline-offset: 2px;
}

.tqa-app .tqa-btn[disabled] {
	opacity: 0.6;
	cursor: wait;
	transform: none;
}

.tqa-app .tqa-btn--primary {
	background: var(--tqa-primary);
	color: #fff;
}

.tqa-app .tqa-btn--primary:hover {
	box-shadow: 0 12px 24px -12px rgba(10, 31, 68, 0.6);
}

.tqa-app .tqa-btn--accent {
	background: var(--tqa-accent);
	color: #fff;
	box-shadow: 0 14px 28px -14px rgba(214, 40, 57, 0.7);
}

.tqa-app .tqa-btn--ghost {
	border-color: var(--tqa-border);
	background: #fff;
	color: var(--tqa-primary);
}

.tqa-app .tqa-btn--ghost:hover {
	border-color: var(--tqa-primary);
}

.tqa-app .tqa-btn--sm {
	min-height: 38px;
	padding: 0 16px;
	font-size: 14px;
}

.tqa-app .tqa-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--tqa-primary);
	font: inherit;
	font-weight: 500;
	text-decoration: underline;
	cursor: pointer;
}

.tqa-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin: 8px 0 0;
}

.tqa-nav--result {
	justify-content: center;
	margin-top: 24px;
}

/* Notices */
.tqa-banner,
.tqa-alert {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 4px;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.5;
}

.tqa-banner {
	background: var(--tqa-soft);
	color: var(--tqa-primary);
}

.tqa-alert {
	background: rgba(214, 40, 57, 0.08);
	color: #9B1C2A;
	font-weight: 500;
}

.tqa-admin-notice {
	margin: 20px 0;
	padding: 14px 18px;
	border: 1px dashed #D62839;
	border-radius: 10px;
	background: #FFF6F7;
	color: #5B1620;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

/* Result */
.tqa-result {
	padding: 44px 32px;
	text-align: center;
	border-top: 6px solid var(--tqa-primary);
}

.tqa-result__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--tqa-soft);
	color: var(--tqa-primary);
	font-size: 26px;
	font-weight: 700;
}

.tqa-score {
	display: inline-flex;
	gap: 24px;
	align-items: center;
	margin: 20px auto 8px;
	padding: 20px 28px;
	border-radius: 18px;
	background: var(--tqa-soft);
	text-align: left;
}

.tqa-score__ring {
	--tqa-pct: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background:
		radial-gradient(closest-side, var(--tqa-soft) 78%, transparent 79%),
		conic-gradient(var(--tqa-accent) calc(var(--tqa-pct) * 1%), #DDE3EC 0);
}

.tqa-score__value {
	color: var(--tqa-primary);
	font-size: 24px;
	font-weight: 700;
}

.tqa-score__meta p {
	margin: 0 0 4px !important;
}

.tqa-score__pts {
	color: var(--tqa-primary);
	font-size: 20px;
	font-weight: 700;
}

.tqa-badge {
	display: inline-block;
	margin: 4px 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: #EEF2F7;
	color: var(--tqa-primary);
	font-size: 13px;
	font-weight: 700;
}

.tqa-badge.is-pass {
	background: #E7F6EE;
	color: #146C43;
}

.tqa-badge.is-fail {
	background: rgba(214, 40, 57, 0.1);
	color: #A3192A;
}

.tqa-result .tqa-banner {
	justify-content: center;
	max-width: 520px;
	margin: 16px auto 0;
	text-align: center;
}

.tqa-review {
	padding: 24px 28px;
}

.tqa-review.is-wrong {
	border-left: 4px solid var(--tqa-accent);
}

.tqa-review__head {
	display: flex;
	gap: 12px;
	margin-bottom: 10px;
	color: var(--tqa-text);
	font-weight: 500;
}

.tqa-review__answer,
.tqa-review__correct {
	margin: 0 0 6px 42px !important;
}

.tqa-review .tqa-badge {
	margin-left: 42px;
}

.tqa-review__explain {
	margin: 12px 0 0 42px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--tqa-soft);
	font-size: 15px;
}

.tqa-review__explain > :last-child {
	margin-bottom: 0;
}

/* Standalone page */
.tqa-clean {
	margin: 0;
	background: #F5F8FC;
}

.tqa-standalone {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	font-family: var(--tqa-font);
}

.tqa-standalone__bar {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	padding: 18px 28px;
	border-bottom: 1px solid var(--tqa-border);
	background: #fff;
}

.tqa-standalone__brand {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	color: var(--tqa-primary);
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
}

.tqa-standalone__brand img {
	border-radius: 8px;
}

.tqa-standalone__back {
	color: var(--tqa-accent);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

.tqa-standalone__main {
	flex: 1;
	padding: 24px 20px 48px;
}

.tqa-standalone__footer {
	padding: 20px;
	color: var(--tqa-muted);
	font-size: 13px;
	text-align: center;
}

.tqa-standalone__footer p {
	margin: 0;
}

/* Phones */
@media (max-width: 640px) {
	.tqa-app {
		margin: 24px auto;
	}

	.tqa-card,
	.tqa-q {
		padding: 22px 18px;
		border-radius: 16px;
	}

	.tqa-q__legend {
		gap: 10px;
		font-size: 17px;
	}

	.tqa-q__num {
		width: 26px;
		height: 26px;
		font-size: 13px;
	}

	.tqa-q__tags,
	.tqa-excerpt,
	.tqa-q__body,
	.tqa-q__error {
		margin-left: 0 !important;
	}

	.tqa-choices--inline {
		grid-template-columns: 1fr;
	}

	.tqa-nav {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.tqa-nav > span:empty {
		display: none;
	}

	.tqa-app .tqa-btn {
		width: 100%;
	}

	.tqa-card--compact .tqa-btn {
		width: 100%;
	}

	.tqa-score {
		flex-direction: column;
		gap: 12px;
		text-align: center;
	}

	.tqa-review__answer,
	.tqa-review__correct,
	.tqa-review__explain,
	.tqa-review .tqa-badge {
		margin-left: 0 !important;
	}

	.tqa-standalone__bar {
		padding: 14px 18px;
	}

	.tqa-standalone__main {
		padding: 12px 12px 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tqa-app *,
	.tqa-app *::before,
	.tqa-app *::after {
		animation: none !important;
		transition: none !important;
	}
}
