@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

/*
 * Step-by-step signup SPA (/signup/edge).
 * Self-contained, prefixed with `se-` and scoped under `.se-shell` so it does
 * not collide with the site's global stylesheet.
 */

:root {
	--se-green:       #81BA41;
	--se-green-hover: #6EA335;
	--se-green-light: #A3D165;
	--se-ink:         #111314;
	--se-ink-soft:    #474C4E;
	--se-border:      #E5E7EB;
	--se-danger:      #D9534F;
	--se-paper:       #F7F8F9;
	--se-placeholder: #A0A6AB;
}

body { background: #fff; }

.se-shell {
	font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--se-ink);
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

/* ----------------------------- header / progress ---------------------- */
.se-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px 12px;
}
.se-logo img { height: 22px; width: auto; display: block; }
.se-back {
	background: none;
	border: none;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	color: var(--se-ink-soft);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 4px;
}
.se-back:hover { color: var(--se-ink); }

.se-progress {
	height: 4px;
	background: var(--se-border);
	border-radius: 100px;
	overflow: hidden;
	margin: 0 24px;
}
.se-progress-bar {
	height: 100%;
	width: 0;
	background: var(--se-green);
	border-radius: 100px;
	transition: width 0.5s ease-out;
}

/* ------------------------------- layout ------------------------------- */
#signup-edge-app {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	padding: 0 20px;
}
/* The form is the single flex child of the app and must itself be a flex column
   so the hero step can grow to fill (vertical centering); without this the steps
   sit inside a plain block and never center. */
#signup-edge-form {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	width: 100%;
}
.se-step {
	width: 100%;
	max-width: 672px;        /* content column width */
	margin: 0 auto;
	padding: 36px 0 64px;    /* top-aligned */
	animation: se-fade-in 0.22s ease-out;
}
@media (min-width: 768px) { .se-step { padding-top: 48px; } }
/* Edu slides: centered text + icon, but still top-aligned vertically. */
.se-step-centered { text-align: center; }
/* Landing/start hero: the only vertically-centered screen. */
.se-step-hero {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding-bottom: 96px;
}
/* Any of our components that set `display` via a class would otherwise beat the
   UA stylesheet's `[hidden]{display:none}` (class specificity > UA), defeating
   the hidden attribute. Reassert hidden with priority for every such element:
   stacked steps, the Back button on step 0, and - importantly - the org-only
   Organization Name / TIN fields that must stay hidden for personal signups. */
.se-step[hidden],
.se-field[hidden],
.se-back[hidden],
.se-modal[hidden],
.se-terms-hint[hidden] { display: none !important; }
@keyframes se-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------ typography ---------------------------- */
.se-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 12px;
	font-weight: 700;
	color: var(--se-green);
	margin: 0 0 12px;
}
/* Step headings. */
.se-title {
	font-size: 30px;
	line-height: 1.1;
	font-weight: 900;
	letter-spacing: -0.02em;
	margin: 0 0 16px;
	color: var(--se-ink);
}
@media (min-width: 768px) { .se-title { font-size: 48px; } }
/* Landing hero: larger than the step headings. */
.se-title-hero { font-size: 40px; line-height: 1.05; }
@media (min-width: 768px) { .se-title-hero { font-size: 64px; line-height: 1.02; } }

.se-accent { color: var(--se-green); }
.se-lead {
	font-size: 18px;
	line-height: 1.6;
	color: var(--se-ink-soft);
	margin: 0 0 16px;
	max-width: 576px;        /* lead column width */
}
@media (min-width: 768px) { .se-lead { font-size: 20px; } }
.se-step-centered .se-lead,
.se-step-hero .se-lead { margin-left: auto; margin-right: auto; }
.se-fineprint {
	font-size: 14px;
	color: var(--se-ink-soft);
	margin-top: 20px;
}

