/* ==========================================================================
   Edman — Forms: contact form and online account application
   ========================================================================== */

/* Grid ------------------------------------------------------------------ */
.edm-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px 20px; }
.edm-field { grid-column: span 12; min-width: 0; margin: 0; padding: 0; border: 0; }
.edm-field--half { grid-column: span 6; }
.edm-field--third { grid-column: span 4; }
.edm-field[hidden], .edm-fsec[hidden] { display: none !important; }

/* Labels ---------------------------------------------------------------- */
.edm-field__label {
	display: flex; align-items: center; gap: 8px; margin: 0 0 9px !important; padding: 0;
	font: 700 .86rem/1.35 var(--edm-sans); letter-spacing: .01em; color: var(--edm-ink-2);
}
.edm-req { width: 6px; height: 6px; border-radius: 50%; background: var(--edm-grad); flex: none; }
.edm-field__help { margin: 8px 0 0 !important; font-size: .82rem; line-height: 1.5; color: var(--edm-muted); }
.edm-field__error { display: flex; align-items: center; gap: 6px; margin: 8px 0 0 !important; font-size: .84rem; font-weight: 600; color: #b42318; }
.edm-field__error[hidden] { display: none; }
.edm-field__error .edm-icon { width: 16px; height: 16px; }

/* Inputs ---------------------------------------------------------------- */
.edm-input {
	display: block; width: 100%; min-height: 54px; margin: 0; padding: 14px 16px;
	font: 500 1rem/1.4 var(--edm-sans); color: var(--edm-ink);
	background: #fff; border: 1px solid var(--edm-line-2); border-radius: var(--edm-radius-sm);
	box-shadow: 0 1px 2px rgba(11, 27, 52, .04);
	transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
	-webkit-appearance: none; appearance: none;
}
.edm-input::placeholder { color: #98a3b3; }
.edm-input:hover { border-color: #b9c5d6; }
.edm-input:focus { outline: none; border-color: var(--edm-blue); box-shadow: 0 0 0 4px rgba(19, 96, 214, .14); }
.edm-input--area { min-height: 140px; resize: vertical; }
.edm-field--textarea .edm-input--area[rows="3"] { min-height: 104px; }
.edm-input[type="date"] { min-height: 54px; }
.edm-input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.edm-input[type="number"]::-webkit-inner-spin-button { opacity: .4; }
.has-error .edm-input, .edm-input[aria-invalid="true"] { border-color: #d92d20; background: #fffbfa; }
.has-error .edm-input:focus { box-shadow: 0 0 0 4px rgba(217, 45, 32, .12); }

.edm-select { position: relative; }
.edm-select .edm-input { padding-right: 44px; cursor: pointer; }
.edm-select .edm-icon { position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--edm-muted); pointer-events: none; }

/* Choice pills & tiles -------------------------------------------------- */
.edm-choice__opts { display: flex; flex-wrap: wrap; gap: 10px; }
.edm-choice--tiles .edm-choice__opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.edm-choice__opt { position: relative; display: block; margin: 0; cursor: pointer; }
.edm-choice__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.edm-choice__ui {
	display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 11px 18px;
	border: 1px solid var(--edm-line-2); border-radius: 999px; background: #fff;
	font: 600 .92rem/1.3 var(--edm-sans); color: var(--edm-ink-2);
	transition: border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.edm-choice--tiles .edm-choice__ui { border-radius: 14px; min-height: 56px; padding: 14px 16px; }
.edm-choice__tick { width: 18px; height: 18px; padding: 3px; border-radius: 50%; border: 1px solid var(--edm-line-2); color: transparent; flex: none; transition: all .2s ease; stroke-width: 2.4; }
.edm-choice__opt:hover .edm-choice__ui { border-color: #b9c5d6; background: var(--edm-paper); }
.edm-choice__opt input:checked + .edm-choice__ui { border-color: var(--edm-blue); background: var(--edm-mist); color: var(--edm-ink); box-shadow: inset 0 0 0 1px var(--edm-blue); }
.edm-choice__opt input:checked + .edm-choice__ui .edm-choice__tick { background: var(--edm-grad); border-color: transparent; color: #fff; }
.edm-choice__opt input:focus-visible + .edm-choice__ui { outline: 2px solid var(--edm-blue); outline-offset: 3px; }
.edm-choice.has-error .edm-choice__ui { border-color: #f1a7a1; }

/* Checkbox -------------------------------------------------------------- */
.edm-check__label { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; align-items: start; cursor: pointer; padding: 18px 20px; border: 1px solid var(--edm-line-2); border-radius: 14px; background: #fff; transition: border-color .2s ease, background .2s ease; }
.edm-check__label:hover { border-color: #b9c5d6; }
.edm-check__label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.edm-check__box { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--edm-line-2); display: inline-flex; align-items: center; justify-content: center; color: transparent; background: #fff; transition: all .2s ease; }
.edm-check__box .edm-icon { width: 16px; height: 16px; stroke-width: 2.6; }
.edm-check__label input:checked ~ .edm-check__box { background: var(--edm-grad); border-color: transparent; color: #fff; }
.edm-check__label input:focus-visible ~ .edm-check__box { outline: 2px solid var(--edm-blue); outline-offset: 3px; }
.edm-check__label:has(input:checked) { border-color: var(--edm-blue); background: var(--edm-mist); }
.edm-check__text { font-size: .95rem; line-height: 1.6; color: var(--edm-ink-2); font-weight: 500; }
.edm-check__text a { font-weight: 700; white-space: nowrap; }
.edm-check__text .edm-req { display: inline-block; margin-left: 6px; vertical-align: middle; }
.edm-check.has-error .edm-check__label { border-color: #f1a7a1; background: #fffbfa; }

/* Switch ---------------------------------------------------------------- */
.edm-toggle-row { margin-top: 36px; padding: 20px 22px; border-radius: 18px; background: var(--edm-paper); border: 1px dashed var(--edm-line-2); }
.edm-switch { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.edm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.edm-switch__track { position: relative; width: 52px; height: 30px; flex: none; border-radius: 999px; background: #cfd8e4; transition: background .25s ease; }
.edm-switch__thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(11, 27, 52, .25); transition: transform .3s var(--edm-ease); }
.edm-switch input:checked + .edm-switch__track { background: var(--edm-grad); }
.edm-switch input:checked + .edm-switch__track .edm-switch__thumb { transform: translateX(22px); }
.edm-switch input:focus-visible + .edm-switch__track { outline: 2px solid var(--edm-blue); outline-offset: 3px; }
.edm-switch__text { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; color: var(--edm-muted); line-height: 1.45; }
.edm-switch__text strong { color: var(--edm-ink); font-size: 1rem; }

/* Signature ------------------------------------------------------------- */
.edm-sign__pad { position: relative; height: 210px; border-radius: 16px; border: 1px dashed #b9c5d6; background: linear-gradient(180deg, #fff, var(--edm-paper)); overflow: hidden; touch-action: none; }
.edm-sign__canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.edm-sign__line { position: absolute; left: 28px; right: 28px; bottom: 52px; height: 1px; background: var(--edm-line-2); pointer-events: none; }
.edm-sign__placeholder { position: absolute; left: 28px; bottom: 62px; display: inline-flex; align-items: center; gap: 8px; font: italic 600 1.35rem/1 var(--edm-serif); color: #a8b3c2; pointer-events: none; transition: opacity .2s ease; }
.edm-sign__placeholder .edm-icon { width: 18px; height: 18px; }
.edm-sign.is-signed .edm-sign__placeholder { opacity: 0; }
.edm-sign.is-signed .edm-sign__pad { border-style: solid; border-color: var(--edm-blue); }
.edm-sign.has-error .edm-sign__pad { border-color: #d92d20; }
.edm-sign__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 10px; }
.edm-sign__hint { margin: 0 !important; font-size: .82rem; color: var(--edm-muted); }
.edm-sign__actions { display: flex; gap: 18px; }
.edm-sign__typed { margin-top: 12px; }

/* Upload ---------------------------------------------------------------- */
.edm-upload__drop {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
	padding: 34px 24px; border: 1.5px dashed #b9c5d6; border-radius: 18px; background: var(--edm-paper); cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}
.edm-upload__drop:hover, .edm-upload__drop.is-drag { border-color: var(--edm-blue); background: var(--edm-mist); }
.edm-upload__drop:focus-within { outline: 2px solid var(--edm-blue); outline-offset: 3px; }
.edm-upload__drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.edm-upload__icon { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--edm-blue); box-shadow: var(--edm-shadow-sm); margin-bottom: 4px; }
.edm-upload__title { font-weight: 700; color: var(--edm-ink); }
.edm-upload__title u { color: var(--edm-blue); text-underline-offset: 3px; }
.edm-upload__meta { font-size: .84rem; color: var(--edm-muted); }
.edm-upload__list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.edm-upload__list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--edm-line); background: #fff; font-size: .9rem; font-weight: 600; color: var(--edm-ink-2); }
.edm-upload__list li::before { content: none !important; }
.edm-upload__list .edm-icon { color: var(--edm-blue); }
.edm-upload__list span:last-child { margin-left: auto; color: var(--edm-muted); font-weight: 500; font-size: .82rem; }
.edm-upload.has-error .edm-upload__drop { border-color: #d92d20; }

/* Honeypot -------------------------------------------------------------- */
.edm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Notices --------------------------------------------------------------- */
.edm-notice { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; margin-bottom: 28px; border-radius: 16px; border: 1px solid; }
.edm-notice:focus { outline: none; }
.edm-notice--success { background: #ecfdf3; border-color: #abefc6; color: #05603a; }
.edm-notice--error { background: #fef3f2; border-color: #fecdca; color: #912018; }
.edm-notice__icon { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: currentColor; }
.edm-notice__icon .edm-icon { color: #fff; width: 20px; height: 20px; }
.edm-notice__title { margin: 0 0 2px !important; font-weight: 800; }
.edm-notice__text { margin: 0 !important; font-size: .94rem; }

/* Contact form ---------------------------------------------------------- */
.edm-form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--edm-line); }
.edm-form__privacy { display: flex; align-items: flex-start; gap: 10px; margin: 0 !important; max-width: 380px; font-size: .84rem; line-height: 1.55; color: var(--edm-muted); }
.edm-form__privacy .edm-icon { width: 17px; height: 17px; color: var(--edm-blue); margin-top: 1px; }

/* Application layout ---------------------------------------------------- */
.edm-apply { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.edm-apply__aside { position: sticky; top: calc(var(--edm-bar-h) + var(--edm-admin) + 24px); display: flex; flex-direction: column; gap: 18px; }
.edm-apply__card { padding: 26px; border-radius: 22px; background: #fff; border: 1px solid var(--edm-line); }
.edm-apply__card--progress { box-shadow: var(--edm-shadow); }
.edm-apply__heading { margin: 10px 0 8px !important; font-size: 2rem; }
.edm-apply__lead { font-size: .93rem; line-height: 1.6; color: var(--edm-muted); }
.edm-meter { position: relative; height: 6px; margin-top: 22px; border-radius: 999px; background: var(--edm-mist-2); overflow: hidden; }
.edm-meter__fill { position: absolute; inset: 0 auto 0 0; width: 25%; border-radius: inherit; background: var(--edm-grad); transition: width .6s var(--edm-ease); }
.edm-meter__label { margin: 10px 0 0 !important; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--edm-ink-2); }

.edm-steps { margin-top: 18px; }
.edm-steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.edm-steps__list li { padding: 0 !important; }
.edm-steps__list li::before { content: none !important; }
.edm-steps__btn {
	display: grid; grid-template-columns: 42px minmax(0, 1fr) 22px; align-items: center; gap: 12px; width: 100%;
	padding: 10px 12px 10px 10px; border: 1px solid transparent; border-radius: 14px; background: transparent; cursor: pointer; text-align: left;
	font: 700 .92rem/1.3 var(--edm-sans); color: var(--edm-ink-2);
	transition: background-color .2s ease, border-color .2s ease;
}
.edm-steps__btn:hover { background: var(--edm-paper); }
.edm-steps__icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--edm-paper); color: var(--edm-muted); transition: all .25s ease; }
.edm-steps__icon .edm-icon { width: 20px; height: 20px; }
.edm-steps__text { display: flex; flex-direction: column; gap: 2px; }
.edm-steps__state { font-size: .72rem; font-weight: 600; color: var(--edm-muted); letter-spacing: .02em; }
.edm-steps__done { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: transparent; border: 1px solid var(--edm-line-2); }
.edm-steps__done .edm-icon { width: 13px; height: 13px; stroke-width: 2.8; }
.edm-steps__btn[aria-current="step"] { background: var(--edm-mist); border-color: rgba(19, 96, 214, .18); color: var(--edm-ink); }
.edm-steps__btn[aria-current="step"] .edm-steps__icon { background: var(--edm-grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(19, 96, 214, .6); }
.edm-steps__btn.is-complete .edm-steps__done { background: #12b76a; border-color: #12b76a; color: #fff; }
.edm-steps__btn.is-complete .edm-steps__icon { color: var(--edm-blue); background: var(--edm-mist); }
.edm-steps__btn.has-issue .edm-steps__done { border-color: #d92d20; background: #fef3f2; }

.edm-apply__card-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px !important; font-weight: 800; color: var(--edm-ink); font-size: .95rem; }
.edm-apply__card-title .edm-icon { color: var(--edm-blue); }
.edm-apply__card--need { background: var(--edm-paper); }
.edm-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: .88rem; line-height: 1.55; }
.edm-ticks li { position: relative; padding-left: 26px; }
.edm-ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%231360d6'/%3E%3Cpath d='m7 12.5 3.2 3.2L17 9' stroke='%23fff' stroke-width='2.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transform: none; }
.edm-apply__card--help p { font-size: .9rem; color: var(--edm-muted); }
.edm-apply__contact { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; color: var(--edm-ink-2) !important; font-size: .92rem; }
.edm-apply__contact .edm-icon { width: 18px; height: 18px; color: var(--edm-blue); }
.edm-apply__contact:hover { color: var(--edm-blue) !important; }

.edm-apply__main { min-width: 0; padding: clamp(24px, 4vw, 56px); border-radius: 28px; background: #fff; border: 1px solid var(--edm-line); box-shadow: var(--edm-shadow-lg); }
.edm-apply__form { margin: 0; }

.edm-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.edm-apply.is-enhanced .edm-step { display: none; }
.edm-apply.is-enhanced .edm-step.is-active { display: block; animation: edm-step-in .5s var(--edm-ease); }
.edm-apply:not(.is-enhanced) .edm-step + .edm-step { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--edm-line); }
.edm-apply:not(.is-enhanced) .edm-step__nav [data-next], .edm-apply:not(.is-enhanced) .edm-step__nav [data-prev] { display: none; }
@keyframes edm-step-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.edm-step__head { padding-bottom: 28px; border-bottom: 1px solid var(--edm-line); }
.edm-step__kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px !important; font-size: .76rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--edm-blue); }
.edm-step__icon { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--edm-mist); }
.edm-step__icon .edm-icon { width: 17px; height: 17px; }
.edm-step__title { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.1; }
.edm-step__title:focus { outline: none; }
.edm-step__intro { margin-top: 12px !important; max-width: 680px; color: var(--edm-muted); }

.edm-fsec { margin-top: 36px; }
.edm-fsec + .edm-fsec { padding-top: 36px; border-top: 1px solid var(--edm-line); }
.edm-fsec__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.edm-fsec__title { font-size: 1.6rem; }
.edm-fsec__note { display: inline-flex; padding: 5px 12px; border-radius: 999px; background: var(--edm-paper); border: 1px solid var(--edm-line); font-size: .74rem; font-weight: 700; color: var(--edm-muted); letter-spacing: .04em; }
.edm-fsec__intro { margin: -8px 0 22px !important; color: var(--edm-muted); font-size: .95rem; max-width: 720px; }

.edm-row-card { grid-column: span 12; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; padding: 20px; border-radius: 16px; background: var(--edm-paper); border: 1px solid var(--edm-line); }

.edm-declare { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; }
.edm-declare li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; padding: 0 !important; font-size: .96rem; line-height: 1.65; color: var(--edm-ink-2); }
.edm-declare li::before { content: none !important; }
.edm-declare .edm-icon { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--edm-mist); color: var(--edm-blue); stroke-width: 2.4; }

.edm-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.edm-docs__item { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 16px; border: 1px solid var(--edm-line); background: #fff; }
.edm-docs__item p { margin: 0 !important; font-size: .92rem; line-height: 1.55; color: var(--edm-ink-2); font-weight: 600; }
.edm-docs__icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--edm-mist); color: var(--edm-blue); }

.edm-step__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--edm-line); }
.edm .edm-btn--submit { --h: 58px; padding: 0 32px; }
.edm .edm-btn[disabled] { opacity: .65; pointer-events: none; }

.edm-apply__done { text-align: center; padding: clamp(24px, 5vw, 64px) 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.edm-apply__done-icon { width: 76px; height: 76px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--edm-grad); color: #fff; box-shadow: 0 20px 40px -18px rgba(19, 96, 214, .7); }
.edm-apply__done-icon .edm-icon { width: 36px; height: 36px; stroke-width: 2.4; }
.edm-apply__done h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); max-width: 620px; }
.edm-apply__done p { max-width: 560px; color: var(--edm-muted); }
.edm-apply__done-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1100px) {
	.edm-apply { grid-template-columns: minmax(0, 1fr); }
	.edm-apply__aside { display: contents; }
	.edm-apply__card--progress { order: 1; }
	.edm-apply__main { order: 2; }
	.edm-apply__card--need { order: 3; }
	.edm-apply__card--help { order: 4; }
	.edm-steps__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.edm-steps__btn { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 12px 8px; gap: 8px; }
	.edm-steps__done { display: none; }
	.edm-steps__text { font-size: .8rem; align-items: center; }
	.edm-steps__btn.is-complete .edm-steps__icon { background: #12b76a; color: #fff; }
}

@media (max-width: 767px) {
	.edm-field--half, .edm-field--third { grid-column: span 12; }
	.edm-row-card { gap: 14px; padding: 16px; }
	.edm-docs { grid-template-columns: minmax(0, 1fr); }
	.edm-apply__main { padding: 22px 18px; border-radius: 22px; }
	.edm-apply__card { padding: 20px; }
	.edm-steps__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
	.edm-steps__text { font-size: 0; }
	.edm-steps__state { display: none; }
	.edm-steps__btn { padding: 8px 4px; }
	.edm-choice--tiles .edm-choice__opts { grid-template-columns: minmax(0, 1fr); }
	.edm-step__nav .edm-btn { flex: 1; padding: 0 16px; }
	.edm-step__nav > span:empty { display: none; }
	.edm-form__foot .edm-btn { width: 100%; }
	.edm-sign__pad { height: 180px; }
}
