/**
 * Lady Nicole Signature — Phase 14 global media, card and CTA polish.
 * Loaded last on every public route. The rules intentionally normalize the
 * mixed legacy/editor-first renderers without changing saved content.
 * Build: 3.0.0-r79.0-editor-first-phase-14-visual-system
 */
:root {
  --ln14-navy: #071d2d;
  --ln14-blue: #087bb2;
  --ln14-blue-hover: #05618d;
  --ln14-accent: #f5a019;
  --ln14-accent-hover: #ffb23d;
  --ln14-ink: #13191e;
  --ln14-muted: #61717c;
  --ln14-line: #dbe5ea;
  --ln14-soft: #f3f7f9;
  --ln14-card-radius: 14px;
  --ln14-shadow: 0 18px 48px rgba(5, 35, 53, .09);
  --ln14-shadow-hover: 0 26px 66px rgba(5, 35, 53, .15);
}

/* ---------- Media contract ---------- */
body.ln-phase-14-visual-system :where(
  .lnv3home-hero__media,
  .lnv3home-program-card__media,
  .lnv3home-intro__media,
  .lnv3home-testimonials__media,
  .lnv3home-free__visual,
  .lnv3home-final,
  .ln-programs-hero__media,
  .ln-program-spotlight__media,
  .ln-program-card__media,
  .ln-private-support-card__media,
  .ln-rp10-art,
  .ln-rp10-about__media,
  .ln-rp10-related__media,
  .ln-free-course-hero__visual,
  .ln-free-course-story__media,
  .ln-free-course-media__frame,
  .ln-events-hero__media,
  .ln-event-spotlight__media,
  .ln-event-card__media,
  .ln-event-hero__main,
  .ln-books-hero__media,
  .ln-book-feature__media,
  .ln-book-card__cover,
  .ln-book-gallery__main,
  .ln-book-related-card__media,
  .ln-about-hero__media,
  .ln-about-story__media,
  .ln-contact-hero__media
) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(145deg, #e7eef2, #f8fafb);
}

