:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #213d37;
  background: #f5f7f4;
  font-synthesis: none;
  --green: #155f52;
  --green-dark: #104d42;
  --green-soft: #eaf3e9;
  --muted: #63756c;
  --line: #dde6de;
  --focus: #78af91;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f5f7f4; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 10% 20%, #e6efdfaa, transparent 48%),
    radial-gradient(ellipse at 95% 65%, #daeee7aa, transparent 42%);
}

[hidden] { display: none !important; }

.masthead {
  width: min(100%, 1200px);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(26px + env(safe-area-inset-top)) max(40px, env(safe-area-inset-right)) 26px max(40px, env(safe-area-inset-left));
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -.3px;
  text-decoration: none;
}

.brand img { flex: 0 0 auto; }
.header-note { color: var(--muted); font-size: 12px; }

main {
  width: min(100%, 560px);
  margin: 34px auto 0;
  padding-inline: 20px;
}

.intro { margin-bottom: 28px; text-align: center; }
.eyebrow {
  margin: 0 0 13px;
  color: #4e6e60;
  font-size: 10.5px;
  font-weight: 780;
  letter-spacing: 1.8px;
  line-height: 1.4;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(29px, 5vw, 38px);
  font-weight: 660;
  letter-spacing: -1.4px;
  line-height: 1.16;
}

.intro > p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.recovery-card {
  width: 100%;
  overflow: hidden;
  border: 1px solid #dce5dd;
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 20px 58px -28px #2442364d, 0 3px 9px #2442360a;
}

.progress {
  display: flex;
  margin: 0;
  padding: 26px 22px 22px;
  border-bottom: 1px solid var(--line);
  background: #fcfdfb;
  list-style: none;
}

.progress li {
  position: relative;
  min-width: 0;
  flex: 1 1 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #718078;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.progress li > span:last-child { max-width: 100%; white-space: nowrap; }
.progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 14px;
  left: calc(50% + 19px);
  right: calc(-50% + 19px);
  height: 1px;
  background: var(--line);
}

.step-dot {
  position: relative;
  z-index: 1;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e2da;
  border-radius: 50%;
  background: #fff;
  font-size: 11px;
  font-weight: 680;
}

