.example-walkthrough {
  scroll-margin-top: 88px;
  /* Count the space above the paper toward the shared hero inset. */
  padding-block-start: calc(var(--hero-inset) - var(--section-margin) / 2);
}
.walkthrough-catalog-link svg { rotate: 180deg; }
.example-walkthrough .walkthrough-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  row-gap: clamp(1.5rem, 4vw, 3.25rem);
}
@media (min-width: 960px) {
  .example-walkthrough .walkthrough-showcase {
    --walkthrough-column-gap: calc(var(--content-column-spacing) * var(--content-gap-scale));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--walkthrough-column-gap);
  }
  .walkthrough-intro h1 { text-box: trim-start cap alphabetic; }
  .walkthrough-intro h1 span { display: block; }
}
.example-walkthrough .walkthrough-intro .lede { margin: 1.15rem 0 1.45rem; font-size: clamp(1.03rem, 1.5vw, 1.2rem); }
.example-walkthrough .walkthrough-preview { min-width: 0; margin: 0; }
.example-walkthrough .walkthrough-preview img {
  width: 100%; height: auto; border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: var(--surface); box-shadow: 0 20px 40px -22px #273c6a66;
}
@media (width > 980px) {
  .example-walkthrough { container-type: inline-size; }
  .example-walkthrough .walkthrough-preview {
    /* From the second column's start to the paper edge, up to twice the column width. */
    inline-size: min(200%, 50cqi - var(--walkthrough-column-gap) / 2);
  }
  .example-walkthrough .walkthrough-preview img { border-radius: 1rem 0 0 1rem; }
}
.example-walkthrough .walkthrough-preview figcaption { margin-top: var(--hero-caption-gap); color: var(--muted); font-size: .875rem; }
.walkthrough-section { margin-top: calc(var(--section-margin) * 1.5); }
.walkthrough-section-title { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; text-align: center; }
@media (width <= 980px) {
  .walkthrough-section-title { font-size: clamp(2rem, 1.8rem + 1vw, 2.375rem); }
}
.walkthrough-extensions .grid { gap: 28px var(--feature-column-gap); }
.walkthrough-extensions .link-arrow { margin-top: 16px; }
.example-walkthrough .walkthrough-guide { scroll-margin-top: 90px; }
.walkthrough-guide-icon {
  display: inline-block; width: 18px; height: 18px;
  margin-inline-end: .25em; vertical-align: -.15em; color: var(--blue-300);
}
.walkthrough-prerequisites dl {
  column-gap: calc(var(--content-column-spacing) * var(--content-gap-scale));
  margin: 16px 0;
}
.example-walkthrough .walkthrough-prerequisites dt { font-weight: 650; }
.example-walkthrough .walkthrough-prerequisites dd { margin: 6px 0 0; color: var(--text-2); }
.example-walkthrough .walkthrough-prerequisites p { margin-top: 12px; color: var(--text-2); }
.walkthrough-steps {
  --step-gap: clamp(18px, 2vw, 24px);
  padding: 0; margin-block-end: 0; list-style: none;
}
.walkthrough-steps > li + li { border-top: 1px solid var(--line-strong); }
.walkthrough-step { scroll-margin-top: 88px; }
.walkthrough-step > summary { display: block; padding-block: clamp(18px, 2.3vw, 28px); cursor: pointer; list-style: none; }
.walkthrough-step > summary::-webkit-details-marker { display: none; }
.walkthrough-step > summary:focus-visible { outline-offset: -2px; }
.walkthrough-step > summary:is(:hover, :focus-visible) { color: var(--blue-500); }
.walkthrough-step > summary:is(:hover, :focus-visible) .walkthrough-step-action { text-decoration-color: currentColor; }
.walkthrough-step-heading {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline; gap: 8px .45em; text-wrap: wrap;
}
.walkthrough-step-action { align-self: center; margin-inline-start: 12px; white-space: nowrap; }
.walkthrough-step:not([open]) .walkthrough-step-open, .walkthrough-step[open] .walkthrough-step-closed { display: none; }
.walkthrough-step[open] .walkthrough-step-action svg { transform: rotate(180deg); }
.walkthrough-step-content, .walkthrough-step-substeps {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--step-gap);
}
.walkthrough-step > .walkthrough-step-content { padding-block: 4px clamp(32px, 4vw, 56px); }
.example-walkthrough .walkthrough-step-content > :is(p, .walkthrough-command, .walkthrough-details, .walkthrough-fields) { margin-block: 0; }
.walkthrough-step-content > h4:not(:first-child), .walkthrough-step-content .walkthrough-details > .walkthrough-step-content { margin-top: var(--step-gap); }
.walkthrough-step-content a:not(.btn) { color: var(--blue-500); text-decoration: underline; }
.walkthrough-step-content > .btn { justify-self: start; min-height: var(--h); height: auto; padding-block: 8px; text-align: center; }
.walkthrough-step-substeps { gap: clamp(32px, 4vw, 56px); padding: 0; margin: 0; list-style: none; }
.example-walkthrough .walkthrough-command {
  border-radius: 8px; padding: .7rem .9rem; margin: .7rem 0;
  color: #fff; background: #111627; border: 1px solid #29334b;
}
.example-walkthrough .walkthrough-command :focus-visible { outline: 2px solid #9cb4ff; outline-offset: 2px; }
.example-walkthrough .walkthrough-command header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.example-walkthrough .walkthrough-command header span { font-size: .875rem; color: #c3cee5; }
.example-walkthrough .walkthrough-command button {
  flex: 0 0 auto; min-height: 34px; padding: .25rem .6rem; color: #fff;
  border: 1px solid #6c7d9f; border-radius: 5px; font: inherit; font-size: .875rem;
}
.example-walkthrough .walkthrough-command button:hover { background: #263651; }
.example-walkthrough .walkthrough-command button:disabled { opacity: .5; cursor: default; }
.example-walkthrough .walkthrough-command pre {
  margin: .55rem 0 0; max-width: 100%; overflow-x: auto;
  font-family: var(--font-mono); font-size: .875rem; line-height: 1.55;
}
.example-walkthrough .walkthrough-command pre.walkthrough-prompt { white-space: pre-wrap; overflow-wrap: anywhere; }
.example-walkthrough .walkthrough-copy-message:empty, .example-walkthrough .walkthrough-name-error:empty { display: none; }
.example-walkthrough .walkthrough-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: .75rem 0; }
.example-walkthrough .walkthrough-fields label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 600; }
.example-walkthrough .walkthrough-fields input {
  width: 100%; min-width: 0; padding: .55rem .6rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px;
}
.example-walkthrough .walkthrough-name-error { color: #8d261e; font-size: .9rem; }
.example-walkthrough code { overflow-wrap: anywhere; }
.example-walkthrough .walkthrough-details { margin: .65rem 0; }
.example-walkthrough .walkthrough-details summary { cursor: pointer; font-weight: 650; }
@media (width < 960px) {
  .example-walkthrough .walkthrough-intro .lede { max-width: 38rem; }
}
@media (max-width: 600px) {
  .example-walkthrough .walkthrough-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .walkthrough-step-heading { grid-template-columns: auto minmax(0, 1fr); }
  .walkthrough-step-action { grid-column: 2; justify-self: start; margin-inline-start: 0; }
}
