/* Client consent form ------------------------------------------------ */
.cf [hidden], .cf__form[hidden], .cf__done[hidden] { display: none !important; }
.cf { display: grid; gap: var(--s-8, 2rem); align-items: start; }
@media (min-width: 1040px) {
  .cf { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .cf__terms { position: sticky; top: 96px; grid-column: 2; grid-row: 1 / span 2; }
}
.cf__form, .cf__done { display: grid; gap: 1.35rem; }
.cf__head h2, .cf__done h2, .cf__terms h2 { font-size: var(--fs-h3); margin-top: .35rem; }
.cf__head .card__text { margin-top: .4rem; }
.cf__opt { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-left: .35rem; }
.cf__pan { text-transform: uppercase; letter-spacing: .14em; font-family: var(--font-mono); }

/* file picker */
.cf__file { display: flex; align-items: center; gap: .7rem; border: 1px dashed var(--line-2); border-radius: 10px; padding: .45rem .5rem; cursor: pointer; background: rgba(0,0,0,.22); min-height: 48px; }
.cf__file:hover { border-color: var(--line-gold-2); }
.cf__file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cf__file:focus-within { outline: 2px solid var(--gold-400); outline-offset: 2px; }
.cf__file-btn { flex: none; font-size: .76rem; font-weight: 600; color: #05100A; background: var(--gold-300); border-radius: 7px; padding: .42rem .8rem; }
.cf__file-name { font-size: .8rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf__file.has-file .cf__file-name { color: var(--text); }
#cf-panfile-err { display: none; }
.field.is-invalid #cf-panfile-err { display: block; }

/* signature */
.cf__sig-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cf__seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0,0,0,.25); }
.cf__seg button { font: inherit; font-size: .76rem; padding: .32rem .95rem; border-radius: 999px; border: 0; background: none; color: var(--text-3); cursor: pointer; }
.cf__seg button.is-active { background: var(--gold-300); color: #05100A; font-weight: 600; }
.cf__pad { position: relative; height: 180px; border-radius: 12px; background: #F7F4EA; border: 1px solid var(--line-gold); overflow: hidden; touch-action: none; }
.cf__pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.cf__pad::after { content: ''; position: absolute; left: 7%; right: 7%; bottom: 38px; border-bottom: 1px dashed rgba(5,16,10,.25); pointer-events: none; }
.cf__pad-hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: .72rem; color: rgba(5,16,10,.45); pointer-events: none; transition: opacity .2s; }
.cf__pad.has-ink .cf__pad-hint { opacity: 0; }
.cf__clear { position: absolute; top: 8px; right: 8px; font: inherit; font-size: .72rem; padding: .3rem .7rem; border-radius: 6px; border: 1px solid rgba(5,16,10,.2); background: #fff; color: #05100A; cursor: pointer; }
.cf__typed { display: grid; gap: .7rem; }
.cf__typed-preview { height: 110px; border-radius: 12px; background: #F7F4EA; border: 1px solid var(--line-gold); display: grid; place-items: center; font-family: 'Brush Script MT', 'Segoe Script', 'Lucida Handwriting', 'Snell Roundhand', cursive; font-size: 2.4rem; color: #10204a; padding: 0 1rem; overflow: hidden; white-space: nowrap; }
.field.is-invalid .cf__pad, .field.is-invalid .cf__typed-preview { border-color: var(--down); }

.cf__checks { display: grid; gap: .9rem; padding: 1.1rem; border-radius: 12px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.check.is-invalid input[type="checkbox"] { border-color: var(--down); }
.cf__submit { display: grid; gap: .8rem; }
.cf__submit .btn { justify-self: start; }
.cf__submit .btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.cf__fine { font-size: .74rem; color: var(--text-3); line-height: 1.55; }

/* terms */
.cf__scroll { margin-top: 1rem; max-height: 68vh; overflow: auto; padding-right: .6rem; font-size: .9rem; line-height: 1.7; }
.cf__scroll h3 { font-size: 1rem; margin-top: 1.4em; color: var(--text); }
.cf__scroll ol { padding-left: 1.7rem; list-style: decimal; }
.cf__scroll ol li::before { content: none; }
.cf__scroll ol li { list-style: decimal; }
.cf__scroll:focus { outline: 1px solid var(--line-gold); outline-offset: 4px; }

/* success */
.cf__done { text-align: left; }
.cf__done-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--up-soft); color: var(--up); }
.cf__done:focus { outline: none; }

@media (max-width: 620px) {
  .cf__pad { height: 160px; }
  .cf__submit .btn { justify-self: stretch; }
}

.cf__upsig { display: grid; gap: .7rem; }
.cf__sigprev { padding: .5rem; }
.cf__sigprev img { max-width: 100%; max-height: 94px; object-fit: contain; display: block; }
.cf__sigprev:empty::before { content: 'Preview appears here'; font: .75rem/1 var(--font-sans, sans-serif); color: rgba(5,16,10,.4); }

/* OTP verification (email + mobile) */
.cf-otp-row { display: flex; gap: .5rem; align-items: stretch; }
.cf-otp-row .input { flex: 1; min-width: 0; }
.cf-otp-row .input[readonly] { opacity: .85; border-color: rgba(79, 208, 138, .45); }
.cf-otp-send { flex: none; white-space: nowrap; }
.cf-otp-ok { flex: none; align-self: center; color: var(--up); font-weight: 600; font-size: .82rem; white-space: nowrap; cursor: pointer; padding: 0 .3rem; }
.cf-otp-box { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .55rem; padding: .7rem; border-radius: 10px; border: 1px dashed var(--line-gold); background: rgba(224, 188, 107, .05); }
.cf-otp-code { max-width: 150px; letter-spacing: .3em; font-family: var(--font-mono); text-align: center; }
.cf-otp-resend { background: none; border: 0; padding: 0 .3rem; font: inherit; font-size: .78rem; color: var(--gold-300); cursor: pointer; }
.cf-otp-resend:disabled { color: var(--text-3); cursor: default; }
.cf-otp-msg { flex-basis: 100%; margin: 0; font-size: .75rem; color: var(--text-3); }
.cf-otp-msg.bad { color: var(--down); }
@media (max-width: 420px) { .cf-otp-row { flex-wrap: wrap; } .cf-otp-send { width: 100%; } }
