/*
 * SleepBaby Article Render Guard 1.0.9
 *
 * Permanent video-card readability contract. This file is deliberately a
 * separate cache-busting asset so a previously cached 1.0.8 stylesheet cannot
 * restore dark inherited copy on the plum/teal video surface after a restart.
 * It is safe on governed .sbds-article bodies and older wrapperless post
 * bodies because every selector remains scoped beneath .entry-content.
 */

:is(.sbds-article, .entry-content) :is(
  .sbds-video,
  .sleepbaby-article-video,
  figure.wp-block-embed-youtube
):not(.sleepbaby-cpsc-video) {
  position: relative;
  isolation: isolate;
  width: min(100%, 920px) !important;
  max-width: 920px !important;
  margin: 2rem auto 2.35rem !important;
  overflow: hidden;
  border: 1px solid #d6c2e6 !important;
  border-radius: 30px !important;
  padding: clamp(0.78rem, 2.3vw, 1.15rem) !important;
  color: #fffefb !important;
  background:
    radial-gradient(circle at 92% 8%, rgba(244, 207, 112, 0.16), transparent 27%),
    radial-gradient(circle at 8% 92%, rgba(106, 190, 172, 0.14), transparent 29%),
    linear-gradient(145deg, #231a34 0%, #422b50 48%, #254946 100%) !important;
  box-shadow: 0 22px 52px rgba(48, 31, 66, 0.28) !important;
}

/*
 * WordPress and older article packs can leave an inline dark color on any of
 * these nodes. Force every reader-facing text node onto a contrast-safe palette
 * without changing the Article HTML or the video's teaching copy.
 */
:is(.sbds-article, .entry-content) :is(
  .sbds-video,
  .sleepbaby-article-video,
  figure.wp-block-embed-youtube
):not(.sleepbaby-cpsc-video) :is(
  h2,
  h3,
  h4,
  h5,
  p,
  li,
  strong,
  em,
  small,
  span,
  figcaption,
  blockquote
) {
  color: #fffefb !important;
  text-shadow: 0 1px 1px rgba(14, 9, 24, 0.42);
}

:is(.sbds-article, .entry-content) :is(
  .sbds-video,
  .sleepbaby-article-video,
  figure.wp-block-embed-youtube
):not(.sleepbaby-cpsc-video) :is(
  .sbds-video__eyebrow,
  .sleepbaby-article-video__eyebrow
) {
  color: #ffe3a0 !important;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

:is(.sbds-article, .entry-content) :is(
  .sbds-video,
  .sleepbaby-article-video,
  figure.wp-block-embed-youtube
):not(.sleepbaby-cpsc-video) a {
  color: #fff1b8 !important;
  text-decoration-color: currentColor;
  text-underline-offset: 0.16em;
}

:is(.sbds-article, .entry-content) :is(
  .sbds-video__frame,
  .sleepbaby-article-video__frame,
  figure.wp-block-embed-youtube .wp-block-embed__wrapper
) {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 21px !important;
  padding: 0 !important;
  background: #171324;
  box-shadow: 0 13px 31px rgba(18, 12, 28, 0.34);
}

:is(.sbds-article, .entry-content) :is(
  .sbds-video__frame,
  .sleepbaby-article-video__frame,
  figure.wp-block-embed-youtube .wp-block-embed__wrapper
) > :is(iframe, video) {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 20px !important;
}
