/* ==========================================================================
   The account pages (site v5): sign up, the password pages, the sign-in gates, email confirmation, the Google
   pages. site.css already draws the column (.auth, .auth-in, .auth-title), the form (.form, .field, .check,
   .pw, .or) and the buttons; this sheet holds only what those pages add: a stack of buttons, an address, the live
   password checks and strength meter, the setup steps and the off-screen honeypot.
   Loaded by each account template in its head block; uses the site.css tokens only.
   ========================================================================== */

/* a stack of buttons under a title or a form: the main action first, then the way out */
.auth-actions {
  display: grid;
  gap: 12px;
}
.auth-body > .notice:last-child {
  margin-bottom: 0;
}
.auth-body > .notice + .auth-actions {
  margin-top: 0;
}
.auth-lead + .auth-lead {
  margin-top: 10px;
}
.auth-alt + .auth-alt {
  margin-top: 12px;
}
.auth-alt button {
  color: var(--blue-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.auth-alt button:hover {
  color: var(--blue);
}
.auth-alt .link-button {
  min-height: 44px;
  padding: 0;
}
.auth-alt-form {
  margin: 0;
}

/* a checkbox row on the account pages: the whole line is the target, at least 44px tall */
.auth .check {
  min-height: 44px;
  align-items: center;
}
.auth .check label {
  flex: 1;
  padding: 8px 0;
}
.auth .check.has-error input[type="checkbox"] {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.auth .check a {
  display: inline-block;
}

/* a quiet block of text set apart on a page: an address, a sentence on what Google keeps */
.auth-addr {
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--mist);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.auth-addr + .auth-addr {
  margin-top: 12px;
}
.auth-addr small {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 550;
}
.auth-addr-ok::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--green);
  vertical-align: 1px;
}
.auth-provider {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 16px;
  font-weight: 600;
}
.auth-provider svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.auth-provider .sep {
  opacity: 0.5;
}

/* "Send the code somewhere else": a closed row that opens a second form */
.auth-more {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.auth-more > summary {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.auth-more > summary::-webkit-details-marker {
  display: none;
}
.auth-more > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.auth-more[open] > summary::after {
  transform: rotate(-135deg);
}
.auth-more > .form {
  padding: 4px 0 8px;
}

/* the live password checks (password-checks.js sets data-state: idle, met or unmet) */
.rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14.5px;
  font-weight: 550;
}
.rules li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rules .tick {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  color: #fff;
  transition:
    background-color 0.2s,
    box-shadow 0.2s;
}
.rules .tick svg {
  width: 10px;
  height: 10px;
  opacity: 0;
}
.rules li[data-state="met"] .tick {
  background: var(--green);
  box-shadow: none;
}
.rules li[data-state="met"] .tick svg {
  opacity: 1;
}
.rules li[data-state="unmet"] .tick {
  box-shadow: inset 0 0 0 1.5px var(--red);
}
.rules li[data-state="unmet"] {
  color: var(--red);
}
.match {
  min-height: 0;
  font-size: 14.5px;
  font-weight: 600;
}
.match:empty {
  display: none;
}
.match[data-state="matched"] {
  color: var(--green);
}
.match[data-state="mismatched"] {
  color: var(--red);
}

/* the strength meter on the reset form (password-strength.js writes data-level 0 to 4 and the word) */
.strength {
  display: grid;
  gap: 8px;
}
.strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.strength-bars span {
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
  transition: background-color 0.2s;
}
.strength-text {
  font-size: 14.5px;
  font-weight: 600;
}
.strength[data-level="1"] .strength-bars span:nth-child(-n + 1) {
  background: var(--red);
}
.strength[data-level="2"] .strength-bars span:nth-child(-n + 2) {
  background: #b25e00;
}
.strength[data-level="3"] .strength-bars span:nth-child(-n + 3) {
  background: var(--blue);
}
.strength[data-level="4"] .strength-bars span {
  background: var(--green);
}
.strength[data-level="1"] .strength-word {
  color: var(--red);
}
.strength[data-level="2"] .strength-word {
  color: #8a4a00;
}
.strength[data-level="3"] .strength-word {
  color: var(--blue-text);
}
.strength[data-level="4"] .strength-word {
  color: var(--green);
}

/* the steps of account setup (Create account, Verify email, Start revising) above the page's title */
.setup-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 36px;
}
.setup-steps li {
  display: grid;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
}
.setup-steps li::before {
  content: "";
  height: 3px;
  border-radius: 2px;
  background: var(--line-2);
}
.setup-steps li.is-done::before,
.setup-steps li.is-current::before {
  background: var(--ink);
}
.setup-steps li.is-current {
  color: var(--blue-text);
}
.setup-steps li.is-current::before {
  background: var(--blue);
}
/* a reader whose address was just verified, on the reload verify-sent.js makes: the bar fills in once */
.vs-page--advanced .setup-steps li.is-fresh::before {
  transform-origin: left center;
  animation: setup-fill 0.5s var(--ease) both;
}
.vs-page--advanced .setup-steps li.is-fresh + li::before {
  transform-origin: left center;
  animation: setup-fill 0.5s var(--ease) 0.25s both;
}
@keyframes setup-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .vs-page--advanced .setup-steps li::before {
    animation: none !important;
  }
}

/* the sign-up form's honeypot: off the screen, not display:none (a bot skips hidden fields), out of the tab order */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

/* a stack of buttons that follows a form on the same page */
.auth-then {
  margin-top: 12px;
}
/* a note that follows the page's body */
.auth .auth-then-note {
  margin-top: 28px;
  margin-bottom: 0;
}

/* a page's way back, above its title */
.auth-back {
  margin-bottom: 20px;
  font-size: 16px;
}
.auth-back .link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* the guidance under a form: a title, a ticked list and one more way out */
.auth-guide {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.auth-guide h2 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.auth-guide .ticks li:first-child {
  border-top: 0;
}
.auth-addr + .auth-then {
  margin-top: 20px;
}
