/**
 * PK Snippets — blog sidebar (TOC + compact CTA) and bottom CTA banner.
 * Scoped to cornerstone structured posts only.
 */

body.pk-cornerstone-template {
  --pk-snippet-green: #17A24C;
  --pk-snippet-green-accent: #33D871;
  --pk-snippet-green-hover: #2A6C4C;
  --pk-snippet-green-lighter: #EAF7EE;
  --pk-snippet-black: #202A37;
  --pk-snippet-text-soft: #525252;
  --pk-snippet-text-faint: #737373;
  --pk-snippet-surface-warm: #FAFAF8;
  --pk-snippet-border: #E5E5E5;
  --pk-snippet-r-sm: 8px;
  --pk-snippet-r: 12px;
  --pk-snippet-r-lg: 20px;
}

body.pk-blog-listing-template {
  --pk-snippet-green: #17A24C;
  --pk-snippet-green-accent: #33D871;
  --pk-snippet-green-hover: #2A6C4C;
  --pk-snippet-green-lighter: #EAF7EE;
  --pk-snippet-black: #202A37;
  --pk-snippet-text-soft: #525252;
  --pk-snippet-text-faint: #737373;
  --pk-snippet-surface-warm: #FAFAF8;
  --pk-snippet-border: #E5E5E5;
  --pk-snippet-r-sm: 8px;
  --pk-snippet-r: 12px;
  --pk-snippet-r-lg: 20px;
}

/* --- Sidebar Option C (TOC + compact CTA) --- */
body.pk-cornerstone-template .pk-sidebar--toc-compact {
  position: sticky;
  top: 96px;
  align-self: start;
  width: 100%;
  max-width: 280px;
}

body.pk-cornerstone-template .pk-sidebar--toc-compact .pk-sidebar-toc {
  background: #fff;
  border: 1px solid var(--pk-snippet-border);
  border-radius: var(--pk-snippet-r);
  overflow: hidden;
}

body.pk-cornerstone-template .pk-sidebar-toc-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--pk-snippet-border);
  background: var(--pk-snippet-surface-warm);
}

body.pk-cornerstone-template .pk-sidebar-toc-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pk-snippet-text-faint);
  display: block;
}

body.pk-cornerstone-template .pk-sidebar-toc-list {
  list-style: none;
  margin: 0;
  padding: 14px 0;
}

body.pk-cornerstone-template .pk-sidebar-toc-list li {
  margin: 0;
  padding: 0;
}

body.pk-cornerstone-template .pk-sidebar-toc-list a {
  display: block;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pk-snippet-text-soft);
  border-left: 3px solid transparent;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

body.pk-cornerstone-template .pk-sidebar-toc-list a:hover {
  color: var(--pk-snippet-black);
  background: var(--pk-snippet-green-lighter);
}

body.pk-cornerstone-template .pk-sidebar-toc-list a.is-active,
body.pk-cornerstone-template .pk-sidebar-toc-list a.active {
  color: var(--pk-snippet-black);
  font-weight: 700;
  border-left-color: var(--pk-snippet-green);
  background: var(--pk-snippet-green-lighter);
}

body.pk-cornerstone-template .pk-sidebar-toc-cta {
  padding: 16px 20px 18px;
  border-top: 1px solid var(--pk-snippet-border);
  background: var(--pk-snippet-surface-warm);
}

body.pk-cornerstone-template .pk-sidebar-toc-cta-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 14px;
  background: var(--pk-snippet-green);
  color: #fff;
  border-radius: var(--pk-snippet-r-sm);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s;
  box-sizing: border-box;
}

body.pk-cornerstone-template .pk-sidebar-toc-cta-btn:hover {
  background: var(--pk-snippet-green-hover);
  color: #fff;
  text-decoration: none;
}

body.pk-cornerstone-template .pk-sidebar-toc-cta-fine {
  margin-top: 8px;
  font-size: 11px;
  color: var(--pk-snippet-text-faint);
  font-weight: 500;
  text-align: center;
}

/* --- Bottom CTA banner --- */
body.pk-cornerstone-template .pk-cta-wrap {
  container-type: inline-size;
  container-name: cta;
  margin-top: 32px;
}