.progress [aria-current="step"] { color: var(--green); font-weight: 720; }
.progress [aria-current="step"] .step-dot {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 4px #eaf2eb;
}
.progress .done .step-dot { border-color: #d4e7da; background: #e8f3ec; color: var(--green); }

.card-content { min-height: 330px; padding: 34px 38px 32px; }
.screen { animation: arrive .2s ease-out; }
.screen form { width: 100%; }

.hero-icon {
  width: 66px;
  height: 66px;
  margin-bottom: 25px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--green-soft);
  color: var(--green);
}
.hero-icon svg { width: 38px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

h2 {
  margin: 0 0 11px;
  font-size: 26px;
  font-weight: 660;
  letter-spacing: -.75px;
  line-height: 1.25;
}
h2:focus { outline: none; }

.description {
  max-width: 390px;
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.brand-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 19px; }
.brand-card {
  width: 100%; min-width: 0; min-height: 94px;
  display: grid; grid-template-columns: 42px minmax(0, 1fr) 20px; align-items: center; gap: 11px;
  padding: 15px 13px; border: 1px solid #cfdacf; border-radius: 13px;
  background: #fdfefd; color: #29473e; cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s, transform .15s;
}
.brand-card-code { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 780; letter-spacing: .4px; }
.brand-card-copy { min-width: 0; display: grid; gap: 4px; }
.brand-card-copy strong { overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.35; }
.brand-card-copy small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.brand-card-check { color: transparent; font-size: 16px; font-weight: 800; }
.brand-card.selected { border-color: var(--green); background: #f3f8f3; box-shadow: 0 0 0 3px #e1eee4; }
.brand-card.selected .brand-card-check { color: var(--green); }
.brand-context { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -3px 0 25px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf7; }
.brand-context > span { min-width: 0; display: grid; gap: 2px; }
.brand-context small { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.brand-context strong { overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.change-brand { min-height: 48px; flex: 0 0 auto; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--green); cursor: pointer; font: 700 12px/1.35 inherit; }
.change-brand:disabled { cursor: not-allowed; opacity: .55; }

label { display: block; margin-bottom: 9px; font-size: 13.5px; font-weight: 680; line-height: 1.4; }
input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #c9d5cc;
  border-radius: 11px;
  background: #fdfefd;
  color: #203b32;
  font: 16px/1.4 inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder { color: #849188; }
input:focus { outline: none; border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px #d9eade; }
input[aria-invalid="true"] { border-color: #a83b32; box-shadow: 0 0 0 3px #f5e1dc; }

.primary {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--green);
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: 650 14px/1.35 inherit;
  text-align: center;
  transition: background .15s, border-color .15s, transform .15s, opacity .15s;
}
.primary > span { flex: 0 0 auto; }
.primary:disabled { border-color: #7b9c91; background: #7b9c91; cursor: not-allowed; opacity: .68; }

button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.hint { margin: 10px 0 23px; color: var(--muted); font-size: 12.5px; line-height: 1.6; overflow-wrap: anywhere; }
.security-note {
  display: flex;
  gap: 9px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}
.security-note span { flex: 0 0 auto; color: var(--green); font-size: 20px; line-height: 1.25; }

.card-footer {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px;
  border-top: 1px solid var(--line);
  background: #fcfdfb;
  color: #63776a;
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
}
.footer-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #699877; }
.below-card { margin: 20px 0; color: #72827a; font-size: 12px; line-height: 1.5; text-align: center; }
.page-footer {
  padding: 32px 20px calc(24px + env(safe-area-inset-bottom));
  color: #7d8d84;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}
.page-footer span { margin: 0 8px; }

.message {
  margin: 18px 0 0;
  padding: 13px 15px;
  border: 1px solid #e7c9ba;
  border-radius: 10px;
  background: #fff4ee;
  color: #813e2e;
  font-size: 13.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.pending { min-height: 22px; display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--green); font-size: 13px; line-height: 1.5; }
.spinner { width: 17px; height: 17px; flex: 0 0 17px; border: 2px solid #d3e4d9; border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }

.delivery-note {
  margin: 0 0 23px;
  padding: 12px 14px;
  border: 1px solid #e0eee2;
  border-radius: 10px;
  background: #edf6ee;
  color: #315f42;
  font-size: 12.5px;
  line-height: 1.65;
}
.otp-input {
  height: 65px;
  padding-right: 12px;
  padding-left: calc(12px + .3em);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(24px, 7vw, 29px);
  letter-spacing: .3em;
  text-align: center;
}

.success-icon {
  width: 74px;
  height: 74px;
  margin: 6px auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7f3e9;
  animation: arrive .4s ease-out;
}
.success-icon svg { width: 44px; stroke: #28754b; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.centered { text-align: center; }
.centered .description { margin-right: auto; margin-left: auto; }

#stopped-status { display: inline-block; margin-bottom: 18px; padding: 7px 11px; border-radius: 999px; background: var(--green-soft); color: #315f42; font-size: 13px; font-weight: 680; }
#non-locked-guidance, #no-email-guidance { margin: 0 0 22px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf7; }
#non-locked-guidance h3 { margin: 0 0 8px; color: #294b41; font-size: 15px; line-height: 1.4; }
#non-locked-guidance p, #no-email-guidance p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
#no-email-guidance p:first-child { margin-top: 0; }

@media (hover: hover) {
  .primary:hover:not(:disabled) { border-color: var(--green-dark); background: var(--green-dark); transform: translateY(-1px); }
  .brand-card:hover:not(:disabled) { border-color: #86aa94; background: #f7faf7; transform: translateY(-1px); }
  .change-brand:hover:not(:disabled) { background: var(--green-soft); }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (max-width: 540px) {
  .masthead {
    padding: calc(15px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 14px max(14px, env(safe-area-inset-left));
  }
  .brand { gap: 10px; font-size: 14px; }
  .brand img { width: 30px; height: 30px; }
  .header-note { display: none; }
  main {
    width: 100%;
    margin-top: 9px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }
  .intro { margin-bottom: 20px; }
  .intro .eyebrow { margin-bottom: 10px; }
  h1 { margin-bottom: 8px; font-size: clamp(28px, 8.2vw, 32px); line-height: 1.14; }
  .intro > p:last-child { font-size: 14.5px; }
  .recovery-card { border-radius: 18px; }
  .progress { padding: 21px 8px 18px; }
  .progress li { gap: 7px; font-size: clamp(9.5px, 2.75vw, 11px); }
  .progress li:not(:last-child)::after { left: calc(50% + 17px); right: calc(-50% + 17px); top: 13px; }
  .step-dot { width: 27px; height: 27px; flex-basis: 27px; font-size: 10.5px; }
  .progress [aria-current="step"] .step-dot { box-shadow: 0 0 0 3px #eaf2eb; }
  .card-content { min-height: 0; padding: 26px 24px 25px; }
  .brand-options { grid-template-columns: 1fr; gap: 10px; }
  .brand-card { min-height: 76px; padding: 12px 13px; }
  .brand-context { align-items: flex-start; margin-bottom: 22px; }
  .hero-icon { width: 62px; height: 62px; margin-bottom: 22px; border-radius: 18px; }
  .hero-icon svg { width: 35px; }
  h2 { margin-bottom: 10px; font-size: clamp(22px, 6.5vw, 24px); line-height: 1.22; }
  .description { margin-bottom: 22px; font-size: 14px; line-height: 1.68; }
  .hint { margin-bottom: 21px; }
  .security-note { margin-top: 17px; }
  .card-footer { padding: 14px 12px; }
  .below-card { margin: 18px 0 14px; }
  .page-footer { padding-top: 18px; }
}

@media (max-width: 359px) {
  .masthead { padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
  main { padding-right: max(10px, env(safe-area-inset-right)); padding-left: max(10px, env(safe-area-inset-left)); }
  .intro { margin-bottom: 17px; }
  .intro > p:last-child { font-size: 14px; }
  .recovery-card { border-radius: 16px; }
  .progress { padding-right: 3px; padding-left: 3px; }
  .progress li { gap: 6px; font-size: 8px; }
  .progress li:not(:last-child)::after { left: calc(50% + 15px); right: calc(-50% + 15px); top: 12px; }
  .step-dot { width: 25px; height: 25px; flex-basis: 25px; font-size: 9.5px; }
  .brand-context { gap: 8px; padding: 9px 10px; }
  .change-brand { padding-right: 8px; padding-left: 8px; }
  .card-content { padding: 24px 20px; }
  .primary { gap: 11px; padding-right: 12px; padding-left: 12px; font-size: 13.5px; }
  .security-note { font-size: 11px; }
  .otp-input { letter-spacing: .24em; padding-left: calc(12px + .24em); }
}

@media (min-width: 768px) {
  main { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
