.library {
  --ink: #301c3e;
  --muted: #62536a;
  --gold: #ebcc90;
  --serif: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --rule: #e3d7df;
  margin: 0;
  background: #f9f5f0;
  color: var(--ink);
  font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
  line-height: 1.5;
}

.library *,
.library *::before,
.library *::after {
  box-sizing: border-box;
}

.library-shell {
  width: min(69rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.library-hero {
  overflow: hidden;
  color: #fff8f2;
  background:
    radial-gradient(ellipse at 80% 78%, #623e74 0%, transparent 53%),
    linear-gradient(115deg, #281339 12%, #432551 100%);
  border-bottom: 3px solid #c69c60;
}

.library-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 5.25rem;
  border-bottom: 1px solid #ebcc9033;
}

.library-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  white-space: nowrap;
}

.library-brand-accent {
  color: var(--gold);
}

.library-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .48rem .9rem;
  border: 1px solid #ebcc9066;
  border-radius: 999px;
  color: #fff8f2;
  font-size: .82rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease;
}

.library-back svg,
.library-read svg {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
}

.library-back svg {
  color: var(--gold);
}

.library-back:hover {
  border-color: var(--gold);
  background: #ebcc901c;
}

.library-back:focus-visible,
.library-read:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.library-intro {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 16.5rem;
  padding-block: 2.75rem 3.4rem;
}

.library-intro-copy {
  position: relative;
  z-index: 1;
}

.library-kicker,
.library-card-kicker {
  margin: 0;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.library-kicker {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--gold);
}

.library-kicker::before {
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  content: '';
}

.library-intro h1 {
  margin: .32rem 0 .85rem;
  font: 400 clamp(2.65rem, 6.7vw, 5.2rem) / 1.025 var(--serif);
  letter-spacing: -.052em;
}

.library-intro h1 em {
  color: var(--gold);
  font-weight: 400;
}

.library-lede {
  max-width: 29rem;
  margin: 0;
  color: #eee0f1;
  font-size: 1.025rem;
  line-height: 1.65;
}

.library-ornament {
  position: absolute;
  right: 1.25rem;
  bottom: -1px;
  width: min(28%, 17.875rem);
  color: #efcc8d;
  pointer-events: none;
}

.library-collection {
  padding-block: 2.6rem 3.2rem;
}

.library-collection-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.library-collection-heading h2 {
  margin: 0;
  font: 400 clamp(1.65rem, 4vw, 2.15rem) / 1.2 var(--serif);
  letter-spacing: -.025em;
}

.library-collection-heading::after {
  order: 1;
  flex: 1;
  height: 1px;
  background: var(--rule);
  content: '';
}

.library-collection-heading span {
  order: 2;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.library-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: #fffdfa;
  box-shadow: 0 .45rem 1.5rem #3319420a;
}

.library-cover-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  height: 13.75rem;
  border-bottom: 1px solid #3b22462b;
  background: radial-gradient(ellipse at 50% 45%, var(--stage-light), transparent 70%), var(--stage-dark);
}

.library-cover-stage--lent {
  --stage-light: #a485af;
  --stage-dark: #715482;
  --cover-tilt: -7deg;
}

.library-cover-stage--advent {
  --stage-light: #8d7ea8;
  --stage-dark: #514671;
  --cover-tilt: 7deg;
}

.library-cover-stage::before {
  position: absolute;
  z-index: -1;
  top: 13%;
  bottom: -18%;
  width: 65%;
  border: 1px solid #f5d9ad55;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
  box-shadow: 0 0 0 1rem #f5d9ad0e, 0 0 0 2rem #f5d9ad0b, 0 0 0 3rem #f5d9ad08;
  content: '';
}

.library-cover-stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle, #ffedcf69 .6px, transparent 1px) center / 15px 15px;
  opacity: .46;
  content: '';
}

.library-cover-index {
  position: absolute;
  top: 1rem;
  left: 1rem;
  min-width: 2.5rem;
  padding: .2rem .35rem;
  border: 1px solid #f5d9ad7a;
  border-radius: 999px;
  background: #2e1c3b44;
  color: #fff2d7;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-align: center;
}

.library-cover {
  display: block;
  width: 9.25rem;
  max-width: 60%;
  filter: drop-shadow(.3rem .6rem .45rem #21152d70);
  transform: rotate(var(--cover-tilt));
}

.library-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.4rem clamp(1.05rem, 3vw, 1.65rem) 1.55rem;
}

.library-card-kicker {
  color: #805524;
}

.library-card h3 {
  margin: .25rem 0 .5rem;
  font: 400 clamp(1.75rem, 4vw, 2.15rem) / 1.15 var(--serif);
  letter-spacing: -.025em;
}

.library-card-description {
  max-width: 31rem;
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.65;
}

.library-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem .85rem;
  margin-top: auto;
}

.library-read {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .52rem .85rem;
  border: 1px solid transparent;
  border-radius: .52rem;
  background: #48285a;
  color: #fff8f2;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s ease;
}

.library-read[href]:hover {
  background: #633975;
}

.library-read:not([href]) {
  border-color: #e3d5e8;
  background: #f3ebf6;
  color: #5e476d;
}

.library-read[href] + .library-link-status {
  display: none;
}

.library-link-status {
  color: var(--muted);
  font-size: .8rem;
}

.library-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem 1.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .82rem;
}

.library-footer span {
  color: #48285a;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.library-footer p {
  margin: 0;
}

@media (max-width: 47rem) {
  .library-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.15rem;
  }

  .library-intro {
    min-height: auto;
  }

  .library-ornament {
    right: -.75rem;
    width: 30%;
    opacity: .38;
  }
}

@media (max-width: 32rem) {
  .library-masthead {
    flex-wrap: wrap;
    gap: .4rem;
    min-height: 4.3rem;
    padding-block: .55rem;
  }

  .library-brand {
    gap: .4rem;
    font-size: .67rem;
    letter-spacing: .11em;
  }

  .library-back {
    gap: .3rem;
    padding-inline: .57rem;
    font-size: .73rem;
  }

  .library-intro {
    padding-block: 2.3rem 2.65rem;
  }

  .library-intro h1 em {
    display: block;
  }

  .library-ornament {
    right: -1.35rem;
    width: 43%;
    opacity: .28;
  }

  .library-collection {
    padding-block: 1.8rem 2rem;
  }

  .library-cover-stage {
    height: 12rem;
  }

  .library-cover {
    width: 8rem;
  }
}
