:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #292d33;
  background: #f4f1eb;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
main {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 64px 28px 100px;
}
.identity { text-align: center; margin-bottom: 50px; }
.card-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 10px;
  font-weight: 600;
}
h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { font-family: inherit; font-size: clamp(20px, 3vw, 30px); font-weight: 600; letter-spacing: .18em; line-height: 1.4; margin: 0; }
.cards {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}
.card {
  position: relative;
  min-height: 280px;
  display: grid;
  grid-template-columns: 33% 1fr;
  align-items: center;
  gap: 22px;
  padding: 34px 30px;
  border: 1px solid;
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 3px 5px #34291b08, 0 16px 28px -12px #34291b30;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 8px #34291b0b, 0 22px 34px -12px #34291b40;
}
.card:focus-visible { outline: 3px solid #4379b6; outline-offset: 6px; }
.directory {
  color: #f4f5f9;
  background: linear-gradient(120deg, #152644, #0b1830);
  border-color: #304262;
}
.directory::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid #8299b321;
  border-radius: 4px;
  pointer-events: none;
}
.directory-art img { display: block; width: 100%; height: auto; border-radius: 23%; }
.directory .card-label { color: #afbed7; }
.library { color: #41372b; background: #fffcf5; border-color: #d9d0c0; }
.library .card-label { color: #827053; }
h2 { font-size: clamp(23px, 2.2vw, 29px); line-height: 1.15; letter-spacing: -.035em; margin: 12px 0; }
.description { font-size: 13px; line-height: 1.65; margin: 0; }
.directory .description { color: #cbd4e3; }
.library .description { color: #6a6053; }
.entry { display: inline-flex; gap: 15px; align-items: center; margin-top: 27px; font-size: 11px; font-weight: 600; letter-spacing: .025em; }
.entry span { font-size: 19px; font-weight: 400; line-height: 1; }
.books { position: relative; height: 174px; }
.book { position: absolute; width: 80px; height: 132px; object-fit: contain; filter: drop-shadow(2px 5px 3px #35251430); }
.book-back { left: 1%; top: 5px; transform: rotate(-12deg); }
.book-middle { right: -2%; top: 21px; transform: rotate(10deg); }
.book-front { left: 18%; top: 42px; transform: rotate(-3deg); }
@media (max-width: 850px) {
  .cards { max-width: 520px; grid-template-columns: 1fr; gap: 24px; }
  main { padding: 48px 24px 64px; }
  .identity { margin-bottom: 34px; }
  h2 { font-size: 29px; }
}
@media (max-width: 400px) {
  main { padding-inline: 18px; }
  .card { min-height: 248px; padding: 28px 23px; gap: 17px; grid-template-columns: 28% 1fr; }
  h2 { font-size: 25px; }
  .card-label { font-size: 9px; letter-spacing: .12em; }
  .book { width: 66px; height: 116px; }
  .book-front { left: 10%; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}
