/* 2 Legit Apply. Inherits the theme font so the site stays one type family.
   Override any --tla-* variable in your theme CSS to retune colors. */
.tla {
	--tla-navy: #0b2545;
	--tla-blue: #1d6fe0;
	--tla-blue-d: #1559b8;
	--tla-ink: #101828;
	--tla-muted: #5b6475;
	--tla-line: #d6dce6;
	--tla-bg: #ffffff;
	--tla-soft: #f3f6fa;
	--tla-err: #c2312b;
	--tla-ok: #13804b;
	--tla-radius: 10px;
	font-family: inherit;
	color: var(--tla-ink);
	max-width: 780px;
	margin: 0 auto;
	line-height: 1.5;
	box-sizing: border-box;
}
.tla *, .tla *::before, .tla *::after { box-sizing: inherit; }
.tla [hidden] { display: none !important; }

/* Progress */
.tla-progress {
	display: flex;
	gap: 6px;
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	counter-reset: none;
}
.tla-progress__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 12px;
	color: var(--tla-muted);
	margin: 0;
}
.tla-progress__item::before {
	content: "";
	display: block;
	height: 5px;
	border-radius: 5px;
	background: var(--tla-line);
	transition: background .25s;
}
.tla-progress__item.is-done::before,
.tla-progress__item.is-active::before { background: var(--tla-blue); }
.tla-progress__item.is-active { color: var(--tla-navy); font-weight: 600; }
.tla-progress__num { display: none; }
@media (max-width: 600px) {
	.tla-progress__label { display: none; }
}

/* Card */
.tla-form {
	background: var(--tla-bg);
	border: 1px solid var(--tla-line);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(11, 37, 69, .08);
	padding: clamp(20px, 4vw, 40px);
	position: relative;
}
.tla-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.tla-step__head { margin-bottom: 22px; }
.tla-step__count { margin: 0 0 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--tla-blue); font-weight: 700; }
.tla-step__title { margin: 0; font-size: clamp(22px, 3.2vw, 28px); line-height: 1.2; color: var(--tla-navy); }
.tla-step__sub { margin: 6px 0 0; color: var(--tla-muted); font-size: 15px; }

/* Grid */
.tla-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px 14px; }
.tla-field { grid-column: span 6; min-width: 0; }
@media (min-width: 640px) {
	.tla-field--half { grid-column: span 3; }
	.tla-field--third { grid-column: span 2; }
}

.tla-label, .tla-seg legend {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 6px;
	color: var(--tla-ink);
	padding: 0;
}
.tla-req { color: var(--tla-err); font-style: normal; }
.tla-help { margin: 5px 0 0; font-size: 12.5px; color: var(--tla-muted); }
.tla-err { margin: 5px 0 0; font-size: 13px; color: var(--tla-err); min-height: 0; }
.tla-err:empty { display: none; }

.tla input[type="text"], .tla input[type="email"], .tla input[type="tel"], .tla input[type="password"],
.tla input[type="date"], .tla select, .tla textarea {
	width: 100%;
	font: inherit;
	font-size: 16px; /* prevents iOS zoom */
	color: var(--tla-ink);
	background: #fff;
	border: 1.5px solid var(--tla-line);
	border-radius: var(--tla-radius);
	padding: 11px 13px;
	min-height: 48px;
	margin: 0;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none;
	appearance: none;
}
.tla select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235b6475' stroke-width='1.8' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
}
.tla textarea { min-height: 90px; resize: vertical; }
.tla input:focus, .tla select:focus, .tla textarea:focus {
	outline: none;
	border-color: var(--tla-blue);
	box-shadow: 0 0 0 3px rgba(29, 111, 224, .18);
}
.tla .is-invalid input, .tla .is-invalid select, .tla .is-invalid textarea, .tla .is-invalid .tla-seg__opt span, .tla .is-invalid .tla-sig {
	border-color: var(--tla-err);
}

/* Affixes */
.tla-affix { position: relative; display: flex; align-items: center; }
.tla-affix > span {
	position: absolute;
	color: var(--tla-muted);
	font-weight: 600;
	pointer-events: none;
}
.tla-affix--pre > span { left: 13px; }
.tla-affix--pre input { padding-left: 26px !important; }
.tla-affix--post > span { right: 13px; }
.tla-affix--post input { padding-right: 34px !important; }
.tla-secret input { padding-right: 64px !important; }
.tla-reveal {
	position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	border: 0; background: var(--tla-soft); color: var(--tla-navy);
	font: inherit; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 6px 9px; cursor: pointer;
}

/* Checkbox */
.tla-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--tla-muted); cursor: pointer; line-height: 1.45; }
.tla-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--tla-blue); }
.tla-field--checkbox + .tla-field--checkbox { margin-top: -6px; }

