.gc-library-shell,
.gc-library-topic-shell {
  margin-top: 2.5rem;
}

.gc-library-intro {
  margin-bottom: 2rem;
}

.gc-library-intro p,
.gc-library-topic-copy p {
  margin: 0;
}

.gc-library-topic-shell .gc-library-topic-copy {
  margin-bottom: 2rem;
}

.gc-library-backlink-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.gc-library-backlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.15rem;
  border-radius: 5px;
  background: #fff;
  color: var(--gc-blue) !important;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(46, 63, 163, 0.08);
}

.gc-library-backlink:hover,
.gc-library-backlink:focus {
  color: var(--gc-blue) !important;
  text-decoration: underline;
}

.gc-library-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.gc-library-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 138px;
  padding: 0.9rem 0.75rem;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(46, 63, 163, 0.08);
  color: var(--gc-text-muted) !important;
  text-align: center;
  text-decoration: none;
}

.gc-library-card-link:hover,
.gc-library-card-link:focus {
  color: var(--gc-text-muted) !important;
  box-shadow: 0 8px 20px rgba(46, 63, 163, 0.3);
}

.gc-library-card-link.is-active {
  background: var(--gc-blue);
  color: #fff !important;
}

.gc-library-card-link img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.65rem;
}

.gc-library-card-link span {
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
}

.gc-bibbase-output {
  margin-top: 2rem;
}

.gc-bibbase-output .groupby.downloads {
  display: none;
}

.gc-bibbase-output .bibbase_group {
  background-color: var(--gc-blue);
  color: #fff;
  text-shadow: none;
}

.gc-bibbase-output #bibbase_header ul ul a {
  font-size: 0.9em !important;
  padding-left: 30px !important;
  background: #fff;
}

.gc-bibbase-output #bibbase li a {
  display: block;
  margin: 2px 2px 2px 0;
  padding: 8px 12px;
  border-radius: 5px;
  line-height: 14px;
}

.gc-bibbase-output #bibbase .dropdown-menu > li > a {
  display: block;
  padding: 3px 20px;
  clear: both;
  font-weight: 400;
  line-height: 20px;
  color: #333;
  white-space: nowrap;
}

.gc-bibbase-output #bibbase li a::after {
  display: none;
}

.gc-bibbase-output #bibbase .dropdown .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-top: 6px;
  margin-left: 2px;
  vertical-align: top;
  border-top: 4px solid #000;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.gc-bibbase-output #bibbase a[aria-expanded="true"] {
  color: #212529;
  background: transparent;
}

.gc-bibbase-output #bibbase .dropdown-menu > li > a:hover {
  background-color: var(--gc-blue);
  color: #fff;
  border-radius: 0;
}

.gc-bibbase-output #bibbase a,
.gc-library-intro a,
.gc-library-topic-copy a {
  color: var(--gc-blue);
}

.gc-bibbase-output #bibbase a:hover,
.gc-bibbase-output #bibbase a:focus,
.gc-library-intro a:hover,
.gc-library-intro a:focus,
.gc-library-topic-copy a:hover,
.gc-library-topic-copy a:focus {
  color: var(--gc-blue);
  text-decoration: underline;
}

@media (max-width: 991.98px) {
  .gc-library-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .gc-library-shell,
  .gc-library-topic-shell {
    margin-top: 2rem;
  }

  .gc-library-backlink-row {
    justify-content: stretch;
  }

  .gc-library-backlink {
    width: 100%;
  }

  .gc-library-card-link {
    min-height: 124px;
    padding: 0.85rem 0.65rem;
  }

  .gc-library-card-link span {
    font-size: 14px;
    line-height: 20px;
  }
}

.librarycontainer {
  margin-top: 2.25rem;
  background: linear-gradient(to bottom, white 65%, rgba(255, 255, 255, 0) 0%);
}

.librarycontainer .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 40px;
  padding-right: 40px;
}

.librarycontent {
  padding: 20px 40px 14px 40px;
}

.librarycontent h1 {
  margin: 0 200px 40px 0;
  color: #005a95;
  font-family: "Roboto", sans-serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 38px;
}

.librarycontent p {
  margin: 0;
  color: #222;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 30px;
}

.librarycontainer .librarycard {
  background-color: rgba(255, 255, 255, 0);
  border: 1px solid rgba(0, 0, 0, 0);
  padding: 0 30px;
  text-align: center;
}

.librarybutton {
  width: 100%;
  height: 138px;
  padding: 0;
  border-color: transparent;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(46, 63, 163, 0.08);
  color: #5a5c61;
  text-decoration: none;
}

.librarybutton:hover,
.librarybutton:focus {
  color: #000;
  background: #fff;
  box-shadow: 0 8px 20px rgba(46, 63, 163, 0.3);
  border-color: transparent;
}

.librarybutton p {
  margin: 5% 10px;
  color: #5a5c61;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
}

.librarybutton.selected {
  background: var(--gc-blue);
}

.librarybutton.selected p {
  color: #fff;
}

.libraryimage {
  width: 48px;
  height: 48px;
  margin-top: 10px;
}

.fulllibrary {
  position: relative;
  float: right;
  top: 20px;
  right: 40px;
  width: 170px;
  height: 62px;
  padding-top: 8px;
}

.fulllibrarymobile {
  display: none;
  width: 100%;
  margin-top: 22px;
}

.librarytitle {
  margin-bottom: 32px;
  color: #5a5c61;
  font-family: "Roboto", sans-serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 40px;
}

.customlink {
  color: var(--gc-blue);
}

.customlink:hover,
.customlink:focus {
  color: var(--gc-blue);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .librarycontainer .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .librarycontent {
    padding: 40px 15px 14px 15px;
  }

  .librarycontent h1 {
    margin-right: auto;
    font-size: 24px;
    line-height: 28px;
  }

  .librarycontent p {
    font-size: 14px;
    line-height: 24px;
  }

  .librarycontainer .librarycard {
    padding: 17.5px 0;
  }

  .librarybutton {
    width: 140px;
    height: auto;
  }

  .librarybutton p {
    margin: 23px 11px 24px;
    font-size: 14px;
    line-height: 24px;
  }

  .maincontent .librarytitle {
    font-size: 23px;
    line-height: 32px;
  }

  .fulllibrary {
    display: none;
  }

  .fulllibrarymobile {
    display: block;
    height: auto;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: inherit;
  }
}