body.ln-phase-14-visual-system :where(
  .lnv3home-hero__image,
  .lnv3home-program-card__media > img,
  .lnv3home-intro__media > img,
  .lnv3home-testimonials__media > img,
  .lnv3home-free__visual > img,
  .lnv3home-final > img,
  .ln-programs-hero__media > img,
  .ln-programs-hero__image,
  .ln-program-spotlight__media img,
  .ln-program-card__media img,
  .ln-private-support-card__media img,
  .ln-rp10-art img,
  .ln-rp10-art__main,
  .ln-rp10-about__media img,
  .ln-rp10-related__media img,
  .ln-free-course-hero__visual img,
  .ln-free-course-story__media img,
  .ln-free-course-media__frame img,
  .ln-events-hero__media img,
  .ln-event-spotlight__media img,
  .ln-event-card__media img,
  .ln-event-hero__main img,
  .ln-books-hero__media img,
  .ln-book-feature__media img,
  .ln-book-card__cover img,
  .ln-book-gallery__main img,
  .ln-book-related-card__media img,
  .ln-about-hero__media img,
  .ln-about-story__media img,
  .ln-contact-hero__media img
) {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Purposeful focal points. */
body.ln-phase-14-visual-system :where(.lnv3home-hero__image, .lnv3home-intro__media img, .ln-about-hero__media img, .ln-about-story__media img) { object-position: center 24% !important; }
body.ln-phase-14-visual-system :where(.ln-contact-hero__media img, .ln-events-hero__media img, .ln-event-card__media img) { object-position: center 42% !important; }
body.ln-phase-14-visual-system :where(.ln-books-hero__media img, .ln-book-feature__media img, .ln-book-card__cover img) { object-position: center !important; }

/* Fixed, predictable ratios; no natural-image gaps. */
body.ln-phase-14-visual-system .lnv3home-program-card__media { aspect-ratio: 4 / 3 !important; }
body.ln-phase-14-visual-system :where(.ln-program-card__media, .ln-private-support-card__media) { aspect-ratio: 4 / 3 !important; min-height: 0 !important; }
body.ln-phase-14-visual-system :where(.ln-event-card__media, .ln-event-spotlight__media) { aspect-ratio: 16 / 10 !important; min-height: 0 !important; }
body.ln-phase-14-visual-system .ln-book-card__cover { aspect-ratio: 4 / 5 !important; min-height: 0 !important; }
body.ln-phase-14-visual-system :where(.ln-programs-hero__media, .ln-events-hero__media, .ln-books-hero__media, .ln-about-hero__media, .ln-contact-hero__media) { min-height: clamp(420px, 43vw, 660px); }
body.ln-phase-14-visual-system :where(.ln-rp10-art, .ln-free-course-hero__visual) { min-height: clamp(460px, 48vw, 720px); }

/* Placeholders inherit the same frame and remain intentional. */
body.ln-phase-14-visual-system :where([class$="--placeholder"], [class*="__image--placeholder"]) {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 24px;
  color: rgba(255,255,255,.88);
  background: linear-gradient(145deg, var(--ln14-blue), var(--ln14-navy));
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
}

/* ---------- Card system ---------- */
body.ln-phase-14-visual-system :where(
  .lnv3home-program-card,
  .ln-program-card,
  .ln-private-support-card,
  .ln-event-card,
  .ln-book-card,
  .ln-book-related-card,
  .ln-event-related-card,
  .ln-contact-help__card,
  .ln-about-manifesto__card,
  .ln-about-values__grid > *,
  .ln-rp10-highlight-grid > *,
  .ln-rp10-related__grid > *
) {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ln14-line) !important;
  border-radius: var(--ln14-card-radius) !important;
  background: #fff;
  box-shadow: var(--ln14-shadow) !important;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
body.ln-phase-14-visual-system :where(
  .lnv3home-program-card,
  .ln-program-card,
  .ln-private-support-card,
  .ln-event-card,
  .ln-book-card,
  .ln-book-related-card,
  .ln-event-related-card,
  .ln-contact-help__card
):hover {
  transform: translateY(-5px);
  border-color: rgba(8,123,178,.28) !important;
  box-shadow: var(--ln14-shadow-hover) !important;
}
body.ln-phase-14-visual-system :where(.lnv3home-program-card__body, .ln-program-card__body, .ln-event-card__body, .ln-book-card__body) {
  display: flex;
  min-height: 0 !important;
  flex: 1 1 auto;
  flex-direction: column;
}
body.ln-phase-14-visual-system :where(.ln-program-grid, .ln-event-grid, .ln-book-grid, .lnv3home-program-grid) { align-items: stretch; }
body.ln-phase-14-visual-system :where(.ln-program-card__footer, .ln-event-card__footer, .ln-book-card__footer, .lnv3home-card-link) { margin-top: auto; }

/* Media corners are owned by the parent card. */
body.ln-phase-14-visual-system :where(.lnv3home-program-card__media, .ln-program-card__media, .ln-event-card__media, .ln-book-card__cover) { border-radius: 0 !important; }

/* Stable overlays and labels. */
body.ln-phase-14-visual-system :where(.lnv3home-program-card__media, .ln-program-card__media, .ln-event-card__media)::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 58% 0 0;
  background: linear-gradient(180deg, transparent, rgba(3,24,37,.62));
  pointer-events: none;
}
body.ln-phase-14-visual-system :where(.lnv3home-program-card__badge, .ln-program-card__index, .ln-program-card__art-copy, .ln-program-card__number, .ln-event-card__date) { z-index: 3; }