/* Yes / No segmented */
.tla-seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.tla-seg__opts { display: flex; gap: 10px; }
.tla-seg__opt { flex: 1; max-width: 160px; position: relative; cursor: pointer; }
.tla-seg__opt input { position: absolute; opacity: 0; inset: 0; }
.tla-seg__opt span {
	display: block; text-align: center; padding: 11px 10px; border: 1.5px solid var(--tla-line);
	border-radius: var(--tla-radius); font-weight: 600; transition: all .15s; background: #fff;
}
.tla-seg__opt input:checked + span { border-color: var(--tla-blue); background: rgba(29, 111, 224, .08); color: var(--tla-blue-d); }
.tla-seg__opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(29, 111, 224, .25); }

/* File drop */
.tla-drop {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	border: 2px dashed var(--tla-line); border-radius: 12px; padding: 22px 16px; text-align: center;
	cursor: pointer; background: var(--tla-soft); transition: border-color .15s, background .15s; position: relative;
}
.tla-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tla-drop.is-over, .tla-drop:hover { border-color: var(--tla-blue); background: rgba(29, 111, 224, .05); }
.tla-drop__cta { font-weight: 700; color: var(--tla-blue-d); }
.tla-drop__hint { font-size: 13px; color: var(--tla-muted); }
.tla-files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.tla-files li {
	display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--tla-line);
	border-radius: 8px; font-size: 14px; margin: 0;
}
.tla-files li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tla-files li small { color: var(--tla-muted); }
.tla-files button { border: 0; background: none; color: var(--tla-err); cursor: pointer; font: inherit; font-size: 13px; padding: 2px 4px; }

/* Review + authorization */
.tla-review { background: var(--tla-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.tla-review dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 0; }
.tla-review dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--tla-muted); margin: 0; }
.tla-review dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.tla-auth {
	border: 1px solid var(--tla-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
	max-height: 210px; overflow-y: auto; font-size: 13px; color: var(--tla-muted);
}
.tla-auth h3 { margin: 0 0 6px; font-size: 14px; color: var(--tla-ink); }
.tla-auth p { margin: 0; }

/* Signature */
.tla-sig { position: relative; border: 1.5px solid var(--tla-line); border-radius: 12px; background: #fff; overflow: hidden; }
.tla-sig__pad { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.tla-sig__hint {
	position: absolute; left: 16px; right: 16px; bottom: 34px; border-top: 1.5px solid var(--tla-line);
	padding-top: 4px; font-size: 12px; color: var(--tla-muted); pointer-events: none;
}
.tla-sig.has-ink .tla-sig__hint { color: transparent; }
.tla-sig__clear {
	position: absolute; top: 8px; right: 8px; border: 0; background: var(--tla-soft); color: var(--tla-navy);
	font: inherit; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 6px; cursor: pointer;
}

/* Alerts + nav */
.tla-alert { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: #fdecea; color: var(--tla-err); font-size: 14px; }
.tla-nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 26px; }
.tla-nav [data-next], .tla-nav [data-submit] { margin-left: auto; }
.tla-btn {
	font: inherit; font-weight: 700; font-size: 16px; border-radius: var(--tla-radius); padding: 14px 26px;
	cursor: pointer; border: 1.5px solid transparent; min-height: 50px; transition: background .15s, transform .05s;
	line-height: 1.2;
}
.tla-btn:active { transform: translateY(1px); }
.tla-btn--primary { background: var(--tla-blue); color: #fff; }
.tla-btn--primary:hover { background: var(--tla-blue-d); }
.tla-btn--ghost { background: #fff; color: var(--tla-navy); border-color: var(--tla-line); }
.tla-btn--ghost:hover { border-color: var(--tla-navy); }
.tla-btn[disabled] { opacity: .65; cursor: wait; }
.tla-btn.is-busy::after {
	content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px;
	border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: tla-spin .7s linear infinite;
}
@keyframes tla-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
	.tla-nav { flex-direction: column-reverse; }
	.tla-btn { width: 100%; }
}

/* Done */
.tla-done { text-align: center; padding: 30px 10px; }
.tla-done__icon {
	width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
	background: rgba(19, 128, 75, .1); color: var(--tla-ok);
}
.tla-done h2 { margin: 0 0 8px; color: var(--tla-navy); }
.tla-done p { color: var(--tla-muted); max-width: 520px; margin: 0 auto; }

.tla-secure { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--tla-muted); margin: 14px 0 0; }

@media (prefers-reduced-motion: reduce) {
	.tla * { transition: none !important; animation: none !important; }
}

/* Inside the theme's form card on /apply: drop our own card chrome. */
.form-card .tla { max-width: none; }
.form-card .tla-form { border: 0; box-shadow: none; padding: 0; background: transparent; }
