/* =========================================================
   Claude Code Power Pack ▸ Pack Contents
   Theme stylesheet for the post body of slug:
     claude-code-power-pack-contents
   Path on live:
     wp-content/themes/promptbuildship/assets/css/ccpp-contents.css

   Rule 13 (scoping):
     - Every selector is prefixed with .pbs-ccpp-contents
     - NO :root, NO bare element selectors, NO global resets.
     - This file is enqueued site-wide via wp_head(); a leak
       past the .pbs-ccpp-contents ancestor would break the site.
   ========================================================= */

.pbs-ccpp-contents {
  /* tokens (scoped to the block, never :root) */
  --pbs-orange:     #FF8235;
  --pbs-blue:       #2D9CFF;
  --pbs-purple:     #9D5DFF;
  --pbs-green:      #00D084;
  --pbs-yellow:     #FFD200;
  --pbs-cream:      #FDFBF7;
  --pbs-cream-dark: #F5F0E8;
  --pbs-black:      #1A1A1A;

  --pbs-font-display: 'Bangers', cursive;
  --pbs-font-body:    'Quicksand', sans-serif;
  --pbs-font-mono:    'JetBrains Mono', monospace;

  --pbs-shadow-card: 6px 6px 0 var(--pbs-black);
  --pbs-shadow-btn:  4px 4px 0 var(--pbs-black);
  --pbs-border:      2px solid var(--pbs-black);
  --pbs-radius-btn:  9999px;
  --pbs-radius-card: 16px;

  --pbs-space-1: 8px;
  --pbs-space-2: 16px;
  --pbs-space-3: 24px;
  --pbs-space-4: 32px;
  --pbs-space-5: 48px;

  --pbs-accent: var(--pbs-orange);

  /* base block (Quicksand body type, cream background dot grid) */
  font-family: var(--pbs-font-body);
  font-weight: 500;
  color: var(--pbs-black);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--pbs-cream);
  background-image: radial-gradient(circle at 1px 1px, rgba(26,26,26,0.04) 1px, transparent 0);
  background-size: 22px 22px;
  border-radius: var(--pbs-radius-card);
  padding: clamp(var(--pbs-space-3), 4vw, var(--pbs-space-5));
}

/* Targeted resets — strictly inside the scope */
.pbs-ccpp-contents,
.pbs-ccpp-contents *,
.pbs-ccpp-contents *::before,
.pbs-ccpp-contents *::after { box-sizing: border-box; }
.pbs-ccpp-contents img,
.pbs-ccpp-contents svg { display: block; max-width: 100%; }
.pbs-ccpp-contents a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.pbs-ccpp-contents h1,
.pbs-ccpp-contents h2,
.pbs-ccpp-contents h3,
.pbs-ccpp-contents h4 {
  font-family: var(--pbs-font-display);
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.05;
  margin: 0;
}
.pbs-ccpp-contents p { max-width: 82ch; margin: 0; }
.pbs-ccpp-contents p + p { margin-top: var(--pbs-space-2); }

.pbs-ccpp-contents :focus-visible {
  outline: 3px solid var(--pbs-purple);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .pbs-ccpp-contents *,
  .pbs-ccpp-contents *::before,
  .pbs-ccpp-contents *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Hero (no H1; the post title from WP is the page H1) ---- */
.pbs-ccpp-contents .ccpp-hero {
  background: var(--pbs-orange);
  color: var(--pbs-black);
  border: 3px solid var(--pbs-black);
  border-radius: var(--pbs-radius-card);
  box-shadow: var(--pbs-shadow-card);
  padding: clamp(var(--pbs-space-4), 5vw, var(--pbs-space-5));
  margin-bottom: var(--pbs-space-5);
  position: relative;
  overflow: hidden;
}
.pbs-ccpp-contents .ccpp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(26,26,26,0.05) 0 2px, transparent 2px 16px);
  pointer-events: none;
}
.pbs-ccpp-contents .ccpp-hero > * { position: relative; }
.pbs-ccpp-contents .ccpp-hero__kicker {
  display: inline-block;
  font-family: var(--pbs-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--pbs-cream);
  border: var(--pbs-border);
  border-radius: var(--pbs-radius-btn);
  padding: 6px 16px;
  margin-bottom: var(--pbs-space-3);
  text-decoration: none;
  color: var(--pbs-black);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
a.pbs-ccpp-contents .ccpp-hero__kicker,
.pbs-ccpp-contents a.ccpp-hero__kicker { cursor: pointer; }
.pbs-ccpp-contents a.ccpp-hero__kicker:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--pbs-black);
}
.pbs-ccpp-contents .ccpp-hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
  max-width: 72ch;
  margin-bottom: var(--pbs-space-4);
}
.pbs-ccpp-contents .ccpp-badges { display: flex; flex-wrap: wrap; gap: var(--pbs-space-2); }
.pbs-ccpp-contents .ccpp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--pbs-font-display);
  font-size: 1.15rem;
  letter-spacing: 1px;
  background: var(--pbs-cream);
  color: var(--pbs-black);
  border: var(--pbs-border);
  box-shadow: var(--pbs-shadow-btn);
  border-radius: var(--pbs-radius-btn);
  padding: 8px 22px;
}
.pbs-ccpp-contents .ccpp-badge--green  { background: var(--pbs-green); }
.pbs-ccpp-contents .ccpp-badge--yellow { background: var(--pbs-yellow); }
.pbs-ccpp-contents .ccpp-badge .star   { color: var(--pbs-orange); font-size: 1.2rem; }

