.mieli-gfs {
	max-width: 720px;
	margin: 0 auto;
	font-family: Merriweather, Poppins, Arial, sans-serif;
	line-height: 1.6;
}

/* Heading font for titles, legends, labels, cards, buttons */
.mieli-gfs-title,
.mieli-gfs-legend,
.mieli-gfs-label,
.mieli-gfs-sub-label,
.mieli-gfs-card__text,
.mieli-gfs-btn,
.mieli-gfs-progress__label,
.mieli-gfs-progress__num {
	font-family: Poppins, Arial, sans-serif;
}

/* ── Progress bar ── */
.mieli-gfs-progress {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 2.5rem;
	padding: 0;
}

.mieli-gfs-progress__step {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.mieli-gfs-progress__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: #555555;
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	flex-shrink: 0;
}

.mieli-gfs-progress__step--active .mieli-gfs-progress__num {
	background: #03d133;
	color: #2c3436;
}

.mieli-gfs-progress__step--done .mieli-gfs-progress__num {
	background: #03d133;
	color: #fff;
}

.mieli-gfs-progress__label {
	font-size: 0.9rem;
	color: #747474;
}

.mieli-gfs-progress__step--active .mieli-gfs-progress__label {
	color: #2c3436;
	font-weight: 700;
}

.mieli-gfs-progress__step--done .mieli-gfs-progress__label {
	color: #2c3436;
}

/* ── Title ── */
.mieli-gfs-title {
	font-size: 1.75rem;
	font-weight: 800;
	margin-bottom: 0.75rem;
	color: #1a1a1a;
}

/* ── Intro text ── */
.mieli-gfs-intro {
	color: #555;
	margin-bottom: 1.25rem;
	line-height: 1.7;
}

.mieli-gfs-intro p {
	margin: 0 0 0.75rem;
}

.mieli-gfs-intro p:last-child {
	margin-bottom: 0;
}

/* ── Fieldset ── */
.mieli-gfs-fieldset {
	border: none;
	padding: 0;
	margin: 0 0 1.75rem;
}

.mieli-gfs-fieldset--sub {
	margin-left: 0;
	margin-top: 0.5rem;
	padding: 0;
	border-left: none;
	background: none;
	border-radius: 0;
	border: none;
}

.mieli-gfs-legend {
	font-weight: 700;
	font-size: 1.15rem;
	margin-bottom: 0.75rem;
	display: block;
	width: 100%;
	color: #1a1a1a;
}

.mieli-gfs-required {
	color: #c62828;
	font-weight: 700;
	font-style: normal;
	font-size: 1.1em;
}

/* ── Card grid (main types, PE toggle, sub-types) ── */
.mieli-gfs-card-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.mieli-gfs-card-grid--2 {
	grid-template-columns: 1fr 1fr;
}

.mieli-gfs-card {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1.25rem 1rem;
	border: 2.5px solid #43a047;
	border-radius: 20px;
	cursor: pointer;
	background: #fff;
	min-height: 80px;
}

.mieli-gfs-card--with-icon {
	position: relative;
	justify-content: flex-start;
	text-align: left;
	margin-left: 24px;
	/* 24px icon inside + gap to text */
	padding: 1rem 1.25rem 1rem calc(24px + 1rem);
	min-height: 0;
}

.mieli-gfs-card--with-icon .mieli-gfs-card__text {
	text-align: left;
}

.mieli-gfs-card input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Icon circle */
.mieli-gfs-card__icon {
	position: absolute;
	left: -24px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #2d3436;
	overflow: hidden;
}

.mieli-gfs-card__icon img {
	width: 26px;
	height: 26px;
	object-fit: contain;
}

.mieli-gfs-card--active .mieli-gfs-card__icon {
	background: #1b5e20;
}

.mieli-gfs-card__text {
	font-size: 0.95rem;
	font-weight: 600;
	color: #2e2e2e;
	line-height: 1.4;
}

.mieli-gfs-card:hover {
	background: #e8f5e9;
	border-color: #2e7d32;
}

.mieli-gfs-card:hover .mieli-gfs-card__text {
	text-decoration: underline;
}

.mieli-gfs-card:focus-within {
	outline: 3px solid #81c784;
	outline-offset: 2px;
}

.mieli-gfs-card--active {
	background: #e8f5e9;
	border-color: #2e7d32;
	box-shadow: 0 2px 12px rgba(46, 125, 50, 0.2);
}

.mieli-gfs-card--active .mieli-gfs-card__text {
	color: #1b5e20;
}

.mieli-gfs-card--compact {
	min-height: 60px;
	padding: 1rem;
}

/* ── Radio buttons (sub-types, associations) ── */
.mieli-gfs-radio {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	padding: 0.6rem 0.75rem;
	cursor: pointer;
	line-height: 1.5;
	border-radius: 10px;
	transition: background 0.15s;
	margin-bottom: 0.25rem;
}

.mieli-gfs-radio:hover {
	background: #f0faf0;
}

.mieli-gfs-radio input[type="radio"] {
	margin-top: 0.25rem;
	flex-shrink: 0;
	accent-color: #2e7d32;
	width: 1.1em;
	height: 1.1em;
}

.mieli-gfs-radio span {
	font-size: 0.95rem;
	color: #333;
}

/* ── Description box ── */
.mieli-gfs-description {
	margin: 0.75rem 0 1.75rem;
	padding: 1.25rem 1.5rem;
	background: #f0faf0;
	border: 2px solid #c8e6c9;
	border-radius: 0;
	color: #37474f;
	line-height: 1.7;
}

.mieli-gfs-description p {
	margin: 0;
}

.mieli-gfs-description ul,
.mieli-gfs-option-desc ul {
	margin: 0.5rem 0 0.25rem 1.25rem;
	padding: 0;
	list-style: disc;
}

