:root {
  font-family: Heebo, "Noto Sans Hebrew", system-ui, sans-serif;
  color-scheme: dark;
  color: #e8eef4;
  background: transparent;
  --mint: #33e7bb;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  background: transparent;
}
body {
  overflow: hidden;
  direction: rtl;
}
main {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 1072px;
  margin: auto;
  padding: 16px 20px 14px;
  min-height: 0;
}
.form-scroll {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  gap: 40px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #526170 transparent;
  min-height: 0;
  flex: 1 1 auto;
}
.form-copy,
form {
  min-width: 0;
}
.private-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #8fd8c3;
}
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(51, 231, 187, 0.65);
}
.close {
  display: grid;
  place-items: center;
  width: 22px;
  height: 19px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a8b2c0;
  font-size: 18px;
  cursor: pointer;
}
h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 0 0 4px;
  color: #fff;
}
.intro {
  margin: 0 0 12px;
  color: #9aa3b2;
  font-size: 12.5px;
  line-height: 1.5;
}
.destination {
  display: flex;
  align-items: center;
  gap: 9px;
}
.service-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid rgba(51, 231, 187, 0.22);
  border-radius: 11px;
  background: rgba(51, 231, 187, 0.08);
  font-size: 12px;
  font-weight: 800;
  color: #8fd8c3;
}
.destination b,
.destination small {
  display: block;
}
.destination b {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 2px;
  color: #e8eef4;
}
.destination small {
  font-size: 11px;
  color: #9aa3b2;
  overflow-wrap: anywhere;
}
form {
  margin: 0;
  padding-top: 2px;
}
.field-label {
  display: block;
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #e8eef4;
}
.field-hint {
  display: inline-block;
  margin-inline-start: 7px;
  padding: 2px 6px;
  border: 1px solid rgba(51, 231, 187, 0.18);
  border-radius: 999px;
  color: #8fd8c3;
  background: rgba(51, 231, 187, 0.06);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: 1px;
}
.field-control {
  position: relative;
}
input {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 7px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #e8eef4;
  font: inherit;
  font-size: 16px;
  direction: ltr;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
input::placeholder {
  color: #6f7b8c;
}
input:hover {
  border-color: rgba(255, 255, 255, 0.16);
}
input:focus {
  border-color: rgba(51, 231, 187, 0.6);
  background: rgba(51, 231, 187, 0.04);
  box-shadow: 0 0 0 3px rgba(51, 231, 187, 0.12);
}
.field-control input[data-password-field="true"] {
  padding-right: 72px;
}
.password-visibility {
  position: absolute;
  top: 7px;
  right: 7px;
  height: 29px;
  padding: 0 7px;
  border: 0;
  background: none;
  color: #9aa3b2;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.password-visibility:hover {
  color: #e8eef4;
}

/* One native input carries the code; these cells only present its fixed shape. */
.code-control {
  margin-top: 9px;
  direction: ltr;
}
.code-control--segmented {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 52px;
}
.code-cells {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1.1vw, 9px);
  width: 100%;
  pointer-events: none;
}
.code-cell {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1 1 48px;
  width: min(48px, 100%);
  max-width: 52px;
  min-width: 0;
  height: 50px;
  overflow: hidden;
  border: 1px solid rgba(176, 197, 211, 0.18);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(22, 37, 44, 0.82),
    rgba(5, 13, 17, 0.92)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 7px 22px rgba(0, 0, 0, 0.22);
  color: #f5fbff;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}
.code-cell::after {
  content: "";
  position: absolute;
  right: 26%;
  bottom: 7px;
  left: 26%;
  height: 1px;
  border-radius: 999px;
  background: rgba(141, 162, 176, 0.24);
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}
.code-cell.is-filled {
  border-color: rgba(51, 231, 187, 0.34);
  background: linear-gradient(
    180deg,
    rgba(20, 52, 51, 0.82),
    rgba(5, 20, 22, 0.96)
  );
  box-shadow:
    inset 0 1px 0 rgba(132, 255, 220, 0.07),
    0 7px 24px rgba(0, 0, 0, 0.24);
}
.code-cell.is-filled::after {
  background: rgba(51, 231, 187, 0.65);
}
.code-control--segmented:focus-within .code-cell.is-current {
  border-color: rgba(74, 240, 199, 0.92);
  background: linear-gradient(
    180deg,
    rgba(24, 65, 61, 0.92),
    rgba(5, 22, 24, 0.98)
  );
  box-shadow:
    inset 0 1px 0 rgba(184, 255, 235, 0.12),
    0 0 0 3px rgba(51, 231, 187, 0.11),
    0 8px 28px rgba(2, 15, 17, 0.38);
  transform: translateY(-1px);
}
.code-control--segmented:focus-within .code-cell.is-current::after {
  background: var(--mint);
  box-shadow: 0 0 8px rgba(51, 231, 187, 0.55);
}
.code-control--segmented[data-complete="true"] .code-cell {
  border-color: rgba(51, 231, 187, 0.48);
}
.code-native-input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  font-size: 16px;
  letter-spacing: 0;
  cursor: text;
}
.code-native-input:focus {
  border: 0;
  box-shadow: none;
  outline: 0;
}