/* ---- Inline TOC (replaces sticky sidenav) ---- */
.pbs-ccpp-contents .ccpp-toc {
  background: var(--pbs-cream);
  border: var(--pbs-border);
  border-top: 6px solid var(--pbs-blue);
  border-radius: var(--pbs-radius-card);
  box-shadow: var(--pbs-shadow-card);
  padding: clamp(var(--pbs-space-3), 4vw, var(--pbs-space-4));
  margin-bottom: var(--pbs-space-5);
}
.pbs-ccpp-contents .ccpp-toc__label {
  font-family: var(--pbs-font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: var(--pbs-space-1);
}
.pbs-ccpp-contents .ccpp-toc__title {
  font-family: var(--pbs-font-display);
  font-size: 1.6rem;
  letter-spacing: 0.5px;
  margin-bottom: var(--pbs-space-2);
}
.pbs-ccpp-contents .ccpp-toc ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px var(--pbs-space-3);
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: pbstoc;
}
.pbs-ccpp-contents .ccpp-toc li {
  counter-increment: pbstoc;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.pbs-ccpp-contents .ccpp-toc li::before {
  content: counter(pbstoc, decimal-leading-zero);
  font-family: var(--pbs-font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--pbs-orange);
  flex: 0 0 auto;
}
.pbs-ccpp-contents .ccpp-toc a {
  display: inline-block;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.pbs-ccpp-contents .ccpp-toc a:hover {
  background: var(--pbs-cream-dark);
  border-color: var(--pbs-black);
  transform: translateX(2px);
}

/* ---- Section cards ---- */
.pbs-ccpp-contents .ccpp-card {
  background: var(--pbs-cream);
  border: var(--pbs-border);
  border-top: 6px solid var(--pbs-accent);
  border-radius: var(--pbs-radius-card);
  box-shadow: var(--pbs-shadow-card);
  padding: clamp(var(--pbs-space-3), 4vw, var(--pbs-space-5));
  margin-bottom: var(--pbs-space-5);
  scroll-margin-top: var(--pbs-space-3);
}
.pbs-ccpp-contents .ccpp-section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  border-left: 8px solid var(--pbs-orange);
  padding-left: var(--pbs-space-2);
  margin-bottom: var(--pbs-space-3);
}
.pbs-ccpp-contents .ccpp-sub-title {
  font-family: var(--pbs-font-body);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0;
  margin: var(--pbs-space-4) 0 var(--pbs-space-1);
  padding-bottom: 6px;
  border-bottom: 2px dashed color-mix(in srgb, var(--pbs-black) 30%, transparent);
  scroll-margin-top: var(--pbs-space-3);
}
.pbs-ccpp-contents .ccpp-prose > .ccpp-sub-title:first-of-type { margin-top: 0; }
.pbs-ccpp-contents .ccpp-sub-title code {
  background: var(--pbs-orange);
  color: var(--pbs-black);
}

.pbs-ccpp-contents .ccpp-card > p,
.pbs-ccpp-contents .ccpp-prose > p { margin-bottom: var(--pbs-space-2); }

/* ---- Inline + block code ---- */
.pbs-ccpp-contents code {
  font-family: var(--pbs-font-mono);
  font-size: 0.88em;
  background: var(--pbs-orange);
  color: var(--pbs-black);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  word-break: break-word;
}
.pbs-ccpp-contents pre {
  background: var(--pbs-black);
  color: #F5F0E8;
  border: var(--pbs-border);
  border-radius: 12px;
  box-shadow: var(--pbs-shadow-btn);
  padding: var(--pbs-space-3);
  overflow-x: auto;
  margin: var(--pbs-space-2) 0 var(--pbs-space-3);
  font-family: var(--pbs-font-mono);
  font-size: 0.86rem;
  line-height: 1.7;
}
.pbs-ccpp-contents pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-weight: 400;
  font-size: 1em;
  word-break: normal;
}
.pbs-ccpp-contents .tok-comment { color: #8C8C8C; font-style: italic; }
.pbs-ccpp-contents .tok-cmd     { color: var(--pbs-green); font-weight: 600; }
.pbs-ccpp-contents .tok-flag    { color: var(--pbs-yellow); }
.pbs-ccpp-contents .tok-path    { color: var(--pbs-blue); }

/* ---- Tables ---- */
.pbs-ccpp-contents .ccpp-table-wrap {
  overflow-x: auto;
  border: var(--pbs-border);
  border-radius: 12px;
  box-shadow: var(--pbs-shadow-btn);
  margin: var(--pbs-space-2) 0 var(--pbs-space-3);
}
.pbs-ccpp-contents table { width: 100%; min-width: 560px; font-size: 0.95rem; border-collapse: collapse; }
.pbs-ccpp-contents thead th {
  background: var(--pbs-orange);
  color: var(--pbs-black);
  font-family: var(--pbs-font-display);
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 12px var(--pbs-space-2);
  border-bottom: var(--pbs-border);
}
.pbs-ccpp-contents tbody td {
  padding: 12px var(--pbs-space-2);
  vertical-align: top;
  border-bottom: 2px solid color-mix(in srgb, var(--pbs-black) 12%, transparent);
}
.pbs-ccpp-contents tbody tr:nth-child(even) { background: var(--pbs-cream-dark); }
.pbs-ccpp-contents tbody tr:last-child td   { border-bottom: none; }
.pbs-ccpp-contents tbody td:first-child       { font-weight: 700; white-space: nowrap; }
.pbs-ccpp-contents tbody td:first-child code  { white-space: nowrap; }

/* ---- Lists ---- */
.pbs-ccpp-contents .ccpp-prose ul,
.pbs-ccpp-contents .ccpp-prose ol {
  margin: var(--pbs-space-1) 0 var(--pbs-space-3);
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
}
.pbs-ccpp-contents .ccpp-prose ul li {
  position: relative;
  padding-left: 30px;
  max-width: 84ch;
}
.pbs-ccpp-contents .ccpp-prose ul li::before {
  content: "\2605";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--pbs-orange);
  font-size: 1.05rem;
}
.pbs-ccpp-contents .ccpp-prose ol { counter-reset: pbsitem; }
.pbs-ccpp-contents .ccpp-prose ol li {
  position: relative;
  padding-left: 42px;
  max-width: 84ch;
  counter-increment: pbsitem;
}
.pbs-ccpp-contents .ccpp-prose ol li::before {
  content: counter(pbsitem);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--pbs-yellow);
  border: var(--pbs-border);
  border-radius: var(--pbs-radius-btn);
  font-family: var(--pbs-font-display);
  font-size: 0.95rem;
}
.pbs-ccpp-contents .ccpp-prose li strong { font-weight: 700; }