body.pk-cornerstone-template .pk-cta-banner {
  position: relative;
  background: var(--pk-snippet-black);
  color: #fff;
  border-radius: var(--pk-snippet-r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  min-height: 320px;
}

body.pk-cornerstone-template .pk-cta-banner::before {
  content: '';
  position: absolute;
  top: -80px;
  right: 35%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(23, 162, 76, 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

body.pk-cornerstone-template .pk-cta-content {
  position: relative;
  z-index: 2;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

body.pk-cornerstone-template .pk-cta-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

body.pk-cornerstone-template .pk-cta-brand-mark {
  width: 26px;
  height: 26px;
  background: var(--pk-snippet-green);
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

body.pk-cornerstone-template .pk-cta-brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
}

body.pk-cornerstone-template .pk-cta-brand-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

body.pk-cornerstone-template .pk-cta-brand-logo--svg,
body.pk-cornerstone-template .pk-cta-brand-logo--svg svg {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

body.pk-cornerstone-template .pk-cta-headline {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
  margin: 0;
}

body.pk-cornerstone-template .pk-cta-headline em {
  font-style: normal;
  color: var(--pk-snippet-green-accent);
}

body.pk-cornerstone-template .pk-cta-body {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  max-width: 380px;
  margin: 0;
}

body.pk-cornerstone-template .pk-cta-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

body.pk-cornerstone-template .pk-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pk-snippet-green);
  color: #fff;
  border-radius: var(--pk-snippet-r-sm);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s;
}

body.pk-cornerstone-template .pk-cta-btn:hover {
  background: var(--pk-snippet-green-hover);
  color: #fff;
  text-decoration: none;
}

body.pk-cornerstone-template .pk-cta-btn .arrow {
  transition: transform 0.18s;
}

body.pk-cornerstone-template .pk-cta-btn:hover .arrow {
  transform: translateX(3px);
}

body.pk-cornerstone-template .pk-cta-qr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--pk-snippet-r-sm);
}

body.pk-cornerstone-template .pk-cta-qr-img {
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

body.pk-cornerstone-template .pk-cta-qr-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.pk-cornerstone-template .pk-cta-qr-label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

body.pk-cornerstone-template .pk-cta-qr-label span {
  color: #fff;
}

body.pk-cornerstone-template .pk-cta-qr-label span:last-child {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  font-size: 10px;
}

body.pk-cornerstone-template .pk-cta-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  flex-wrap: wrap;
}

body.pk-cornerstone-template .pk-cta-stars {
  color: #FACC15;
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1;
}

body.pk-cornerstone-template .pk-cta-proof-text {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

body.pk-cornerstone-template .pk-cta-proof-text strong {
  color: #fff;
  font-weight: 700;
}

body.pk-cornerstone-template .pk-cta-avatars {
  display: flex;
}

body.pk-cornerstone-template .pk-cta-avatars img,
body.pk-cornerstone-template .pk-cta-avatars span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--pk-snippet-black);
  display: inline-block;
  margin-left: -7px;
  object-fit: cover;
}

body.pk-cornerstone-template .pk-cta-avatars img:first-child,
body.pk-cornerstone-template .pk-cta-avatars span:first-child {
  margin-left: 0;
}

