/* Colours and shapes in one place, so the page can be matched to the website. */
:root {
	--tc-bg: #f6f7f9;
	--tc-surface: #ffffff;
	--tc-text: #1d2330;
	--tc-muted: #5d6577;
	--tc-border: #dfe3ea;
	--tc-accent: #1f5eff;
	--tc-accent-text: #ffffff;
	--tc-accent-soft: #e8efff;
	--tc-good: #1e8a4c;
	--tc-good-soft: #e5f5ec;
	--tc-warn: #b26a00;
	--tc-warn-soft: #fff3df;
	--tc-bad: #c4312b;
	--tc-bad-soft: #fde9e8;
	--tc-radius: 12px;
	--tc-speed: 160ms;
	color-scheme: light;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	background: var(--tc-bg);
	color: var(--tc-text);
	font: 16px / 1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.tc {
	max-width: 860px;
	margin: 0 auto;
	padding: 24px 16px 32px;
}

h1 {
	margin: 0 0 6px;
	font-size: 1.75rem;
	line-height: 1.2;
}

h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	font-size: 1.15rem;
}

h3 {
	margin: 18px 0 6px;
	font-size: 1rem;
}

.tc-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 20px;
}

.tc-lead {
	margin: 0;
	color: var(--tc-muted);
	max-width: 62ch;
}

.tc-lang {
	display: inline-flex;
	padding: 3px;
	border-radius: 999px;
	background: var(--tc-surface);
	border: 1px solid var(--tc-border);
	flex-shrink: 0;
}

.tc-lang[hidden] {
	display: none;
}

.tc-lang button {
	border: 0;
	background: transparent;
	padding: 4px 12px;
	border-radius: 999px;
	font: inherit;
	font-size: 0.85rem;
	color: var(--tc-muted);
	cursor: pointer;
	transition: background var(--tc-speed), color var(--tc-speed);
}

.tc-lang button[aria-pressed="true"] {
	background: var(--tc-accent);
	color: var(--tc-accent-text);
}

.tc-card {
	background: var(--tc-surface);
	border: 1px solid var(--tc-border);
	border-radius: var(--tc-radius);
	padding: 20px;
	margin-bottom: 16px;
	animation: tc-appear 220ms ease-out;
}

@keyframes tc-appear {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

.tc-step {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--tc-accent-soft);
	color: var(--tc-accent);
	font-size: 0.85rem;
	font-weight: 700;
}

/* ---------- form ---------- */

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

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

.tc-wide {
	grid-column: 1 / -1;
}

label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 0.9rem;
	font-weight: 500;
}

.tc-block {
	margin-top: 14px;
}

abbr {
	color: var(--tc-bad);
	text-decoration: none;
}

input,
textarea {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--tc-border);
	border-radius: 8px;
	background: var(--tc-surface);
	color: inherit;
	font: inherit;
	font-weight: 400;
	transition: border-color var(--tc-speed), box-shadow var(--tc-speed);
}

textarea {
	resize: vertical;
}

input:focus,
textarea:focus {
	outline: none;
	border-color: var(--tc-accent);
	box-shadow: 0 0 0 3px var(--tc-accent-soft);
}

.tc-fieldset {
	border: 0;
	padding: 0;
	margin: 18px 0 0;
}

legend {
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 8px;
}

.tc-hint {
	color: var(--tc-muted);
	font-size: 0.85rem;
	margin: 4px 0 8px;
}

.tc-hint a {
	color: var(--tc-accent);
	font-weight: 600;
}

.tc-reference {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1.4fr);
	gap: 10px;
	margin-bottom: 8px;
}

.tc-reference + .tc-reference span {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.tc-drop {
	border: 2px dashed var(--tc-border);
	border-radius: var(--tc-radius);
	padding: 24px 16px;
	text-align: center;
	transition: border-color var(--tc-speed), background var(--tc-speed);
}

.tc-drop p {
	margin: 0 0 12px;
}

.tc-drop.tc-dragging {
	border-color: var(--tc-accent);
	background: var(--tc-accent-soft);
}

.tc-drop-buttons {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.tc-files {
	margin-top: 14px;
	font-size: 0.9rem;
}

.tc-files p {
	margin: 0 0 6px;
	font-weight: 600;
}

.tc-files p.tc-over {
	color: var(--tc-bad);
}

.tc-files ul {
	margin: 0 0 6px;
	padding-left: 18px;
	color: var(--tc-muted);
	word-break: break-all;
}

.tc-consent {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	font-size: 0.9rem;
}

.tc-consent input {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	flex-shrink: 0;
}

.tc-error {
	color: var(--tc-bad);
	margin: 12px 0 0;
}

/* ---------- buttons ---------- */

.tc-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border-radius: 8px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--tc-speed), transform var(--tc-speed), box-shadow
		var(--tc-speed);
}

.tc-button:active {
	transform: scale(0.98);
}

.tc-primary {
	background: var(--tc-accent);
	color: var(--tc-accent-text);
}

.tc-primary:hover {
	box-shadow: 0 4px 14px rgb(31 94 255 / 25%);
}

.tc-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	box-shadow: none;
}

#submit {
	margin-top: 16px;
	width: 100%;
	padding: 13px 18px;
	font-size: 1.05rem;
}

.tc-secondary {
	background: var(--tc-surface);
	border-color: var(--tc-border);
	color: var(--tc-text);
}

.tc-secondary:hover {
	border-color: var(--tc-accent);
}

.tc-link {
	border: 0;
	background: none;
	padding: 0;
	color: var(--tc-accent);
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}