/* ---- Example callout (per-agent / per-skill invocation line) ---- */
.pbs-ccpp-contents .ccpp-example {
  background: var(--pbs-cream-dark);
  border: var(--pbs-border);
  border-radius: 12px;
  padding: 14px var(--pbs-space-2);
  margin-top: var(--pbs-space-1);
  font-family: var(--pbs-font-mono);
  font-size: 0.85rem;
  max-width: none;
}
.pbs-ccpp-contents .ccpp-example b {
  font-family: var(--pbs-font-display);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 1px;
  color: var(--pbs-orange);
  margin-right: 8px;
  text-transform: uppercase;
}

.pbs-ccpp-contents hr {
  border: none;
  border-top: 3px dashed color-mix(in srgb, var(--pbs-black) 35%, transparent);
  margin: var(--pbs-space-4) 0;
}

.pbs-ccpp-contents .ccpp-lead {
  font-size: 1.1rem;
  font-weight: 600;
  max-width: 82ch;
}

/* ---- Sign-off block (closes the post) ---- */
.pbs-ccpp-contents .ccpp-signoff {
  text-align: center;
  border-top: 3px dashed color-mix(in srgb, var(--pbs-black) 35%, transparent);
  padding-top: var(--pbs-space-4);
  margin-top: var(--pbs-space-2);
}
.pbs-ccpp-contents .ccpp-signoff__brand {
  font-family: var(--pbs-font-display);
  font-size: 1.8rem;
  letter-spacing: 1px;
  margin-bottom: var(--pbs-space-1);
}
.pbs-ccpp-contents .ccpp-signoff__brand .dot-o { color: var(--pbs-orange); }
.pbs-ccpp-contents .ccpp-signoff__brand .dot-b { color: var(--pbs-blue); }
.pbs-ccpp-contents .ccpp-signoff__brand .dot-s { color: var(--pbs-purple); }
.pbs-ccpp-contents .ccpp-signoff p { margin-inline: auto; opacity: 0.7; font-size: 0.9rem; }

