.section {
	display: grid;
	gap: 1.15rem;

	@include respond(desktop-sm) {
		gap: 1.4rem;
	}
}

.setupGrid {
	display: grid;
	gap: 1rem;

	@include respond(desktop-md) {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
		gap: 1.15rem;
	}
}

.heroCard {
	display: grid;
	gap: 1.15rem;
	padding: 1.2rem;
	border-radius: var(--radius-3xl);
	background: linear-gradient(135deg, color-mix(in srgb, var(--surface-panel) 88%, var(--surface-info) 12%), var(--surface-panel-strong));
	border: 1px solid var(--border-strong);
	box-shadow: var(--shadow-soft);

	@include respond(desktop-md) {
		grid-template-columns: minmax(0, 1.18fr) minmax(20rem, 0.98fr);
		align-items: start;
		padding: 1.45rem;
	}
}

.setupCard,
.setupSummaryCard {
	display: grid;
	gap: 1rem;
	padding: 1.05rem 1.15rem;
	border-radius: 1.25rem;
	background: var(--surface-panel);
	border: 1px solid var(--border-soft);
	box-shadow: var(--shadow-soft);
}

.setupSummaryCard {
	align-content: start;
	gap: 1.1rem;
	padding: 1.15rem 1.2rem;
	background: var(--surface-panel);
	border-color: var(--border-soft);

	h2 {
		font-size: 1.2rem;
		line-height: 1.12;
		letter-spacing: -0.03em;
	}

	@include respond(desktop-md) {
		padding: 1.25rem 1.3rem;
	}
}

.panelEyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--text-subtle);
}

.setupHeader {
	display: flex;
	justify-content: space-between;
	align-items: start;
	gap: 1rem;
	flex-wrap: wrap;

	h2 {
		font-size: 1.2rem;
		line-height: 1.1;
		letter-spacing: -0.03em;
	}

	p:last-child {
		margin-top: 0.25rem;
		color: var(--text-muted);
		font-size: 0.92rem;
		max-width: 60ch;
	}
}

.setupBadge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	padding: 0 0.8rem;
	border-radius: var(--radius-full);
	background: var(--surface-info-emphasis);
	color: var(--text-info-strong);
	font-size: 0.82rem;
	font-weight: 700;
	white-space: nowrap;
}

.fieldGrid {
	display: grid;
	gap: 0.85rem;

	@include respond(desktop-sm) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.fieldLabel {
	display: grid;
	gap: 0.45rem;

	span {
		font-size: 0.86rem;
		font-weight: 600;
		color: var(--text-subtle);
	}
}

.fieldLabelFull {
	@include respond(desktop-sm) {
		grid-column: 1 / -1;
	}
}

.textInput,
.selectInput,
.textArea {
	width: 100%;
	padding: 0.85rem 0.95rem;
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-soft);
	background: var(--surface-panel-strong);
	color: var(--text);
	font: inherit;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;

	&:focus {
		outline: none;
		border-color: var(--border-info-strong);
		box-shadow: var(--focus-ring-soft);
	}
}

.textArea {
	resize: vertical;
	min-height: 8rem;
}

.toggleRow {
	display: flex;
	align-items: start;
	gap: 0.8rem;
	padding: 0.9rem 1rem;
	border-radius: var(--radius-lg);
	background: var(--surface-soft);
	border: 1px solid var(--border-soft);
	cursor: pointer;

	input {
		margin-top: 0.15rem;
	}

	strong {
		display: block;
		font-size: 0.95rem;
	}

	span {
		display: block;
		margin-top: 0.2rem;
		font-size: 0.84rem;
		color: var(--text-muted);
	}
}

.generatorPanel {
	display: grid;
	gap: 0.85rem;
	padding: 1rem;
	border-radius: var(--radius-xl);
	background: color-mix(in srgb, var(--surface-info) 10%, var(--surface-panel) 90%);
	border: 1px solid color-mix(in srgb, var(--border-soft) 72%, var(--info) 28%);
}

.generatorActions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.generatorNote {
	font-size: 0.84rem;
	color: var(--text-muted);
	max-width: 46ch;
}