/* -------------------------------- button ------------------------------ */
.se-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--se-green);
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	font-size: 16px;
	border: none;
	border-radius: 100px;
	padding: 15px 34px;
	margin-top: 12px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, opacity 0.15s ease;
}
.se-btn:hover { background: var(--se-green-hover); color: #fff; }
.se-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.se-btn.is-loading { color: transparent; position: relative; pointer-events: none; }
.se-btn.is-loading::after {
	content: "";
	position: absolute;
	width: 18px; height: 18px;
	top: calc(50% - 9px); left: calc(50% - 9px);
	border: 2px solid rgba(255,255,255,0.6);
	border-top-color: #fff;
	border-radius: 50%;
	animation: se-spin 0.6s linear infinite;
}
@keyframes se-spin { to { transform: rotate(360deg); } }
.se-btn-ghost {
	background: #fff;
	color: var(--se-ink);
	border: 1px solid var(--se-border);
}
.se-btn-ghost:hover { background: var(--se-paper); color: var(--se-ink); }

/* ----------------------------- edu icon ------------------------------- */
.se-edu-icon {
	width: 72px; height: 72px;
	border-radius: 50%;
	background: var(--se-paper);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 18px;
	color: var(--se-green);
	font-size: 26px;
}

/* ------------------------------- tiles -------------------------------- */
.se-tiles { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.se-tile {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	border: 1px solid var(--se-border);
	border-radius: 8px;
	padding: 18px 20px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.se-tile:hover { border-color: var(--se-green-light); }
.se-tile input { margin-top: 3px; accent-color: var(--se-green); width: 18px; height: 18px; flex: 0 0 auto; }
.se-tile input:focus, .se-tile input:focus-visible { outline: none; box-shadow: none; }
/* keep a focus cue on the tile itself for keyboard users */
.se-tile:focus-within { border-color: var(--se-green); }
.se-tile-body { display: flex; flex-direction: column; }
.se-tile-title { font-weight: 700; font-size: 16px; }
.se-tile-sub { font-size: 14px; color: var(--se-ink-soft); margin-top: 2px; }
.se-tile.is-selected {
	border-color: var(--se-green);
	background: rgba(129, 186, 65, 0.06);
}

/* ------------------------------- fields ------------------------------- */
.se-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 8px 0 4px;
}
.se-field { display: flex; flex-direction: column; }
.se-col-full { grid-column: 1 / -1; }
.se-label {
	font-size: 14px;
	font-weight: 700;
	color: var(--se-ink);
	margin-bottom: 6px;
}
.se-req { color: var(--se-danger); }
.se-input {
	width: 100%;
	font-family: inherit;
	font-size: 16px;
	color: var(--se-ink);
	background: #fff;
	border: 1px solid var(--se-border);
	border-radius: 8px;
	padding: 12px 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.se-input::placeholder { color: var(--se-placeholder); }
.se-input:focus {
	outline: none;
	border-color: var(--se-green);
	box-shadow: 0 0 0 3px rgba(129, 186, 65, 0.2);
}
.se-field.is-error .se-input,
.se-input.is-error {
	border-color: var(--se-danger);
	box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15);
}
.se-field-error {
	color: var(--se-danger);
	font-size: 12px;
	margin: 6px 0 0;
	min-height: 0;
	display: none;
}
.se-field-error.is-visible { display: block; }
.se-form-error {
	color: var(--se-danger);
	font-size: 14px;
	margin-top: 14px;
}

/* ------------------------------- terms -------------------------------- */
/* Embedded Terms of Service (fetched + chrome-stripped by /ajax/terms). */
.se-terms-doc {
	margin-top: 24px;
	max-height: 340px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;   /* momentum scroll on iOS */
	overscroll-behavior: contain;        /* don't scroll the page when it bottoms out */
	border: 1px solid var(--se-border);
	border-radius: 8px;
	background: #fff;
	padding: 20px 24px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--se-ink-soft);
	box-shadow: inset 0 -12px 12px -12px rgba(0,0,0,0.12);
	overflow-wrap: break-word;           /* wrap long URLs/words instead of overflowing */
	word-break: break-word;
}
.se-terms-loading { color: var(--se-ink-soft); font-style: italic; margin: 0; }
.se-terms-doc h1, .se-terms-doc h2, .se-terms-doc h3, .se-terms-doc h4 {
	color: var(--se-ink);
	font-weight: 700;
	line-height: 1.3;
	margin: 18px 0 8px;
}
.se-terms-doc h1 { font-size: 18px; }
.se-terms-doc h2 { font-size: 16px; }
.se-terms-doc h3, .se-terms-doc h4 { font-size: 15px; }
.se-terms-doc p { margin: 0 0 12px; }
.se-terms-doc ul, .se-terms-doc ol { margin: 0 0 12px; padding-left: 22px; }
.se-terms-doc li { margin-bottom: 6px; }
.se-terms-doc a { color: var(--se-green); text-decoration: underline; }
.se-terms-doc strong { color: var(--se-ink); }
.se-terms-doc :first-child { margin-top: 0; }
/* keep embedded media/tables inside the panel on small screens */
.se-terms-doc img { max-width: 100%; height: auto; }
.se-terms-doc table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.se-terms-doc td, .se-terms-doc th { padding: 6px 8px; border: 1px solid var(--se-border); }
/* per-document title + version, and the separator between the two docs */
.se-terms-doc-title { font-size: 19px; margin: 0 0 2px; color: var(--se-ink); }
.se-terms-doc-version { font-size: 13px; color: var(--se-ink-soft); margin: 0 0 16px; font-style: italic; }
.se-terms-sep { border: none; border-top: 2px solid var(--se-border); margin: 32px 0 24px; }
/* shown while the agreement checkbox is locked (must scroll to the bottom first) */
.se-terms-hint {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 12px 0 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--se-green);
}
.se-terms-hint i { font-size: 12px; }
.se-check.is-locked input { opacity: 0.45; cursor: not-allowed; }
.se-check.is-locked span { color: var(--se-ink-soft); opacity: 0.65; }

.se-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 20px;
	cursor: pointer;
	line-height: 1.5;
}
.se-check input { margin-top: 3px; accent-color: var(--se-green); width: 18px; height: 18px; }
.se-check a { color: var(--se-green); font-weight: 700; }

/* ------------------------------ honeypot ------------------------------ */
.se-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/* ------------------------------- modal -------------------------------- */
.se-modal {
	position: fixed;
	inset: 0;
	background: rgba(17, 19, 20, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 1000;
}
.se-modal[hidden] { display: none; }
.se-modal-card {
	background: #fff;
	border-radius: 12px;
	max-width: 460px;
	width: 100%;
	padding: 28px;
	box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.se-modal-title { font-size: 20px; font-weight: 900; margin: 0 0 12px; }
.se-modal-card p { color: var(--se-ink-soft); line-height: 1.6; margin: 0 0 20px; }
.se-modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.se-modal-actions .se-btn { margin-top: 0; }

/* ------------------------------- footer ------------------------------- */
.se-footer {
	flex: 0 0 auto;
	text-align: center;
	padding: 20px;
	font-size: 12px;
	color: var(--se-ink-soft);
	border-top: 1px solid var(--se-border);
}

/* ------------------------------ responsive ---------------------------- */
@media (max-width: 640px) {
	.se-grid { grid-template-columns: 1fr; }
	.se-terms-doc { padding: 16px; max-height: 50vh; }
}
