/* Pattern step blocks written by CrochetManager's Pattern Writer.
   Each step = heading, Pattern instruction, Beginner explanation, photo, Checkpoint. */
.cs-prose h3 { margin-top: 38px; }
.cs-prose h4 {
  margin: 30px 0 10px; font-family: var(--cs-serif); font-weight: 500;
  font-size: clamp(19px, 2vw, 22px); line-height: 1.25; color: var(--cs-ink);
  scroll-margin-top: calc(var(--cs-header-h, 78px) + 16px);
}

.cs-prose .cs-step-instruction,
.cs-prose .cs-step-beginner,
.cs-prose .cs-step-checkpoint { margin: 0 0 12px; }

.cs-prose .cs-step-instruction {
  padding: 14px 18px; border-left: 4px solid var(--cs-green); border-radius: 0 12px 12px 0;
  background: var(--cs-panel-2); color: var(--cs-ink); line-height: 1.6;
}
/* Row-by-row lists directly under the label belong to the instruction. */
.cs-prose .cs-step-instruction + .wp-block-list {
  margin: -12px 0 14px; padding: 4px 18px 12px 38px; border-left: 4px solid var(--cs-green);
  border-radius: 0 0 12px 0; background: var(--cs-panel-2); line-height: 1.65;
}
.cs-prose .cs-step-instruction + .wp-block-list li { margin: 6px 0; padding-left: 4px; }

.cs-prose .cs-step-beginner {
  padding: 2px 0 2px 18px; border-left: 2px dashed var(--cs-line-3); color: var(--cs-muted); line-height: 1.7;
}

.cs-prose .cs-step-checkpoint {
  padding: 12px 16px; border: 1px solid var(--cs-sage); border-radius: 12px;
  background: color-mix(in srgb, var(--cs-sage) 12%, var(--cs-panel)); color: var(--cs-ink); line-height: 1.6;
}

.cs-prose .cs-step-instruction > strong:first-child,
.cs-prose .cs-step-beginner > strong:first-child,
.cs-prose .cs-step-checkpoint > strong:first-child {
  display: block; margin-bottom: 3px; font-family: var(--cs-sans); font-size: 11.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.cs-prose .cs-step-instruction > strong:first-child { color: var(--cs-green); }
.cs-prose .cs-step-beginner > strong:first-child { color: var(--cs-taupe); }
.cs-prose .cs-step-checkpoint > strong:first-child { color: #4F6B4B; }

/* Step photographs sit inside the step, between explanation and checkpoint. */
.cs-prose .cs-step-beginner + .wp-block-image { margin: 14px 0 14px; }

@media print {
  .cs-prose .cs-step-instruction, .cs-prose .cs-step-beginner, .cs-prose .cs-step-checkpoint,
  .cs-prose .cs-step-instruction + .wp-block-list { break-inside: avoid; background: none; }
  .cs-prose .cs-step-instruction, .cs-prose .cs-step-instruction + .wp-block-list { border-left: 3px solid #000; }
  .cs-prose .cs-step-checkpoint { border: 1px solid #666; }
  .cs-prose .cs-step-beginner { border-left: 1px dashed #666; }
  .cs-prose h3, .cs-prose h4 { break-after: avoid; }
  .cs-prose .wp-block-image { break-inside: avoid; max-height: 8cm; }
  .cs-prose .wp-block-image img { max-height: 8cm; width: auto; }
  [data-cs-jump] { display: none !important; }
}
