/* Site-specific overrides for static Writebook */

/* Make library book cards clickable */
.library a {
  --hover-color: var(--color-subtle-dark);
}

/* Library intro section */
.library-intro {
  grid-column: 1 / -1;
  max-inline-size: 55ch;
  margin-inline: auto;
  text-align: start;
  padding-inline: var(--inline-space);
}

/* Override turbo-frame display:contents for static site */
turbo-frame {
  display: contents;
}

/* Make sidebar visible by default on desktop when it has content */
body:has(#sidebar > *) {
  #sidebar {
    @media (min-width: 70ch) {
      margin-inline-start: 0;
    }
  }
}

/* Product wordmark custom styling */
.product__wordmark {
  font-weight: 700;
  letter-spacing: -0.02ch;
}

/* Ensure cover image backgrounds work with static paths */
.book__cover-wrapper .book__cover {
  aspect-ratio: 6 / 9;
}

/* Book intro section on detail pages */
.book-intro {
  max-inline-size: 55ch;
  margin-inline: auto;
  text-align: start;
  padding-block-end: var(--block-space);
}

/* Subtle subtitle on library cards */
.library__book .txt-subtle {
  font-size: 0.85em;
  opacity: 0.7;
}

/* Custom BeeNex teal theme — gradient-based since no teal cover texture exists */
.theme--teal .book__cover {
  background: linear-gradient(
    135deg,
    oklch(55% 0.14 195) 0%,
    oklch(45% 0.12 200) 30%,
    oklch(50% 0.16 190) 60%,
    oklch(40% 0.10 205) 100%
  ) !important;
  background-size: cover !important;
}

.theme--teal .book__title,
.theme--teal .book__cover-wrapper {
  color: var(--color-always-white);
}

/* Custom Class Artifacts amber theme */
.theme--amber .book__cover {
  background: linear-gradient(
    135deg,
    oklch(65% 0.16 75) 0%,
    oklch(55% 0.14 60) 30%,
    oklch(60% 0.18 80) 60%,
    oklch(50% 0.12 55) 100%
  ) !important;
  background-size: cover !important;
}

.theme--amber .book__title,
.theme--amber .book__cover-wrapper {
  color: var(--color-always-white);
}