.mieli-gfs-description li,
.mieli-gfs-option-desc li {
	margin-bottom: 0.25rem;
}

/* ── Divider between selection sections ── */
.mieli-gfs-divider {
	border: none;
	border-top: 2px solid #c8e6c9;
	margin: 1.5rem 0;
}

.mieli-gfs-option-desc {
	margin: 0 0 0.75rem 2rem;
	font-size: 0.875rem;
	color: #666;
	line-height: 1.6;
}

/* ── Select / dropdown ── */
.mieli-gfs-field {
	margin-bottom: 1.75rem;
}

.mieli-gfs-label {
	display: block;
	font-weight: 700;
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
	color: #1a1a1a;
}

.mieli-gfs-select {
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	border: 2px solid #999;
	border-radius: 0;
	background: #fff;
	color: #333;
	appearance: auto;
}

.mieli-gfs-select:focus {
	border-color: #43a047;
	box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.2);
	outline: none;
}

.mieli-gfs-sub-label {
	font-size: 0.9rem;
	color: #555;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

/* ── Action buttons ── */
.mieli-gfs-actions {
	margin-top: 2rem;
	display: flex;
	gap: 0.75rem;
}

.mieli-gfs-actions--top {
	margin-top: 0;
	margin-bottom: 1.25rem;
}

.mieli-gfs-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.75rem 2rem;
	font-size: 1rem;
	font-weight: 700;
	border: 2px solid #03d133;
	border-radius: 0;
	cursor: pointer;
	background: #03d133;
	color: #000;
}

.mieli-gfs-btn:hover {
	background: #fff;
	color: #000;
	border-color: #03d133;
}

.mieli-gfs-btn:focus-visible {
	outline: 3px solid #81c784;
	outline-offset: 2px;
}

.mieli-gfs-btn--next {
	background: #03d133;
	color: #000;
	border-color: #03d133;
}

.mieli-gfs-btn--next:hover {
	background: #fff;
	color: #000;
	border-color: #03d133;
}

.mieli-gfs-btn--prev {
	background: #03d133;
	color: #000;
	border-color: #03d133;
}

.mieli-gfs-btn--prev:hover {
	background: #fff;
	color: #000;
	border-color: #03d133;
}

/* ── Resend (after submission) ── */
.mieli-gfs-resend {
	margin-top: 1.5rem;
	padding: 1.25rem;
	background: #f0faf0;
	border: 2px solid #c8e6c9;
	border-radius: 10px;
	text-align: center;
}

.mieli-gfs-resend__help {
	margin: 0 0 0.75rem;
	color: #2e3a2e;
}

.mieli-gfs-resend__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

.mieli-gfs-btn--resend {
	background: #fff;
	color: #000;
	border-color: #03d133;
}

.mieli-gfs-btn--resend:hover {
	background: #03d133;
	color: #000;
	border-color: #03d133;
}

.mieli-gfs-btn--continue {
	background: #03d133;
	color: #000;
	border-color: #03d133;
	text-decoration: none;
}

.mieli-gfs-btn--continue:hover {
	background: #fff;
	color: #000;
	border-color: #03d133;
}

/* ── Loading ── */
.mieli-gfs-loading {
	text-align: center;
	padding: 2.5rem;
	color: #888;
	font-style: italic;
}

/* ── Error ── */
.mieli-gfs-error {
	color: #c62828;
	padding: 1rem 1.25rem;
	background: #ffebee;
	border: 2px solid #ef9a9a;
	border-radius: 10px;
}

/* ── Responsive: stack cards on small screens ── */
@media (max-width: 520px) {
	.mieli-gfs {
		padding: 0 0.75rem;
	}

	.mieli-gfs-progress__label {
		display: none;
	}

	.mieli-gfs-progress {
		justify-content: center;
	}

	.mieli-gfs-card-grid,
	.mieli-gfs-card-grid--2 {
		grid-template-columns: 1fr;
	}

	.mieli-gfs-card {
		min-height: 60px;
		padding: 1rem;
	}

	.mieli-gfs-card--with-icon {
		margin-left: 20px;
		padding: 0.75rem 1rem 0.75rem calc(20px + 0.75rem);
	}

	.mieli-gfs-card__icon {
		width: 40px;
		height: 40px;
		left: -20px;
	}

	.mieli-gfs-card__icon img {
		width: 22px;
		height: 22px;
	}

	.mieli-gfs-title {
		font-size: 1.4rem;
	}
}

/* ── Debug panel (unchanged) ── */
.mieli-gfs-debug {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	width: 360px;
	max-height: 50vh;
	background: #fffbe6;
	border: 2px solid #e6a800;
	border-radius: 6px;
	font-size: 0.8rem;
	z-index: 99999;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.mieli-gfs-debug__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.4rem 0.75rem;
	background: #e6a800;
	cursor: default;
	flex-shrink: 0;
}

.mieli-gfs-debug__title {
	font-weight: 700;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
}

.mieli-gfs-debug__toggle {
	background: none;
	border: none;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	line-height: 1;
	padding: 0 0.25rem;
}

.mieli-gfs-debug__body {
	padding: 0.5rem 0.75rem;
	overflow-y: auto;
}

.mieli-gfs-debug--collapsed .mieli-gfs-debug__body {
	display: none;
}

.mieli-gfs-debug__table {
	width: 100%;
	border-collapse: collapse;
}

.mieli-gfs-debug__table td {
	padding: 0.2rem 0.4rem;
	border-bottom: 1px solid #f0e6b8;
	vertical-align: top;
}

.mieli-gfs-debug__table td:first-child {
	white-space: nowrap;
	color: #666;
	width: 110px;
}

.mieli-gfs-debug__table code {
	font-size: 0.65rem;
	word-break: break-all;
}