/* ---- Buy-now interstitial (rounded block placed between sections) ----
   Matches the landing page buy-now pattern: $39 + price terms above,
   image button in the middle, mono terms list below. */
.pbs-ccpp-contents .ccpp-cta {
  background: var(--pbs-cream);
  border: 3px solid var(--pbs-black);
  border-top: 6px solid var(--pbs-orange);
  border-radius: var(--pbs-radius-card);
  box-shadow: var(--pbs-shadow-card);
  padding: clamp(var(--pbs-space-3), 4vw, var(--pbs-space-4));
  margin-bottom: var(--pbs-space-5);
  display: grid;
  gap: var(--pbs-space-3);
  position: relative;
  overflow: hidden;
}
.pbs-ccpp-contents .ccpp-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,130,53,0.06) 0 2px, transparent 2px 16px);
  pointer-events: none;
}
.pbs-ccpp-contents .ccpp-cta > * { position: relative; }

.pbs-ccpp-contents .ccpp-cta__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}
.pbs-ccpp-contents .ccpp-cta__price {
  font-family: var(--pbs-font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: 1px;
  line-height: 1;
  color: var(--pbs-black);
}
.pbs-ccpp-contents .ccpp-cta__price-terms {
  font-family: var(--pbs-font-mono);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  font-weight: 600;
  opacity: 0.85;
}

.pbs-ccpp-contents .ccpp-cta__btn {
  display: block;
  align-self: center;
  justify-self: center;
  text-decoration: none;
  line-height: 0;
  max-width: 520px;
  width: 100%;
  filter: drop-shadow(4px 4px 0 var(--pbs-black));
  transition: transform 150ms ease, filter 150ms ease;
}
.pbs-ccpp-contents .ccpp-cta__btn:hover {
  transform: translate(-1px, -1px) rotate(-1deg);
  filter: drop-shadow(6px 6px 0 var(--pbs-black));
}
.pbs-ccpp-contents .ccpp-cta__btn:active {
  transform: translate(3px, 3px);
  filter: drop-shadow(1px 1px 0 var(--pbs-black));
}
.pbs-ccpp-contents .ccpp-cta__btn img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.pbs-ccpp-contents .ccpp-cta__terms-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
  font-family: var(--pbs-font-mono);
  font-size: clamp(0.88rem, 1.5vw, 0.98rem);
  font-weight: 600;
}
/* Defeat the prose-list bullet/star + indent for this list specifically */
.pbs-ccpp-contents .ccpp-cta__terms-list li {
  padding-left: 0;
  max-width: none;
  position: static;
}
.pbs-ccpp-contents .ccpp-cta__terms-list li::before { content: none; }
.pbs-ccpp-contents .ccpp-cta__terms-list b {
  color: var(--pbs-green);
  font-weight: 700;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .pbs-ccpp-contents { font-size: 15px; }
  .pbs-ccpp-contents .ccpp-badge { font-size: 1rem; padding: 7px 16px; }
}

/* ---- Print ---- */
@media print {
  .pbs-ccpp-contents .ccpp-card,
  .pbs-ccpp-contents .ccpp-hero { box-shadow: none; break-inside: avoid; }
  .pbs-ccpp-contents .ccpp-hero { background: #fff; color: #000; }
  .pbs-ccpp-contents pre { background: #f4f4f4; color: #000; box-shadow: none; }
  .pbs-ccpp-contents pre .tok-comment,
  .pbs-ccpp-contents pre .tok-cmd,
  .pbs-ccpp-contents pre .tok-flag,
  .pbs-ccpp-contents pre .tok-path { color: #000; }
  .pbs-ccpp-contents code { background: #eee; }
  .pbs-ccpp-contents a { text-decoration: none; }
}
