@layer uniform.components {
.u-auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100dvh;
  background: var(--u-color-bg-page);
  color: var(--u-color-text-default);
}

.u-auth-shell > * {
  grid-column: 1 / -1;
  padding-inline: var(--u-page-margin);
}

.u-auth-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--u-space-4);
  padding-top: calc(var(--u-space-6) + env(safe-area-inset-top));
}

.u-auth-shell > header > p { display: none; }

.u-auth-shell > header + * {
  display: flex;
  flex-direction: column;
  gap: var(--u-space-6);
  padding-block: var(--u-space-12);
}

.u-auth-shell > header + * > * {
  max-width: var(--u-max-width-form);
  margin: 0;
}

.u-auth-shell > header + * > p + p { margin-top: calc(var(--u-space-2) - var(--u-space-6)); }

.u-auth-shell > footer {
  padding-bottom: calc(var(--u-space-12) + env(safe-area-inset-bottom));
  color: var(--u-color-text-muted);
  font-size: var(--u-font-size-small);
  line-height: var(--u-line-height-small);
}

.u-auth-shell > footer > * { margin: 0; }

.u-auth-shell > footer a { color: inherit; }

/* Phones keep the form at the top, where the keyboard can't push it out of view. */
@media (min-width: 40em) {
  .u-auth-shell > header + * { justify-content: center; }
}

@media (min-width: 64em) {
  .u-auth-shell > * { grid-column: 2; }

  .u-auth-shell > header {
    grid-column: 1;
    grid-row: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: var(--u-space-12);
    background: var(--u-color-bg-ink);
    color: var(--u-color-text-on-ink);
  }

  .u-auth-shell > header > p {
    display: block;
    max-width: var(--u-max-width-form);
    margin: 0;
  }

  .u-auth-shell > header :focus-visible { outline-color: var(--u-color-info-on-ink); }

  .u-auth-shell > header + * {
    grid-row: 1 / 3;
    justify-content: center;
  }

  .u-auth-shell > footer { grid-row: 3; }
}
}
