/* ==========================================================================
   Explain8 account screens: register, sign in, link and reset pages, email
   verification, account settings. Loaded after site.css and portal.css.
   Tokens only. Surfaces are tone steps, fields keep their lines.

   Contents
     1  Split screen: scene art on the suite, the card on daylight
     2  The card
     3  Smaller parts: points, well, links, status
     4  Account settings rows
   ========================================================================== */

/* 1 Split screen -------------------------------------------------------------- */

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}

.auth-art {
  display: flex;
  flex-direction: column;
}

/* The picture is a banner on a phone and the full suite side from 62rem. */
.auth-art-figure {
  position: relative;
  height: 7.5rem;
  margin: 0;
  overflow: hidden;
}

.auth-art-figure picture,
.auth-art-figure img {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-art-figure img {
  object-fit: cover;
  object-position: 62% 40%;
}

/* A solid chip, so the caption never rides on the picture. Shown with the full suite side. */
.auth-art-caption {
  display: none;
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  background: var(--suite);
  color: var(--on-suite-soft);
  font-size: var(--step-small);
  line-height: 1.4;
}

.auth-art-line {
  display: none;
  margin: 0;
}

.auth-panel {
  display: grid;
  align-content: start;
  justify-items: center;
  padding: clamp(1.5rem, 5vw, 4rem) var(--gutter) clamp(2rem, 5vw, 4rem);
  background: var(--fog-2);
}

@media (min-width: 62rem) {
  .auth-split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: none;
    align-items: start;
  }

  /* The suite side stays put while a long form scrolls. */
  .auth-art {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
  }

  .auth-art-figure {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
  }

  .auth-art-figure img {
    object-position: 50% 50%;
  }

  .auth-art-caption {
    display: block;
  }

  .auth-art-line {
    display: block;
    max-width: 26ch;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    font-family: var(--font-display);
    font-size: var(--step-h3);
    font-stretch: 86%;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
    color: var(--on-suite);
  }

  .auth-panel {
    align-content: center;
    align-self: stretch;
  }
}

/* 2 The card ------------------------------------------------------------------- */

.auth-card {
  width: 100%;
  max-width: 34rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--paper);
}

.auth-title {
  max-width: none;
  font-size: clamp(1.9rem, 1.35rem + 1.8vw, 2.6rem);
  line-height: 1;
}

.auth-card .lede {
  max-width: none;
  font-size: var(--step-body);
  font-weight: 450;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.auth-section-title {
  max-width: none;
  margin-bottom: 0;
}

/* Spacing inside notices on these pages (paragraphs, button rows, inline forms). */
.auth-card .notice p,
.auth-card .notice .actions,
.auth-account .notice p,
.auth-account .notice form,
.auth-account .notice > .button {
  margin: 0.5rem 0 0;
}

.auth-card .notice .actions form {
  margin: 0;
}

.auth-card .form-actions {
  margin-top: 0.5rem;
}

/* 3 Smaller parts: points, well, links, status ----------------------------------- */

.auth-points {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.auth-points > li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  line-height: 1.5;
}

.auth-points > li::before {
  content: "";
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.22rem;
  background-color: var(--signal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The second way in (an emailed link) sits on its own tone step instead of behind a rule. */
.auth-well {
  padding: clamp(1.1rem, 3vw, 1.5rem);
  border-radius: var(--radius);
  background: var(--fog);
}

.auth-well .field input {
  background-color: var(--paper);
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step-small);
}

.auth-links > li {
  margin: 0;
}

.auth-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* A fieldset that is switched off with a visible explanation next to it. */
.auth-fieldset {
  min-width: 0;
  margin-bottom: 0;
  padding: 0;
  border: 0;
}

.auth-fieldset[disabled] {
  opacity: 0.6;
}

.auth-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}

.auth-status > * {
  margin: 0;
}

/* 4 Account settings rows --------------------------------------------------------- */

/* One area per row: the name and what it does on the left, the controls on a panel on the right. */
.settings {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.settings-row {
  display: grid;
  gap: 0.85rem 2rem;
  grid-template-columns: minmax(0, 1fr);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.settings-head h2 {
  margin-bottom: 0.4rem;
}

.settings-head p {
  max-width: 34rem;
  margin: 0;
  font-size: var(--step-small);
  line-height: 1.5;
  color: var(--slate);
}

.settings-head .badge {
  margin-top: 0.6rem;
}

.settings-panel {
  min-width: 0;
  max-width: 40rem;
}

.settings-panel form {
  max-width: 34rem;
}

@media (min-width: 62rem) {
  .settings-row {
    grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
    align-items: start;
  }

  .settings-head {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}