.tc-link:hover {
	text-decoration: underline;
}

/* ---------- progress ---------- */

.tc-progress {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
}

.tc-progress li {
	position: relative;
	padding: 8px 0 8px 32px;
	color: var(--tc-muted);
	transition: color var(--tc-speed);
}

.tc-progress li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 12px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid var(--tc-border);
}

.tc-progress .tc-progress-done {
	color: var(--tc-text);
}

.tc-progress .tc-progress-done::before {
	border-color: var(--tc-good);
	background: var(--tc-good);
}

.tc-progress .tc-progress-active {
	color: var(--tc-text);
	font-weight: 600;
}

.tc-progress .tc-progress-active::before {
	border-color: var(--tc-accent);
	border-top-color: transparent;
	animation: tc-spin 0.9s linear infinite;
}

@keyframes tc-spin {
	to {
		transform: rotate(360deg);
	}
}

.tc-notice,
.tc-error-card {
	border-left: 4px solid var(--tc-warn);
}

.tc-notice {
	background: var(--tc-warn-soft);
	padding: 12px 16px;
	border-radius: 8px;
	margin: 0 0 16px;
}

/* ---------- result ---------- */

.tc-actions {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 12px;
}

.tc-verdict {
	border-left: 6px solid var(--tc-muted);
}

.tc-verdict-bid {
	border-left-color: var(--tc-good);
}

.tc-verdict-bid_with_conditions {
	border-left-color: var(--tc-warn);
}

.tc-verdict-do_not_bid {
	border-left-color: var(--tc-bad);
}

.tc-verdict-title {
	margin: 0;
	color: var(--tc-muted);
}

.tc-verdict-label {
	margin: 4px 0;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.25;
}

.tc-verdict-bid .tc-verdict-label {
	color: var(--tc-good);
}

.tc-verdict-bid_with_conditions .tc-verdict-label {
	color: var(--tc-warn);
}

.tc-verdict-do_not_bid .tc-verdict-label {
	color: var(--tc-bad);
}

.tc-verdict-score {
	margin: 0 0 6px;
	font-weight: 600;
}

.tc-verdict-warning {
	color: var(--tc-bad);
	font-weight: 600;
}

.tc-meter {
	height: 8px;
	border-radius: 999px;
	background: var(--tc-border);
	overflow: hidden;
	max-width: 320px;
}

.tc-meter span {
	display: block;
	height: 100%;
	background: var(--tc-accent);
	border-radius: inherit;
	animation: tc-grow 700ms ease-out;
	transform-origin: left;
}

@keyframes tc-grow {
	from {
		transform: scaleX(0);
	}
}

.tc-result ul,
.tc-result ol {
	margin: 0;
	padding-left: 20px;
}

.tc-result li + li {
	margin-top: 6px;
}

.tc-facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 8px 18px;
	margin: 0;
}

.tc-facts dt {
	color: var(--tc-muted);
}

.tc-facts dd {
	margin: 0;
}

.tc-result .tc-requirements,
.tc-result .tc-checklist {
	list-style: none;
	padding: 0;
}

.tc-req {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 12px;
	padding: 10px 0;
	border-top: 1px solid var(--tc-border);
}

.tc-req p {
	margin: 0 0 4px;
}

.tc-req-title {
	font-weight: 600;
}

.tc-badge {
	align-self: start;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	text-align: center;
}

.tc-req-met .tc-badge {
	background: var(--tc-good-soft);
	color: var(--tc-good);
}

.tc-req-unclear .tc-badge {
	background: var(--tc-warn-soft);
	color: var(--tc-warn);
}

.tc-req-not_met .tc-badge {
	background: var(--tc-bad-soft);
	color: var(--tc-bad);
}

.tc-tag {
	margin-left: 8px;
	padding: 1px 8px;
	border-radius: 4px;
	background: var(--tc-bg);
	color: var(--tc-muted);
	font-size: 0.75rem;
	font-weight: 500;
}

.tc-checklist label {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
}

.tc-checklist input {
	width: 16px;
	height: 16px;
	margin-top: 4px;
	flex-shrink: 0;
}

.tc-small {
	font-size: 0.85rem;
	word-break: break-word;
}

.tc-cta {
	background: var(--tc-accent-soft);
	border-color: transparent;
}

.tc-disclaimer {
	text-align: center;
}

/* ---------- small screens ---------- */

@media (max-width: 640px) {
	.tc-header {
		flex-direction: column-reverse;
	}

	.tc-lang {
		align-self: flex-end;
	}

	.tc-grid,
	.tc-grid-3,
	.tc-reference {
		grid-template-columns: 1fr;
	}

	.tc-reference {
		padding-bottom: 10px;
		border-bottom: 1px solid var(--tc-border);
	}

	.tc-reference + .tc-reference span {
		position: static;
		width: auto;
		height: auto;
		clip: auto;
	}

	.tc-req {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.tc-badge {
		justify-self: start;
	}

	.tc-facts {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	.tc-facts dd {
		margin-bottom: 8px;
	}
}

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

/* ---------- PDF (print) ---------- */

@media print {
	html,
	body {
		background: #fff;
		font-size: 11pt;
	}

	.tc-header .tc-lang,
	.tc-lead,
	.tc-no-print,
	#check-form,
	#progress,
	#error,
	#unavailable {
		display: none !important;
	}

	.tc {
		max-width: none;
		padding: 0;
	}

	.tc-card {
		border: 1px solid #ccc;
		break-inside: avoid;
		animation: none;
	}

	.tc-meter span {
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}
}
