.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
}
.auth-form-side {
  display: flex;
  flex-direction: column;
  padding: 30px 45px 22px;
  min-width: 0;
  background: var(--paper);
}
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-form-wrap {
  width: min(350px, 100%);
  margin: auto;
  padding: 35px 0;
}
.auth-back {
  display: inline-block;
  color: var(--mk-muted);
  font-size: 11px;
  margin-bottom: 26px;
}
.auth-back:hover {
  color: var(--ink);
}
.auth-form-wrap h1 {
  font-size: 36px;
  letter-spacing: -0.055em;
  margin-bottom: 13px;
}
.auth-intro {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 25px;
  max-width: 320px;
}
.social-buttons {
  display: grid;
  gap: 10px;
}
.social-button {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  min-height: 45px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.18s;
}
.social-button:hover {
  background: var(--soft);
  border-color: var(--mk-muted);
}
.social-google {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.social-google:hover {
  background: var(--mk-accent);
  color: var(--paper);
  border-color: var(--mk-accent);
}
.social-google svg {
  background: #fff;
  border-radius: 50%;
  padding: 2px;
  width: 21px;
  height: 21px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 23px 0;
  font-size: 10px;
  color: var(--mk-muted);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--line);
}
.auth-form {
  display: grid;
  gap: 16px;
}
.form-group > label,
.form-label-row > label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #898f84;
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px 13px;
  font-size: 13px;
  transition: border-color 0.18s;
}
.form-input::placeholder {
  color: var(--mk-muted);
  opacity: 1;
}
.dark .form-input {
  border-color: hsl(var(--input));
}
.form-input:focus {
  border-color: var(--mk-accent);
}
.form-input[aria-invalid='true'] {
  border-color: #b34130;
}
.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-label-row a {
  font-size: 11px;
  margin-bottom: 7px;
  color: var(--mk-muted);
}
.form-label-row a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.password-input-wrapper {
  position: relative;
}
.password-input-wrapper input {
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 4px;
  top: 2px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--mk-muted);
}
.password-toggle:hover {
  color: var(--ink);
}
.form-hint {
  font-size: 10px;
  color: var(--mk-muted);
  display: block;
  margin-top: 5px;
}
.terms-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 10px !important;
  line-height: 1.6;
  color: var(--mk-muted);
  cursor: pointer;
}
.terms-label input {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--mk-accent);
}
.terms-label a,
.auth-legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-submit {
  width: 100%;
  gap: 10px;
  min-height: 45px;
}
.auth-submit:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}
.auth-switch {
  font-size: 12px;
  text-align: center;
  margin-top: 23px;
}
.auth-switch a {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-legal {
  font-size: 9px;
  line-height: 1.8;
  text-align: center;
  margin: 19px auto 0;
  max-width: 285px;
}
.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  color: var(--mk-muted);
  margin-top: 12px;
}
.auth-footer a:hover {
  color: var(--ink);
}
.form-message {
  font-size: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.error-message {
  color: #942c22;
  background: #fceeea;
  border-color: #e5b9b1;
}
.dark .error-message {
  color: #ffd3cb;
  background: #442c28;
  border-color: #89564d;
}
.success-message {
  background: var(--sage);
  color: var(--ink);
}
.auth-art-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: var(--blue);
  border-left: 1px solid var(--line);
  padding: 48px 38px 28px;
  overflow: hidden;
  position: relative;
  min-height: 100svh;
}
.auth-art-side::before,
.auth-art-side::after {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid var(--mk-accent);
  opacity: 0.1;
  border-radius: 50%;
  pointer-events: none;
}
.auth-art-side::before {
  top: 22%;
  right: -300px;
}
.auth-art-side::after {
  bottom: -260px;
  left: -190px;
}
.auth-art-eyebrow {
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--mk-accent);
  text-align: center;
}
.auth-art-content {
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 55px 0 40px;
}
.auth-art-content h2 {
  font-size: clamp(48px, 5vw, 76px);
  letter-spacing: -0.06em;
  line-height: 1.02;
}
.auth-art-content > p {
  font-size: 13px;
  margin-top: 20px;
}
.auth-product-art {
  position: relative;
  margin: 48px 0 65px;
  text-align: left;
}
.art-window {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 7px;
  transform: rotate(-3deg);
}
.art-window-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 17px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  color: var(--mk-muted);
}
.art-window-top > span:first-child {
  font-size: 17px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.05em;
  margin-right: auto;
}
.art-window-top .icon {
  width: 19px;
  height: 19px;
}
.art-editor {
  padding: 25px;
}
.art-document-title {
  font-size: 10px;
  color: var(--mk-muted);
}
.art-editor > p {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.5;
  margin: 17px 0 24px;
}
.art-editor > p em {
  background: var(--butter);
  font-style: normal;
}
.art-editor-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--mk-muted);
}
.art-wave-area {
  display: flex;
  align-items: center;
  gap: 17px;
  border-top: 1px solid var(--line);
  padding: 20px;
  font-size: 9px;
  color: var(--mk-muted);
}
.art-play {
  background: var(--ink);
  color: var(--paper);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.art-play .icon {
  width: 13px;
  height: 13px;
}
.art-wave-area .audio-waveform {
  height: 31px;
}
.art-voice-card {
  position: absolute;
  right: -12px;
  bottom: -33px;
  transform: rotate(4deg);
  padding: 17px 19px;
  background: var(--butter);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 22px #0000000c;
  border-radius: 4px;
}
.art-voice-avatar {
  background: var(--surface);
  font-family: Georgia, serif;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 20px;
}
.art-voice-card strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
}
.art-voice-card small {
  font-size: 8px;
  color: var(--mk-muted);
  display: block;
  margin-top: 3px;
}
.art-voice-card > .icon {
  width: 17px;
  color: var(--mk-accent);
}
.auth-art-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 9px;
  color: var(--mk-muted);
}
.auth-art-footnote span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.auth-art-footnote .icon {
  width: 13px;
  height: 13px;
}
.auth-art-link {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 1;
}
.auth-art-link .icon {
  width: 15px;
  height: 15px;
}
.auth-art-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.turnstile-container:empty {
  display: none;
}
.turnstile-container {
  max-width: 100%;
  overflow: hidden;
}
@media (min-width: 1500px) {
  .auth-form-side {
    padding-inline: 70px;
  }
  .auth-form-wrap {
    width: 380px;
  }
  .auth-form-wrap h1 {
    font-size: 40px;
  }
}
@media (max-width: 1000px) {
  .auth-form-side {
    padding: 25px 30px;
  }
  .auth-art-side {
    padding-inline: 28px;
  }
  .auth-art-footnote {
    gap: 13px;
    font-size: 8px;
  }
  .art-editor {
    padding: 20px;
  }
  .art-editor > p {
    font-size: 21px;
  }
  .art-voice-card {
    right: -5px;
    padding: 13px;
  }
  .auth-art-content h2 {
    font-size: 57px;
  }
}
@media (max-width: 760px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-art-side {
    display: none;
  }
  .auth-form-side {
    padding: 22px 24px;
    min-height: 100svh;
  }
  .auth-form-wrap {
    width: min(370px, 100%);
    padding: 38px 0 26px;
  }
  .auth-form-wrap h1 {
    font-size: 35px;
  }
  .auth-intro {
    font-size: 13px;
  }
  .auth-back {
    margin-bottom: 23px;
  }
  .auth-header .brand {
    font-size: 27px;
  }
  .auth-footer {
    margin-top: 15px;
  }
  .form-input {
    font-size: 16px;
    min-height: 46px;
  }
  .auth-form {
    gap: 15px;
  }
  .auth-submit {
    min-height: 47px;
  }
  .social-button {
    min-height: 45px;
  }
  .terms-label {
    font-size: 11px !important;
  }
  .auth-legal {
    font-size: 10px;
  }
  .auth-switch {
    margin-top: 22px;
  }
}

