/* 23andMe page proportions with the earlier light AncestralGenome form theme. */
@font-face {
  font-family: 'AG Outfit';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/outfit/outfit-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'AG Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/montserrat/montserrat-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'AG Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible/atkinson-hyperlegible-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'AG Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible/atkinson-hyperlegible-bold.woff2') format('woff2');
}
:root {
  --ag-cyan: #20b4cc;
  --ag-cyan-2: #4ecde0;
  --ag-gold: #d8c7a1;
  --ag-clay: #c97a45;
  --auth-font: 'AG Montserrat', 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --auth-field-font: 'AG Atkinson Hyperlegible', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --auth-accent: #107f95;
  --auth-accent-hover: #0c6f83;
  --auth-button-background: linear-gradient(135deg, var(--ag-cyan), var(--ag-cyan-2) 55%, var(--ag-clay));
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #fbf9f9;
  color: #2d2d2d;
  font-family: var(--auth-font);
  font-size: 14px;
  font-weight: 500;
}
.auth-header {
  flex: 0 0 auto;
  width: 100%;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid #edf0f3;
}
.auth-header-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: none;
  height: 43px;
  margin: 0;
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.auth-brand span {
  font-family: 'AG Outfit', 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  background: linear-gradient(120deg, #20b4cc 0%, var(--ag-cyan-2) 50%, var(--ag-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-wrap {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  padding: 100px 24px 15px;
}
.auth-shell {
  width: 390px;
  max-width: 100%;
  margin: 0 auto;
}
.auth-card {
  width: 100%;
  max-width: none;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  min-height: 515px;
  padding: 40px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 0 0 1px #efefef, 0 0 5px #0000000d;
}
.auth-panel > * { flex-shrink: 0; }
.auth-privacy-note {
  margin: auto 0 0;
  padding: 20px 15px 0;
  color: #666;
  font-size: 11px;
  font-style: normal;
  line-height: 1.5;
  text-align: center;
}
.auth-privacy-note a { color: inherit; text-underline-offset: 2px; }
.tabs { display: none; }
.tab-content, #view-forgot, #view-reset { padding: 0 !important; }
.auth-heading { margin: 0; }
.auth-heading h1 {
  margin: 0 0 15px;
  color: #2d2d2d;
  font-family: var(--auth-font);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: normal;
}
.auth-heading p {
  margin: 0 0 15px;
  color: #666;
  font-family: var(--auth-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
#tab-signup .auth-heading p {
  margin: 0 0 35px;
  padding: 0;
  color: #666;
  font-family: var(--auth-font);
  font-size: 16px;
  /* The reference's 400 resolves to its lowest available face: Montserrat 500. */
  font-weight: 500;
  line-height: 24px;
  letter-spacing: normal;
}
.auth-fields { display: grid; gap: 8px; }
.auth-fields .form-group { position: relative; min-width: 0; margin: 0; }
.auth-card label {
  position: absolute;
  z-index: 1;
  top: 13px;
  left: 16px;
  max-width: calc(100% - 32px);
  margin: 0;
  color: #6b7a8d;
  font-family: var(--auth-field-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: normal;
  pointer-events: none;
  transition: top .1s ease, font-size .1s ease;
}
.auth-card input {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 48px;
  margin: 0;
  padding: 12px 16px;
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #2d2d2d;
  box-shadow: inset 0 0 0 1px #e3e9f0;
  outline: none;
  font-family: var(--auth-field-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: normal;
  transition: box-shadow .2s ease;
}
.auth-card input::placeholder { color: transparent; }
.auth-card input:focus {
  border: 0;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--auth-accent), 0 0 0 3px rgba(32, 180, 204, .12);
}
/* Keep saved credentials white too; the inset fill covers the browser's autofill tint. */
.auth-card input:is(:autofill, :-webkit-autofill) {
  -webkit-text-fill-color: #2d2d2d;
  caret-color: #2d2d2d;
  box-shadow: inset 0 0 0 1px #e3e9f0, inset 0 0 0 1000px #fff;
}
.auth-card input:is(:autofill, :-webkit-autofill):focus {
  box-shadow: inset 0 0 0 1px var(--auth-accent), inset 0 0 0 1000px #fff, 0 0 0 3px rgba(32, 180, 204, .12);
}
/* Values, including browser autofill, lift the label without changing field size. */
.auth-card .form-group:has(input:not(:placeholder-shown)) label,
.auth-card .form-group:has(input:autofill) label {
  top: 5px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}
.auth-card input:not(:placeholder-shown),
.auth-card input:autofill { padding-top: 21px; padding-bottom: 5px; line-height: 22px; }
.password-field { position: relative; }
.auth-card .password-field input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 0;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 48px;
  padding: 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #6b7a8d;
  cursor: pointer;
}
.password-toggle svg { display: block; width: 24px; height: 24px; }
.password-toggle:hover { color: #2d2d2d; }
.password-eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-slash { display: block; }
/* Beat the older shared button ID styles, including their mobile overrides. */
.auth-card :is(#btn-login, #btn-signup, #btn-forgot, #btn-reset) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0 !important;
  height: 48px;
  min-height: 48px;
  margin: 8px 0 0;
  padding: 0 24px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--auth-button-background) !important;
  color: #fff !important;
  box-shadow: none !important;
  font-family: var(--auth-font) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: normal;
  letter-spacing: normal !important;
  transform: none;
  transition: filter .2s ease;
}
.auth-card #btn-login { margin-top: 16px; }
.auth-card :is(#btn-login, #btn-signup, #btn-forgot, #btn-reset):hover {
  background: var(--auth-button-background) !important;
  transform: none;
  filter: brightness(.97);
}
.auth-card :is(#btn-login, #btn-signup, #btn-forgot, #btn-reset):disabled {
  opacity: .6;
  filter: none;
  cursor: not-allowed;
}
.auth-card .form-note {
  margin: 0;
  padding: 18px 0 0;
  color: #666;
  font-family: var(--auth-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  text-align: center;
}
.auth-card .form-note-forgot { margin: 12px 0 0; padding: 0; }
.auth-card .form-note a { color: var(--auth-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.auth-card .form-note a:hover { color: var(--auth-accent-hover); text-decoration: underline; }
.auth-card .field-hint { margin: 8px 0 0; color: #666; font-size: 12px; line-height: 18px; }
.auth-social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #666;
  font-size: 12px;
  line-height: 16px;
}
.auth-social-divider::before, .auth-social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e3e9f0;
}
@font-face {
  font-family: 'AG Google Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/google-sans/google-sans-latin-500.woff2') format('woff2');
}
.auth-card .btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #1f1f1f;
  font-family: 'AG Google Sans', var(--auth-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}
.auth-card .btn-google img { display: block; flex: 0 0 20px; object-fit: contain; }
.auth-card .btn-google:hover { background: #f8fafb; }
.auth-card .btn-google:disabled { opacity: .6; cursor: wait; }
.auth-card .alert { font-family: var(--auth-font); font-size: 14px; font-weight: 500; }
.auth-card :is(.btn-submit, .btn-google, .password-toggle, a):focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
}
.auth-footer {
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
  padding: 32px 20px 40px;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}
.auth-footer ul {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.auth-footer a { color: inherit; font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
.auth-header a:focus-visible, .auth-footer a:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 4px;
}
@media (max-width: 767px) {
  /* Use the desktop form inside a compact mobile card. */
  .page-wrap { padding: 40px 20px 24px; }
  .auth-shell { width: 350px; }
  .auth-panel { padding: 30px 40px; border-radius: 30px; }
  /* Preserve the existing mobile input size to avoid focus zoom on iOS. */
  .auth-card input { font-size: 16px; }
}
@media (max-width: 359px) {
  .page-wrap { padding: 24px 16px; }
  .auth-panel { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-card label, .auth-card input, .auth-card .btn-submit { transition: none; }
}
