:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #0b0b0b;
  background: #fff;
  --lime: #b2eb38;
  --green: #37641a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; background: #f5f5f5; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-back {
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  width: 40px;
}
.header-back:hover { color: #000; }
.header-logo {
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo-text {
  font-size: 26px;
  font-weight: 700;
  color: #2a5a07;
  letter-spacing: -0.5px;
}
.header-help {
  color: #2a5a07;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  width: 40px;
  text-align: right;
}
.header-help:hover { text-decoration: underline; }
button, input { font: inherit; }
button { cursor: pointer; }

main {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 40px 20px;
}

.card {
  width: 500px;
  max-width: 100%;
  padding: 32px 40px 40px;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 13px 44px rgb(0 0 0 / 12%);
}

.intro-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}
.intro-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  color: #555;
}

.field { position: relative; }
.field label {
  position: absolute;
  top: -8px;
  left: 9px;
  padding: 0 6px;
  background: #fff;
  font-size: 12px;
  line-height: 16px;
  cursor: text;
}

.field input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 8px 15px;
  border: 2px solid #171717;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: #111;
  font-size: 16px;
}

.field input:focus-visible { box-shadow: 0 0 0 3px rgb(178 235 56 / 40%); }
.field input[aria-invalid="true"] { border-color: #c00; }
.field:has(input[aria-invalid="true"]) label { color: #c00; }
.field input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgb(204 0 0 / 12%); }
.field input[readonly] { color: #555; }
.name-feedback {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
  color: #c00;
  font-size: 12px;
  line-height: 17px;
}
.name-feedback::before { content: '⚠'; flex-shrink: 0; }

.email-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  margin-bottom: 20px;
  padding: 10px 15px;
  border: 1px solid #999;
  border-radius: 9px;
  font-size: 16px;
}
.email-summary span { min-width: 0; overflow-wrap: anywhere; }
.email-summary .text-button { flex-shrink: 0; font-size: 14px; }

.continue {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 23px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: #173e00;
  font-size: 14px;
  font-weight: 700;
}

.continue:hover { background: #a7e329; }
.continue:active { background: #9fd426; }
.continue:disabled { cursor: wait; opacity: 0.65; }
.notice { margin: 12px 0 0; color: #555; font-size: 12px; line-height: 18px; }
.text-button {
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 1px;
}

.status { margin: 14px 0 0; color: var(--green); font-size: 13px; line-height: 19px; }
.status.error { color: #c00; }
button:focus-visible { outline: 3px solid #719b24; outline-offset: 4px; }

@media (max-width: 560px) {
  .site-header { padding: 10px 16px; }
  .header-logo .logo-icon { height: 28px; }
  .header-help { font-size: 14px; }
  main { padding: 20px 16px; }
  .card { padding: 24px 20px 28px; border-radius: 12px; box-shadow: 0 6px 24px rgb(0 0 0 / 10%); }
  .text-button { margin-left: 0; }
  .twofa-shield img { width: 140px; height: 140px; }
}

@media (max-width: 360px) {
  main { padding-right: 10px; padding-left: 10px; }
  .card { padding-right: 16px; padding-left: 16px; }
  .header-logo .logo-icon { height: 24px; }
}

.model-icon { font-size: 64px; text-align: center; margin-bottom: 20px; }
#model-step h1 { font-size: 19px; text-align: center; margin: 0 0 20px; }

.twofa-shield { text-align: center; margin-bottom: 16px; }
.twofa-shield img { width: 200px; height: 200px; }
.twofa-title { font-size: 20px; font-weight: 700; text-align: center; margin: 0 0 10px; }
.twofa-subtitle { text-align: center; font-size: 14px; line-height: 22px; color: #333; margin: 0 0 14px; }
.twofa-phone {
  display: block;
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 9px;
  background: #f9f9f9;
  color: #333;
  font-size: 16px;
  margin-bottom: 12px;
}
.twofa-code-field input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 8px 15px;
  border: 1px solid #ccc;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: #111;
  font-size: 16px;
}
.twofa-code-field input:focus-visible { border-color: #171717; box-shadow: 0 0 0 3px rgb(178 235 56 / 40%); }
.twofa-code-field input[aria-invalid="true"] { border-color: #c00; }
.twofa-code-field input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgb(204 0 0 / 12%); }
.twofa-code-field input::placeholder { color: #999; }
.twofa-resend { margin: 16px 0 0; font-size: 14px; text-align: center; color: #555; }
.twofa-resend .text-link { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.model-help { text-align: center; font-size: 14px; line-height: 22px; margin: 0 0 28px; }

.registration { margin: 30px 0 0; font-size: 14px; line-height: 20px; }
.registration-link { margin-left: 4px; color: var(--green); font-weight: 700; text-decoration: underline; }

.field-password { position: relative; }
.field-password input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  padding: 4px;
  border: 0;
  background: transparent;
  color: #666;
  cursor: pointer;
  line-height: 0;
}
.password-toggle:hover { color: #333; }
.password-forgot {
  margin: 12px 0 0;
}
.password-forgot .text-link {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#success-step { text-align: center; padding: 30px 0 10px; }
.success-spinner { margin: 0 auto 24px; width: 64px; height: 64px; }
.spinner-ring { width: 64px; height: 64px; animation: spin 1.2s linear infinite; }
.spinner-ring circle {
  fill: none;
  stroke: var(--lime);
  stroke-width: 4;
  stroke-dasharray: 90 150;
  stroke-dashoffset: 0;
  stroke-linecap: round;
}
@keyframes spin { to { transform: rotate(360deg); } }
.success-check { margin: 0 auto 24px; width: 64px; height: 64px; animation: pop 0.4s ease; }
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.success-title { font-size: 20px; font-weight: 700; margin: 0 0 12px; color: #1D4B00; }
.success-subtitle { font-size: 14px; line-height: 22px; color: #555; margin: 0; }
