/* TK9-PUB-004A — Public Registration Visual Foundation
   Public shell / hero / identity / registration status.
   Builds on TK9-021 tokens without changing form business logic. */

body[data-app="tk9-registration"] {
	--public-ink: #12362e;
	--public-muted: #71817c;
	--public-line: rgba(16, 63, 53, .13);
	--public-surface: rgba(255, 253, 248, .94);
	--public-gold: var(--tk9-gold, #d9b66f);
	--public-gold-bright: var(--tk9-gold-bright, #f0d596);
	--public-emerald: var(--tk9-emerald, #103f35);
	--public-emerald-soft: var(--tk9-emerald-soft, #1a5a4b);
	background:
		radial-gradient(circle at 9% 2%, rgba(217, 182, 111, .13), transparent 25rem),
		radial-gradient(circle at 91% 13%, rgba(26, 90, 75, .085), transparent 28rem),
		linear-gradient(180deg, #fbfaf5 0%, #f5f2e9 56%, #f8f7f2 100%);
}

body[data-app="tk9-registration"] .ambient-one {
	background: rgba(26, 90, 75, .075);
	width: 320px;
	height: 320px;
	right: -180px;
}

body[data-app="tk9-registration"] .ambient-two {
	background: rgba(217, 182, 111, .09);
	width: 340px;
	height: 340px;
	left: -190px;
}

.public-identity-header {
	padding: 14px 0 8px;
}

.public-identity-header .brand-wrap {
	min-height: 68px;
	justify-content: space-between;
	gap: 18px;
}

.public-brand-lockup {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
	color: var(--public-ink);
	text-decoration: none;
}

.public-brand-mark {
	width: 58px;
	height: 58px;
	flex: 0 0 58px;
	filter: drop-shadow(0 9px 20px rgba(16, 63, 53, .13));
}

.public-brand-copy {
	display: grid;
	min-width: 0;
	line-height: 1.2;
}

.public-brand-copy .brand-kicker {
	margin: 0 0 3px;
	font-size: .68rem;
	font-weight: 700;
	color: #73827d;
}

.public-brand-copy .brand-title {
	font-size: .98rem;
	font-weight: 900;
	color: var(--public-ink);
}

.public-brand-copy small {
	margin-top: 4px;
	font-size: .62rem;
	font-weight: 700;
	color: #9a7a3d;
}

.public-header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	flex: 0 0 auto;
}

.header-track-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 7px 13px;
	border: 1px solid rgba(16, 63, 53, .15);
	border-radius: 999px;
	background: rgba(255, 255, 255, .74);
	box-shadow: 0 8px 20px rgba(16, 63, 53, .055);
	color: var(--public-emerald);
	text-decoration: none;
	font-size: .72rem;
	font-weight: 800;
	transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.header-track-link:hover {
	background: #fff;
	border-color: rgba(16, 63, 53, .28);
	transform: translateY(-1px);
}

.public-identity-header .environment-badge {
	margin-inline-start: 0;
	padding: 7px 10px;
	font-size: .63rem;
	box-shadow: none;
}

body[data-app="tk9-registration"] .main-shell {
	padding-bottom: 48px;
}

.public-event-hero {
	isolation: isolate;
	margin-top: 8px;
	padding: 25px 21px 22px;
	border: 1px solid rgba(217, 182, 111, .27);
	border-radius: 30px;
	background:
		radial-gradient(circle at 12% 8%, rgba(240, 213, 150, .14), transparent 30%),
		radial-gradient(circle at 94% 100%, rgba(26, 90, 75, .42), transparent 42%),
		linear-gradient(145deg, #123f35 0%, #0b2d26 59%, #071b17 100%);
	box-shadow: 0 24px 66px rgba(8, 38, 31, .18);
	color: var(--tk9-white, #fffdf8);
}

.public-event-hero.tk9-pattern::after {
	position: absolute;
	inset: 0;
	width: auto;
	height: auto;
	z-index: 0;
	border: 0;
	border-radius: inherit;
	background-image: url('/assets/takreem9-pattern.svg');
	background-size: 156px 156px;
	opacity: .055;
	mix-blend-mode: screen;
	pointer-events: none;
}

.public-event-hero::before {
	content: "";
	position: absolute;
	z-index: 0;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(90deg, transparent 0 70%, rgba(255, 255, 255, .02) 70% 70.2%, transparent 70.2%),
		radial-gradient(circle at 85% 15%, rgba(217, 182, 111, .09), transparent 23%);
}


.public-event-hero > * {
	position: relative;
	z-index: 1;
}

.public-event-hero .event-copy {
	max-width: 760px;
}

.hero-status-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.public-event-hero .edition-pill {
	padding: 7px 12px;
	border-color: rgba(240, 213, 150, .34);
	background: rgba(255, 255, 255, .055);
	color: var(--public-gold-bright);
	font-size: .69rem;
	letter-spacing: .01em;
}

.registration-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 31px;
	padding: 6px 11px;
	border: 1px solid rgba(255, 255, 255, .13);
	border-radius: 999px;
	background: rgba(0, 0, 0, .12);
	color: rgba(255, 255, 255, .82);
	font-size: .67rem;
	font-weight: 800;
}

.registration-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #c9d5d0;
	box-shadow: 0 0 0 4px rgba(201, 213, 208, .08);
}

.registration-status-badge.is-open {
	border-color: rgba(143, 208, 165, .34);
	background: rgba(75, 145, 99, .15);
	color: #dff4e6;
}
.registration-status-badge.is-open .registration-status-dot {
	background: #91dda9;
	box-shadow: 0 0 0 4px rgba(145, 221, 169, .12), 0 0 18px rgba(145, 221, 169, .46);
}

.registration-status-badge.is-closed {
	border-color: rgba(217, 182, 111, .35);
	background: rgba(217, 182, 111, .105);
	color: #f6e7bf;
}
.registration-status-badge.is-closed .registration-status-dot { background: var(--public-gold-bright); }

.registration-status-badge.is-error,
.registration-status-badge.is-security {
	border-color: rgba(217, 109, 109, .32);
	background: rgba(217, 109, 109, .105);
	color: #f4cccc;
}
.registration-status-badge.is-error .registration-status-dot,
.registration-status-badge.is-security .registration-status-dot { background: #e79090; }

.hero-overline {
	margin: 0 0 6px !important;
	color: var(--public-gold-bright) !important;
	font-size: .72rem !important;
	font-weight: 800;
	letter-spacing: .02em;
}

.public-event-hero h2 {
	max-width: 19ch;
	margin: 5px 0 10px;
	font-size: clamp(1.8rem, 8vw, 3.15rem);
	line-height: 1.28;
	letter-spacing: -.035em;
	text-wrap: balance;
	color: #fffefb;
}

.public-event-hero .hero-lead {
	max-width: 64ch;
	margin: 0;
	color: rgba(255, 255, 255, .72);
	font-size: .9rem;
	line-height: 1.9;
}

.event-facts {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(86px, .65fr) minmax(0, 1fr);
	gap: 7px;
	margin-top: 22px;
}

.event-fact {
	min-width: 0;
	padding: 10px 11px;
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 14px;
	background: rgba(255, 255, 255, .045);
	backdrop-filter: blur(5px);
}

.event-fact span {
	display: block;
	margin-bottom: 2px;
	color: rgba(255, 255, 255, .5);
	font-size: .58rem;
}

.event-fact strong {
	display: block;
	min-width: 0;
	color: #fffdf8;
	font-size: .72rem;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.hero-emblem {
	display: flex;
	width: auto;
	height: auto;
	flex: initial;
	align-items: center;
	gap: 13px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, .09);
}

.hero-emblem::before,
.hero-emblem::after {
	content: none !important;
}

.hero-emblem-mark {
	width: 72px;
	height: 72px;
	flex: 0 0 72px;
	display: grid;
	place-items: center;
	border: 1px solid rgba(217, 182, 111, .22);
	border-radius: 24px;
	background: rgba(0, 0, 0, .09);
}

.hero-emblem-mark img {
	width: 63px;
	height: 63px;
	filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .25));
}

.hero-emblem-copy {
	display: grid;
	line-height: 1.15;
}

.hero-emblem-copy span {
	color: rgba(255, 255, 255, .58);
	font-size: .62rem;
}

.hero-emblem-copy strong {
	margin: 2px 0;
	color: var(--public-gold-bright);
	font-size: 1.5rem;
	font-weight: 900;
}

.hero-emblem-copy small {
	color: rgba(255, 255, 255, .72);
	font-size: .62rem;
}

body[data-app="tk9-registration"] .draft-notice {
	border-color: rgba(217, 182, 111, .46);
	background: linear-gradient(135deg, rgba(255, 250, 235, .98), rgba(255, 253, 247, .98));
	box-shadow: 0 12px 32px rgba(96, 71, 25, .055);
}

body[data-app="tk9-registration"] .registration-card {
	border-color: rgba(16, 63, 53, .095);
	background: var(--public-surface);
	box-shadow: 0 24px 70px rgba(16, 63, 53, .09);
}

body[data-app="tk9-registration"] .registration-card::before {
	content: "";
	display: block;
	height: 3px;
	background: linear-gradient(90deg, transparent 0%, var(--public-gold) 24%, #efd28d 50%, var(--public-gold) 76%, transparent 100%);
	opacity: .84;
}

body[data-app="tk9-registration"] .public-footer {
	margin-top: 8px;
	padding-top: 26px;
	border-top: 1px solid rgba(16, 63, 53, .07);
}

body[data-app="tk9-registration"] .public-footer p {
	color: var(--public-emerald);
	font-weight: 900;
}

@media (min-width: 720px) {
	.public-identity-header { padding: 20px 0 10px; }
	.public-brand-mark { width: 68px; height: 68px; flex-basis: 68px; }
	.public-brand-copy .brand-kicker { font-size: .75rem; }
	.public-brand-copy .brand-title { font-size: 1.12rem; }
	.public-brand-copy small { font-size: .68rem; }
	.header-track-link { min-height: 42px; padding-inline: 17px; font-size: .76rem; }

	.public-event-hero {
		display: grid;
		grid-template-columns: minmax(0, 1.55fr) minmax(210px, .45fr);
		align-items: center;
		gap: 34px;
		min-height: 390px;
		padding: 42px 46px;
		border-radius: 36px;
	}
	.public-event-hero h2 { font-size: clamp(2.35rem, 4.8vw, 3.7rem); }
	.public-event-hero .hero-lead { font-size: 1rem; }
	.event-facts { max-width: 690px; gap: 9px; margin-top: 28px; }
	.event-fact { padding: 12px 13px; border-radius: 16px; }
	.event-fact span { font-size: .62rem; }
	.event-fact strong { font-size: .78rem; }

	.hero-emblem {
		display: grid;
		justify-items: center;
		align-content: center;
		gap: 12px;
		margin: 0;
		padding: 26px 0 26px 30px;
		border-top: 0;
		border-inline-start: 1px solid rgba(255, 255, 255, .1);
		text-align: center;
	}
	.hero-emblem-mark {
		width: 168px;
		height: 168px;
		border-radius: 50%;
		background: radial-gradient(circle, rgba(217, 182, 111, .11), rgba(0, 0, 0, .05) 62%, transparent 63%);
	}
	.hero-emblem-mark img { width: 156px; height: 156px; }
	.hero-emblem-copy strong { font-size: 2rem; }
	.hero-emblem-copy span, .hero-emblem-copy small { font-size: .72rem; }
}

@media (min-width: 1040px) {
	.public-event-hero { padding: 48px 54px; }
	.public-event-hero .event-copy { max-width: 800px; }
	body[data-app="tk9-registration"] .registration-card,
	body[data-app="tk9-registration"] .notice.draft-notice {
		width: min(940px, 100%);
	}
}

@media (max-width: 560px) {
	.public-identity-header .brand-wrap { min-height: 58px; gap: 9px; }
	.public-brand-mark { width: 48px; height: 48px; flex-basis: 48px; }
	.public-brand-copy .brand-kicker { max-width: 25ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .61rem; }
	.public-brand-copy .brand-title { font-size: .84rem; }
	.public-brand-copy small { display: none; }
	.header-track-link { min-height: 34px; padding: 6px 10px; font-size: .64rem; }
	.public-identity-header .environment-badge { position: absolute; top: 4px; left: 14px; transform: translateY(-50%); }

	.public-event-hero { border-radius: 24px; }
	.public-event-hero h2 { font-size: clamp(1.72rem, 9vw, 2.35rem); }
	.hero-status-row { margin-bottom: 15px; }
	.event-facts { grid-template-columns: 1fr 1fr; }
	.event-fact-name { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	.header-track-link { transition: none; }
}


/* TK9-PUB-004A1 — Mobile Hero & Shell Refinements
   Keeps the public entry anchored at the identity hero and improves the
   compact mobile hierarchy without changing registration business logic. */

@media (max-width: 560px) {
	/* Keep environment context fully inside the mobile header. */
	.public-identity-header {
		padding-top: max(12px, env(safe-area-inset-top));
	}

	.public-identity-header .brand-wrap {
		position: relative;
		align-items: center;
	}

	.public-header-actions {
		align-self: stretch;
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		gap: 5px;
	}

	.public-identity-header .environment-badge {
		position: static;
		order: -1;
		align-self: flex-start;
		max-width: 100%;
		margin: 0;
		padding: 4px 7px;
		transform: none;
		font-size: .54rem;
		line-height: 1.35;
		white-space: nowrap;
	}

	.header-track-link {
		min-height: 33px;
		padding: 5px 9px;
	}

	/* Give the hero a calmer vertical rhythm on narrow screens. */
	.public-event-hero {
		padding: 25px 18px 25px;
	}

	.hero-status-row {
		gap: 7px;
		margin-bottom: 17px;
	}

	.hero-overline {
		margin-bottom: 8px !important;
	}

	.public-event-hero h2 {
		margin-bottom: 13px;
	}

	.public-event-hero .hero-lead {
		line-height: 1.95;
	}

	.event-facts {
		gap: 9px;
		margin-top: 26px;
	}

	.event-fact {
		display: grid;
		place-items: center;
		min-height: 70px;
		padding: 12px 10px;
		border-radius: 15px;
		text-align: center;
	}

	.event-fact span {
		margin-bottom: 4px;
		font-size: .64rem;
		line-height: 1.4;
	}

	.event-fact strong {
		font-size: .82rem;
		line-height: 1.55;
		text-align: center;
	}

	.event-fact-name {
		min-height: 74px;
	}

	.hero-emblem {
		gap: 14px;
		margin-top: 25px;
		padding-top: 20px;
	}

	/* Make restored-draft context easier to scan on a phone. */
	body[data-app="tk9-registration"] .draft-notice {
		display: grid;
		grid-template-columns: 1fr;
		align-items: start;
		gap: 10px;
		padding: 15px 16px;
	}

	body[data-app="tk9-registration"] .draft-notice > div {
		gap: 3px;
	}

	body[data-app="tk9-registration"] .draft-notice strong {
		font-size: .86rem;
		line-height: 1.55;
	}

	body[data-app="tk9-registration"] .draft-notice span {
		font-size: .72rem;
		line-height: 1.65;
	}

	body[data-app="tk9-registration"] .draft-notice .text-button {
		justify-self: start;
		padding: 4px 0;
		white-space: normal;
		font-size: .75rem;
		text-align: start;
	}
}

@media (max-width: 380px) {
	.public-brand-copy .brand-kicker { max-width: 19ch; }
	.public-brand-mark { width: 44px; height: 44px; flex-basis: 44px; }
	.header-track-link { font-size: .61rem; }
	.public-identity-header .environment-badge { font-size: .51rem; }
	.event-fact strong { font-size: .78rem; }
}
