.page {
  position: relative;
}

.article-header {
  position: relative;
}

.hgsl-home-link {
  position: absolute;
  z-index: 20;
  top: 1rem;
  left: 0;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 2px;
  color: #121212;
  text-decoration: none;
}

.hgsl-home-link svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.hgsl-home-link:hover {
  background: #f2f2f2;
}

.hgsl-home-link:focus-visible {
  outline: 1px solid #121212;
  outline-offset: 2px;
}

.hgsl-account {
  position: absolute;
  z-index: 20;
  top: 1rem;
  right: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .65rem;
  max-width: min(28rem, 42vw);
  margin: 0;
  color: #333;
  font: 600 .72rem/1.3 Arial, Helvetica, sans-serif;
}

.hgsl-account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hgsl-account button,
.hgsl-context-menu button {
  font: inherit;
}

.hgsl-account button {
  appearance: none;
  cursor: pointer;
}

.hgsl-context-menu button[hidden] {
  display: none;
}

#hgsl-sign-in {
  min-width: 5.1rem;
  min-height: 2rem;
  padding: .35rem .75rem;
  border: 1px solid #326891;
  border-radius: 3px;
  color: #fff;
  background: #567b95;
  font: 700 .69rem/1 Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
}

#hgsl-sign-in:hover,
#hgsl-sign-in:focus-visible {
  background: #326891;
  outline: 2px solid rgba(50, 104, 145, .28);
  outline-offset: 2px;
}

#hgsl-sign-out {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: #333;
  background: transparent;
}

.library-home .hgsl-account {
  right: max(20px, calc((100vw - 980px) / 2));
}

.hgsl-context-menu {
  position: fixed;
  z-index: 90;
  width: min(15.5rem, calc(100vw - 1rem));
  padding: .38rem;
  border: 1px solid #cfd4d8;
  border-radius: .38rem;
  background: #fff;
  box-shadow: 0 .7rem 2rem rgba(0, 0, 0, .16);
  color: #202326;
  font: .88rem/1.35 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hgsl-context-target {
  overflow: hidden;
  margin: 0;
  padding: .38rem .55rem .32rem;
  color: #687078;
  font-size: .73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hgsl-context-menu button {
  display: block;
  width: 100%;
  padding: .58rem .62rem;
  border: 0;
  border-radius: .28rem;
  color: #183e58;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.hgsl-context-menu button:hover,
.hgsl-context-menu button:focus-visible {
  background: #eef4f8;
  outline: none;
}

.hgsl-auth-dialog {
  width: min(26.5rem, calc(100vw - 2rem));
  max-height: min(42rem, calc(100vh - 2rem));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #c7c7c7;
  border-top: 4px solid #121212;
  border-radius: 2px;
  background: #fff;
  color: #121212;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .2);
}

.hgsl-auth-dialog::backdrop {
  background: rgba(18, 18, 18, .48);
}

.hgsl-auth-shell {
  position: relative;
  padding: 1.85rem 2rem 2rem;
}

.hgsl-auth-close {
  position: absolute;
  top: .7rem;
  right: .72rem;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  border: 0;
  border-radius: 2px;
  color: #4a4a4a;
  background: transparent;
  font: 400 1.25rem/1 Arial, Helvetica, sans-serif;
  line-height: 1;
  cursor: pointer;
}

.hgsl-auth-close:hover,
.hgsl-auth-close:focus-visible {
  background: #f3f3f3;
  outline: 1px solid #121212;
}

.hgsl-auth-dialog h2 {
  margin: 0;
  padding: 0 2rem;
  text-align: center;
  font: 700 1.6rem/1.12 Georgia, "Times New Roman", serif;
  letter-spacing: -.015em;
}

.hgsl-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 1.55rem 0 1.35rem;
  border-bottom: 1px solid #d6d6d6;
}

.hgsl-auth-tabs button {
  padding: .68rem .3rem .62rem;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #666;
  background: transparent;
  font: 700 .77rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: .01em;
  cursor: pointer;
}

.hgsl-auth-tabs button[aria-selected="true"] {
  border-bottom-color: #121212;
  color: #121212;
  font-weight: 700;
}

.hgsl-auth-form {
  display: grid;
  gap: 1rem;
}

.hgsl-auth-field {
  display: grid;
  gap: .38rem;
  color: #333;
  font: 700 .72rem/1.3 Arial, Helvetica, sans-serif;
}

.hgsl-auth-field input {
  width: 100%;
  min-height: 2.85rem;
  padding: .65rem .7rem;
  border: 1px solid #888;
  border-radius: 2px;
  color: #121212;
  background: #fff;
  font: 1rem/1.35 Arial, Helvetica, sans-serif;
}

.hgsl-auth-field input:focus {
  border-color: #121212;
  outline: 1px solid #121212;
  outline-offset: 0;
}

.hgsl-auth-submit {
  min-height: 2.85rem;
  margin-top: .3rem;
  padding: .68rem .9rem;
  border: 1px solid #121212;
  border-radius: 2px;
  color: #fff;
  background: #121212;
  font: 700 .8rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: .01em;
  cursor: pointer;
}

.hgsl-auth-submit:hover,
.hgsl-auth-submit:focus-visible {
  background: #333;
  outline: 2px solid rgba(18, 18, 18, .22);
  outline-offset: 2px;
}

.hgsl-auth-submit:disabled {
  cursor: wait;
  opacity: .65;
}

.hgsl-auth-error {
  margin: 1rem 0 0;
  padding: .7rem .75rem;
  border: 1px solid #c24a43;
  color: #8b1f19;
  background: #fff;
  font: .78rem/1.45 Arial, Helvetica, sans-serif;
}

.hgsl-auth-toast {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 1rem;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: .72rem .9rem;
  border-radius: .38rem;
  color: #fff;
  background: #26343d;
  box-shadow: 0 .55rem 1.8rem rgba(0, 0, 0, .18);
  font: .84rem/1.45 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 520px) {
  .hgsl-account {
    position: static;
    justify-content: flex-end;
    max-width: none;
    margin: -1rem 0 1rem;
  }
  .library-home .hgsl-account {
    width: calc(100% - 40px);
    margin: 1rem auto 0;
  }
  .hgsl-auth-shell { padding: 1.55rem 1.1rem 1.4rem; }
  .hgsl-auth-toast { right: .65rem; bottom: .65rem; }
}
