/* Login-page layout only. Provider CAPTCHA content is deliberately untouched. */
body.auth-page {
  --auth-accent: var(--accent, var(--primary, #0b896e));
  --auth-text: var(--text, #173029);
  --auth-muted: var(--muted, #6d7772);
  --auth-surface: var(--card, var(--surface, #fffefa));
  --auth-border: var(--border, #e6dac6);
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: var(--bg, #f7f2e8);
  color: var(--auth-text);
  font-family: inherit;
  line-height: 1.5;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page .auth-layout {
  width: min(100%, 1024px);
  margin: auto;
  padding: 32px 22px;
}
.auth-page .auth-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.auth-page .auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--auth-text);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
  min-width: 0;
}
.auth-page .auth-brand img { display: block; width: 38px; height: 38px; object-fit: contain; flex: none; }
.auth-page .auth-brand span { overflow-wrap: anywhere; }
.auth-page .auth-return { color: var(--auth-accent); text-decoration: none; font-weight: 700; }
.auth-page .auth-return:hover { text-decoration: underline; }
.auth-page .auth-card {
  width: 100%;
  max-width: 490px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--auth-border);
  border-radius: 22px;
  background: var(--auth-surface);
  box-shadow: 0 14px 45px rgba(40, 37, 25, .07);
}
.auth-page .auth-kicker {
  margin: 0 0 8px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--auth-accent);
}
.auth-page .auth-card h1 { margin: 0 0 10px; color: var(--auth-text); font-size: clamp(1.6rem, 4vw, 2rem); line-height: 1.2; }
.auth-page .auth-intro { color: var(--auth-muted); margin: 0 0 26px; }
.auth-page .auth-form { display: block; }
.auth-page .auth-field { display: block; margin-bottom: 20px; }
.auth-page .auth-field > label { display: block; margin: 0 0 8px; font-weight: 700; color: var(--auth-text); }
.auth-page .auth-field > input.auth-email {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  margin: 0;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: var(--auth-surface);
  color: var(--auth-text);
  font: inherit;
}
.auth-page .auth-field > input.auth-email:focus-visible,
.auth-page .auth-submit:focus-visible,
.auth-page .auth-return:focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 3px; }
.auth-page .auth-help { display: block; margin-top: 7px; color: var(--auth-muted); font-size: .85rem; }
.auth-page .auth-error { margin: 0 0 18px; padding: 11px 13px; color: #a82222; background: #fff1ef; border: 1px solid #f3c2bb; border-radius: 12px; }
/* This container gives the CAPTCHA space but intentionally does not style its widget, controls, images or challenge. */
.auth-page .auth-captcha-block { margin: 12px 0 22px; min-width: 0; }
.auth-page .auth-submit { display: block; width: 100%; min-height: 46px; margin: 18px 0 0; cursor: pointer; font-weight: 700; }
.auth-page .auth-footer { text-align: center; margin: 24px 0 0; color: var(--auth-muted); font-size: .88rem; }
@media (max-width: 540px) {
  .auth-page .auth-layout { padding: 18px 12px; }
  .auth-page .auth-card { border-radius: 17px; padding: 22px 17px; }
  .auth-page .auth-header { padding: 0 4px; }
}

/* Homepage login dialog: reuse the auth-page fields, typography and card without changing CAPTCHA internals. */
dialog.login-dialog.auth-page {
  --auth-accent: var(--accent, var(--primary, #0b896e));
  --auth-text: var(--text, #173029);
  --auth-muted: var(--muted, #6d7772);
  --auth-surface: var(--card, var(--surface, #fffefa));
  --auth-border: var(--border, #e6dac6);
  box-sizing: border-box;
  width: min(520px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--auth-text);
  background: var(--auth-surface);
  box-shadow: 0 24px 80px rgba(18, 37, 32, .26);
  overflow: auto;
}
dialog.login-dialog::backdrop { background: rgba(17, 31, 29, .58); }
dialog.login-dialog .auth-card { max-width: none; margin: 0; box-shadow: none; border: 0; }
dialog.login-dialog .login-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--auth-border);
  border-radius: 50%;
  background: var(--auth-surface);
  color: var(--auth-text);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}
dialog.login-dialog .login-dialog-close:focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 2px; }
dialog.login-dialog .auth-card h2 { color: var(--auth-text); font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; margin: 0 0 10px; }
dialog.login-dialog .auth-intro { margin-bottom: 22px; }
dialog.login-dialog .auth-login-page-link { display: block; margin-top: 14px; text-align: center; color: var(--auth-accent); font-weight: 650; }
@media (max-width: 540px) {
  dialog.login-dialog.auth-page { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
  dialog.login-dialog .auth-card { padding: 24px 18px; }
}
