.sgsht,
.sgsht * {
	box-sizing: border-box;
}

.sgsht {
	--sgsht-accent: #135e96;
	--sgsht-accent-dark: #0a4b78;
	--sgsht-border: #c3c4c7;
	--sgsht-error: #b32d2e;
	--sgsht-success: #16833b;
	--sgsht-soft: #f6f7f7;
	color: #111;
	font-size: 1rem;
	line-height: 1.55;
	margin-inline: auto;
	max-width: 70rem;
	width: 100%;
}

.sgsht-virtual {
	padding: clamp(1rem, 3vw, 3rem);
}

.sgsht-shell {
	margin-inline: auto;
	max-width: 75rem;
}

.sgsht h1,
.sgsht h2,
.sgsht p {
	color: inherit;
}

.sgsht-header {
	margin-bottom: 1.25rem;
}

.sgsht-description,
.sgsht-instructions {
	max-width: 52rem;
}

.sgsht-instructions {
	background: var(--sgsht-soft);
	border-left: 0.25rem solid var(--sgsht-accent);
	margin-block: 1rem 1.5rem;
	padding: 0.9rem 1rem;
}

.sgsht-notice,
.sgsht-error {
	background: #fff;
	border: 1px solid var(--sgsht-border);
	border-left: 0.3rem solid var(--sgsht-success);
	margin-block: 1rem;
	padding: 0.9rem 1rem;
}

.sgsht-error {
	border-left-color: var(--sgsht-error);
}

.sgsht-form,
.sgsht-login {
	background: #fff;
	border: 1px solid var(--sgsht-border);
	border-radius: 0.35rem;
	max-width: 58rem;
	padding: clamp(1rem, 3vw, 2rem);
}

.sgsht-login {
	max-width: 34rem;
}

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

.sgsht-field {
	margin-block: 0 1rem;
}

.sgsht-field > label,
.sgsht-fieldset > legend {
	display: block;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.sgsht input[type="text"],
.sgsht input[type="email"],
.sgsht input[type="tel"],
.sgsht input[type="password"],
.sgsht textarea {
	background: #fff;
	border: 1px solid #7e8993;
	border-radius: 0.2rem;
	color: #111;
	font: inherit;
	max-width: 100%;
	min-height: 2.75rem;
	padding: 0.6rem 0.7rem;
	width: 100%;
}

.sgsht input[readonly] {
	background: var(--sgsht-soft);
}

.sgsht textarea {
	min-height: 7rem;
	resize: vertical;
}

.sgsht-field small {
	display: block;
	margin-top: 0.35rem;
}

.sgsht-fieldset {
	border: 1px solid var(--sgsht-border);
	margin-block: 1rem;
	min-width: 0;
	padding: 1rem;
}

.sgsht-fieldset > label {
	display: inline-flex;
	gap: 0.35rem;
	margin-right: 1.25rem;
}

.sgsht-position-options {
	display: grid;
	gap: 0.65rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sgsht-position-option {
	align-items: flex-start;
	background: var(--sgsht-soft);
	border: 1px solid var(--sgsht-border);
	border-radius: 0.25rem;
	cursor: pointer;
	display: flex;
	gap: 0.65rem;
	min-width: 0;
	padding: 0.85rem;
}

.sgsht-position-option:has(input:checked) {
	background: #edf6fc;
	border-color: var(--sgsht-accent);
}

.sgsht-position-option input {
	flex: 0 0 auto;
	margin-top: 0.28rem;
}

.sgsht-position-option span,
.sgsht-position-option small {
	display: block;
	min-width: 0;
}

.sgsht-selection-status {
	font-weight: 600;
	margin: 0.75rem 0 0;
}

.sgsht-button {
	background: var(--sgsht-accent);
	border: 1px solid var(--sgsht-accent);
	border-radius: 0.2rem;
	color: #fff !important;
	cursor: pointer;
	display: inline-block;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	padding: 0.75rem 1rem;
	text-decoration: none !important;
}

.sgsht-button:hover,
.sgsht-button:focus {
	background: var(--sgsht-accent-dark);
	border-color: var(--sgsht-accent-dark);
}

.sgsht-button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.sgsht-button-secondary {
	background: #fff;
	color: var(--sgsht-accent) !important;
}

.sgsht-button-secondary:hover,
.sgsht-button-secondary:focus {
	color: #fff !important;
}

.sgsht :focus-visible {
	outline: 0.2rem solid #ffbf47;
	outline-offset: 0.15rem;
}

.sgsht-privacy,
.sgsht-help {
	font-size: 0.92rem;
	max-width: 52rem;
}

.sgsht-member-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1.25rem;
}

.sgsht-member-actions form {
	margin: 0;
}

.sgsht-link-button {
	background: transparent;
	border: 0;
	color: var(--sgsht-accent);
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: underline;
}

.sgsht-results {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-block: 1.25rem;
}

.sgsht-result-card {
	background: #fff;
	border: 1px solid var(--sgsht-border);
	border-radius: 0.35rem;
	min-width: 0;
	padding: 1rem;
}

.sgsht-result-card h2 {
	font-size: 1.25rem;
	margin-top: 0;
}

.sgsht-schedule,
.sgsht-count {
	margin-block: 0.35rem;
}

.sgsht-overflow {
	color: #0a6b2b;
	font-weight: 600;
}

.sgsht-roster {
	margin-bottom: 0;
	padding-left: 1.5rem;
}

.sgsht-roster li {
	margin-block: 0.35rem;
}

.sgsht-callsign {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-weight: 700;
}

@media (max-width: 48rem) {
	.sgsht-grid,
	.sgsht-position-options,
	.sgsht-results {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 30rem) {
	.sgsht-virtual {
		padding: 0.75rem;
	}

	.sgsht-form,
	.sgsht-login {
		border-left: 0;
		border-radius: 0;
		border-right: 0;
		margin-inline: -0.75rem;
		padding-inline: 0.75rem;
	}

	.sgsht-fieldset > label {
		display: flex;
		margin-block: 0.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sgsht * {
		scroll-behavior: auto !important;
	}
}
