/*
 * SleepBaby.org article authored-CTA foreground contract v2.5.9.4.
 *
 * Legacy and writer-authored article blocks sometimes carry a complete button
 * surface inline: background, border, padding, radius, and foreground.  The
 * article light-surface link rule is intentionally forceful for prose links,
 * so this later layer restores the author's explicit button foreground without
 * changing the authored background or turning ordinary editorial links into
 * buttons.
 */
body.sleepbaby-single-post.sleepbaby-single-post
  .entry-content.entry-content
  a[data-sb-authored-cta="1"][data-sb-authored-cta="1"][data-sb-authored-cta="1"]:is(:link, :visited, :hover, :focus, :focus-visible, :active),
body.sleepbaby-single-post.sleepbaby-single-post
  .entry-content.entry-content
  a[data-sb-authored-cta="1"][data-sb-authored-cta="1"][data-sb-authored-cta="1"]:is(:link, :visited, :hover, :focus, :focus-visible, :active)
  :is(span, strong, em, b, i, small),
body.sleepbaby-single-post.sleepbaby-single-post
  .entry-content.entry-content
  a[data-sb-authored-cta="1"][data-sb-authored-cta="1"][data-sb-authored-cta="1"]:is(:link, :visited, :hover, :focus, :focus-visible, :active)::before,
body.sleepbaby-single-post.sleepbaby-single-post
  .entry-content.entry-content
  a[data-sb-authored-cta="1"][data-sb-authored-cta="1"][data-sb-authored-cta="1"]:is(:link, :visited, :hover, :focus, :focus-visible, :active)::after {
  color: var(--sb-authored-cta-fg, #fffefb) !important;
  -webkit-text-fill-color: var(--sb-authored-cta-fg, #fffefb) !important;
  text-decoration: none !important;
  text-decoration-color: currentColor !important;
  text-shadow: none !important;
}

body.sleepbaby-single-post.sleepbaby-single-post
  .entry-content.entry-content
  a[data-sb-authored-cta="1"][data-sb-authored-cta="1"][data-sb-authored-cta="1"]:is(:focus, :focus-visible) {
  outline: 3px solid currentColor !important;
  outline-offset: 4px !important;
}

@media (forced-colors: active) {
  body.sleepbaby-single-post.sleepbaby-single-post
    .entry-content.entry-content
    a[data-sb-authored-cta="1"][data-sb-authored-cta="1"][data-sb-authored-cta="1"]:is(:link, :visited, :hover, :focus, :focus-visible, :active),
  body.sleepbaby-single-post.sleepbaby-single-post
    .entry-content.entry-content
    a[data-sb-authored-cta="1"][data-sb-authored-cta="1"][data-sb-authored-cta="1"]:is(:link, :visited, :hover, :focus, :focus-visible, :active)
    :is(span, strong, em, b, i, small),
  body.sleepbaby-single-post.sleepbaby-single-post
    .entry-content.entry-content
    a[data-sb-authored-cta="1"][data-sb-authored-cta="1"][data-sb-authored-cta="1"]:is(:link, :visited, :hover, :focus, :focus-visible, :active)::before,
  body.sleepbaby-single-post.sleepbaby-single-post
    .entry-content.entry-content
    a[data-sb-authored-cta="1"][data-sb-authored-cta="1"][data-sb-authored-cta="1"]:is(:link, :visited, :hover, :focus, :focus-visible, :active)::after {
    color: ButtonText !important;
    -webkit-text-fill-color: ButtonText !important;
    text-decoration-color: ButtonText !important;
    border-color: ButtonText !important;
  }
}

/*
 * Tablet continuation integrity contract.
 *
 * An older April optimization deliberately reduced the final item in each
 * three-item group to half width between 768px and 1099px.  Inside the
 * article continuation that made the third bonus's own two-column layout
 * collapse to a zero-width copy column immediately after "Deep Into
 * Dreams".  The final item may span the two-column parent, but it must keep
 * the parent's full usable width and a real copy column.
 */
@media (min-width: 768px) and (max-width: 1099px) {
  body.sleepbaby-single-post.sleepbaby-single-post
    .sleepbaby-article-archive-footer.sleepbaby-article-archive-footer
    :is(.sbh2020-tip, .sbh2020-bonus-band, .sbh2020-testimonial):last-of-type {
    inline-size: 100% !important;
    width: 100% !important;
    max-inline-size: none !important;
    min-inline-size: 0 !important;
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
  }

  body.sleepbaby-single-post.sleepbaby-single-post
    .sleepbaby-article-archive-footer.sleepbaby-article-archive-footer
    .sbh2020-bonus-band:last-of-type .sbh2020-bonus-card {
    grid-template-columns: minmax(180px, .82fr) minmax(0, 1.18fr) !important;
    inline-size: 100% !important;
    min-inline-size: 0 !important;
  }

  body.sleepbaby-single-post.sleepbaby-single-post
    .sleepbaby-article-archive-footer.sleepbaby-article-archive-footer
    .sbh2020-bonus-band:last-of-type .sbh2020-bonus-card__copy {
    min-inline-size: 0 !important;
    overflow-wrap: anywhere;
  }
}
