/*
 * Blog page: free handbook block.
 * Loaded only on the Narrow Blog template, after narrow-custom.
 */

/* The handbook cover is a 3:4 picture instead of the old CSS-drawn cover. */
body.narrow-blog-page .leadmag-preview .leadmag-cover-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

/* The cover text sits on the empty dark area at the bottom of the picture. */
body.narrow-blog-page .leadmag-preview .leadmag-cover-caption {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0 2rem 2rem;
  pointer-events: none;
}

body.narrow-blog-page .leadmag-preview .leadmag-cover-title {
  margin: 0;
  color: var(--narrow-text-light, #fff7ec);
  font-size: 1.8rem;
  line-height: 1.15;
}

body.narrow-blog-page .leadmag-preview .leadmag-cover-sub {
  color: rgba(255, 247, 236, 0.55);
}

@media (max-width: 768px) {
  body.narrow-blog-page .leadmag-preview .leadmag-cover-caption {
    gap: 0.7rem;
    padding: 0 1.5rem 1.5rem;
  }

  body.narrow-blog-page .leadmag-preview .leadmag-cover-title {
    font-size: 1.5rem !important;
  }
}

body.narrow-blog-page .leadmag-label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--narrow-text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.6;
}

body.narrow-blog-page .leadmag-consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Honeypot field: invisible for people, bots fill it in. */
body.narrow-blog-page .leadmag-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

body.narrow-blog-page .leadmag-success[hidden] {
  display: none;
}

body.narrow-blog-page .leadmag-success a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

body.narrow-blog-page .leadmag-success.is-error {
  border-color: rgba(200, 60, 40, 0.35);
  background: rgba(200, 60, 40, 0.08);
  color: #9c2f1f;
}