/* Long or ranged recovery codes retain space to vary instead of inventing cells. */
.code-control--flexible {
  position: relative;
  border-radius: 13px;
  background: linear-gradient(
    135deg,
    rgba(51, 231, 187, 0.08),
    rgba(255, 255, 255, 0.015) 36%,
    rgba(0, 0, 0, 0.12)
  );
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.2);
}
.code-control--flexible::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(51, 231, 187, 0.65);
  pointer-events: none;
}
.code-flexible-input {
  height: 49px;
  margin: 0;
  padding-inline: 38px;
  border-color: rgba(137, 164, 176, 0.2);
  border-radius: 13px;
  background: rgba(3, 11, 15, 0.78);
  text-align: center;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.autofill-note {
  margin: 0 0 7px;
  color: #8f9bab;
  font-size: 10.5px;
  line-height: 1.6;
}
.autofill-help {
  margin-bottom: 4px;
  color: #b0bed2;
  font-size: 10.5px;
  line-height: 1.6;
}
.autofill-help summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.autofill-help p {
  margin: 7px 0 0;
  color: #8f9fb2;
}
.form-footer {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  gap: 40px;
  flex: 0 0 auto;
  padding-top: 12px;
  align-items: center;
  border-top: 1px solid rgba(51, 231, 187, 0.12);
}
.privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: #9aa3b2;
  font-size: 10.5px;
  line-height: 1.55;
}
.privacy-ic {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(51, 231, 187, 0.1);
  color: var(--mint);
}
.form-actions {
  min-width: 0;
}
#submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #e70e3c, #f43f5e);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(231, 14, 60, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}
#submit:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(231, 14, 60, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
#submit:active {
  transform: none;
}
#manual {
  display: block;
  margin: 8px auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: #9aa3b2;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
#manual:hover {
  color: #e8eef4;
}
#pin-recovery {
  display: none;
  margin: 8px auto 0;
  padding: 0;
  border: 0;
  color: #b6c8d9;
  background: transparent;
  font: inherit;
  font-size: 10px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
body[data-pin="true"] #pin-recovery:not([hidden]) {
  display: block;
}
body[data-pin="true"] .autofill-help {
  display: none;
}
button:focus-visible,
input:focus-visible,
summary:focus-visible,
.form-scroll:focus-visible {
  outline: 2px solid #73e2c2;
  outline-offset: 2px;
}
.code-native-input:focus-visible {
  outline: 2px solid rgba(115, 226, 194, 0.8);
  outline-offset: 3px;
}
body[data-step="email_code"] .autofill-help,
body[data-step="verification_code"] .autofill-help {
  display: none;
}

@media (max-width: 700px) {
  main {
    padding: 14px 19px;
  }
  .form-scroll {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .private-head {
    margin-bottom: 5px;
  }
  h1 {
    font-size: 21px;
    margin-bottom: 6px;
  }
  .intro {
    font-size: 11px;
    margin-bottom: 8px;
  }
  .destination {
    gap: 7px;
  }
  .destination b {
    font-size: 9px;
  }
  .destination small {
    font-size: 8px;
  }
  .service-mark {
    width: 24px;
    height: 26px;
  }
  .field-label {
    margin-bottom: 9px;
  }
  .form-footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding-top: 10px;
  }
  .form-actions {
    grid-row: 1;
  }
  #submit {
    height: 44px;
  }
  .privacy,
  #manual {
    font-size: 10px;
  }
  #manual {
    margin-top: 6px;
  }
  .code-cells {
    gap: clamp(4px, 1.5vw, 7px);
  }
  .code-cell {
    height: clamp(42px, 12vw, 49px);
    border-radius: 10px;
    font-size: clamp(18px, 6vw, 23px);
  }
  .code-cell::after {
    bottom: 6px;
  }
}
@media (max-width: 420px) {
  main {
    padding-inline: 14px;
  }
  .code-cells {
    gap: 4px;
  }
  .code-cell {
    height: clamp(38px, 11.5vw, 46px);
    border-radius: 9px;
  }
  .field-hint {
    margin-inline-start: 5px;
  }
}
/* A mobile keyboard can leave the protected iframe only a short strip. Put the
   focused field first in that strip; the surrounding Portal still supplies the
   destination and recording context in its fixed guidance header. */
@media (max-width: 700px) and (max-height: 300px) {
  main {
    padding: 8px 14px 7px;
  }
  .form-scroll {
    display: block;
  }
  .form-copy,
  .autofill-note,
  .autofill-help {
    display: none;
  }
  form {
    padding-top: 0;
  }
  .field-label {
    margin-bottom: 6px;
  }
  .form-footer {
    display: block;
    padding-top: 6px;
  }
  .privacy {
    margin-bottom: 3px;
    font-size: 8px;
    line-height: 1.3;
  }
  #submit {
    height: 40px;
  }
  #manual {
    margin-top: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Vendor feedback is inert text inside this private, scrollable form only. */
.vendor-feedback {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 122, 137, .3);
  border-radius: 10px;
  background: rgba(128, 34, 53, .14);
  color: #ffc1c8;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
}
.vendor-feedback[hidden] { display: none; }
