/* ==================================================================
 * SIGN-UP PAGES – runners (/join/<race>) and volunteers (/volunteer/<race>)
 * 0.35: the calm platform look – the page is the form, no floating card.
 *   body.byt-own   = our look (Geist, Linen, dark mode)
 *   body.byt-blend = inside another website (?embed=1): see-through, system font
 *   --accent       = the race colour (Race setup › Results page + app)
 * ================================================================== */
:root {
	--accent: #C8102E;
	--bg: #FAFAF7; --paper: #FFFFFF; --soft: #F1F0EC; --ink: #121211; --on-ink: #FAFAF7;
	--muted: #6F6D67; --faint: #A3A19B; --line: #E7E5E0; --line-strong: #D3D0C8;
	--bad: #9A3B2F; --bad-bg: #F6E7E4; --ok: #4F8A4B; --ok-bg: #E9F0E6; --ok-ink: #3E5A36; --warn: #C08A2E; --warn-bg: #F6EEDC; --warn-ink: #6E5422;
	--ring: rgba(18, 18, 17, 0.10);
	--font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]):has(body.byt-own:not(.embed)) {
		color-scheme: dark;
		--bg: #0E0E0D; --paper: #171716; --soft: #1D1D1B; --ink: #EDEDEA; --on-ink: #0E0E0D;
		--muted: #8A8984; --faint: #5C5B57; --line: #262624; --line-strong: #3A3A37;
		--bad: #E07A6C; --bad-bg: #3A1A17; --ok: #7FA373; --ok-bg: #1E2A1B; --ok-ink: #A9C79E; --warn: #C9A257; --warn-bg: #2E2615; --warn-ink: #E1C281;
		--ring: rgba(237, 237, 234, 0.14);
	}
}
:root[data-theme="dark"]:has(body.byt-own:not(.embed)) {
	color-scheme: dark;
	--bg: #0E0E0D; --paper: #171716; --soft: #1D1D1B; --ink: #EDEDEA; --on-ink: #0E0E0D;
	--muted: #8A8984; --faint: #5C5B57; --line: #262624; --line-strong: #3A3A37;
	--bad: #E07A6C; --bad-bg: #3A1A17; --ok: #7FA373; --ok-bg: #1E2A1B; --ok-ink: #A9C79E; --warn: #C9A257; --warn-bg: #2E2615; --warn-ink: #E1C281;
	--ring: rgba(237, 237, 234, 0.14);
}
:root:has(body.byt-blend) { --bg: transparent; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --mono: var(--font); }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
.ic { width: 1.1em; height: 1.1em; vertical-align: -0.15em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Page: one calm column */
.j-wrap { max-width: 620px; margin: 0 auto; padding: 32px 20px 56px; }
body.embed .j-wrap { padding: 8px 4px 12px; max-width: 720px; }
.j-banner { display: block; width: 100%; margin: 0 0 28px; border-radius: 18px; max-height: 260px; object-fit: cover; }
.j-head { margin: 0 0 24px; }
.j-head h1 { margin: 0 0 10px; font-size: clamp(32px, 6vw, 44px); line-height: 1.03; font-weight: 400; letter-spacing: -0.045em; text-wrap: balance; }
.j-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; color: var(--muted); font-size: 15px; }
.j-meta b { color: var(--ink); font-weight: 500; font-family: var(--mono); }
.j-places { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.j-places::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Messages */
.j-note { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin: 0 0 22px; font-size: 15px; color: var(--muted); }
.j-notice, .j-alert { display: flex; gap: 10px; border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; font-weight: 400; }
.j-notice { background: var(--warn-bg); color: var(--warn-ink); border: 0; }
.j-alert { background: var(--bad-bg); color: var(--bad); }
.j-notice::before, .j-alert::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .6em; border-radius: 50%; background: currentColor; }

