.library {
  background: linear-gradient(165deg, #edf4f5, #fff 56%, #faf4ec);
}
.library-hero {
  position: relative;
  isolation: isolate;
  background: #e7eff1;
  overflow: hidden;
  border-bottom: 1px solid #bbd0d7;
}
.library-photo {
  position: absolute;
  inset: 0 0 0 auto;
  width: 56%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
}
.library-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #edf3f5 12%, #e7eff1 43%, #e7eff1e8 49%, #e7eff100 67%);
}
.library-intro { position: relative; z-index: 1; padding-bottom: clamp(38px, 5vw, 80px); }
.library-intro h1 {
  margin-block: clamp(26px, 3.5vw, 60px) 16px;
  max-width: 15ch;
  font-size: clamp(44px, 5.6vw, 82px);
  line-height: 1.02;
}
.library-intro h1 span { display: block; color: var(--brand-ink); }
.library-intro > p { width: min(41%, 45ch); color: var(--ink-2); font-size: clamp(16px, 1.35vw, 20px); }
.library-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  padding-block: clamp(36px, 4.8vw, 74px) clamp(52px, 6vw, 94px);
}
.library-groups section { border-top: 2px solid #9cb8c4; padding-top: 17px; }
.library-groups section:first-child { border-color: var(--accent); }
.library-groups section:nth-child(2) { border-color: var(--brand); }
.library-groups h2 { font-size: clamp(25px, 2.45vw, 38px); }
.library-groups section > p { margin-top: 12px; color: var(--ink-3); max-width: 43ch; }
.library-groups ul { list-style: none; padding: 0; margin: 22px 0 0; }
.library-groups li { border-top: 1px solid var(--rule); }
.library-groups li a { display: block; position: relative; padding: 18px 24px 18px 0; }
.library-groups li a::after { content: "→"; position: absolute; right: 2px; top: 18px; color: var(--brand); }
.library-groups h3 { font-size: clamp(19px, 1.5vw, 23px); line-height: 1.2; color: var(--brand-ink); }
.library-groups li p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.library-groups a:is(:hover, :focus-visible) h3 { text-decoration: underline; text-underline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .library-groups li a::after { transition: transform 160ms ease; }
  .library-groups li a:is(:hover, :focus-visible)::after { transform: translateX(3px); }
}
@media (min-width: 681px) and (max-width: 880px) {
  .library-intro h1 { font-size: 44px; }
  .library-groups { gap: 18px; }
}
@media (max-width: 680px) {
  .library-photo { inset: auto 0 0; width: 100%; height: 152px; object-position: center 47%; }
  .library-hero::after { background: linear-gradient(180deg, #edf3f5 calc(100% - 151px), #edf3f500 calc(100% - 96px)); }
  .library-intro { padding-bottom: 148px; }
  .library-intro h1 { margin-top: 15px; font-size: clamp(39px, 8.8vw, 55px); }
  .library-intro > p { width: 100%; max-width: 48ch; }
  .library-groups { grid-template-columns: 1fr; gap: 28px; }
  .library-groups ul { margin-top: 14px; }
}
