.pm-member-shell {
  align-items: center;
  background: var(--pm-surface);
  border-bottom: 1px solid var(--pm-border);
  color: var(--pm-text);
  display: grid;
  font-family: system-ui, sans-serif;
  gap: 0.9rem;
  grid-template-columns: minmax(10rem, 0.7fr) minmax(0, 1.5fr) auto;
  min-height: 3.25rem;
  padding: 0.4rem 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.pm-member-shell--no-local {
  grid-template-columns: auto minmax(0, 1fr);
}

.pm-member-shell__identity {
  display: grid;
  justify-self: start;
  line-height: 1.08;
  min-width: 0;
}

.pm-member-shell__identity-row,
.pm-member-shell__institution-links {
  align-items: center;
  display: flex;
}

.pm-member-shell__identity-row {
  gap: 0.35rem;
  min-width: 0;
}

.pm-member-shell__institution-links {
  gap: 0.12rem;
}

.pm-member-shell__institution,
.pm-member-shell__institution-links a,
.pm-member-shell__surface,
.pm-member-shell__local a,
.pm-member-shell__utilities a,
.pm-member-shell__member-menu a,
.pm-member-shell__local-menu a,
.pm-member-surfaces a {
  color: inherit;
  text-decoration: none;
}

.pm-member-shell__institution-links a {
  align-items: center;
  border-radius: 4px;
  color: var(--pm-muted);
  display: inline-flex;
  font-size: 0.72rem;
  height: 1.25rem;
  justify-content: center;
  width: 1.25rem;
}

.pm-member-shell__sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.pm-member-shell__institution {
  color: var(--pm-muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pm-member-shell__surface {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.94rem;
  font-weight: 700;
  white-space: nowrap;
}

.pm-member-shell__local {
  align-items: center;
  display: flex;
  font-size: 0.8rem;
  gap: 0.8rem;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
}

.pm-member-shell__utilities {
  align-items: center;
  display: flex;
  font-size: 0.76rem;
  gap: 0.5rem;
  justify-self: end;
  min-width: 0;
  white-space: nowrap;
}

.pm-member-shell--no-local .pm-member-shell__utilities {
  grid-column: 2;
}

.pm-member-shell__utilities a,
.pm-member-shell__utilities button,
.pm-member-shell__compact summary,
.pm-member-shell__member-menu > a,
.pm-member-shell__member-menu > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--pm-muted);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  justify-content: center;
  line-height: 1.2;
  min-height: 2rem;
  padding: 0.3rem 0.25rem;
}

.pm-member-shell__compact {
  align-items: center;
  display: none;
  font-size: 0.76rem;
  gap: 0.45rem;
  justify-self: end;
}

.pm-member-disclosure {
  position: relative;
}

.pm-member-disclosure summary {
  list-style: none;
}

.pm-member-disclosure summary::-webkit-details-marker {
  display: none;
}

.pm-member-disclosure__menu {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  box-shadow: 0 0.8rem 2rem rgb(0 0 0 / 18%);
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  min-width: 14rem;
  padding: 0.45rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
}

.pm-member-disclosure:not([open]) > .pm-member-disclosure__menu {
  display: none;
}

.pm-member-disclosure--sections .pm-member-disclosure__menu {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.pm-member-disclosure__menu--member {
  min-width: 16rem;
}

.pm-member-shell__local-menu,
.pm-member-shell__member-menu,
.pm-member-surfaces__links {
  display: grid;
  gap: 0.15rem;
}

.pm-member-shell__local-menu a,
.pm-member-shell__member-menu a,
.pm-member-shell__member-menu button,
.pm-member-surfaces__links a {
  border-radius: 6px;
  display: block;
  padding: 0.58rem 0.7rem;
  text-align: left;
}

.pm-member-shell__member-menu > button {
  justify-content: flex-start;
  width: 100%;
}

.pm-member-surfaces {
  border-top: 1px solid var(--pm-border);
  margin-top: 0.2rem;
  padding-top: 0.4rem;
}

.pm-member-shell__utilities .pm-member-surfaces {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.pm-member-surfaces__label {
  color: var(--pm-muted);
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  text-transform: uppercase;
}

.pm-member-surfaces__links [data-member-surface-slot]:empty {
  display: none;
}

.pm-member-shell a:hover,
.pm-member-shell a:focus-visible,
.pm-member-shell button:hover,
.pm-member-shell button:focus-visible,
.pm-member-disclosure summary:hover,
.pm-member-disclosure summary:focus-visible {
  color: var(--pm-accent);
}

.pm-member-shell a:focus-visible,
.pm-member-shell button:focus-visible,
.pm-member-disclosure summary:focus-visible {
  outline: 2px solid var(--pm-accent);
  outline-offset: 3px;
}

.pm-member-shell a[aria-current="page"],
.pm-member-shell a[aria-current="location"] {
  color: var(--pm-text);
  font-weight: 700;
  text-decoration-color: var(--pm-accent);
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

body.mode-focus .pm-member-shell {
  display: none;
}

@media (max-width: 980px) {
  body.pm-canonical-commentary-reader .pm-member-shell {
    background: color-mix(in srgb, var(--pm-surface) 94%, transparent);
    box-shadow: 0 10px 26px rgb(0 0 0 / 12%);
    left: 0;
    min-height: var(--pm-mobile-utility-height, 3.35rem);
    position: fixed;
    right: 0;
    top: 0;
    transform: translateY(0);
    transition: transform 160ms ease, opacity 160ms ease;
    z-index: 60;
  }

  body.pm-canonical-commentary-reader.pm-mobile-utility-hidden .pm-member-shell {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-1 * var(--pm-mobile-utility-height, 3.35rem) - 0.5rem));
  }
}

@media (max-width: 80rem) {
  .pm-member-shell[data-navigation-density="deep"] {
    grid-template-columns: minmax(10rem, 1fr) auto;
  }

  .pm-member-shell[data-navigation-density="deep"] .pm-member-shell__local {
    display: none;
  }

  .pm-member-shell[data-navigation-density="deep"] .pm-member-shell__compact {
    display: flex;
    grid-column: 2;
    grid-row: 1;
  }

  .pm-member-shell[data-navigation-density="deep"] .pm-member-shell__utilities {
    display: none;
  }

  .pm-member-shell[data-navigation-density="deep"] .pm-member-disclosure--member {
    display: block;
  }
}

@media (max-width: 54rem) {
  .pm-member-shell:not([data-navigation-density="deep"]):not(.pm-member-shell--no-local) {
    grid-template-columns: minmax(10rem, 1fr) auto;
  }

  .pm-member-shell:not([data-navigation-density="deep"]):not(.pm-member-shell--no-local) .pm-member-shell__local {
    display: none;
  }

  .pm-member-shell:not([data-navigation-density="deep"]):not(.pm-member-shell--no-local) .pm-member-shell__compact {
    display: flex;
    grid-column: 2;
    grid-row: 1;
  }

  .pm-member-shell:not([data-navigation-density="deep"]):not(.pm-member-shell--no-local) .pm-member-shell__utilities {
    display: none;
  }

  .pm-member-shell:not([data-navigation-density="deep"]):not(.pm-member-shell--no-local) .pm-member-disclosure--member {
    display: block;
  }
}

@media (max-width: 46rem) {
  .pm-member-shell,
  .pm-member-shell[data-navigation-density="deep"],
  .pm-member-shell:not([data-navigation-density="deep"]),
  .pm-member-shell--no-local:not([data-navigation-density="deep"]) {
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.4rem 0.65rem;
  }

  .pm-member-shell__utilities {
    display: none;
  }

  .pm-member-shell__compact,
  .pm-member-shell[data-navigation-density="deep"] .pm-member-shell__compact,
  .pm-member-shell:not([data-navigation-density="deep"]) .pm-member-shell__compact,
  .pm-member-shell--no-local:not([data-navigation-density="deep"]) .pm-member-shell__compact {
    display: flex;
    grid-column: 2;
    grid-row: 1;
  }

  .pm-member-shell[data-navigation-density="deep"] .pm-member-disclosure--member,
  .pm-member-shell:not([data-navigation-density="deep"]) .pm-member-disclosure--member {
    display: block;
  }

  .pm-member-shell__institution {
    font-size: 0.58rem;
  }

  .pm-member-shell__surface {
    font-size: 0.88rem;
  }

  .pm-member-disclosure--sections .pm-member-disclosure__menu {
    left: auto;
    right: 0;
    transform: none;
  }
}

@media (max-width: 24rem) {
  .pm-member-shell__compact {
    font-size: 0.7rem;
    gap: 0.25rem;
  }

  .pm-member-disclosure__menu,
  .pm-member-disclosure__menu--member {
    min-width: 13rem;
  }
}
