.library {
  width: min(1100px, calc(100% - 80px));
  margin: auto;
  padding-block: 56px 82px;
}
.library-heading {
  max-width: 760px;
  margin-bottom: 32px;
}
.library-heading h1 {
  font-size: clamp(2.8rem, 6vw, 4.65rem);
  margin-bottom: 13px;
}
.library-heading p,
.topic-summary {
  color: var(--muted);
  font-size: 1.05rem;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.topic-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 13px;
  color: inherit;
  text-decoration: none;
  background: var(--face);
  border: 2px solid var(--ink);
  border-radius: 13px;
  box-shadow: 4px 4px 0 var(--ink);
  transition:
    box-shadow 0.14s,
    transform 0.14s;
}
.topic-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.topic-link:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 7px;
}
.topic-art {
  display: grid;
  place-items: center;
  min-height: 180px;
  background:
    #e8f0e1 radial-gradient(circle, #b5caa6 1px, transparent 1.2px) 0 0 / 15px
    15px;
  border: 1px solid #bccdb0;
  border-radius: 8px;
}
.topic-art img {
  width: 156px;
  height: 156px;
  object-fit: contain;
}
.topic-art.pixel {
  background-color: #eee6f1;
  border-color: #d3c1da;
  background-image: radial-gradient(circle, #c5aecb 1px, transparent 1.2px);
}
.topic-art.pixel img {
  width: 168px;
  height: 168px;
  image-rendering: pixelated;
}
.topic-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 19px 12px 14px;
}
.topic-info h2 {
  font-size: clamp(1.9rem, 4vw, 2.65rem);
  margin-bottom: 8px;
}
.topic-meta {
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
}
.topic-summary {
  margin-bottom: 17px;
}
.topic-cta {
  margin-top: auto;
  color: var(--rust);
  font-weight: 700;
}
.poko-nav-links a[aria-current="page"] {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
@media (max-width: 680px) {
  .library {
    width: calc(100% - 32px);
    padding-block: 36px 55px;
  }
  .library-heading {
    margin-bottom: 24px;
  }
  .topic-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .topic-art {
    min-height: 125px;
  }
  .topic-art img,
  .topic-art.pixel img {
    width: 120px;
    height: 120px;
  }
  .topic-info {
    padding: 14px 8px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .topic-link {
    transition: none;
  }
}
