/* CKB-WEB-EXTERNAL-TEST-R1
   First external tester feedback closure.
   Scope: phone Gallery loop, dark social contrast, Newsletter CTA,
   archive discoverability, social QR presentation. */

.footer-newsletter-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 16px !important;
  padding: 9px 14px 8px !important;
  border: 1px solid #15181a !important;
  background: #15181a;
  color: #fff !important;
  font-size: 12.5px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: .045em !important;
  text-decoration: none;
}
.footer-newsletter-cta:hover,
.footer-newsletter-cta:focus-visible {
  background: transparent;
  color: #15181a !important;
  outline: none;
}

.section-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.section-heading-actions .archive-review-link {
  font-weight: 700;
}

.social-qr {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  max-width: 520px;
}
.social-qr img {
  display: block;
  width: 132px;
  height: 132px;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(11,11,11,.16);
}
.social-qr-copy p {
  margin: 0 0 10px;
}
.social-qr-copy .text-link {
  display: inline-block;
}

@media (prefers-color-scheme: dark) {
  body[data-color-scheme="r1"] .footer-social-icon {
    color: var(--theme-text) !important;
    border-color: var(--theme-line-strong) !important;
    background: transparent !important;
  }
  body[data-color-scheme="r1"] .footer-social-icon:hover,
  body[data-color-scheme="r1"] .footer-social-icon:focus-visible {
    color: var(--theme-bg-page) !important;
    background: var(--theme-text) !important;
    border-color: var(--theme-text) !important;
  }
  body[data-color-scheme="r1"] .footer-newsletter-cta {
    background: var(--theme-button-bg) !important;
    color: var(--theme-button-text) !important;
    border-color: var(--theme-button-bg) !important;
  }
  body[data-color-scheme="r1"] .footer-newsletter-cta:hover,
  body[data-color-scheme="r1"] .footer-newsletter-cta:focus-visible {
    background: transparent !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-text) !important;
  }
}

@media (max-width: 640px) {
  /* Phone Gallery uses the already-rendered clone cycle so the final poster
     can continue naturally to poster 1. JS silently re-bases clones to their
     matching originals after the snap completes. */
  .poster-link[data-clone="true"] {
    display: flex !important;
  }

  .section-heading-actions {
    gap: 10px 14px;
  }
  .section-heading-actions .text-link {
    font-size: 10.5px !important;
  }

  .social-qr {
    grid-template-columns: 112px minmax(0,1fr);
    gap: 14px;
  }
  .social-qr img {
    width: 112px;
    height: 112px;
  }

  .footer-newsletter-cta {
    min-height: 42px !important;
    padding: 10px 14px 9px !important;
    font-size: 12px !important;
  }
}
