/* Membership and sign-in: the landing page, the apply flow, the status tracker, and the sign-in pages (email, 6-box code, link, create account).
   Builds on ui.css (tokens, buttons, pills, banner, fields, bar). Mobile first.

   Sections: 1 page . 2 landing steps . 3 apply flow (progress, fields, photos) . 4 finish screen and status tracker . 5 sign-in and the code input */

/* ---------- 1. Page ---------- */
.mb { max-width: 520px; padding-bottom: 40px; }
.mb [hidden] { display: none !important; }
.mb-eyebrow { margin: 0 0 6px; font-family: var(--ui-font-mono); font-size: 1.2rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ui-signal); }
.mb-title { margin: 0 0 10px; font-size: 2.8rem; line-height: 1.15; overflow-wrap: anywhere; }
.mb-lead { margin: 0 0 18px; font-size: 1.7rem; color: rgba(242, 242, 242, 0.88); }
.mb-lead strong { color: var(--ui-text); overflow-wrap: anywhere; }
.mb-note { margin: 14px 0 0; font-size: 1.4rem; color: var(--ui-muted); }
.mb-note a, .mb-lead a { color: var(--ui-text); text-underline-offset: 4px; }
.mb-help { margin: 0 0 16px; font-size: 1.5rem; color: var(--ui-muted); }
.mb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mb-actions .ui-btn { flex: 1 1 160px; }
.mb-actions .ui-btn--quiet { flex: 0 1 auto; }
.mb-main { margin-top: 22px; }
.mb-status { margin-top: 22px; }
.mb-status .ui-banner__title { display: block; }
.mb-status__line { margin-top: 8px; }
.mb-choices { margin-top: 8px; }
.mb-choices .ui-row { min-height: 64px; }
.mb-choices .ui-row__title { font-size: 1.6rem; }
@media screen and (min-width: 750px) { .mb-title { font-size: 3.4rem; } }

/* ---------- 2. Landing: the three steps ---------- */
.mb-steps { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 14px; }
.mb-steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.6rem; }
.mb-steps strong { font-family: var(--ui-font-mono); font-weight: 700; }
.mb-steps li > span:last-child { color: var(--ui-muted); padding-top: 3px; }
.mb-steps li strong { color: var(--ui-text); display: block; }
.mb-steps__n {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--ui-line-strong); font-family: var(--ui-font-mono); font-weight: 700; font-size: 1.5rem; color: var(--ui-signal);
}

/* ---------- 3. Apply flow ---------- */
.member-form .ui-field { margin-bottom: 18px; }
.wizard fieldset.wizard-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.wizard legend { padding: 0; margin: 0 0 6px; }
.wizard legend h2 { margin: 0; font-size: 2.4rem; line-height: 1.2; }
.wizard-step[hidden] { display: none !important; }
.wizard:not(.wizard--on) .wizard-step { margin-bottom: 28px; }
.mb-privacy { margin-top: 4px; }

/* progress: "Step 2 of 5" and a bar */
.mb-progress { margin: 0 0 22px; }
.mb-progress__track { height: 6px; background: var(--ui-surface-2); border-radius: 3px; overflow: hidden; }
div.mb-progress__bar { display: block; height: 100%; width: 0; background: var(--ui-signal); border-radius: 3px; transition: width 0.25s ease; }
.mb-progress__label { display: block; margin-top: 8px; font-family: var(--ui-font-mono); font-size: 1.3rem; font-weight: 600; color: var(--ui-muted); }
@media (prefers-reduced-motion: reduce) { div.mb-progress__bar { transition: none; } }

/* the sticky Continue bar */
.mb-bar { justify-content: center; }
.mb-bar__inner { display: flex; gap: 10px; width: 100%; max-width: 520px; }
.mb-bar__inner .ui-btn { flex: 1; max-width: none; margin: 0; }
.mb-bar__inner .wizard-back { flex: 0 0 38%; }
.wizard:not(.wizard--on) .wizard-next, .wizard:not(.wizard--on) .wizard-back { display: none !important; }
.wizard:not(.wizard--on) .wizard-submit[hidden] { display: inline-flex !important; }