.questionPicker {
	display: grid;
	gap: 0.75rem;
}

.questionPickerHeader {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;

	h3 {
		font-size: 1rem;
	}

	p {
		margin-top: 0.2rem;
		font-size: 0.88rem;
		color: var(--text-muted);
	}

	small {
		font-size: 0.82rem;
		color: var(--text-muted);
	}
}

.questionList {
	display: grid;
	gap: 0.75rem;
	max-height: 28rem;
	overflow: auto;
	padding-right: 0.15rem;
}

.questionCard {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.75rem;
	padding: 0.9rem;
	border-radius: var(--radius-lg);
	background: var(--surface-panel-strong);
	border: 1px solid var(--border-soft);
	cursor: pointer;
}

.questionCheck {
	padding-top: 0.1rem;
}

.questionCopy {
	display: grid;
	gap: 0.35rem;

	strong {
		font-size: 0.96rem;
	}

	p {
		font-size: 0.84rem;
		color: var(--text-muted);
	}
}

.questionMeta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;

	span {
		display: inline-flex;
		align-items: center;
		padding: 0.3rem 0.55rem;
		border-radius: var(--radius-full);
		background: var(--surface-soft);
		color: var(--text-muted);
		font-size: 0.76rem;
	}
}

.questionEmptyState {
	padding: 0.95rem 1rem;
	border-radius: var(--radius-lg);
	background: var(--surface-soft);
	border: 1px dashed var(--border-soft);
	color: var(--text-muted);
	font-size: 0.88rem;
}

.formActions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.feedbackMessage {
	padding: 0.82rem 0.95rem;
	border-radius: var(--radius-lg);
	font-size: 0.88rem;
	border: 1px solid transparent;
}

.feedbackError {
	background: var(--surface-warning-tint);
	border-color: color-mix(in srgb, var(--warning) 30%, transparent);
	color: var(--warning-text);
}

.feedbackSuccess {
	background: var(--surface-info-soft-tint);
	border-color: color-mix(in srgb, var(--info) 28%, transparent);
	color: var(--text-info-strong);
}

.summaryList {
	display: grid;
	gap: 0.8rem;
}

.summaryRow {
	display: flex;
	justify-content: space-between;
	gap: 0.8rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border-soft);

	span {
		font-size: 0.84rem;
		color: var(--text-muted);
	}

	strong {
		text-align: right;
		font-size: 0.92rem;
	}

	&:last-child {
		padding-bottom: 0;
		border-bottom: 0;
	}
}

.setupNote {
	font-size: 0.86rem;
	color: var(--text-muted);
	line-height: 1.5;
}

.heroCopy {
	display: grid;
	gap: 0.55rem;

	h1 {
		font-size: clamp(1.8rem, 1.45rem + 1.1vw, 2.8rem);
		line-height: 1;
		letter-spacing: -0.04em;
		max-width: 15ch;
	}

	p:last-child {
		color: var(--text-muted);
		font-size: 0.96rem;
		max-width: 56ch;
	}
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--info);
}

.groupList {
	display: grid;
	gap: 1rem;
}