/* ---------- Button and link contrast ---------- */
body.ln-phase-14-visual-system :where(
  .ln-button,
  .lnv3home-button,
  .bs21-button,
  .wp-element-button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  button[type="submit"],
  input[type="submit"]
) {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid var(--ln14-blue) !important;
  border-radius: 4px !important;
  color: #fff !important;
  background: var(--ln14-blue) !important;
  box-shadow: none;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none !important;
  opacity: 1 !important;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
body.ln-phase-14-visual-system :where(
  .ln-button,
  .lnv3home-button,
  .bs21-button,
  .wp-element-button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  button[type="submit"],
  input[type="submit"]
):is(:link, :visited) { color: #fff !important; }
body.ln-phase-14-visual-system :where(
  .ln-button,
  .lnv3home-button,
  .bs21-button,
  .wp-element-button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  button[type="submit"],
  input[type="submit"]
):hover {
  border-color: var(--ln14-blue-hover) !important;
  color: #fff !important;
  background: var(--ln14-blue-hover) !important;
  box-shadow: 0 12px 26px rgba(5,97,141,.2);
  transform: translateY(-2px);
}
body.ln-phase-14-visual-system :where(.ln-button, .lnv3home-button, .bs21-button) :where(span, svg) { color: inherit !important; stroke: currentColor !important; }
body.ln-phase-14-visual-system :where(.ln-button, .lnv3home-button, .bs21-button) svg { width: 18px !important; height: 18px !important; flex: 0 0 18px; fill: none !important; }

body.ln-phase-14-visual-system :where(.ln-button--accent, .lnv3home-button--accent) {
  border-color: var(--ln14-accent) !important;
  color: #17130d !important;
  background: var(--ln14-accent) !important;
}
body.ln-phase-14-visual-system :where(.ln-button--accent, .lnv3home-button--accent):is(:link, :visited) { color: #17130d !important; }
body.ln-phase-14-visual-system :where(.ln-button--accent, .lnv3home-button--accent):hover {
  border-color: var(--ln14-accent-hover) !important;
  color: #17130d !important;
  background: var(--ln14-accent-hover) !important;
}
body.ln-phase-14-visual-system :where(.ln-button--secondary, .bs21-button--outline) {
  border-color: #9eb4c0 !important;
  color: var(--ln14-navy) !important;
  background: #fff !important;
}
body.ln-phase-14-visual-system :where(.ln-button--secondary, .bs21-button--outline):is(:link, :visited) { color: var(--ln14-navy) !important; }
body.ln-phase-14-visual-system :where(.ln-button--secondary, .bs21-button--outline):hover {
  border-color: var(--ln14-navy) !important;
  color: #fff !important;
  background: var(--ln14-navy) !important;
}
body.ln-phase-14-visual-system .lnv3home-button--navy {
  border-color: var(--ln14-navy) !important;
  color: #fff !important;
  background: var(--ln14-navy) !important;
}
body.ln-phase-14-visual-system .lnv3home-button--glass {
  border-color: rgba(255,255,255,.75) !important;
  color: #fff !important;
  background: rgba(255,255,255,.09) !important;
  backdrop-filter: blur(8px);
}
body.ln-phase-14-visual-system .lnv3home-button--light {
  border-color: #fff !important;
  color: var(--ln14-navy) !important;
  background: #fff !important;
}
body.ln-phase-14-visual-system :where(.ln-button--disabled, .ln-button[aria-disabled="true"], button:disabled, input:disabled) {
  border-color: #c8d2d7 !important;
  color: #6f7b82 !important;
  background: #edf1f3 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none !important;
}

/* Filter controls are readable before interaction. */
body.ln-phase-14-visual-system :where(.ln-program-filters button, .ln-event-filters button, .ln-books-hero__routes a) {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #b9c8d0 !important;
  border-radius: 999px !important;
  color: var(--ln14-navy) !important;
  background: #fff !important;
  font-weight: 700;
  opacity: 1 !important;
}
body.ln-phase-14-visual-system :where(.ln-program-filters button, .ln-event-filters button, .ln-books-hero__routes a):hover,
body.ln-phase-14-visual-system :where(.ln-program-filters button, .ln-event-filters button, .ln-books-hero__routes a).is-active,
body.ln-phase-14-visual-system :where(.ln-program-filters button, .ln-event-filters button)[aria-pressed="true"] {
  border-color: var(--ln14-navy) !important;
  color: #fff !important;
  background: var(--ln14-navy) !important;
}

/* Text links remain visible in all states. */
body.ln-phase-14-visual-system :where(.lnv3home-card-link, .ln-home-card-link, .ln-text-link, .ln-book-text-link, .ln-program-card__link) {
  color: #006b9e !important;
  font-weight: 750;
  text-decoration: none;
}
body.ln-phase-14-visual-system :where(.lnv3home-card-link, .ln-home-card-link, .ln-text-link, .ln-book-text-link, .ln-program-card__link):is(:link, :visited) { color: #006b9e !important; }
body.ln-phase-14-visual-system :where(.lnv3home-card-link, .ln-home-card-link, .ln-text-link, .ln-book-text-link, .ln-program-card__link):hover { color: var(--ln14-navy) !important; }
body.ln-phase-14-visual-system :where(.lnv3home-card-link, .ln-home-card-link, .ln-text-link, .ln-book-text-link, .ln-program-card__link) svg { width: 18px !important; height: 18px !important; fill: none !important; stroke: currentColor !important; }

/* ---------- Responsive safeguards ---------- */
@media (max-width: 900px) {
  body.ln-phase-14-visual-system :where(.ln-programs-hero__media, .ln-events-hero__media, .ln-books-hero__media, .ln-about-hero__media, .ln-contact-hero__media, .ln-rp10-art, .ln-free-course-hero__visual) {
    min-height: 0;
    aspect-ratio: 16 / 11;
  }
}
@media (max-width: 620px) {
  body.ln-phase-14-visual-system :where(.ln-program-card__media, .ln-private-support-card__media, .ln-event-card__media, .lnv3home-program-card__media) { aspect-ratio: 4 / 3 !important; }
  body.ln-phase-14-visual-system :where(.ln-button, .lnv3home-button, .bs21-button, button[type="submit"], input[type="submit"]) { width: 100%; }
  body.ln-phase-14-visual-system :where(.ln-programs-hero__media, .ln-events-hero__media, .ln-books-hero__media, .ln-about-hero__media, .ln-contact-hero__media, .ln-rp10-art, .ln-free-course-hero__visual) { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  body.ln-phase-14-visual-system :where(a, button, article, img) { transition: none !important; }
  body.ln-phase-14-visual-system :where(a, button, article):hover { transform: none !important; }
}