/* choices and selects */
.mb-group { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.mb-group legend.ui-label { padding: 0; }
.mb-seg { margin-top: 2px; }
.mb-seg .ui-seg__item { min-height: 48px; font-size: 1.5rem; }
.ui-select {
  padding-right: 40px; background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9f9a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.mb .ui-error:empty { display: none; }

/* photos: an outline frame that shows how to hold the card or face, then the preview */
.photo { margin: 0 0 16px; }
.photo__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo__target {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; overflow: hidden;
  width: 100%; min-height: 200px; padding: 20px; border: 2px dashed var(--ui-line-strong); border-radius: var(--ui-radius);
  background: var(--ui-surface); color: var(--ui-muted); cursor: pointer; text-align: center; font-size: 1.5rem;
}
.photo__target:hover, .photo__target:focus-within { border-color: var(--ui-text); color: var(--ui-text); }
.photo__input:focus-visible + .photo__target { outline: 2px solid var(--ui-signal); outline-offset: 2px; }
.photo__art { display: block; width: 128px; height: auto; color: var(--ui-line-strong); }
.photo--id .photo__target { aspect-ratio: 1.586 / 1; min-height: 0; padding: 14px; }
.photo--id .photo__art { width: 46%; max-width: 180px; }
.photo--selfie .photo__target { max-width: 250px; margin: 0 auto; aspect-ratio: 4 / 5; min-height: 0; border-radius: 50% / 40%; padding: 30px 20px; }
.photo--selfie .photo__art { width: 40%; max-width: 120px; }
.photo__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.photo__prompt { font-family: var(--ui-font-mono); font-weight: 600; font-size: 1.4rem; }
.photo__retake { margin-top: 12px; }
.photo--selfie .photo__retake { display: flex; margin-left: auto; margin-right: auto; }
.photo__tips { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.photo__tips li { display: flex; align-items: flex-start; gap: 10px; font-size: 1.5rem; color: rgba(242, 242, 242, 0.88); }
.photo__tips svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--ui-signal); }
.photo__privacy { margin: 14px 0 0; padding: 12px 14px; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-sm); font-size: 1.4rem; color: var(--ui-muted); }
.photo__target:has(.photo__preview:not([hidden])) { border-style: solid; border-color: var(--ui-line); }
.photo__target:has(.photo__preview:not([hidden])) .photo__art, .photo__target:has(.photo__preview:not([hidden])) .photo__prompt { display: none; }

/* ---------- 4. Finish screen and the status tracker ---------- */
.mb-done__icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 8px 0 16px; border-radius: 50%; background: var(--ui-signal-tint); color: var(--ui-signal); }
.mb-done__icon svg { width: 28px; height: 28px; }

.mb-track { display: flex; margin: 8px 0 28px; padding: 0; list-style: none; counter-reset: none; }
.mb-track__step { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.mb-track__step + .mb-track__step::before {   /* the line to the previous step */
  content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--ui-line-strong);
}
.mb-track__step.is-done + .mb-track__step::before, .mb-track__step.is-done + .mb-track__step.is-current::before { background: var(--ui-signal); }
.mb-track__dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ui-ink); border: 2px solid var(--ui-line-strong); color: var(--ui-on-signal); font-family: var(--ui-font-mono); font-weight: 700; font-size: 1.5rem;
}
.mb-track__dot svg { width: 16px; height: 16px; }
.is-done .mb-track__dot { background: var(--ui-signal); border-color: var(--ui-signal); }
.is-current .mb-track__dot { border-color: var(--ui-signal); box-shadow: inset 0 0 0 6px var(--ui-ink), inset 0 0 0 16px var(--ui-signal); }
.is-warn .mb-track__dot { background: var(--ui-warn); border-color: var(--ui-warn); }
.is-bad .mb-track__dot { background: var(--ui-bad); border-color: var(--ui-bad); }
.mb-track__label { font-family: var(--ui-font-mono); font-size: 1.3rem; font-weight: 600; color: var(--ui-muted); line-height: 1.3; }
.is-done .mb-track__label, .is-current .mb-track__label, .is-warn .mb-track__label, .is-bad .mb-track__label { color: var(--ui-text); }

.mb-todo { margin: 0 0 4px; padding: 0; list-style: none; border-top: 1px solid var(--ui-line); }
.mb-todo li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--ui-line); font-family: var(--ui-font-mono); font-weight: 600; font-size: 1.5rem; }
.mb-todo li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ui-warn); }

/* ---------- 5. Sign-in ---------- */
.mb-form .ui-field { margin-bottom: 16px; }
.mb-form .ui-notice { margin-bottom: 16px; }
.mb-switch { margin: 6px 0 0; }
.mb-switch .ui-link { font-size: 1.4rem; }
.mb-two { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.mb-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin-top: 18px; }
.mb-links form { margin: 0; }
.mb-links .ui-link { font-size: 1.4rem; }
.mb-links .ui-link[disabled] { color: var(--ui-muted); text-decoration: none; cursor: default; }

/* Dawn styles every button inside .customer as a big boxed button and every link in blue; a text link here is just a link */
.mb button.ui-link, .customer button.ui-link {
  display: inline-flex; width: auto; min-width: 0; min-height: var(--ui-tap); margin: 0; padding: 0; background: none; border: 0; box-shadow: none;
  color: var(--ui-text); font-family: inherit; font-size: 1.4rem; letter-spacing: 0;
}
.mb button.ui-link::before, .mb button.ui-link::after, .customer button.ui-link::before, .customer button.ui-link::after { display: none; }
.mb a.ui-link { color: var(--ui-text); }
.mb .mb-links button.ui-link[disabled] { color: var(--ui-muted); text-decoration: none; opacity: 1; }
