/* South Side Thunder registration form.
   Layout: a crest-led navy masthead over five numbered fieldsets, closed by a gold fee band.
   Colors read the Thunder theme's tokens when present and fall back to the same values. */
.threg,
.threg-details {
	--threg-navy: var(--th-navy, #22419A);
	--threg-navy-deep: var(--th-navy-deep, #132A6B);
	--threg-gold: var(--th-gold, #FDD651);
	--threg-gold-deep: var(--th-gold-deep, #E0B420);
	--threg-ink: var(--th-ink, #141C3A);
	--threg-muted: var(--th-muted, #55607F);
	--threg-line: var(--th-line, #DCE1EE);
	--threg-band: var(--th-band, #EAF0FB);
	--threg-surface: #FFFFFF;
	--threg-danger: #B42318;
	--threg-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
	--threg-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Page intro (pattern) ---------- */
.threg-details { font-family: var(--threg-body); color: var(--threg-ink); }
.threg-details h1 {
	font-family: var(--threg-display);
	font-weight: 800;
	text-transform: uppercase;
	font-size: clamp(36px, 6vw, 56px);
	line-height: .95;
	letter-spacing: .005em;
	color: var(--threg-navy-deep);
	text-wrap: balance;
	margin-block: 8px 12px;
}
.threg-details__eyebrow {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--threg-navy);
	margin-bottom: 0;
}
.threg-facts {
	list-style: none;
	padding: 0;
	margin-block: 24px 40px;
	border-top: 2px solid var(--threg-ink);
}
.threg-facts li {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 4px 16px;
	padding-block: 11px;
	border-bottom: 1px solid var(--threg-line);
	font-size: 17px;
	line-height: 1.45;
}
.threg-facts strong {
	font-family: var(--threg-display);
	font-weight: 800;
	font-size: 19px;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: var(--threg-navy);
}
@media (max-width: 520px) {
	.threg-facts li { grid-template-columns: 1fr; }
}

/* ---------- Form shell ---------- */
.threg {
	font-family: var(--threg-body);
	font-size: 17px;
	line-height: 1.5;
	color: var(--threg-ink);
	background: var(--threg-surface);
	border: 1px solid var(--threg-line);
	border-radius: 12px;
	overflow: hidden;
	max-width: 760px;
	margin-inline: auto;
	box-shadow: 0 18px 40px -24px rgba(19, 42, 107, .45);
	scroll-margin-top: 24px;
}
.threg *, .threg *::before, .threg *::after { box-sizing: border-box; }
.threg [hidden] { display: none !important; }

.threg-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 24px 28px;
	background: var(--threg-navy);
	color: #FFFFFF;
	border-bottom: 4px solid var(--threg-gold);
	overflow: hidden;
}
/* A single bolt cut through the masthead, echoing the crest. */
.threg-head::after {
	content: "";
	position: absolute;
	right: -10px;
	top: -20px;
	width: 220px;
	height: calc(100% + 40px);
	background: var(--threg-navy-deep);
	clip-path: polygon(40% 0, 78% 0, 60% 40%, 88% 36%, 30% 100%, 46% 54%, 18% 58%);
	pointer-events: none;
}
.threg-head > * { position: relative; z-index: 1; }
.threg-crest { width: 64px; height: auto; flex: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .3)); }
.threg-head__text { min-width: 0; }
.threg-eyebrow {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--threg-gold);
}
.threg-title {
	margin: 2px 0 0;
	font-family: var(--threg-display);
	font-weight: 800;
	font-size: clamp(26px, 4.6vw, 36px);
	line-height: 1;
	text-transform: uppercase;
	color: #FFFFFF;
	text-wrap: balance;
}
.threg-season {
	margin: 6px 0 0;
	font-weight: 600;
	color: #DCE4FA;
}
.threg-season span {
	display: inline-block;
	padding: 1px 8px;
	margin-right: 4px;
	border-radius: 4px;
	background: var(--threg-gold);
	color: var(--threg-navy-deep);
	font-family: var(--threg-display);
	font-weight: 800;
	font-size: 18px;
	letter-spacing: .03em;
	font-variant-numeric: tabular-nums;
}

.threg-form { padding: 8px 28px 28px; }
.threg-note { margin: 16px 0 0; font-size: 14px; color: var(--threg-muted); }
.threg-req { color: var(--threg-danger); font-weight: 700; }

.threg-alert {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 8px;
	background: #FEF3F2;
	border: 1px solid #FDA29B;
	color: var(--threg-danger);
	font-weight: 600;
}
.threg-alert p { margin: 0; }

/* ---------- Steps ---------- */
.threg-step {
	border: 0;
	margin: 0;
	padding: 24px 0 26px;
	border-bottom: 1px solid var(--threg-line);
	min-width: 0;
}
.threg-step legend {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	margin-bottom: 14px;
	font-family: var(--threg-display);
	font-weight: 800;
	font-size: 24px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: var(--threg-navy-deep);
}
.threg-num {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--threg-navy);
	color: var(--threg-gold);
	font-size: 17px;
	font-variant-numeric: tabular-nums;
}
.threg-help { margin: -4px 0 14px; font-size: 15px; color: var(--threg-muted); max-width: 60ch; }

.threg-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}
.threg-span-2 { grid-column: span 2; }
.threg-span-4 { grid-column: 1 / -1; }
@media (max-width: 600px) {
	.threg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.threg-span-2, .threg-span-4 { grid-column: 1 / -1; }
}

.threg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.threg-field label,
.threg-label {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--threg-ink);
}
.threg input[type="text"],
.threg input[type="email"],
.threg input[type="tel"],
.threg input[type="date"],
.threg textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	font: inherit;
	font-size: 17px;
	color: var(--threg-ink);
	background: #FFFFFF;
	border: 1.5px solid #B9C2DA;
	border-radius: 8px;
	transition: border-color .15s, box-shadow .15s;
}
.threg textarea { min-height: 90px; resize: vertical; }
.threg input::placeholder, .threg textarea::placeholder { color: #8891AC; }
.threg input:focus,
.threg textarea:focus {
	outline: none;
	border-color: var(--threg-navy);
	box-shadow: 0 0 0 3px rgba(253, 214, 81, .85);
}
.threg [aria-invalid="true"] { border-color: var(--threg-danger) !important; }
.threg-error { margin: 0; font-size: 14px; font-weight: 600; color: var(--threg-danger); }

/* ---------- Athletes ---------- */
.threg-athletes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.threg-athlete {
	padding: 14px;
	border-radius: 10px;
	background: var(--threg-band);
	display: grid;
	gap: 8px;
}
.threg-athlete__row {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(150px, 1fr) auto;
	align-items: end;
	gap: 10px 12px;
}
.threg-athlete__row .threg-camp { grid-column: 1 / -1; grid-row: 2; justify-self: start; min-height: 32px; font-size: 16px; }
.threg-camp:empty { display: none; }
.threg-chip,
.threg-camp {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 0 12px;
	border-radius: 8px;
	font-family: var(--threg-display);
	font-weight: 800;
	font-size: 17px;
	letter-spacing: .03em;
	text-transform: uppercase;
	white-space: nowrap;
}
.threg-chip { min-height: 0; padding: 2px 8px; font-size: 15px; border-radius: 5px; }
.threg-camp[data-camp="blue"], .threg-chip--blue { background: var(--threg-navy); color: #FFFFFF; }
.threg-camp[data-camp="gold"], .threg-chip--gold { background: var(--threg-gold); color: var(--threg-navy-deep); }
.threg-camp[data-camp="out"] {
	background: transparent;
	color: var(--threg-danger);
	font-family: var(--threg-body);
	font-size: 14px;
	text-transform: none;
	letter-spacing: 0;
	white-space: normal;
	padding: 0;
}
.threg-remove,
.threg-add {
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	border-radius: 8px;
}
.threg-remove {
	min-height: 46px;
	padding: 0 12px;
	background: transparent;
	border: 1.5px solid #B9C2DA;
	color: var(--threg-muted);
	font-size: 15px;
}
.threg-remove:hover { border-color: var(--threg-danger); color: var(--threg-danger); }
.threg-add {
	margin-top: 12px;
	padding: 10px 16px;
	background: transparent;
	border: 2px dashed var(--threg-navy);
	color: var(--threg-navy);
	font-size: 16px;
}
.threg-add:hover { background: var(--threg-band); }
.threg-remove:focus-visible, .threg-add:focus-visible, .threg-btn:focus-visible, .threg-release:focus-visible, .threg-choice input:focus-visible + span {
	outline: 3px solid var(--threg-gold-deep);
	outline-offset: 2px;
}
@media (max-width: 600px) {
	.threg-athlete__row { grid-template-columns: minmax(0, 1fr) auto; }
	.threg-athlete__row .threg-field:first-child { grid-column: 1 / -1; }
	.threg-athlete__row .threg-camp { grid-row: 3; }
}

/* ---------- Membership choice ---------- */
.threg-choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.threg-choice { position: relative; cursor: pointer; flex: 1 1 180px; }
.threg-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.threg-choice span {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 16px;
	border: 1.5px solid #B9C2DA;
	border-radius: 8px;
	font-weight: 700;
	font-size: 18px;
}
.threg-choice small { font-weight: 600; font-size: 14px; color: var(--threg-muted); }
.threg-choice input:checked + span {
	border-color: var(--threg-navy);
	background: var(--threg-navy);
	color: #FFFFFF;
}
.threg-choice input:checked + span small { color: var(--threg-gold); }
.threg-choices[aria-invalid="true"] .threg-choice span { border-color: var(--threg-danger); }

/* ---------- Release ---------- */
.threg-release {
	max-height: 168px;
	overflow-y: auto;
	padding: 14px 16px;
	margin-bottom: 16px;
	border-radius: 8px;
	background: var(--threg-band);
	font-size: 14.5px;
	line-height: 1.6;
	color: #2C3557;
}
.threg-release p { margin: 0; max-width: 72ch; }
.threg .threg-sign { font-family: var(--threg-display); font-size: 24px; font-weight: 600; letter-spacing: .01em; }

/* ---------- Submit band ---------- */
.threg-submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
	margin-top: 24px;
	padding: 16px 18px;
	border-radius: 10px;
	background: var(--threg-gold);
	color: var(--threg-navy-deep);
}
.threg-total { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.threg-total__label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.threg-total__amt { font-family: var(--threg-display); font-size: 32px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.threg-total__calc { font-size: 15px; font-weight: 600; }
.threg-btn {
	appearance: none;
	border: 0;
	border-radius: 8px;
	padding: 14px 26px;
	background: var(--threg-navy-deep);
	color: #FFFFFF;
	font-family: var(--threg-display);
	font-size: 21px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s, transform .15s;
}
.threg-btn:hover { background: var(--threg-navy); }
.threg-btn:active { transform: translateY(1px); }
.threg-fine { margin: 12px 0 0; font-size: 14px; color: var(--threg-muted); }

/* ---------- Done / closed ---------- */
.threg-done { padding: 28px; }
.threg-done h3 {
	margin: 0 0 12px;
	font-family: var(--threg-display);
	font-weight: 800;
	font-size: 30px;
	text-transform: uppercase;
	color: var(--threg-navy-deep);
}
.threg-done__list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.threg-done__list li { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; }
.threg-done p { margin: 0 0 10px; }
.threg-link { color: var(--threg-navy); font-weight: 700; }
.threg-done--closed p { font-size: 18px; margin: 0; }

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

@media (max-width: 600px) {
	.threg-head { padding: 20px 18px; gap: 14px; }
	.threg-crest { width: 50px; }
	.threg-form { padding: 4px 18px 22px; }
	.threg-done { padding: 22px 18px; }
	.threg-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.threg * { transition: none !important; }
}