/* Verification and recovery follow the same account layout. */
.recovery-heading {
  margin-bottom: 28px;
}
.recovery-heading h1,
.recovery-heading h2 {
  font-size: clamp(32px, 3vw, 42px);
  margin: 16px 0 12px;
  font-weight: 500;
  letter-spacing: -0.05em;
}
.recovery-heading p {
  font-size: 14px;
}
.recovery-heading .auth-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sage);
}
.recovery-heading .auth-icon svg {
  width: 28px;
  height: 28px;
}
.recovery-form .form-group {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}
.recovery-form :is(label, legend, .form-label) {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}
.recovery-form .form-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #898f84;
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 14px;
}
.dark .recovery-form .form-input {
  border-color: hsl(var(--input));
}
.recovery-form .password-input-wrapper {
  position: relative;
}
.recovery-form .password-input-wrapper input {
  padding-right: 48px;
}
.recovery-form .password-toggle {
  position: absolute;
  right: 5px;
  top: 3px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}
.recovery-form .otp-input-container {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.recovery-form .otp-input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 1px solid #898f84;
  border-radius: 5px;
  text-align: center;
  font:
    500 24px 'Satoshi',
    sans-serif;
  background: var(--surface);
  color: var(--ink);
}
.recovery-form .form-hint,
.recovery-form .resend-timer {
  color: var(--mk-muted);
  font-size: 12px;
}
.recovery-form .w-full {
  width: 100%;
}
.recovery-form .recovery-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
}
.recovery-form .auth-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.recovery-form .resend-section {
  margin: 22px 0;
  text-align: center;
  font-size: 13px;
}
.recovery-form .resend-btn {
  color: var(--mk-accent);
  text-decoration: underline;
  padding: 8px;
}
.recovery-form .error-message,
.recovery-form .success-message {
  padding: 12px;
  border-radius: 5px;
  font-size: 13px;
  margin-bottom: 18px;
}
.recovery-form .email-display {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.recovery-form .password-requirements {
  padding: 12px 0;
  font-size: 12px;
  color: var(--mk-muted);
}
.recovery-form .requirement {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
}
.recovery-form .requirement.valid {
  color: var(--mk-accent);
}
.recovery-form .spinner {
  animation: auth-spin 1s linear infinite;
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}