body.pk-cornerstone-template .pk-cta-avatars span:nth-child(1) {
  background: linear-gradient(135deg, #E89030 0%, #D83351 100%);
}

body.pk-cornerstone-template .pk-cta-avatars span:nth-child(2) {
  background: linear-gradient(135deg, #17A24C 0%, #33D871 100%);
}

body.pk-cornerstone-template .pk-cta-avatars span:nth-child(3) {
  background: linear-gradient(135deg, #525252 0%, #202A37 100%);
}

body.pk-cornerstone-template .pk-cta-avatars span:nth-child(4) {
  background: linear-gradient(135deg, #FACC15 0%, #E89030 100%);
}

body.pk-cornerstone-template .pk-cta-image {
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

body.pk-cornerstone-template .pk-cta-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.pk-cornerstone-template .pk-cta-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(32, 42, 55, 0.45) 0%, transparent 30%);
  pointer-events: none;
}

@container cta (max-width: 540px) {
  body.pk-cornerstone-template .pk-cta-banner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body.pk-cornerstone-template .pk-cta-banner::before {
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
  }

  body.pk-cornerstone-template .pk-cta-image {
    order: -1;
    height: 140px;
    min-height: 140px;
  }

  body.pk-cornerstone-template .pk-cta-image::after {
    background: linear-gradient(180deg, transparent 40%, rgba(32, 42, 55, 0.55) 100%);
  }

  body.pk-cornerstone-template .pk-cta-content {
    padding: 22px 22px 24px;
    gap: 12px;
  }

  body.pk-cornerstone-template .pk-cta-headline {
    font-size: 22px;
  }

  body.pk-cornerstone-template .pk-cta-action-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  body.pk-cornerstone-template .pk-cta-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }

  body.pk-cornerstone-template .pk-cta-qr {
    display: none;
  }

  body.pk-cornerstone-template .pk-cta-proof {
    gap: 8px 10px;
  }
}

/* Listing cluster pages reuse the same bottom CTA component outside cornerstone bodies. */
body.pk-blog-listing-template .pk-cta-wrap {
  container-type: inline-size;
  container-name: cta;
  margin-top: 0;
}

body.pk-blog-listing-template .pk-cta-banner,
body.pk-blog-listing-template .pk-cta-banner * {
  box-sizing: border-box;
}

body.pk-blog-listing-template .pk-cta-banner {
  position: relative;
  background: var(--pk-snippet-black);
  color: #fff;
  border-radius: var(--pk-snippet-r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  min-height: 320px;
}

body.pk-blog-listing-template .pk-cta-banner::before {
  content: '';
  position: absolute;
  top: -80px;
  right: 35%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(23, 162, 76, 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

body.pk-blog-listing-template .pk-cta-content {
  position: relative;
  z-index: 2;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

body.pk-blog-listing-template .pk-cta-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

body.pk-blog-listing-template .pk-cta-brand-mark {
  width: 26px;
  height: 26px;
  background: var(--pk-snippet-green);
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

body.pk-blog-listing-template .pk-cta-brand-name,
body.pk-blog-listing-template .pk-cta-headline {
  color: #fff;
}

body.pk-blog-listing-template .pk-cta-brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

body.pk-blog-listing-template .pk-cta-brand-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

body.pk-blog-listing-template .pk-cta-brand-logo--svg,
body.pk-blog-listing-template .pk-cta-brand-logo--svg svg {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

body.pk-blog-listing-template .pk-cta-headline {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
}

/* Headline color, em sizing, and button/arrow color are handled by the shared,
   component-scoped CTA-banner shim at the end of this file (covers all surfaces). */
body.pk-blog-listing-template .pk-cta-headline em {
  font-style: normal;
  color: var(--pk-snippet-green-accent);
}

body.pk-blog-listing-template .pk-cta-body {
  margin: 0;
  max-width: 380px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

body.pk-blog-listing-template .pk-cta-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

body.pk-blog-listing-template .pk-cta-btn,
body.pk-blog-listing-template .pk-cta-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pk-snippet-green);
  color: #fff;
  border-radius: var(--pk-snippet-r-sm);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s;
}

body.pk-blog-listing-template .pk-cta-btn:hover {
  background: var(--pk-snippet-green-hover);
  color: #fff;
  text-decoration: none;
}

body.pk-blog-listing-template .pk-cta-qr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--pk-snippet-r-sm);
}

body.pk-blog-listing-template .pk-cta-qr-img {
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

body.pk-blog-listing-template .pk-cta-qr-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.pk-blog-listing-template .pk-cta-qr-label {
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  white-space: nowrap;
}

body.pk-blog-listing-template .pk-cta-qr-label span {
  color: #fff;
}

body.pk-blog-listing-template .pk-cta-qr-label span:last-child {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  font-size: 10px;
}

body.pk-blog-listing-template .pk-cta-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  flex-wrap: wrap;
}

body.pk-blog-listing-template .pk-cta-stars {
  color: #FACC15;
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1;
}

body.pk-blog-listing-template .pk-cta-proof-text,
body.pk-blog-listing-template .pk-cta-proof-text strong {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
}

body.pk-blog-listing-template .pk-cta-proof-text strong {
  color: #fff;
  font-weight: 700;
}

body.pk-blog-listing-template .pk-cta-avatars {
  display: flex;
}

body.pk-blog-listing-template .pk-cta-avatars img,
body.pk-blog-listing-template .pk-cta-avatars span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--pk-snippet-black);
  display: inline-block;
  margin-left: -7px;
  object-fit: cover;
}

body.pk-blog-listing-template .pk-cta-avatars img:first-child,
body.pk-blog-listing-template .pk-cta-avatars span:first-child {
  margin-left: 0;
}

body.pk-blog-listing-template .pk-cta-image {
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

body.pk-blog-listing-template .pk-cta-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.pk-blog-listing-template .pk-cta-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(32, 42, 55, 0.45) 0%, transparent 30%);
  pointer-events: none;
}

@container cta (max-width: 540px) {
  body.pk-blog-listing-template .pk-cta-banner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body.pk-blog-listing-template .pk-cta-image {
    order: -1;
    height: 140px;
    min-height: 140px;
  }

  body.pk-blog-listing-template .pk-cta-content {
    padding: 22px 22px 24px;
    gap: 12px;
  }

  body.pk-blog-listing-template .pk-cta-headline {
    font-size: 22px;
  }

  body.pk-blog-listing-template .pk-cta-action-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  body.pk-blog-listing-template .pk-cta-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }

  body.pk-blog-listing-template .pk-cta-qr {
    display: none;
  }
}

@media (max-width: 1000px) {
  body.pk-cornerstone-template .pk-sidebar--toc-compact,
  body.pk-cornerstone-template .pk-sidebar--legacy-promo {
    display: none;
  }
}

/* Cornerstone article-body: dark CTA banner + TOC (main.css still zeros nav padding globally). */
body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner,
body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner * {
  box-sizing: border-box;
}

body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner h3.pk-cta-headline {
  color: #fff !important;
  margin-top: 0;
  margin-bottom: 0;
}

body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner p.pk-cta-body {
  color: rgba(255, 255, 255, 0.78) !important;
  margin: 0;
}

body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner a.pk-cta-btn,
body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner a.pk-cta-btn:visited,
body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner a.pk-cta-btn:hover {
  color: #fff !important;
  text-decoration: none !important;
}

body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner .pk-cta-proof-text,
body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner .pk-cta-proof-text strong {
  color: rgba(255, 255, 255, 0.85) !important;
}

body.pk-cornerstone-template .pk-cornerstone-article-body .pk-cta-banner .pk-cta-qr-label span {
  color: #fff !important;
}

/* main.css zeros nav padding; keep TOC list visible and links styled */
body.pk-cornerstone-template nav.pk-sidebar-toc .pk-sidebar-toc-list {
  display: block !important;
  padding: 14px 0 !important;
  margin: 0 !important;
}

body.pk-cornerstone-template nav.pk-sidebar-toc .pk-sidebar-toc-list li {
  padding: 0 !important;
  margin: 0 !important;
}

body.pk-cornerstone-template nav.pk-sidebar-toc .pk-sidebar-toc-list li::before {
  display: none !important;
}

body.pk-cornerstone-template nav.pk-sidebar-toc .pk-sidebar-toc-list a,
body.pk-cornerstone-template nav.pk-sidebar-toc .pk-sidebar-toc-list a:visited {
  color: var(--pk-snippet-text-soft) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

body.pk-cornerstone-template nav.pk-sidebar-toc .pk-sidebar-toc-list a:hover {
  color: var(--pk-snippet-black) !important;
}

body.pk-cornerstone-template nav.pk-sidebar-toc .pk-sidebar-toc-list a.is-active,
body.pk-cornerstone-template nav.pk-sidebar-toc .pk-sidebar-toc-list a.active {
  color: var(--pk-snippet-black) !important;
  font-weight: 700 !important;
}
/* === END cornerstone article-body === */


/* Shared CTA-banner cascade reset (dark surface; survives host surface heading/link colors). */
.pk-cta-banner h3.pk-cta-headline { color: #fff !important; }
.pk-cta-banner .pk-cta-headline em { font-size: inherit !important; line-height: inherit !important; }
.pk-cta-banner p.pk-cta-body { color: rgba(255, 255, 255, 0.78) !important; }
.pk-cta-banner .pk-cta-qr-label,
.pk-cta-banner .pk-cta-qr-label span,
.pk-cta-banner .pk-cta-qr-label span:first-child { color: #fff !important; }
.pk-cta-banner .pk-cta-qr-label span:last-child { color: rgba(255, 255, 255, 0.55) !important; }
.pk-cta-banner .pk-cta-proof-text,
.pk-cta-banner .pk-cta-proof-text strong { color: rgba(255, 255, 255, 0.85) !important; }
.pk-cta-banner a.pk-cta-btn,
.pk-cta-banner a.pk-cta-btn:visited,
.pk-cta-banner a.pk-cta-btn:hover { color: #fff !important; text-decoration: none !important; }
.pk-cta-banner a.pk-cta-btn .arrow { color: #fff !important; }
/* === END TEMP === */