.setupSummaryCard .formActions {
	display: grid;
	gap: 0.7rem;

	@include respond(desktop-sm) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.setupSummaryCard .primaryAction,
.setupSummaryCard .secondaryAction {
	width: 100%;
	justify-self: stretch;
}

.groupStack {
	display: grid;
	gap: 1rem;
}

.infoCard {
	display: grid;
	gap: 0.8rem;
	padding: 1rem 1.1rem;
	border-radius: 1.1rem;
	background: var(--surface-panel);
	border: 1px solid var(--border-soft);
	color: var(--text-muted);
	box-shadow: var(--shadow-soft);

	h2 {
		color: var(--text);
		font-size: 1.05rem;
	}
}

.group {
	display: grid;
	gap: 0.85rem;
}

.groupHeader {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;

	h2 {
		font-size: 1.2rem;
		line-height: 1.1;
		letter-spacing: -0.03em;
	}

	p {
		margin-top: 0.2rem;
		font-size: 0.92rem;
		color: var(--text-muted);
	}
}

.groupCount {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.1rem;
	height: 2.1rem;
	padding: 0 0.7rem;
	border-radius: var(--radius-full);
	background: var(--surface-info-emphasis);
	color: var(--text-info-strong);
	font-weight: 600;
	font-size: 0.88rem;
}

.cardGrid {
	display: grid;
	gap: 0.9rem;

	@media (min-width: 940px) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	@media (min-width: 1480px) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.assignmentCard {
	display: grid;
	gap: 0.95rem;
	padding: 1rem;
	border-radius: 1.3rem;
	background: var(--surface-panel);
	border: 1px solid var(--border-soft);
	box-shadow: var(--shadow-soft);
	min-width: 0;
	align-content: start;
	position: relative;
	overflow: hidden;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		border-color 0.2s ease;

	&::before {
		content: "";
		position: absolute;
		inset: 0 auto 0 0;
		width: 0.3rem;
		background: var(--border-soft);
	}

	&:hover {
		transform: translateY(-2px);
		box-shadow: var(--shadow-elevated);
	}
}

.assignmentCardLink {
	color: inherit;
	text-decoration: none;
	cursor: pointer;

	&:hover {
		text-decoration: none;
	}

	&:focus-visible {
		outline: none;
		border-color: var(--border-info-strong);
		box-shadow: var(--focus-ring-soft), var(--shadow-elevated);
	}
}

.assignmentCardReview {
	border-color: color-mix(in srgb, var(--warning) 24%, var(--border-soft));

	&::before {
		background: var(--warning);
	}
}

.assignmentCardLive {
	border-color: color-mix(in srgb, var(--info) 22%, var(--border-soft));

	&::before {
		background: var(--info);
	}
}

.assignmentCardClosed {
	background: linear-gradient(180deg, color-mix(in srgb, var(--surface-panel) 82%, var(--surface-soft) 18%), var(--surface-panel));

	&::before {
		background: var(--border-soft);
	}
}

.cardTop {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.statusChip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.42rem 0.68rem;
	border-radius: var(--radius-full);
	font-size: 0.76rem;
	font-weight: 700;
	white-space: nowrap;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border: 1px solid transparent;
}

.review {
	background: var(--surface-warning-tint);
	color: var(--warning-text);
	border-color: var(--border-info-strong);
}

.live {
	background: var(--surface-info-soft-tint);
	color: var(--info);
	border-color: var(--border-info-strong);
}

.closed {
	background: var(--surface-soft);
	color: var(--text-muted);
	border-color: var(--border-soft);
}

.progressText {
	font-size: 0.82rem;
	color: var(--text-muted);
	white-space: nowrap;
}

.cardBody {
	display: grid;
	gap: 0.35rem;
	min-width: 0;

	h3 {
		font-size: 1rem;
		font-weight: 600;
		overflow-wrap: anywhere;
	}

	p {
		font-size: 0.92rem;
		color: var(--text-subtle);
		font-weight: 600;
	}

	small {
		font-size: 0.83rem;
		color: var(--text-muted);
		line-height: 1.45;
		overflow-wrap: anywhere;
	}
}

.cardMeta {
	display: grid;
	gap: 0.5rem;

	@include respond(desktop-sm) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	span {
		display: grid;
		align-items: start;
		padding: 0.6rem 0.72rem;
		border-radius: 0.9rem;
		background: var(--surface-soft);
		color: var(--text-muted);
		font-size: 0.8rem;
		line-height: 1.35;
	}
}

.primaryAction,
.secondaryAction {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.8rem 1rem;
	border-radius: var(--radius-full);
	font-weight: 500;
	text-decoration: none;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease;

	&:hover {
		text-decoration: none;
		transform: translateY(-1px);
	}
}

.primaryAction {
	background: linear-gradient(135deg, var(--action-primary-start), var(--action-primary-end));
	color: var(--action-primary-text);
	box-shadow: var(--action-primary-shadow);
	justify-self: start;
}

.secondaryAction {
	background: var(--surface-soft);
	color: var(--text);
	border: 1px solid var(--border-soft);
	justify-self: start;
}