/* Form: boxed fields, like the platform */
.j-form { display: flex; flex-direction: column; gap: 18px; }
.j-form label, .j-form fieldset { display: block; font-weight: 500; font-size: 14px; }
.j-form fieldset { border: 0; padding: 0; margin: 0; }
.j-form legend { padding: 0; margin-bottom: 6px; }
.j-form small { font-weight: 400; color: var(--muted); }
.j-form input[type=text], .j-form input[type=email], .j-form input[type=date], .j-form input[type=number], .j-form input[type=tel], .j-form select, .j-form textarea {
	display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px;
	font: 400 16px var(--font); background: var(--paper); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.j-form input:hover, .j-form select:hover, .j-form textarea:hover { border-color: var(--faint); }
.j-form input:focus, .j-form select:focus, .j-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ring); }
.j-form textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.j-form .j-short { max-width: 160px; }
.j-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.j-row > * { min-width: 0; }
.j-radio { display: inline-flex !important; align-items: center; gap: 8px; margin-right: 22px; font-weight: 400 !important; font-size: 15px !important; min-height: 40px; cursor: pointer; }
.j-radio input, .j-check-l input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.j-checks { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.j-check-l { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 15px !important; cursor: pointer; }
.j-check-l input { margin-top: 2px; }
.j-help { display: block; margin-top: 5px; }
.has-err input, .has-err select { border-color: var(--bad) !important; }
.j-err { display: block; color: var(--bad); font-size: 13px; font-weight: 500; margin-top: 5px; }
.j-btn { min-height: 54px; border: 0; border-radius: 999px; background: var(--ink); color: var(--on-ink); font: 500 17px var(--font); cursor: pointer; margin-top: 8px; transition: opacity .2s; }
.j-btn:hover { opacity: .88; }
.j-small { font-size: 13px; color: var(--muted); margin: 0; }
.j-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Done / closed */
.j-done { text-align: center; padding: 16px 0 6px; }
.j-done h2 { margin: 14px 0 8px; font-size: 30px; font-weight: 400; letter-spacing: -0.035em; line-height: 1.1; }
.j-done > p { color: var(--muted); }
.j-check { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--ok-bg); color: var(--ok-ink); display: flex; align-items: center; justify-content: center; }
.j-check .ic { width: 28px; height: 28px; stroke-width: 1.8; }
.j-check.wait { background: var(--warn-bg); color: var(--warn-ink); }
.j-check.calm { background: var(--soft); color: var(--muted); }
.j-pay { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 18px 0; }
.j-pay h3 { margin: 0 0 8px; font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.j-pay p { margin: 0 0 8px; overflow-wrap: anywhere; }
.j-closed h2 { font-size: 26px; }
.j-credit { text-align: center; font-size: 12px; color: var(--muted); margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.j-credit a { color: var(--muted); }

/* Volunteer shifts */
.j-h2 { font-size: 24px; font-weight: 400; letter-spacing: -0.025em; margin: 26px 0 8px; }
.j-day { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 18px 0 8px; }
.j-shift { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; margin: 0 0 8px; cursor: pointer; font-weight: 400; background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.j-shift:hover { border-color: var(--line-strong); }
.j-shift input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.j-shift b { font-weight: 500; }
.j-shift small { display: block; color: var(--muted); margin-top: 3px; }
.j-shift.full { opacity: .5; cursor: not-allowed; }
.j-shift:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

@media (max-width: 520px) {
	.j-row { grid-template-columns: 1fr; }
	.j-wrap { padding: 20px 16px 40px; }
	.j-banner { margin-bottom: 22px; border-radius: 14px; }
}
html:has(body.byt-blend) { background: transparent; }

/* 0.45 price tiers + gifts under the title */
.j-tiers { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.j-tiers li { padding-left: 14px; position: relative; }
.j-tiers li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.j-tiers li.now { color: var(--ink); font-weight: 600; }
.j-tiers li.now::before { background: var(--accent); }
.j-gifts { margin-top: 8px; }
.j-gifts b { font-family: var(--font); }
/* 0.46 the pay-by-card button as a link */
a.j-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0 28px; text-decoration: none; }
.j-pay form .j-btn { width: 100%; }
/* 0.47 several ways to pay */
.j-ways { display: grid; gap: 10px; margin: 6px 0 4px; }
.j-ways .j-btn { width: 100%; margin-top: 0; }
.j-btn-alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
/* 0.50 gifts: one drop-down per piece, extras, live total; 0.51 mockups */
.j-gift { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 6px; margin: 0; display: grid; gap: 8px; }
.j-gift legend { padding: 0 6px; font-weight: 500; }
.j-gift legend small { color: var(--muted); font-weight: 400; }
.j-piece { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; gap: 10px; align-items: center; }
.j-piece small { display: block; color: var(--muted); font-size: 12px; }
.j-total { font-size: 17px; margin: 10px 0 0; }
.j-total b { font-family: var(--mono); font-weight: 600; }
.j-total small { color: var(--muted); }
.j-mockups { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.j-mockups img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.j-guide { font-size: 14px; }

/* 0.57 bank transfer details */
.j-bank { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.j-bank h3 { margin: 0 0 8px; }
.j-bank dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 8px; }
.j-bank dt { color: var(--muted); font-size: 13px; }
.j-bank dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; user-select: all; }
