:root {
  --ink: #222;
  --muted: #888;
  --faint: #aaa;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 20rem;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "pliego", Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 300;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
main,
noscript {
  width: min(100% - 2.5rem, 730px);
  margin-inline: auto;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

main {
  padding-bottom: 5rem;
}

.bookshelf-index main {
  padding-top: 10vh;
}

.book {
  position: relative;
  display: block;
  padding: 0.08rem 0;
  overflow: hidden;
  font-weight: 300;
  line-height: 1.35;
}

.book-title {
  font-weight: 300;
}

.book.is-recommended .book-title {
  font-weight: 700;
}

.book:not(.is-static):hover .book-title,
.book:focus-visible .book-title {
  text-shadow: -1px 0 0 rgba(0, 0, 0, 0.35), 1px 0 0 rgba(0, 0, 0, 0.35);
}

.book:focus-visible {
  outline: 1px solid var(--faint);
  outline-offset: 1px;
}

.book-author {
  color: #777;
}

.book-author::before {
  content: " by ";
}

.book.is-dnf .book-title,
.book-profile.is-dnf .book-page-title {
  color: #999;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.book.is-paused .book-title {
  color: #777;
}

.book.is-paused .book-author {
  color: var(--faint);
}

.book-row-meta {
  position: absolute;
  top: 0.08rem;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-left: 1.75rem;
  color: var(--muted);
  background: linear-gradient(to right, transparent, #fff 1.35rem);
  font-size: 0.72rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  white-space: nowrap;
}

.book:hover .book-row-meta,
.book:focus-visible .book-row-meta {
  opacity: 1;
}

.rating {
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.status,
.book-date,
.book-page-date,
.highlight-count,
.meta-separator {
  color: var(--muted);
  font-size: 0.72rem;
}

.empty-state {
  min-height: 25vh;
  display: grid;
  place-items: center;
  margin: 0;
  color: #777;
  text-align: center;
}

.empty-state a {
  font-weight: 700;
}

.book-site-header {
  padding: 4rem 0 3.5rem;
  text-align: left;
}

.back-link {
  color: #777;
  font-weight: 700;
}

.back-link:hover {
  color: var(--ink);
  text-shadow: -1px 0 0 rgba(0, 0, 0, 0.35), 1px 0 0 rgba(0, 0, 0, 0.35);
}

.book-profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem;
  align-items: start;
}

.book-page-title {
  max-width: 32rem;
  font-size: 1.75rem;
  line-height: 1.25;
}

.book-page-subtitle {
  display: block;
  margin-top: 0.3rem;
  color: #555;
  font-size: 0.72em;
  font-weight: 300;
  line-height: 1.35;
}

.book-page-subtitle + .book-page-subtitle {
  margin-top: 0.1rem;
}

.book-page-author {
  margin: 0.55rem 0 0;
  color: #777;
}

.book-page-author::before {
  content: "by ";
}

.book-page-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin-top: 1rem;
}

.book-cover-frame {
  width: 108px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.book-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 180ms ease;
}

.book-cover.is-loaded {
  opacity: 1;
}

.book-highlights {
  max-width: 38rem;
  margin-top: 4rem;
}

.highlight-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.highlight {
  margin: 0 0 1.4rem;
}

.highlight blockquote {
  margin: 0;
  line-height: 1.55;
}

.no-highlights {
  color: var(--muted);
}

@media (hover: none), (max-width: 600px) {
  .book-row-meta {
    display: none;
  }
}

@media (max-width: 600px) {
  .bookshelf-index main {
    padding-top: 8vh;
  }

  .book-site-header {
    padding: 2.5rem 0 3rem;
  }

  .book-profile-header {
    gap: 1.25rem;
  }

  .book-page-title {
    font-size: 1.45rem;
  }

  .book-cover-frame {
    width: 76px;
  }

  .book-highlights {
    margin-top: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-cover {
    transition: none;
  }
}
