/* One step of the Unisson documentation model (.steps > li, its ::before circle and ::after line, .prose h3, .prose p,
   .prose code). The host is the list item; bythium-pack-steps gives it the listitem role and the counter. No motion. */
:host {
  --mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  position: relative;
  display: block;
  min-inline-size: 0;
  /* An enclosing section may tighten the step (bythium-pack-how: 30 px, 19 px headings, muted 15.5 px text of 58ch). */
  padding: 0 0 var(--pack-step-gap, 34px) 56px;
  color: var(--pack-ink);
  font: 16px / 1.6 var(--sans);
  font-feature-settings: normal;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}
:host([hidden]) {
  display: none;
}
:host(:last-child) {
  padding-block-end: 0;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
[part="number"] {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: -2px;
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border-radius: 50%;
  font: 800 14px var(--mono);
  color: var(--pack-btnink);
  /* In sRGB: the tokens are oklch, which gradients would otherwise blend in oklab; the model blends its hex in sRGB. */
  background: linear-gradient(in srgb 135deg, var(--pack-btn1), var(--pack-btn2));
  box-shadow: 0 0 22px -2px var(--pack-a2);
}
/* No number given: the rank in bythium-pack-steps, from the counter the list resets. */
[part="number"]:empty::before {
  content: counter(pack-step);
}
[part="line"] {
  position: absolute;
  inset-inline-start: 17px;
  inset-block: 42px 6px;
  inline-size: 2px;
  border-radius: 2px;
  background: linear-gradient(in srgb, var(--pack-c2), transparent);
}
:host(:last-child) [part="line"] {
  display: none;
}
[part="heading"] {
  margin: 2px 0 0;
  font: 700 var(--pack-step-heading-size, 20px) / 1.3 var(--sans);
  letter-spacing: -0.02em;
  scroll-margin-block-start: 90px;
}
[part="text"] {
  margin: var(--pack-step-text-gap, 8px) 0 0;
  max-inline-size: var(--pack-step-text-max, 70ch);
  color: var(--pack-step-text-color, inherit);
  font-size: var(--pack-step-text-size, inherit);
}
code {
  font: 600 0.88em var(--mono);
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--pack-panel2);
  border: 1px solid var(--pack-line);
  color: var(--pack-ink);
  overflow-wrap: anywhere;
}
/* The code panel sits 18 px under the text, as .code does in the model. */
::slotted(*) {
  margin-block-start: 18px;
}
@media (max-width: 700px) {
  :host {
    padding-inline-start: 48px;
  }
  [part="heading"] {
    scroll-margin-block-start: 150px;
  }
}
@media (forced-colors: active) {
  [part="number"] {
    border: 1px solid CanvasText;
  }
  [part="line"] {
    background: CanvasText;
  }
  code {
    border-color: CanvasText;
  }
}
